From 4b248d403cebb433b65abf63c68d402c5ea1e175 Mon Sep 17 00:00:00 2001 From: Cris Di Sclafani Date: Fri, 12 Mar 2021 14:18:29 +0100 Subject: [PATCH] Built motion from commit (unavailable).|2.5.21 --- apidoc/api_data.js | 2 +- apidoc/api_data.json | 2 +- apidoc/api_project.js | 2 +- apidoc/api_project.json | 2 +- package.json | 3 +- public/app/main/apps/analytics/i18n/es.json | 2 +- public/app/main/apps/callysquare/i18n/ar.json | 2 +- public/app/main/apps/callysquare/i18n/cs.json | 2 +- public/app/main/apps/callysquare/i18n/da.json | 2 +- public/app/main/apps/callysquare/i18n/de.json | 2 +- public/app/main/apps/callysquare/i18n/en.json | 2 +- public/app/main/apps/callysquare/i18n/es.json | 10 +- public/app/main/apps/callysquare/i18n/et.json | 2 +- public/app/main/apps/callysquare/i18n/fa.json | 2 +- public/app/main/apps/callysquare/i18n/fi.json | 2 +- public/app/main/apps/callysquare/i18n/fr.json | 2 +- public/app/main/apps/callysquare/i18n/he.json | 2 +- public/app/main/apps/callysquare/i18n/hi.json | 2 +- public/app/main/apps/callysquare/i18n/id.json | 2 +- public/app/main/apps/callysquare/i18n/it.json | 2 +- public/app/main/apps/callysquare/i18n/ja.json | 2 +- public/app/main/apps/callysquare/i18n/ko.json | 2 +- public/app/main/apps/callysquare/i18n/lt.json | 2 +- public/app/main/apps/callysquare/i18n/lv.json | 2 +- public/app/main/apps/callysquare/i18n/nl.json | 2 +- public/app/main/apps/callysquare/i18n/no.json | 2 +- public/app/main/apps/callysquare/i18n/pl.json | 2 +- public/app/main/apps/callysquare/i18n/pt-BR.json | 2 +- public/app/main/apps/callysquare/i18n/pt-PT.json | 2 +- public/app/main/apps/callysquare/i18n/ru.json | 2 +- public/app/main/apps/callysquare/i18n/sv.json | 2 +- public/app/main/apps/callysquare/i18n/tr.json | 2 +- public/app/main/apps/callysquare/i18n/zh-CN.json | 2 +- public/app/main/apps/callysquare/i18n/zh-TW.json | 2 +- public/app/main/apps/chat/i18n/de.json | 266 ++-- public/app/main/apps/chat/i18n/en.json | 6 + public/app/main/apps/chat/i18n/es.json | 24 +- public/app/main/apps/contactmanager/i18n/en.json | 8 +- public/app/main/apps/contactmanager/i18n/es.json | 16 +- public/app/main/apps/contactmanager/i18n/it.json | 8 +- public/app/main/apps/dashboards/i18n/ar.json | 3 +- public/app/main/apps/dashboards/i18n/cs.json | 3 +- public/app/main/apps/dashboards/i18n/da.json | 3 +- public/app/main/apps/dashboards/i18n/de.json | 3 +- public/app/main/apps/dashboards/i18n/en.json | 1 + public/app/main/apps/dashboards/i18n/es.json | 45 +- public/app/main/apps/dashboards/i18n/et.json | 3 +- public/app/main/apps/dashboards/i18n/fa.json | 3 +- public/app/main/apps/dashboards/i18n/fi.json | 3 +- public/app/main/apps/dashboards/i18n/fr.json | 3 +- public/app/main/apps/dashboards/i18n/he.json | 3 +- public/app/main/apps/dashboards/i18n/hi.json | 3 +- public/app/main/apps/dashboards/i18n/id.json | 3 +- public/app/main/apps/dashboards/i18n/it.json | 1 + public/app/main/apps/dashboards/i18n/ja.json | 3 +- public/app/main/apps/dashboards/i18n/ko.json | 3 +- public/app/main/apps/dashboards/i18n/lt.json | 3 +- public/app/main/apps/dashboards/i18n/lv.json | 3 +- public/app/main/apps/dashboards/i18n/nl.json | 3 +- public/app/main/apps/dashboards/i18n/no.json | 3 +- public/app/main/apps/dashboards/i18n/pl.json | 3 +- public/app/main/apps/dashboards/i18n/pt-BR.json | 3 +- public/app/main/apps/dashboards/i18n/pt-PT.json | 3 +- public/app/main/apps/dashboards/i18n/ru.json | 3 +- public/app/main/apps/dashboards/i18n/sv.json | 3 +- public/app/main/apps/dashboards/i18n/tr.json | 3 +- public/app/main/apps/dashboards/i18n/zh-CN.json | 3 +- public/app/main/apps/dashboards/i18n/zh-TW.json | 3 +- public/app/main/apps/integrations/i18n/ar.json | 3 +- public/app/main/apps/integrations/i18n/cs.json | 3 +- public/app/main/apps/integrations/i18n/da.json | 3 +- public/app/main/apps/integrations/i18n/de.json | 3 +- public/app/main/apps/integrations/i18n/es.json | 3 +- public/app/main/apps/integrations/i18n/et.json | 3 +- public/app/main/apps/integrations/i18n/fa.json | 3 +- public/app/main/apps/integrations/i18n/fi.json | 3 +- public/app/main/apps/integrations/i18n/fr.json | 3 +- public/app/main/apps/integrations/i18n/he.json | 3 +- public/app/main/apps/integrations/i18n/hi.json | 3 +- public/app/main/apps/integrations/i18n/id.json | 3 +- public/app/main/apps/integrations/i18n/ja.json | 3 +- public/app/main/apps/integrations/i18n/ko.json | 3 +- public/app/main/apps/integrations/i18n/lt.json | 3 +- public/app/main/apps/integrations/i18n/lv.json | 3 +- public/app/main/apps/integrations/i18n/nl.json | 3 +- public/app/main/apps/integrations/i18n/no.json | 3 +- public/app/main/apps/integrations/i18n/pl.json | 3 +- public/app/main/apps/integrations/i18n/pt-BR.json | 3 +- public/app/main/apps/integrations/i18n/pt-PT.json | 3 +- public/app/main/apps/integrations/i18n/ru.json | 3 +- public/app/main/apps/integrations/i18n/sv.json | 3 +- public/app/main/apps/integrations/i18n/tr.json | 3 +- public/app/main/apps/integrations/i18n/zh-CN.json | 3 +- public/app/main/apps/integrations/i18n/zh-TW.json | 3 +- public/app/main/apps/mail/i18n/ar.json | 6 +- public/app/main/apps/mail/i18n/cs.json | 6 +- public/app/main/apps/mail/i18n/da.json | 6 +- public/app/main/apps/mail/i18n/de.json | 6 +- public/app/main/apps/mail/i18n/en.json | 2 + public/app/main/apps/mail/i18n/es.json | 30 +- public/app/main/apps/mail/i18n/et.json | 6 +- public/app/main/apps/mail/i18n/fa.json | 6 +- public/app/main/apps/mail/i18n/fi.json | 6 +- public/app/main/apps/mail/i18n/fr.json | 6 +- public/app/main/apps/mail/i18n/he.json | 6 +- public/app/main/apps/mail/i18n/hi.json | 6 +- public/app/main/apps/mail/i18n/id.json | 6 +- public/app/main/apps/mail/i18n/it.json | 2 + public/app/main/apps/mail/i18n/ja.json | 6 +- public/app/main/apps/mail/i18n/ko.json | 6 +- public/app/main/apps/mail/i18n/lt.json | 6 +- public/app/main/apps/mail/i18n/lv.json | 6 +- public/app/main/apps/mail/i18n/nl.json | 6 +- public/app/main/apps/mail/i18n/no.json | 6 +- public/app/main/apps/mail/i18n/pl.json | 6 +- public/app/main/apps/mail/i18n/pt-BR.json | 6 +- public/app/main/apps/mail/i18n/pt-PT.json | 6 +- public/app/main/apps/mail/i18n/ru.json | 6 +- public/app/main/apps/mail/i18n/sv.json | 6 +- public/app/main/apps/mail/i18n/tr.json | 6 +- public/app/main/apps/mail/i18n/zh-CN.json | 6 +- public/app/main/apps/mail/i18n/zh-TW.json | 6 +- public/app/main/apps/motiondialer/i18n/es.json | 16 +- public/app/main/apps/settings/i18n/ar.json | 10 +- public/app/main/apps/settings/i18n/cs.json | 10 +- public/app/main/apps/settings/i18n/da.json | 10 +- public/app/main/apps/settings/i18n/de.json | 10 +- public/app/main/apps/settings/i18n/en.json | 8 +- public/app/main/apps/settings/i18n/es.json | 10 +- public/app/main/apps/settings/i18n/et.json | 10 +- public/app/main/apps/settings/i18n/fa.json | 10 +- public/app/main/apps/settings/i18n/fi.json | 10 +- public/app/main/apps/settings/i18n/fr.json | 10 +- public/app/main/apps/settings/i18n/he.json | 10 +- public/app/main/apps/settings/i18n/hi.json | 10 +- public/app/main/apps/settings/i18n/id.json | 10 +- public/app/main/apps/settings/i18n/it.json | 8 +- public/app/main/apps/settings/i18n/ja.json | 10 +- public/app/main/apps/settings/i18n/ko.json | 10 +- public/app/main/apps/settings/i18n/lt.json | 10 +- public/app/main/apps/settings/i18n/lv.json | 10 +- public/app/main/apps/settings/i18n/nl.json | 10 +- public/app/main/apps/settings/i18n/no.json | 10 +- public/app/main/apps/settings/i18n/pl.json | 10 +- public/app/main/apps/settings/i18n/pt-BR.json | 10 +- public/app/main/apps/settings/i18n/pt-PT.json | 10 +- public/app/main/apps/settings/i18n/ru.json | 10 +- public/app/main/apps/settings/i18n/sv.json | 10 +- public/app/main/apps/settings/i18n/tr.json | 10 +- public/app/main/apps/settings/i18n/zh-CN.json | 10 +- public/app/main/apps/settings/i18n/zh-TW.json | 10 +- public/app/main/apps/sms/i18n/ar.json | 8 +- public/app/main/apps/sms/i18n/cs.json | 8 +- public/app/main/apps/sms/i18n/da.json | 8 +- public/app/main/apps/sms/i18n/de.json | 8 +- public/app/main/apps/sms/i18n/en.json | 4 + public/app/main/apps/sms/i18n/es.json | 8 +- public/app/main/apps/sms/i18n/et.json | 8 +- public/app/main/apps/sms/i18n/fa.json | 8 +- public/app/main/apps/sms/i18n/fi.json | 8 +- public/app/main/apps/sms/i18n/fr.json | 8 +- public/app/main/apps/sms/i18n/he.json | 8 +- public/app/main/apps/sms/i18n/hi.json | 8 +- public/app/main/apps/sms/i18n/id.json | 8 +- public/app/main/apps/sms/i18n/it.json | 8 +- public/app/main/apps/sms/i18n/ja.json | 8 +- public/app/main/apps/sms/i18n/ko.json | 8 +- public/app/main/apps/sms/i18n/lt.json | 8 +- public/app/main/apps/sms/i18n/lv.json | 8 +- public/app/main/apps/sms/i18n/nl.json | 8 +- public/app/main/apps/sms/i18n/no.json | 8 +- public/app/main/apps/sms/i18n/pl.json | 8 +- public/app/main/apps/sms/i18n/pt-BR.json | 8 +- public/app/main/apps/sms/i18n/pt-PT.json | 8 +- public/app/main/apps/sms/i18n/ru.json | 8 +- public/app/main/apps/sms/i18n/sv.json | 8 +- public/app/main/apps/sms/i18n/tr.json | 8 +- public/app/main/apps/sms/i18n/zh-CN.json | 8 +- public/app/main/apps/sms/i18n/zh-TW.json | 8 +- public/app/main/apps/tools/i18n/ar.json | 3 +- public/app/main/apps/tools/i18n/cs.json | 3 +- public/app/main/apps/tools/i18n/da.json | 3 +- public/app/main/apps/tools/i18n/de.json | 3 +- public/app/main/apps/tools/i18n/en.json | 1 + public/app/main/apps/tools/i18n/es.json | 19 +- public/app/main/apps/tools/i18n/et.json | 3 +- public/app/main/apps/tools/i18n/fa.json | 3 +- public/app/main/apps/tools/i18n/fi.json | 3 +- public/app/main/apps/tools/i18n/fr.json | 3 +- public/app/main/apps/tools/i18n/he.json | 11 +- public/app/main/apps/tools/i18n/hi.json | 3 +- public/app/main/apps/tools/i18n/id.json | 3 +- public/app/main/apps/tools/i18n/it.json | 1 + public/app/main/apps/tools/i18n/ja.json | 3 +- public/app/main/apps/tools/i18n/ko.json | 3 +- public/app/main/apps/tools/i18n/lt.json | 3 +- public/app/main/apps/tools/i18n/lv.json | 3 +- public/app/main/apps/tools/i18n/nl.json | 3 +- public/app/main/apps/tools/i18n/no.json | 3 +- public/app/main/apps/tools/i18n/pl.json | 3 +- public/app/main/apps/tools/i18n/pt-BR.json | 3 +- public/app/main/apps/tools/i18n/pt-PT.json | 3 +- public/app/main/apps/tools/i18n/ru.json | 3 +- public/app/main/apps/tools/i18n/sv.json | 3 +- public/app/main/apps/tools/i18n/tr.json | 3 +- public/app/main/apps/tools/i18n/zh-CN.json | 3 +- public/app/main/apps/tools/i18n/zh-TW.json | 3 +- public/app/main/apps/voice/i18n/es.json | 16 +- public/app/main/apps/voice/i18n/he.json | 16 +- public/app/main/apps/whatsapp/i18n/es.json | 24 +- public/app/toolbar/i18n/ar.json | 4 +- public/app/toolbar/i18n/cs.json | 4 +- public/app/toolbar/i18n/da.json | 4 +- public/app/toolbar/i18n/de.json | 4 +- public/app/toolbar/i18n/en.json | 4 +- public/app/toolbar/i18n/es.json | 4 +- public/app/toolbar/i18n/et.json | 4 +- public/app/toolbar/i18n/fa.json | 4 +- public/app/toolbar/i18n/fi.json | 4 +- public/app/toolbar/i18n/fr.json | 4 +- public/app/toolbar/i18n/he.json | 4 +- public/app/toolbar/i18n/hi.json | 4 +- public/app/toolbar/i18n/id.json | 4 +- public/app/toolbar/i18n/it.json | 4 +- public/app/toolbar/i18n/ja.json | 4 +- public/app/toolbar/i18n/ko.json | 4 +- public/app/toolbar/i18n/lt.json | 4 +- public/app/toolbar/i18n/lv.json | 4 +- public/app/toolbar/i18n/nl.json | 4 +- public/app/toolbar/i18n/no.json | 4 +- public/app/toolbar/i18n/pl.json | 4 +- public/app/toolbar/i18n/pt-BR.json | 4 +- public/app/toolbar/i18n/pt-PT.json | 4 +- public/app/toolbar/i18n/ru.json | 4 +- public/app/toolbar/i18n/sv.json | 4 +- public/app/toolbar/i18n/tr.json | 4 +- public/app/toolbar/i18n/zh-CN.json | 4 +- public/app/toolbar/i18n/zh-TW.json | 4 +- .../plugins/square/stencils/tts/tts_128x128.png | Bin 21276 -> 22003 bytes public/index.html | 4 +- public/scripts/app.ba2d32d9.js | 1 + public/scripts/app.f6dd99bd.js | 1 - public/styles/app.9fde47c2.css | 1 + public/styles/app.bff19739.css | 1 - .../UserChatInteraction.attributes.js | 2 +- .../UserChatInteraction.controller.js | 2 +- .../UserChatInteraction.model.js | 2 +- .../UserChatInteraction/UserChatInteraction.rpc.js | 2 +- server/api/UserChatInteraction/index.js | 2 +- .../UserFaxInteraction.attributes.js | 2 +- .../UserFaxInteraction.controller.js | 2 +- .../UserFaxInteraction/UserFaxInteraction.model.js | 2 +- .../UserFaxInteraction/UserFaxInteraction.rpc.js | 2 +- server/api/UserFaxInteraction/index.js | 2 +- .../UserMailInteraction.attributes.js | 2 +- .../UserMailInteraction.controller.js | 2 +- .../UserMailInteraction.model.js | 2 +- .../UserMailInteraction/UserMailInteraction.rpc.js | 2 +- server/api/UserMailInteraction/index.js | 2 +- .../UserOpenchannelInteraction.attributes.js | 2 +- .../UserOpenchannelInteraction.controller.js | 2 +- .../UserOpenchannelInteraction.model.js | 2 +- .../UserOpenchannelInteraction.rpc.js | 2 +- server/api/UserOpenchannelInteraction/index.js | 2 +- .../UserSmsInteraction.attributes.js | 2 +- .../UserSmsInteraction.controller.js | 2 +- .../UserSmsInteraction/UserSmsInteraction.model.js | 2 +- .../UserSmsInteraction/UserSmsInteraction.rpc.js | 2 +- server/api/UserSmsInteraction/index.js | 2 +- .../UserWhatsappInteraction.attributes.js | 2 +- .../UserWhatsappInteraction.controller.js | 2 +- .../UserWhatsappInteraction.model.js | 2 +- .../UserWhatsappInteraction.rpc.js | 2 +- server/api/UserWhatsappInteraction/index.js | 2 +- server/api/action/action.attributes.js | 2 +- server/api/action/action.controller.js | 2 +- server/api/action/action.model.js | 2 +- server/api/action/action.rpc.js | 2 +- server/api/action/index.js | 2 +- .../analyticCustomReport.attributes.js | 2 +- .../analyticCustomReport.controller.js | 2 +- .../analyticCustomReport.model.js | 2 +- .../analyticCustomReport.rpc.js | 2 +- server/api/analyticCustomReport/index.js | 2 +- .../analyticDefaultReport.attributes.js | 2 +- .../analyticDefaultReport.controller.js | 2 +- .../analyticDefaultReport.model.js | 2 +- .../analyticDefaultReport.rpc.js | 2 +- server/api/analyticDefaultReport/index.js | 2 +- .../analyticExtractedReport.attributes.js | 2 +- .../analyticExtractedReport.controller.js | 2 +- .../analyticExtractedReport.model.js | 2 +- .../analyticExtractedReport.rpc.js | 2 +- server/api/analyticExtractedReport/index.js | 2 +- .../analyticFieldReport.attributes.js | 2 +- .../analyticFieldReport.controller.js | 2 +- .../analyticFieldReport.model.js | 2 +- .../analyticFieldReport/analyticFieldReport.rpc.js | 2 +- server/api/analyticFieldReport/index.js | 2 +- .../analyticMetric/analyticMetric.attributes.js | 2 +- .../analyticMetric/analyticMetric.controller.js | 2 +- server/api/analyticMetric/analyticMetric.model.js | 2 +- server/api/analyticMetric/analyticMetric.rpc.js | 2 +- server/api/analyticMetric/index.js | 2 +- .../analyticTreeReport.attributes.js | 2 +- .../analyticTreeReport.controller.js | 2 +- .../analyticTreeReport/analyticTreeReport.model.js | 2 +- .../analyticTreeReport/analyticTreeReport.rpc.js | 2 +- server/api/analyticTreeReport/index.js | 2 +- server/api/attachment/attachment.attributes.js | 2 +- server/api/attachment/attachment.controller.js | 2 +- server/api/attachment/attachment.model.js | 2 +- server/api/attachment/attachment.rpc.js | 2 +- server/api/attachment/index.js | 2 +- server/api/authGoogle/authGoogle.controller.js | 2 +- server/api/authGoogle/index.js | 2 +- server/api/authLocal/authLocal.controller.js | 2 +- server/api/authLocal/index.js | 2 +- server/api/automation/automation.attributes.js | 2 +- server/api/automation/automation.controller.js | 2 +- server/api/automation/automation.model.js | 2 +- server/api/automation/automation.rpc.js | 2 +- server/api/automation/index.js | 2 +- server/api/campaign/campaign.attributes.js | 2 +- server/api/campaign/campaign.controller.js | 2 +- server/api/campaign/campaign.model.js | 2 +- server/api/campaign/campaign.rpc.js | 2 +- server/api/campaign/index.js | 2 +- server/api/cannedAnswer/cannedAnswer.attributes.js | 2 +- server/api/cannedAnswer/cannedAnswer.controller.js | 2 +- server/api/cannedAnswer/cannedAnswer.model.js | 2 +- server/api/cannedAnswer/cannedAnswer.rpc.js | 2 +- server/api/cannedAnswer/index.js | 2 +- server/api/cdr/cdr.attributes.js | 2 +- server/api/cdr/cdr.controller.js | 2 +- server/api/cdr/cdr.model.js | 2 +- server/api/cdr/cdr.rpc.js | 2 +- server/api/cdr/index.js | 2 +- .../chatApplication/chatApplication.attributes.js | 2 +- .../chatApplication/chatApplication.controller.js | 2 +- .../api/chatApplication/chatApplication.model.js | 2 +- server/api/chatApplication/chatApplication.rpc.js | 2 +- server/api/chatApplication/index.js | 2 +- server/api/chatGroup/chatGroup.attributes.js | 2 +- server/api/chatGroup/chatGroup.controller.js | 2 +- server/api/chatGroup/chatGroup.events.js | 2 +- server/api/chatGroup/chatGroup.model.js | 2 +- server/api/chatGroup/chatGroup.rpc.js | 2 +- server/api/chatGroup/chatGroup.socket.js | 2 +- server/api/chatGroup/index.js | 2 +- .../chatInteraction/chatInteraction.attributes.js | 2 +- .../chatInteraction/chatInteraction.controller.js | 2 +- .../api/chatInteraction/chatInteraction.events.js | 2 +- .../api/chatInteraction/chatInteraction.model.js | 2 +- server/api/chatInteraction/chatInteraction.rpc.js | 2 +- .../api/chatInteraction/chatInteraction.socket.js | 2 +- server/api/chatInteraction/index.js | 2 +- .../chatInternalMessage.attributes.js | 2 +- .../chatInternalMessage.controller.js | 2 +- .../chatInternalMessage.events.js | 2 +- .../chatInternalMessage.model.js | 2 +- .../chatInternalMessage/chatInternalMessage.rpc.js | 2 +- .../chatInternalMessage.socket.js | 2 +- server/api/chatInternalMessage/index.js | 2 +- server/api/chatMessage/chatMessage.attributes.js | 2 +- server/api/chatMessage/chatMessage.controller.js | 2 +- server/api/chatMessage/chatMessage.events.js | 2 +- server/api/chatMessage/chatMessage.model.js | 2 +- server/api/chatMessage/chatMessage.rpc.js | 2 +- server/api/chatMessage/chatMessage.socket.js | 2 +- server/api/chatMessage/index.js | 2 +- .../chatOfflineMessage.attributes.js | 2 +- .../chatOfflineMessage.controller.js | 2 +- .../chatOfflineMessage/chatOfflineMessage.model.js | 2 +- .../chatOfflineMessage/chatOfflineMessage.rpc.js | 2 +- server/api/chatOfflineMessage/index.js | 2 +- .../chatProactiveAction.attributes.js | 2 +- .../chatProactiveAction.controller.js | 2 +- .../chatProactiveAction.model.js | 2 +- .../chatProactiveAction/chatProactiveAction.rpc.js | 2 +- server/api/chatProactiveAction/index.js | 2 +- server/api/chatQueue/chatQueue.attributes.js | 2 +- server/api/chatQueue/chatQueue.controller.js | 2 +- server/api/chatQueue/chatQueue.events.js | 2 +- server/api/chatQueue/chatQueue.model.js | 2 +- server/api/chatQueue/chatQueue.rpc.js | 2 +- server/api/chatQueue/chatQueue.socket.js | 2 +- server/api/chatQueue/index.js | 2 +- .../chatQueueReport/chatQueueReport.attributes.js | 2 +- .../chatQueueReport/chatQueueReport.controller.js | 2 +- .../api/chatQueueReport/chatQueueReport.model.js | 2 +- server/api/chatQueueReport/chatQueueReport.rpc.js | 2 +- server/api/chatQueueReport/index.js | 2 +- .../chatTransferReport.attributes.js | 2 +- .../chatTransferReport.controller.js | 2 +- .../chatTransferReport/chatTransferReport.model.js | 2 +- .../chatTransferReport/chatTransferReport.rpc.js | 2 +- server/api/chatTransferReport/index.js | 2 +- server/api/chatWebsite/chatWebsite.attributes.js | 2 +- server/api/chatWebsite/chatWebsite.controller.js | 2 +- server/api/chatWebsite/chatWebsite.events.js | 2 +- server/api/chatWebsite/chatWebsite.model.js | 2 +- server/api/chatWebsite/chatWebsite.rpc.js | 2 +- server/api/chatWebsite/chatWebsite.socket.js | 2 +- server/api/chatWebsite/index.js | 2 +- .../api/cloudProvider/cloudProvider.attributes.js | 2 +- .../api/cloudProvider/cloudProvider.controller.js | 2 +- server/api/cloudProvider/cloudProvider.model.js | 2 +- server/api/cloudProvider/cloudProvider.rpc.js | 2 +- server/api/cloudProvider/index.js | 2 +- server/api/cmCompany/cmCompany.attributes.js | 2 +- server/api/cmCompany/cmCompany.controller.js | 2 +- server/api/cmCompany/cmCompany.model.js | 2 +- server/api/cmCompany/cmCompany.rpc.js | 2 +- server/api/cmCompany/index.js | 2 +- server/api/cmContact/cmContact.attributes.js | 2 +- server/api/cmContact/cmContact.controller.js | 2 +- server/api/cmContact/cmContact.events.js | 2 +- server/api/cmContact/cmContact.model.js | 2 +- server/api/cmContact/cmContact.rpc.js | 2 +- server/api/cmContact/cmContact.socket.js | 2 +- server/api/cmContact/index.js | 2 +- .../cmContactHasItem.attributes.js | 2 +- .../cmContactHasItem.controller.js | 2 +- .../api/cmContactHasItem/cmContactHasItem.model.js | 2 +- .../api/cmContactHasItem/cmContactHasItem.rpc.js | 2 +- server/api/cmContactHasItem/index.js | 2 +- .../cmContactHasPhone.attributes.js | 2 +- .../cmContactHasPhone.controller.js | 2 +- .../cmContactHasPhone/cmContactHasPhone.model.js | 2 +- .../api/cmContactHasPhone/cmContactHasPhone.rpc.js | 2 +- server/api/cmContactHasPhone/index.js | 2 +- .../api/cmCustomField/cmCustomField.attributes.js | 2 +- .../api/cmCustomField/cmCustomField.controller.js | 2 +- server/api/cmCustomField/cmCustomField.model.js | 2 +- server/api/cmCustomField/cmCustomField.rpc.js | 2 +- server/api/cmCustomField/index.js | 2 +- server/api/cmHopper/cmHopper.attributes.js | 2 +- server/api/cmHopper/cmHopper.controller.js | 2 +- server/api/cmHopper/cmHopper.model.js | 2 +- server/api/cmHopper/cmHopper.rpc.js | 2 +- server/api/cmHopper/index.js | 2 +- .../cmHopperAdditionalPhone.attributes.js | 2 +- .../cmHopperAdditionalPhone.controller.js | 2 +- .../cmHopperAdditionalPhone.model.js | 2 +- .../cmHopperAdditionalPhone.rpc.js | 2 +- server/api/cmHopperAdditionalPhone/index.js | 2 +- .../api/cmHopperBlack/cmHopperBlack.attributes.js | 2 +- .../api/cmHopperBlack/cmHopperBlack.controller.js | 2 +- server/api/cmHopperBlack/cmHopperBlack.model.js | 2 +- server/api/cmHopperBlack/cmHopperBlack.rpc.js | 2 +- server/api/cmHopperBlack/index.js | 2 +- .../api/cmHopperFinal/cmHopperFinal.attributes.js | 2 +- .../api/cmHopperFinal/cmHopperFinal.controller.js | 2 +- server/api/cmHopperFinal/cmHopperFinal.model.js | 2 +- server/api/cmHopperFinal/cmHopperFinal.rpc.js | 2 +- server/api/cmHopperFinal/index.js | 2 +- .../cmHopperHistory/cmHopperHistory.attributes.js | 2 +- .../cmHopperHistory/cmHopperHistory.controller.js | 2 +- .../api/cmHopperHistory/cmHopperHistory.model.js | 2 +- server/api/cmHopperHistory/cmHopperHistory.rpc.js | 2 +- server/api/cmHopperHistory/index.js | 2 +- server/api/cmList/cmList.attributes.js | 2 +- server/api/cmList/cmList.controller.js | 2 +- server/api/cmList/cmList.events.js | 2 +- server/api/cmList/cmList.model.js | 2 +- server/api/cmList/cmList.rpc.js | 2 +- server/api/cmList/cmList.socket.js | 2 +- server/api/cmList/index.js | 2 +- server/api/condition/condition.attributes.js | 2 +- server/api/condition/condition.controller.js | 2 +- server/api/condition/condition.model.js | 2 +- server/api/condition/condition.rpc.js | 2 +- server/api/condition/index.js | 2 +- .../contactItemType/contactItemType.attributes.js | 2 +- .../contactItemType/contactItemType.controller.js | 2 +- .../api/contactItemType/contactItemType.model.js | 2 +- server/api/contactItemType/contactItemType.rpc.js | 2 +- server/api/contactItemType/index.js | 2 +- server/api/dashboard/dashboard.attributes.js | 2 +- server/api/dashboard/dashboard.controller.js | 2 +- server/api/dashboard/dashboard.events.js | 2 +- server/api/dashboard/dashboard.model.js | 2 +- server/api/dashboard/dashboard.rpc.js | 2 +- server/api/dashboard/dashboard.socket.js | 2 +- server/api/dashboard/index.js | 2 +- .../api/dashboardItem/dashboardItem.attributes.js | 2 +- .../api/dashboardItem/dashboardItem.controller.js | 2 +- server/api/dashboardItem/dashboardItem.events.js | 2 +- server/api/dashboardItem/dashboardItem.model.js | 2 +- server/api/dashboardItem/dashboardItem.rpc.js | 2 +- server/api/dashboardItem/dashboardItem.socket.js | 2 +- server/api/dashboardItem/index.js | 2 +- server/api/disposition/disposition.attributes.js | 2 +- server/api/disposition/disposition.controller.js | 2 +- server/api/disposition/disposition.model.js | 2 +- server/api/disposition/disposition.rpc.js | 2 +- server/api/disposition/index.js | 2 +- server/api/faxAccount/faxAccount.attributes.js | 2 +- server/api/faxAccount/faxAccount.controller.js | 2 +- server/api/faxAccount/faxAccount.events.js | 2 +- server/api/faxAccount/faxAccount.model.js | 2 +- server/api/faxAccount/faxAccount.rpc.js | 2 +- server/api/faxAccount/faxAccount.socket.js | 2 +- server/api/faxAccount/index.js | 2 +- .../faxApplication/faxApplication.attributes.js | 2 +- .../faxApplication/faxApplication.controller.js | 2 +- server/api/faxApplication/faxApplication.model.js | 2 +- server/api/faxApplication/faxApplication.rpc.js | 2 +- server/api/faxApplication/index.js | 2 +- .../faxInteraction/faxInteraction.attributes.js | 2 +- .../faxInteraction/faxInteraction.controller.js | 2 +- server/api/faxInteraction/faxInteraction.events.js | 2 +- server/api/faxInteraction/faxInteraction.model.js | 2 +- server/api/faxInteraction/faxInteraction.rpc.js | 2 +- server/api/faxInteraction/faxInteraction.socket.js | 2 +- server/api/faxInteraction/index.js | 2 +- server/api/faxMessage/faxMessage.attributes.js | 2 +- server/api/faxMessage/faxMessage.controller.js | 2 +- server/api/faxMessage/faxMessage.events.js | 2 +- server/api/faxMessage/faxMessage.model.js | 2 +- server/api/faxMessage/faxMessage.rpc.js | 2 +- server/api/faxMessage/faxMessage.socket.js | 2 +- server/api/faxMessage/index.js | 2 +- server/api/faxQueue/faxQueue.attributes.js | 2 +- server/api/faxQueue/faxQueue.controller.js | 2 +- server/api/faxQueue/faxQueue.events.js | 2 +- server/api/faxQueue/faxQueue.model.js | 2 +- server/api/faxQueue/faxQueue.rpc.js | 2 +- server/api/faxQueue/faxQueue.socket.js | 2 +- server/api/faxQueue/index.js | 2 +- .../faxQueueReport/faxQueueReport.attributes.js | 2 +- .../faxQueueReport/faxQueueReport.controller.js | 2 +- server/api/faxQueueReport/faxQueueReport.model.js | 2 +- server/api/faxQueueReport/faxQueueReport.rpc.js | 2 +- server/api/faxQueueReport/index.js | 2 +- .../faxTransferReport.attributes.js | 2 +- .../faxTransferReport.controller.js | 2 +- .../faxTransferReport/faxTransferReport.model.js | 2 +- .../api/faxTransferReport/faxTransferReport.rpc.js | 2 +- server/api/faxTransferReport/index.js | 2 +- server/api/intDeskAccount/index.js | 2 +- .../intDeskAccount/intDeskAccount.attributes.js | 2 +- .../intDeskAccount/intDeskAccount.controller.js | 2 +- server/api/intDeskAccount/intDeskAccount.model.js | 2 +- server/api/intDeskAccount/intDeskAccount.rpc.js | 2 +- server/api/intDeskConfiguration/index.js | 2 +- .../intDeskConfiguration.attributes.js | 2 +- .../intDeskConfiguration.controller.js | 2 +- .../intDeskConfiguration.model.js | 2 +- .../intDeskConfiguration.rpc.js | 2 +- server/api/intDeskField/index.js | 2 +- server/api/intDeskField/intDeskField.attributes.js | 2 +- server/api/intDeskField/intDeskField.controller.js | 2 +- server/api/intDeskField/intDeskField.model.js | 2 +- server/api/intDeskField/intDeskField.rpc.js | 2 +- server/api/intDynamics365Account/index.js | 2 +- .../intDynamics365Account.attributes.js | 2 +- .../intDynamics365Account.controller.js | 2 +- .../intDynamics365Account.model.js | 2 +- .../intDynamics365Account.rpc.js | 2 +- server/api/intDynamics365Configuration/index.js | 2 +- .../intDynamics365Configuration.attributes.js | 2 +- .../intDynamics365Configuration.controller.js | 2 +- .../intDynamics365Configuration.model.js | 2 +- .../intDynamics365Configuration.rpc.js | 2 +- server/api/intDynamics365Field/index.js | 2 +- .../intDynamics365Field.attributes.js | 2 +- .../intDynamics365Field.controller.js | 2 +- .../intDynamics365Field.model.js | 2 +- .../intDynamics365Field/intDynamics365Field.rpc.js | 2 +- server/api/intFreshdeskAccount/index.js | 2 +- .../intFreshdeskAccount.attributes.js | 2 +- .../intFreshdeskAccount.controller.js | 2 +- .../intFreshdeskAccount.model.js | 2 +- .../intFreshdeskAccount/intFreshdeskAccount.rpc.js | 2 +- server/api/intFreshdeskConfiguration/index.js | 2 +- .../intFreshdeskConfiguration.attributes.js | 2 +- .../intFreshdeskConfiguration.controller.js | 2 +- .../intFreshdeskConfiguration.model.js | 2 +- .../intFreshdeskConfiguration.rpc.js | 2 +- server/api/intFreshdeskField/index.js | 2 +- .../intFreshdeskField.attributes.js | 2 +- .../intFreshdeskField.controller.js | 2 +- .../intFreshdeskField/intFreshdeskField.model.js | 2 +- .../api/intFreshdeskField/intFreshdeskField.rpc.js | 2 +- server/api/intFreshsalesAccount/index.js | 2 +- .../intFreshsalesAccount.attributes.js | 2 +- .../intFreshsalesAccount.controller.js | 2 +- .../intFreshsalesAccount.model.js | 2 +- .../intFreshsalesAccount.rpc.js | 2 +- server/api/intFreshsalesConfiguration/index.js | 2 +- .../intFreshsalesConfiguration.attributes.js | 2 +- .../intFreshsalesConfiguration.controller.js | 2 +- .../intFreshsalesConfiguration.model.js | 2 +- .../intFreshsalesConfiguration.rpc.js | 2 +- server/api/intFreshsalesField/index.js | 2 +- .../intFreshsalesField.attributes.js | 2 +- .../intFreshsalesField.controller.js | 2 +- .../intFreshsalesField/intFreshsalesField.model.js | 2 +- .../intFreshsalesField/intFreshsalesField.rpc.js | 2 +- server/api/intSalesforceAccount/index.js | 2 +- .../intSalesforceAccount.attributes.js | 2 +- .../intSalesforceAccount.controller.js | 2 +- .../intSalesforceAccount.model.js | 2 +- .../intSalesforceAccount.rpc.js | 2 +- server/api/intSalesforceConfiguration/index.js | 2 +- .../intSalesforceConfiguration.attributes.js | 2 +- .../intSalesforceConfiguration.controller.js | 2 +- .../intSalesforceConfiguration.model.js | 2 +- .../intSalesforceConfiguration.rpc.js | 2 +- server/api/intSalesforceField/index.js | 2 +- .../intSalesforceField.attributes.js | 2 +- .../intSalesforceField.controller.js | 2 +- .../intSalesforceField/intSalesforceField.model.js | 2 +- .../intSalesforceField/intSalesforceField.rpc.js | 2 +- server/api/intServicenowAccount/index.js | 2 +- .../intServicenowAccount.attributes.js | 2 +- .../intServicenowAccount.controller.js | 2 +- .../intServicenowAccount.model.js | 2 +- .../intServicenowAccount.rpc.js | 2 +- server/api/intServicenowConfiguration/index.js | 2 +- .../intServicenowConfiguration.attributes.js | 2 +- .../intServicenowConfiguration.controller.js | 2 +- .../intServicenowConfiguration.model.js | 2 +- .../intServicenowConfiguration.rpc.js | 2 +- server/api/intServicenowField/index.js | 2 +- .../intServicenowField.attributes.js | 2 +- .../intServicenowField.controller.js | 2 +- .../intServicenowField/intServicenowField.model.js | 2 +- .../intServicenowField/intServicenowField.rpc.js | 2 +- server/api/intSugarcrmAccount/index.js | 2 +- .../intSugarcrmAccount.attributes.js | 2 +- .../intSugarcrmAccount.controller.js | 2 +- .../intSugarcrmAccount/intSugarcrmAccount.model.js | 2 +- .../intSugarcrmAccount/intSugarcrmAccount.rpc.js | 2 +- server/api/intSugarcrmConfiguration/index.js | 2 +- .../intSugarcrmConfiguration.attributes.js | 2 +- .../intSugarcrmConfiguration.controller.js | 2 +- .../intSugarcrmConfiguration.model.js | 2 +- .../intSugarcrmConfiguration.rpc.js | 2 +- server/api/intSugarcrmField/index.js | 2 +- .../intSugarcrmField.attributes.js | 2 +- .../intSugarcrmField.controller.js | 2 +- .../api/intSugarcrmField/intSugarcrmField.model.js | 2 +- .../api/intSugarcrmField/intSugarcrmField.rpc.js | 2 +- server/api/intVtigerAccount/index.js | 2 +- .../intVtigerAccount.attributes.js | 2 +- .../intVtigerAccount.controller.js | 2 +- .../api/intVtigerAccount/intVtigerAccount.model.js | 2 +- .../api/intVtigerAccount/intVtigerAccount.rpc.js | 2 +- server/api/intVtigerConfiguration/index.js | 2 +- .../intVtigerConfiguration.attributes.js | 2 +- .../intVtigerConfiguration.controller.js | 2 +- .../intVtigerConfiguration.model.js | 2 +- .../intVtigerConfiguration.rpc.js | 2 +- server/api/intVtigerField/index.js | 2 +- .../intVtigerField/intVtigerField.attributes.js | 2 +- .../intVtigerField/intVtigerField.controller.js | 2 +- server/api/intVtigerField/intVtigerField.model.js | 2 +- server/api/intVtigerField/intVtigerField.rpc.js | 2 +- server/api/intZendeskAccount/index.js | 2 +- .../intZendeskAccount.attributes.js | 2 +- .../intZendeskAccount.controller.js | 2 +- .../intZendeskAccount/intZendeskAccount.model.js | 2 +- .../api/intZendeskAccount/intZendeskAccount.rpc.js | 2 +- server/api/intZendeskConfiguration/index.js | 2 +- .../intZendeskConfiguration.attributes.js | 2 +- .../intZendeskConfiguration.controller.js | 2 +- .../intZendeskConfiguration.model.js | 2 +- .../intZendeskConfiguration.rpc.js | 2 +- server/api/intZendeskField/index.js | 2 +- .../intZendeskField/intZendeskField.attributes.js | 2 +- .../intZendeskField/intZendeskField.controller.js | 2 +- .../api/intZendeskField/intZendeskField.model.js | 2 +- server/api/intZendeskField/intZendeskField.rpc.js | 2 +- server/api/intZohoAccount/index.js | 2 +- .../intZohoAccount/intZohoAccount.attributes.js | 2 +- .../intZohoAccount/intZohoAccount.controller.js | 2 +- server/api/intZohoAccount/intZohoAccount.model.js | 2 +- server/api/intZohoAccount/intZohoAccount.rpc.js | 2 +- server/api/intZohoConfiguration/index.js | 2 +- .../intZohoConfiguration.attributes.js | 2 +- .../intZohoConfiguration.controller.js | 2 +- .../intZohoConfiguration.model.js | 2 +- .../intZohoConfiguration.rpc.js | 2 +- server/api/intZohoField/index.js | 2 +- server/api/intZohoField/intZohoField.attributes.js | 2 +- server/api/intZohoField/intZohoField.controller.js | 2 +- server/api/intZohoField/intZohoField.model.js | 2 +- server/api/intZohoField/intZohoField.rpc.js | 2 +- server/api/integration/index.js | 2 +- server/api/integration/integration.attributes.js | 2 +- server/api/integration/integration.controller.js | 2 +- server/api/integration/integration.model.js | 2 +- server/api/integration/integration.rpc.js | 2 +- server/api/integrationReport/index.js | 2 +- .../integrationReport.attributes.js | 2 +- .../integrationReport.controller.js | 2 +- .../integrationReport/integrationReport.model.js | 2 +- .../api/integrationReport/integrationReport.rpc.js | 2 +- server/api/interval/index.js | 2 +- server/api/interval/interval.attributes.js | 2 +- server/api/interval/interval.controller.js | 2 +- server/api/interval/interval.model.js | 2 +- server/api/interval/interval.rpc.js | 2 +- server/api/jira/index.js | 2 +- server/api/jira/jira.controller.js | 2 +- server/api/jscriptyAnswerReport/index.js | 2 +- .../jscriptyAnswerReport.attributes.js | 2 +- .../jscriptyAnswerReport.controller.js | 2 +- .../jscriptyAnswerReport.model.js | 2 +- .../jscriptyAnswerReport.rpc.js | 2 +- server/api/jscriptyProject/index.js | 2 +- .../jscriptyProject/jscriptyProject.attributes.js | 2 +- .../jscriptyProject/jscriptyProject.controller.js | 2 +- .../api/jscriptyProject/jscriptyProject.model.js | 2 +- server/api/jscriptyProject/jscriptyProject.rpc.js | 2 +- server/api/jscriptyQuestionReport/index.js | 2 +- .../jscriptyQuestionReport.attributes.js | 2 +- .../jscriptyQuestionReport.controller.js | 2 +- .../jscriptyQuestionReport.model.js | 2 +- .../jscriptyQuestionReport.rpc.js | 2 +- server/api/jscriptySessionReport/index.js | 2 +- .../jscriptySessionReport.attributes.js | 2 +- .../jscriptySessionReport.controller.js | 2 +- .../jscriptySessionReport.model.js | 2 +- .../jscriptySessionReport.rpc.js | 2 +- server/api/license/index.js | 2 +- server/api/license/license.attributes.js | 2 +- server/api/license/license.controller.js | 2 +- server/api/license/license.model.js | 2 +- server/api/license/license.rpc.js | 2 +- server/api/mailAccount/index.js | 2 +- server/api/mailAccount/mailAccount.attributes.js | 2 +- server/api/mailAccount/mailAccount.controller.js | 2 +- server/api/mailAccount/mailAccount.events.js | 2 +- server/api/mailAccount/mailAccount.model.js | 2 +- server/api/mailAccount/mailAccount.rpc.js | 2 +- server/api/mailAccount/mailAccount.socket.js | 2 +- server/api/mailApplication/index.js | 2 +- .../mailApplication/mailApplication.attributes.js | 2 +- .../mailApplication/mailApplication.controller.js | 2 +- .../api/mailApplication/mailApplication.model.js | 2 +- server/api/mailApplication/mailApplication.rpc.js | 2 +- server/api/mailInteraction/index.js | 2 +- .../mailInteraction/mailInteraction.attributes.js | 2 +- .../mailInteraction/mailInteraction.controller.js | 2 +- .../api/mailInteraction/mailInteraction.events.js | 2 +- .../api/mailInteraction/mailInteraction.model.js | 2 +- server/api/mailInteraction/mailInteraction.rpc.js | 2 +- .../api/mailInteraction/mailInteraction.socket.js | 2 +- server/api/mailMessage/index.js | 2 +- server/api/mailMessage/mailMessage.attributes.js | 2 +- server/api/mailMessage/mailMessage.controller.js | 2 +- server/api/mailMessage/mailMessage.events.js | 2 +- server/api/mailMessage/mailMessage.model.js | 2 +- server/api/mailMessage/mailMessage.rpc.js | 2 +- server/api/mailMessage/mailMessage.socket.js | 2 +- server/api/mailQueue/index.js | 2 +- server/api/mailQueue/mailQueue.attributes.js | 2 +- server/api/mailQueue/mailQueue.controller.js | 2 +- server/api/mailQueue/mailQueue.events.js | 2 +- server/api/mailQueue/mailQueue.model.js | 2 +- server/api/mailQueue/mailQueue.rpc.js | 2 +- server/api/mailQueue/mailQueue.socket.js | 2 +- server/api/mailQueueReport/index.js | 2 +- .../mailQueueReport/mailQueueReport.attributes.js | 2 +- .../mailQueueReport/mailQueueReport.controller.js | 2 +- .../api/mailQueueReport/mailQueueReport.model.js | 2 +- server/api/mailQueueReport/mailQueueReport.rpc.js | 2 +- server/api/mailServerIn/index.js | 2 +- server/api/mailServerIn/mailServerIn.attributes.js | 2 +- server/api/mailServerIn/mailServerIn.model.js | 2 +- server/api/mailServerIn/mailServerIn.rpc.js | 2 +- server/api/mailServerOut/index.js | 2 +- .../api/mailServerOut/mailServerOut.attributes.js | 2 +- .../api/mailServerOut/mailServerOut.controller.js | 2 +- server/api/mailServerOut/mailServerOut.model.js | 2 +- server/api/mailServerOut/mailServerOut.rpc.js | 2 +- server/api/mailSubstatus/index.js | 2 +- .../api/mailSubstatus/mailSubstatus.attributes.js | 2 +- .../api/mailSubstatus/mailSubstatus.controller.js | 2 +- server/api/mailSubstatus/mailSubstatus.model.js | 2 +- server/api/mailSubstatus/mailSubstatus.rpc.js | 2 +- server/api/mailTransferReport/index.js | 2 +- .../mailTransferReport.attributes.js | 2 +- .../mailTransferReport.controller.js | 2 +- .../mailTransferReport/mailTransferReport.model.js | 2 +- .../mailTransferReport/mailTransferReport.rpc.js | 2 +- server/api/memberReport/index.js | 2 +- server/api/memberReport/memberReport.attributes.js | 2 +- server/api/memberReport/memberReport.controller.js | 2 +- server/api/memberReport/memberReport.model.js | 2 +- server/api/memberReport/memberReport.rpc.js | 2 +- server/api/migration/index.js | 2 +- server/api/migration/migration.attributes.js | 2 +- server/api/migration/migration.controller.js | 2 +- server/api/migration/migration.model.js | 2 +- server/api/migration/migration.rpc.js | 2 +- server/api/network/index.js | 2 +- server/api/network/network.attributes.js | 2 +- server/api/network/network.controller.js | 2 +- server/api/network/network.model.js | 2 +- server/api/network/network.rpc.js | 2 +- server/api/notification/index.js | 2 +- server/api/notification/notification.attributes.js | 2 +- server/api/notification/notification.controller.js | 2 +- server/api/notification/notification.events.js | 2 +- server/api/notification/notification.model.js | 2 +- server/api/notification/notification.rpc.js | 2 +- server/api/notification/notification.socket.js | 2 +- server/api/openchannelAccount/index.js | 2 +- .../openchannelAccount.attributes.js | 2 +- .../openchannelAccount.controller.js | 2 +- .../openchannelAccount.events.js | 2 +- .../openchannelAccount/openchannelAccount.model.js | 2 +- .../openchannelAccount/openchannelAccount.rpc.js | 2 +- .../openchannelAccount.socket.js | 2 +- server/api/openchannelApplication/index.js | 2 +- .../openchannelApplication.attributes.js | 2 +- .../openchannelApplication.controller.js | 2 +- .../openchannelApplication.model.js | 2 +- .../openchannelApplication.rpc.js | 2 +- server/api/openchannelInteraction/index.js | 2 +- .../openchannelInteraction.attributes.js | 2 +- .../openchannelInteraction.controller.js | 2 +- .../openchannelInteraction.events.js | 2 +- .../openchannelInteraction.model.js | 2 +- .../openchannelInteraction.rpc.js | 2 +- .../openchannelInteraction.socket.js | 2 +- server/api/openchannelMessage/index.js | 2 +- .../openchannelMessage.attributes.js | 2 +- .../openchannelMessage.controller.js | 2 +- .../openchannelMessage.events.js | 2 +- .../openchannelMessage/openchannelMessage.model.js | 2 +- .../openchannelMessage/openchannelMessage.rpc.js | 2 +- .../openchannelMessage.socket.js | 2 +- server/api/openchannelQueue/index.js | 2 +- .../openchannelQueue.attributes.js | 2 +- .../openchannelQueue.controller.js | 2 +- .../openchannelQueue/openchannelQueue.events.js | 2 +- .../api/openchannelQueue/openchannelQueue.model.js | 2 +- .../api/openchannelQueue/openchannelQueue.rpc.js | 2 +- .../openchannelQueue/openchannelQueue.socket.js | 2 +- server/api/openchannelQueueReport/index.js | 2 +- .../openchannelQueueReport.attributes.js | 2 +- .../openchannelQueueReport.controller.js | 2 +- .../openchannelQueueReport.model.js | 2 +- .../openchannelQueueReport.rpc.js | 2 +- server/api/openchannelTransferReport/index.js | 2 +- .../openchannelTransferReport.attributes.js | 2 +- .../openchannelTransferReport.controller.js | 2 +- .../openchannelTransferReport.model.js | 2 +- .../openchannelTransferReport.rpc.js | 2 +- server/api/pause/index.js | 2 +- server/api/pause/pause.attributes.js | 2 +- server/api/pause/pause.controller.js | 2 +- server/api/pause/pause.model.js | 2 +- server/api/pause/pause.rpc.js | 2 +- server/api/plugin/index.js | 2 +- server/api/plugin/plugin.attributes.js | 2 +- server/api/plugin/plugin.controller.js | 2 +- server/api/plugin/plugin.events.js | 2 +- server/api/plugin/plugin.model.js | 2 +- server/api/plugin/plugin.rpc.js | 2 +- server/api/plugin/plugin.socket.js | 2 +- server/api/pm2/index.js | 2 +- server/api/pm2/pm2.controller.js | 2 +- server/api/reportAgentPreview/index.js | 2 +- .../reportAgentPreview.attributes.js | 2 +- .../reportAgentPreview/reportAgentPreview.model.js | 2 +- .../reportAgentPreview/reportAgentPreview.rpc.js | 2 +- server/api/rpc/index.js | 2 +- server/api/rpc/rpc.controller.js | 2 +- server/api/schedule/index.js | 2 +- server/api/schedule/schedule.attributes.js | 2 +- server/api/schedule/schedule.controller.js | 2 +- server/api/schedule/schedule.model.js | 2 +- server/api/schedule/schedule.rpc.js | 2 +- server/api/screenRecording/index.js | 2 +- .../screenRecording/screenRecording.attributes.js | 2 +- .../screenRecording/screenRecording.controller.js | 2 +- .../api/screenRecording/screenRecording.model.js | 2 +- server/api/screenRecording/screenRecording.rpc.js | 2 +- server/api/setting/index.js | 2 +- server/api/setting/setting.attributes.js | 2 +- server/api/setting/setting.controller.js | 2 +- server/api/setting/setting.model.js | 2 +- server/api/setting/setting.rpc.js | 2 +- server/api/smsAccount/index.js | 2 +- server/api/smsAccount/smsAccount.attributes.js | 2 +- server/api/smsAccount/smsAccount.controller.js | 2 +- server/api/smsAccount/smsAccount.events.js | 2 +- server/api/smsAccount/smsAccount.model.js | 2 +- server/api/smsAccount/smsAccount.rpc.js | 2 +- server/api/smsAccount/smsAccount.socket.js | 2 +- server/api/smsApplication/index.js | 2 +- .../smsApplication/smsApplication.attributes.js | 2 +- .../smsApplication/smsApplication.controller.js | 2 +- server/api/smsApplication/smsApplication.model.js | 2 +- server/api/smsApplication/smsApplication.rpc.js | 2 +- server/api/smsInteraction/index.js | 2 +- .../smsInteraction/smsInteraction.attributes.js | 2 +- .../smsInteraction/smsInteraction.controller.js | 2 +- server/api/smsInteraction/smsInteraction.events.js | 2 +- server/api/smsInteraction/smsInteraction.model.js | 2 +- server/api/smsInteraction/smsInteraction.rpc.js | 2 +- server/api/smsInteraction/smsInteraction.socket.js | 2 +- server/api/smsMessage/index.js | 2 +- server/api/smsMessage/smsMessage.attributes.js | 2 +- server/api/smsMessage/smsMessage.controller.js | 2 +- server/api/smsMessage/smsMessage.events.js | 2 +- server/api/smsMessage/smsMessage.model.js | 2 +- server/api/smsMessage/smsMessage.rpc.js | 2 +- server/api/smsMessage/smsMessage.socket.js | 2 +- server/api/smsQueue/index.js | 2 +- server/api/smsQueue/smsQueue.attributes.js | 2 +- server/api/smsQueue/smsQueue.controller.js | 2 +- server/api/smsQueue/smsQueue.events.js | 2 +- server/api/smsQueue/smsQueue.model.js | 2 +- server/api/smsQueue/smsQueue.rpc.js | 2 +- server/api/smsQueue/smsQueue.socket.js | 2 +- server/api/smsQueueReport/index.js | 2 +- .../smsQueueReport/smsQueueReport.attributes.js | 2 +- .../smsQueueReport/smsQueueReport.controller.js | 2 +- server/api/smsQueueReport/smsQueueReport.model.js | 2 +- server/api/smsQueueReport/smsQueueReport.rpc.js | 2 +- server/api/smsTransferReport/index.js | 2 +- .../smsTransferReport.attributes.js | 2 +- .../smsTransferReport.controller.js | 2 +- .../smsTransferReport/smsTransferReport.model.js | 2 +- .../api/smsTransferReport/smsTransferReport.rpc.js | 2 +- server/api/sound/index.js | 2 +- server/api/sound/sound.attributes.js | 2 +- server/api/sound/sound.controller.js | 2 +- server/api/sound/sound.model.js | 2 +- server/api/sound/sound.rpc.js | 2 +- server/api/squareMessage/index.js | 2 +- .../api/squareMessage/squareMessage.attributes.js | 2 +- .../api/squareMessage/squareMessage.controller.js | 2 +- server/api/squareMessage/squareMessage.model.js | 2 +- server/api/squareMessage/squareMessage.rpc.js | 2 +- server/api/squareOdbc/index.js | 2 +- server/api/squareOdbc/squareOdbc.attributes.js | 2 +- server/api/squareOdbc/squareOdbc.controller.js | 2 +- server/api/squareOdbc/squareOdbc.model.js | 2 +- server/api/squareOdbc/squareOdbc.rpc.js | 2 +- server/api/squareProject/index.js | 2 +- .../api/squareProject/squareProject.attributes.js | 2 +- .../api/squareProject/squareProject.controller.js | 2 +- server/api/squareProject/squareProject.events.js | 2 +- server/api/squareProject/squareProject.model.js | 2 +- server/api/squareProject/squareProject.rpc.js | 2 +- server/api/squareProject/squareProject.socket.js | 2 +- server/api/squareRecording/index.js | 2 +- .../squareRecording/squareRecording.attributes.js | 2 +- .../squareRecording/squareRecording.controller.js | 2 +- .../api/squareRecording/squareRecording.model.js | 2 +- server/api/squareRecording/squareRecording.rpc.js | 2 +- server/api/squareReport/index.js | 2 +- server/api/squareReport/squareReport.attributes.js | 2 +- server/api/squareReport/squareReport.controller.js | 2 +- server/api/squareReport/squareReport.model.js | 2 +- server/api/squareReport/squareReport.rpc.js | 2 +- server/api/squareReportDetail/index.js | 2 +- .../squareReportDetail.attributes.js | 2 +- .../squareReportDetail.controller.js | 2 +- .../squareReportDetail/squareReportDetail.model.js | 2 +- .../squareReportDetail/squareReportDetail.rpc.js | 2 +- server/api/system/index.js | 2 +- server/api/system/system.controller.js | 2 +- server/api/tag/index.js | 2 +- server/api/tag/tag.attributes.js | 2 +- server/api/tag/tag.controller.js | 2 +- server/api/tag/tag.model.js | 2 +- server/api/tag/tag.rpc.js | 2 +- server/api/team/index.js | 2 +- server/api/team/team.attributes.js | 2 +- server/api/team/team.controller.js | 2 +- server/api/team/team.events.js | 2 +- server/api/team/team.model.js | 2 +- server/api/team/team.rpc.js | 2 +- server/api/team/team.socket.js | 2 +- server/api/template/index.js | 2 +- server/api/template/template.attributes.js | 2 +- server/api/template/template.controller.js | 2 +- server/api/template/template.model.js | 2 +- server/api/template/template.rpc.js | 2 +- server/api/trigger/index.js | 2 +- server/api/trigger/trigger.attributes.js | 2 +- server/api/trigger/trigger.controller.js | 2 +- server/api/trigger/trigger.model.js | 2 +- server/api/trigger/trigger.rpc.js | 2 +- server/api/trunk/index.js | 2 +- server/api/trunk/trunk.attributes.js | 2 +- server/api/trunk/trunk.controller.js | 2 +- server/api/trunk/trunk.model.js | 2 +- server/api/trunk/trunk.rpc.js | 2 +- server/api/user/index.js | 2 +- server/api/user/user.attributes.js | 2 +- server/api/user/user.controller.js | 2 +- server/api/user/user.events.js | 2 +- server/api/user/user.model.js | 2 +- server/api/user/user.rpc.js | 2 +- server/api/user/user.socket.js | 2 +- server/api/userChatQueue/index.js | 2 +- .../api/userChatQueue/userChatQueue.attributes.js | 2 +- server/api/userChatQueue/userChatQueue.model.js | 2 +- server/api/userChatQueue/userChatQueue.rpc.js | 2 +- server/api/userFaxQueue/index.js | 2 +- server/api/userFaxQueue/userFaxQueue.attributes.js | 2 +- server/api/userFaxQueue/userFaxQueue.model.js | 2 +- server/api/userFaxQueue/userFaxQueue.rpc.js | 2 +- server/api/userMailQueue/index.js | 2 +- .../api/userMailQueue/userMailQueue.attributes.js | 2 +- server/api/userMailQueue/userMailQueue.model.js | 2 +- server/api/userMailQueue/userMailQueue.rpc.js | 2 +- server/api/userNotification/index.js | 18 + .../userNotification.attributes.js | 18 + .../userNotification.controller.js | 18 + .../userNotification/userNotification.events.js | 18 + .../api/userNotification/userNotification.model.js | 18 + .../api/userNotification/userNotification.rpc.js | 18 + .../userNotification/userNotification.socket.js | 18 + server/api/userOpenchannelQueue/index.js | 2 +- .../userOpenchannelQueue.attributes.js | 2 +- .../userOpenchannelQueue.model.js | 2 +- .../userOpenchannelQueue.rpc.js | 2 +- server/api/userProfile/index.js | 2 +- server/api/userProfile/userProfile.attributes.js | 2 +- server/api/userProfile/userProfile.controller.js | 2 +- server/api/userProfile/userProfile.events.js | 2 +- server/api/userProfile/userProfile.model.js | 2 +- server/api/userProfile/userProfile.rpc.js | 2 +- server/api/userProfile/userProfile.socket.js | 2 +- server/api/userProfileResource/index.js | 2 +- .../userProfileResource.attributes.js | 2 +- .../userProfileResource.controller.js | 2 +- .../userProfileResource.model.js | 2 +- .../userProfileResource/userProfileResource.rpc.js | 2 +- server/api/userProfileSection/index.js | 2 +- .../userProfileSection.attributes.js | 2 +- .../userProfileSection.controller.js | 2 +- .../userProfileSection/userProfileSection.model.js | 2 +- .../userProfileSection/userProfileSection.rpc.js | 2 +- server/api/userSmsQueue/index.js | 2 +- server/api/userSmsQueue/userSmsQueue.attributes.js | 2 +- server/api/userSmsQueue/userSmsQueue.model.js | 2 +- server/api/userSmsQueue/userSmsQueue.rpc.js | 2 +- server/api/userVoiceQueue/index.js | 2 +- .../userVoiceQueue/userVoiceQueue.attributes.js | 2 +- server/api/userVoiceQueue/userVoiceQueue.model.js | 2 +- server/api/userVoiceQueue/userVoiceQueue.rpc.js | 2 +- server/api/userVoiceQueueRt/index.js | 2 +- .../userVoiceQueueRt.attributes.js | 2 +- .../userVoiceQueueRt/userVoiceQueueRt.events.js | 2 +- .../api/userVoiceQueueRt/userVoiceQueueRt.model.js | 2 +- .../api/userVoiceQueueRt/userVoiceQueueRt.rpc.js | 2 +- .../userVoiceQueueRt/userVoiceQueueRt.socket.js | 2 +- server/api/userWhatsappQueue/index.js | 2 +- .../userWhatsappQueue.attributes.js | 2 +- .../userWhatsappQueue/userWhatsappQueue.model.js | 2 +- .../api/userWhatsappQueue/userWhatsappQueue.rpc.js | 2 +- server/api/variable/index.js | 2 +- server/api/variable/variable.attributes.js | 2 +- server/api/variable/variable.controller.js | 2 +- server/api/variable/variable.model.js | 2 +- server/api/variable/variable.rpc.js | 2 +- server/api/version/index.js | 2 +- server/api/version/version.controller.js | 2 +- server/api/voiceAgentReport/index.js | 2 +- .../voiceAgentReport.attributes.js | 2 +- .../voiceAgentReport.controller.js | 2 +- .../api/voiceAgentReport/voiceAgentReport.model.js | 2 +- .../api/voiceAgentReport/voiceAgentReport.rpc.js | 2 +- server/api/voiceCallReport/index.js | 2 +- .../voiceCallReport/voiceCallReport.attributes.js | 2 +- .../voiceCallReport/voiceCallReport.controller.js | 2 +- .../api/voiceCallReport/voiceCallReport.model.js | 2 +- server/api/voiceCallReport/voiceCallReport.rpc.js | 2 +- server/api/voiceChanSpy/index.js | 2 +- server/api/voiceChanSpy/voiceChanSpy.attributes.js | 2 +- server/api/voiceChanSpy/voiceChanSpy.controller.js | 2 +- server/api/voiceChanSpy/voiceChanSpy.model.js | 2 +- server/api/voiceChanSpy/voiceChanSpy.rpc.js | 2 +- server/api/voiceContext/index.js | 2 +- server/api/voiceContext/voiceContext.attributes.js | 2 +- server/api/voiceContext/voiceContext.controller.js | 2 +- server/api/voiceContext/voiceContext.model.js | 2 +- server/api/voiceContext/voiceContext.rpc.js | 2 +- server/api/voiceDialReport/index.js | 2 +- .../voiceDialReport/voiceDialReport.attributes.js | 2 +- .../voiceDialReport/voiceDialReport.controller.js | 2 +- .../api/voiceDialReport/voiceDialReport.model.js | 2 +- server/api/voiceDialReport/voiceDialReport.rpc.js | 2 +- server/api/voiceExtension/index.js | 2 +- .../voiceExtension/voiceExtension.attributes.js | 2 +- .../voiceExtension/voiceExtension.controller.js | 2 +- server/api/voiceExtension/voiceExtension.events.js | 2 +- server/api/voiceExtension/voiceExtension.model.js | 2 +- server/api/voiceExtension/voiceExtension.rpc.js | 2 +- server/api/voiceExtension/voiceExtension.socket.js | 2 +- server/api/voiceMail/index.js | 2 +- server/api/voiceMail/voiceMail.attributes.js | 2 +- server/api/voiceMail/voiceMail.controller.js | 2 +- server/api/voiceMail/voiceMail.model.js | 2 +- server/api/voiceMail/voiceMail.rpc.js | 2 +- server/api/voiceMailMessage/index.js | 2 +- .../voiceMailMessage.attributes.js | 2 +- .../voiceMailMessage.controller.js | 2 +- .../api/voiceMailMessage/voiceMailMessage.model.js | 2 +- .../api/voiceMailMessage/voiceMailMessage.rpc.js | 2 +- server/api/voiceMusicOnHold/index.js | 2 +- .../voiceMusicOnHold.attributes.js | 2 +- .../voiceMusicOnHold.controller.js | 2 +- .../api/voiceMusicOnHold/voiceMusicOnHold.model.js | 2 +- .../api/voiceMusicOnHold/voiceMusicOnHold.rpc.js | 2 +- server/api/voicePrefix/index.js | 2 +- server/api/voicePrefix/voicePrefix.attributes.js | 2 +- server/api/voicePrefix/voicePrefix.controller.js | 2 +- server/api/voicePrefix/voicePrefix.events.js | 2 +- server/api/voicePrefix/voicePrefix.model.js | 2 +- server/api/voicePrefix/voicePrefix.rpc.js | 2 +- server/api/voicePrefix/voicePrefix.socket.js | 2 +- server/api/voiceQueue/index.js | 2 +- server/api/voiceQueue/voiceQueue.attributes.js | 2 +- server/api/voiceQueue/voiceQueue.controller.js | 2 +- server/api/voiceQueue/voiceQueue.events.js | 2 +- server/api/voiceQueue/voiceQueue.model.js | 2 +- server/api/voiceQueue/voiceQueue.rpc.js | 2 +- server/api/voiceQueue/voiceQueue.socket.js | 2 +- server/api/voiceQueueReport/index.js | 2 +- .../voiceQueueReport.attributes.js | 2 +- .../voiceQueueReport.controller.js | 2 +- .../voiceQueueReport/voiceQueueReport.events.js | 2 +- .../api/voiceQueueReport/voiceQueueReport.model.js | 2 +- .../api/voiceQueueReport/voiceQueueReport.rpc.js | 2 +- .../voiceQueueReport/voiceQueueReport.socket.js | 2 +- server/api/voiceQueuesLog/index.js | 2 +- .../voiceQueuesLog/voiceQueuesLog.attributes.js | 2 +- .../voiceQueuesLog/voiceQueuesLog.controller.js | 2 +- server/api/voiceQueuesLog/voiceQueuesLog.model.js | 2 +- server/api/voiceQueuesLog/voiceQueuesLog.rpc.js | 2 +- server/api/voiceRecording/index.js | 2 +- .../voiceRecording/voiceRecording.attributes.js | 2 +- .../voiceRecording/voiceRecording.controller.js | 2 +- server/api/voiceRecording/voiceRecording.model.js | 2 +- server/api/voiceRecording/voiceRecording.rpc.js | 2 +- server/api/voiceTransferReport/index.js | 2 +- .../voiceTransferReport.attributes.js | 2 +- .../voiceTransferReport.controller.js | 2 +- .../voiceTransferReport.model.js | 2 +- .../voiceTransferReport/voiceTransferReport.rpc.js | 2 +- server/api/webbar/index.js | 2 +- server/api/webbar/webbar.controller.js | 2 +- server/api/whatsappAccount/index.js | 2 +- .../whatsappAccount/whatsappAccount.attributes.js | 2 +- .../whatsappAccount/whatsappAccount.controller.js | 2 +- .../api/whatsappAccount/whatsappAccount.events.js | 2 +- .../api/whatsappAccount/whatsappAccount.model.js | 2 +- server/api/whatsappAccount/whatsappAccount.rpc.js | 2 +- .../api/whatsappAccount/whatsappAccount.socket.js | 2 +- server/api/whatsappApplication/index.js | 2 +- .../whatsappApplication.attributes.js | 2 +- .../whatsappApplication.controller.js | 2 +- .../whatsappApplication.model.js | 2 +- .../whatsappApplication/whatsappApplication.rpc.js | 2 +- server/api/whatsappInteraction/index.js | 2 +- .../whatsappInteraction.attributes.js | 2 +- .../whatsappInteraction.controller.js | 2 +- .../whatsappInteraction.events.js | 2 +- .../whatsappInteraction.model.js | 2 +- .../whatsappInteraction/whatsappInteraction.rpc.js | 2 +- .../whatsappInteraction.socket.js | 2 +- server/api/whatsappMessage/index.js | 2 +- .../whatsappMessage/whatsappMessage.attributes.js | 2 +- .../whatsappMessage/whatsappMessage.controller.js | 2 +- .../api/whatsappMessage/whatsappMessage.events.js | 2 +- .../api/whatsappMessage/whatsappMessage.model.js | 2 +- server/api/whatsappMessage/whatsappMessage.rpc.js | 2 +- .../api/whatsappMessage/whatsappMessage.socket.js | 2 +- server/api/whatsappQueue/index.js | 2 +- .../api/whatsappQueue/whatsappQueue.attributes.js | 2 +- .../api/whatsappQueue/whatsappQueue.controller.js | 2 +- server/api/whatsappQueue/whatsappQueue.events.js | 2 +- server/api/whatsappQueue/whatsappQueue.model.js | 2 +- server/api/whatsappQueue/whatsappQueue.rpc.js | 2 +- server/api/whatsappQueue/whatsappQueue.socket.js | 2 +- server/api/whatsappQueueReport/index.js | 2 +- .../whatsappQueueReport.attributes.js | 2 +- .../whatsappQueueReport.controller.js | 2 +- .../whatsappQueueReport.model.js | 2 +- .../whatsappQueueReport/whatsappQueueReport.rpc.js | 2 +- server/api/whatsappTransferReport/index.js | 2 +- .../whatsappTransferReport.attributes.js | 2 +- .../whatsappTransferReport.controller.js | 2 +- .../whatsappTransferReport.model.js | 2 +- .../whatsappTransferReport.rpc.js | 2 +- server/app.js | 2 +- server/components/auth/service.js | 2 +- server/components/encryptor/index.js | 2 +- server/components/export/csv.js | 2 +- server/components/export/pdf.js | 2 +- server/components/export/xlsx.js | 2 +- server/components/extensions/rewrite.js | 2 +- server/components/import/cm/csv.js | 2 +- server/components/import/cm/csv2.js | 2 +- server/components/import/cm/csvUpdates.js | 2 +- server/components/integrations/configuration.js | 2 +- server/components/interaction/service.js | 2 +- server/components/license/service.js | 2 +- server/components/parsers/advancedSearch.js | 2 +- server/components/parsers/qs.js | 2 +- server/config/environment/development.js | 4 +- server/config/express.js | 2 +- server/config/license/hardware.js | 2 +- server/config/license/index.js | 2 +- server/config/license/util.js | 2 +- server/config/local.env.js | 2 +- server/config/logger.js | 2 +- server/config/pm2/config.js | 2 +- server/config/pm2/index.js | 2 +- server/config/schedule/chat.js | 2 +- server/config/schedule/index.js | 2 +- server/config/schedule/transcribe.js | 2 +- server/config/schedule/whatsapp.js | 2 +- server/config/seedContact.js | 2 +- server/config/seedDB/report/fields.js | 2 +- server/config/seedUsers.js | 2 +- server/config/socketio.js | 2 +- server/config/triggers/index.js | 2 +- server/config/utils.js | 2 +- server/errors/index.js | 2 +- server/files/attachments/1615214408648-connect.log | 243 +++ .../files/attachments/1615214408648-freeswitch.log | 1822 ++++++++++++++++++++ server/files/attachments/1615214408648-jssip.html | 144 ++ server/files/attachments/1615214408648-ring.log | 357 ++++ server/migrations/2.5.11.js | 341 ++-- server/migrations/2.5.15.js | 177 ++ server/migrations/2.5.16.js | 179 ++ server/migrations/2.5.17.js | 165 ++ server/migrations/2.5.18.js | 198 +++ server/migrations/2.5.19.js | 165 ++ server/migrations/2.5.20.js | 179 ++ server/migrations/2.5.21.js | 165 ++ server/mysqldb/index.js | 2 +- server/routes.js | 2 +- server/rpc/index.js | 2 +- server/services/agi/channel.js | 2 +- server/services/agi/error.js | 2 +- server/services/agi/graph/index.js | 2 +- server/services/agi/index.js | 2 +- server/services/agi/mailRpc/index.js | 2 +- server/services/agi/reply.js | 2 +- server/services/agi/rpc/index.js | 2 +- server/services/agi/scripts/aws/index.js | 2 +- server/services/agi/scripts/aws/lex/index.js | 2 +- server/services/agi/scripts/aws/lex/lib/api.js | 2 +- server/services/agi/scripts/aws/polly/index.js | 2 +- server/services/agi/scripts/aws/polly/lib/api.js | 2 +- server/services/agi/scripts/google/asr/index.js | 2 +- server/services/agi/scripts/google/asr/lib/api.js | 2 +- server/services/agi/scripts/google/index.js | 2 +- server/services/agi/scripts/index.js | 2 +- server/services/agi/scripts/sestek/index.js | 2 +- server/services/agi/scripts/sestek/nda/index.js | 2 +- server/services/agi/scripts/tilde/asr/index.js | 2 +- server/services/agi/scripts/tilde/asr/lib/api.js | 2 +- server/services/agi/scripts/tilde/index.js | 2 +- server/services/agi/server.js | 2 +- server/services/agi/vertices.js | 2 +- server/services/ami/acw/index.js | 2 +- server/services/ami/ami.js | 2 +- server/services/ami/client.js | 2 +- server/services/ami/dialer/action.js | 2 +- server/services/ami/dialer/additionalPhone.js | 2 +- server/services/ami/dialer/agentComplete.js | 2 +- server/services/ami/dialer/final.js | 2 +- server/services/ami/dialer/hangup.js | 2 +- server/services/ami/dialer/history.js | 2 +- server/services/ami/dialer/index.js | 2 +- server/services/ami/dialer/queueCallerAbandon.js | 2 +- server/services/ami/fax/action.js | 2 +- server/services/ami/fax/index.js | 2 +- server/services/ami/fax/rpcDb.js | 2 +- server/services/ami/fax/util/gs.js | 2 +- server/services/ami/fax/util/util.js | 2 +- server/services/ami/index.js | 2 +- server/services/ami/model/agent.js | 2 +- server/services/ami/model/campaign.js | 2 +- server/services/ami/model/channel.js | 2 +- server/services/ami/model/deskAccount.js | 2 +- server/services/ami/model/dynamics365Account.js | 2 +- server/services/ami/model/faxAccount.js | 2 +- server/services/ami/model/freshdeskAccount.js | 2 +- server/services/ami/model/freshsalesAccount.js | 2 +- server/services/ami/model/queueReport.js | 2 +- server/services/ami/model/salesforceAccount.js | 2 +- server/services/ami/model/servicenowAccount.js | 2 +- server/services/ami/model/sugarcrmAccount.js | 2 +- server/services/ami/model/telephone.js | 2 +- server/services/ami/model/template.js | 2 +- server/services/ami/model/trigger.js | 2 +- server/services/ami/model/trunk.js | 2 +- server/services/ami/model/voiceExtension.js | 2 +- server/services/ami/model/voiceQueue.js | 2 +- server/services/ami/model/vtigerAccount.js | 2 +- server/services/ami/model/zendeskAccount.js | 2 +- server/services/ami/model/zohoAccount.js | 2 +- server/services/ami/preview/action.js | 2 +- server/services/ami/preview/index.js | 2 +- server/services/ami/preview/rpcDb.js | 2 +- server/services/ami/preview/util/util.js | 2 +- server/services/ami/properties.js | 2 +- server/services/ami/realtime/index.js | 2 +- server/services/ami/report/index.js | 2 +- server/services/ami/report/userReport.js | 2 +- server/services/ami/report/voiceAgentReport.js | 2 +- server/services/ami/report/voiceCallReport.js | 2 +- server/services/ami/report/voiceDialReport.js | 2 +- server/services/ami/report/voiceQueueReport.js | 2 +- server/services/ami/rpc/agentReportPreview.js | 2 +- server/services/ami/rpc/attachment.js | 2 +- server/services/ami/rpc/campaign.js | 2 +- server/services/ami/rpc/cmContact.js | 2 +- server/services/ami/rpc/cmHopper.js | 2 +- server/services/ami/rpc/cmHopperAdditionalPhone.js | 2 +- server/services/ami/rpc/cmHopperBlack.js | 2 +- server/services/ami/rpc/cmHopperFinal.js | 2 +- server/services/ami/rpc/cmHopperHistory.js | 2 +- server/services/ami/rpc/faxAccount.js | 2 +- server/services/ami/rpc/faxMessage.js | 2 +- server/services/ami/rpc/integrations/desk.js | 2 +- .../services/ami/rpc/integrations/dynamics365.js | 2 +- server/services/ami/rpc/integrations/freshdesk.js | 2 +- server/services/ami/rpc/integrations/freshsales.js | 2 +- server/services/ami/rpc/integrations/salesforce.js | 2 +- server/services/ami/rpc/integrations/servicenow.js | 2 +- server/services/ami/rpc/integrations/sugarcrm.js | 2 +- server/services/ami/rpc/integrations/vtiger.js | 2 +- server/services/ami/rpc/integrations/zendesk.js | 2 +- server/services/ami/rpc/integrations/zoho.js | 2 +- server/services/ami/rpc/memberReport.js | 2 +- server/services/ami/rpc/template.js | 2 +- server/services/ami/rpc/trigger.js | 2 +- server/services/ami/rpc/trunk.js | 2 +- server/services/ami/rpc/user.js | 2 +- server/services/ami/rpc/voiceAgentReport.js | 2 +- server/services/ami/rpc/voiceCallReport.js | 2 +- server/services/ami/rpc/voiceDialReport.js | 2 +- server/services/ami/rpc/voiceExtension.js | 2 +- server/services/ami/rpc/voiceQueue.js | 2 +- server/services/ami/rpc/voiceQueueReport.js | 2 +- server/services/ami/rpc/voiceQueueRt.js | 2 +- server/services/ami/rpc/voiceRecording.js | 2 +- server/services/ami/rpc/voiceTransferReport.js | 2 +- server/services/ami/server/index.js | 2 +- server/services/ami/trigger/cmContact/index.js | 2 +- server/services/ami/trigger/index.js | 2 +- server/services/ami/trigger/integration/desk.js | 2 +- .../ami/trigger/integration/dynamics365.js | 2 +- .../services/ami/trigger/integration/freshdesk.js | 2 +- .../services/ami/trigger/integration/freshsales.js | 2 +- server/services/ami/trigger/integration/index.js | 2 +- .../services/ami/trigger/integration/salesforce.js | 2 +- .../services/ami/trigger/integration/servicenow.js | 2 +- .../services/ami/trigger/integration/sugarcrm.js | 2 +- server/services/ami/trigger/integration/util.js | 2 +- server/services/ami/trigger/integration/vtiger.js | 2 +- server/services/ami/trigger/integration/zendesk.js | 2 +- server/services/ami/trigger/integration/zoho.js | 2 +- server/services/ami/trigger/script/index.js | 2 +- server/services/ami/trigger/urlforward/index.js | 2 +- server/services/email/client.js | 2 +- server/services/email/index.js | 2 +- server/services/email/lib/email.js | 2 +- server/services/email/lib/imap.js | 2 +- server/services/email/lib/smtp.js | 2 +- server/services/email/lib/utils.js | 2 +- server/services/email/model/mailAccount.js | 2 +- server/services/email/realtime/index.js | 2 +- server/services/email/rpc/mailAccount.js | 2 +- server/services/email/server/index.js | 2 +- server/services/express/index.js | 2 +- server/services/routing/client.js | 2 +- server/services/routing/index.js | 2 +- server/services/routing/lib/rule-engine.js | 2 +- server/services/routing/mailRpc/index.js | 2 +- server/services/routing/model/agent.js | 2 +- server/services/routing/model/chatQueue.js | 2 +- server/services/routing/model/faxQueue.js | 2 +- server/services/routing/model/interval.js | 2 +- server/services/routing/model/mailQueue.js | 2 +- server/services/routing/model/openchannelQueue.js | 2 +- server/services/routing/model/smsQueue.js | 2 +- server/services/routing/model/whatsappQueue.js | 2 +- server/services/routing/realtime/index.js | 2 +- server/services/routing/rpc/chatInteraction.js | 2 +- server/services/routing/rpc/chatMessage.js | 2 +- server/services/routing/rpc/chatQueue.js | 2 +- server/services/routing/rpc/chatQueueReport.js | 2 +- server/services/routing/rpc/faxInteraction.js | 2 +- server/services/routing/rpc/faxMessage.js | 2 +- server/services/routing/rpc/faxQueue.js | 2 +- server/services/routing/rpc/faxQueueReport.js | 2 +- server/services/routing/rpc/interval.js | 2 +- server/services/routing/rpc/mailInteraction.js | 2 +- server/services/routing/rpc/mailMessage.js | 2 +- server/services/routing/rpc/mailQueue.js | 2 +- server/services/routing/rpc/mailQueueReport.js | 2 +- .../services/routing/rpc/openchannelInteraction.js | 2 +- server/services/routing/rpc/openchannelMessage.js | 2 +- server/services/routing/rpc/openchannelQueue.js | 2 +- .../services/routing/rpc/openchannelQueueReport.js | 2 +- server/services/routing/rpc/smsInteraction.js | 2 +- server/services/routing/rpc/smsMessage.js | 2 +- server/services/routing/rpc/smsQueue.js | 2 +- server/services/routing/rpc/smsQueueReport.js | 2 +- server/services/routing/rpc/user.js | 2 +- server/services/routing/rpc/whatsappInteraction.js | 2 +- server/services/routing/rpc/whatsappMessage.js | 2 +- server/services/routing/rpc/whatsappQueue.js | 2 +- server/services/routing/rpc/whatsappQueueReport.js | 2 +- .../services/routing/server/applications/agent.js | 2 +- .../routing/server/applications/amazonlex.js | 2 +- .../routing/server/applications/autoreply.js | 2 +- .../services/routing/server/applications/close.js | 2 +- .../routing/server/applications/dialogflow.js | 2 +- .../routing/server/applications/dialogflowV2.js | 2 +- .../services/routing/server/applications/gotoif.js | 2 +- .../services/routing/server/applications/gotop.js | 2 +- .../routing/server/applications/message.js | 2 +- .../services/routing/server/applications/noop.js | 2 +- .../services/routing/server/applications/queue.js | 2 +- .../routing/server/applications/strategy/agent.js | 2 +- .../server/applications/strategy/beepall.js | 2 +- .../routing/server/applications/strategy/index.js | 2 +- .../server/applications/strategy/rrmemory.js | 2 +- .../routing/server/applications/strategy/util.js | 2 +- .../services/routing/server/applications/system.js | 2 +- server/services/routing/server/applications/tag.js | 2 +- .../services/routing/server/applications/utils.js | 2 +- server/services/routing/server/index.js | 2 +- server/services/routing/server/interval.js | 2 +- server/services/xdr/agents.controller.js | 2 +- server/services/xdr/calls.controller.js | 2 +- server/services/xdr/core.controller.js | 2 +- server/services/xdr/dials.controller.js | 2 +- server/services/xdr/index.js | 2 +- server/services/xdr/members.controller.js | 2 +- server/services/xdr/queues.controller.js | 2 +- server/services/xdr/recordings.controller.js | 2 +- server/services/xdr/transfers.controller.js | 2 +- server/services/xdr/utils.js | 2 +- snippet/1.0.16/scripts/vendor.js | 2 +- snippet/1.0.16/styles/vendor.css | 2 +- 1457 files changed, 6319 insertions(+), 1913 deletions(-) create mode 100644 public/scripts/app.ba2d32d9.js delete mode 100644 public/scripts/app.f6dd99bd.js create mode 100644 public/styles/app.9fde47c2.css delete mode 100644 public/styles/app.bff19739.css create mode 100644 server/api/userNotification/index.js create mode 100644 server/api/userNotification/userNotification.attributes.js create mode 100644 server/api/userNotification/userNotification.controller.js create mode 100644 server/api/userNotification/userNotification.events.js create mode 100644 server/api/userNotification/userNotification.model.js create mode 100644 server/api/userNotification/userNotification.rpc.js create mode 100644 server/api/userNotification/userNotification.socket.js create mode 100644 server/files/attachments/1615214408648-connect.log create mode 100644 server/files/attachments/1615214408648-freeswitch.log create mode 100644 server/files/attachments/1615214408648-jssip.html create mode 100644 server/files/attachments/1615214408648-ring.log create mode 100644 server/migrations/2.5.15.js create mode 100644 server/migrations/2.5.16.js create mode 100644 server/migrations/2.5.17.js create mode 100644 server/migrations/2.5.18.js create mode 100644 server/migrations/2.5.19.js create mode 100644 server/migrations/2.5.20.js create mode 100644 server/migrations/2.5.21.js diff --git a/apidoc/api_data.js b/apidoc/api_data.js index e4c5f33..95d16f7 100644 --- a/apidoc/api_data.js +++ b/apidoc/api_data.js @@ -1 +1 @@ -define({ "api": [ { "type": "delete", "url": "/api/actions/{id}", "title": "Deletes a Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteActions", "group": "Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "put", "url": "/api/actions/{id}", "title": "Update an existing Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateActions", "group": "Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "post", "url": "/api/analytics/custom_reports", "title": "Creates a new Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "delete", "url": "/api/analytics/custom_reports/{id}", "title": "Deletes a Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports", "title": "Gets a list of Analytic Custom Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/custom_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/custom_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/custom_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/custom_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/custom_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}", "title": "Gets a single Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "put", "url": "/api/analytics/custom_reports/{id}", "title": "Update an existing Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "post", "url": "/api/analytics/default_reports", "title": "Creates a new Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "delete", "url": "/api/analytics/default_reports/{id}", "title": "Deletes a Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports", "title": "Gets a list of Analytic Default Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/default_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/default_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/default_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/default_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/default_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}", "title": "Gets a single Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "put", "url": "/api/analytics/default_reports/{id}", "title": "Update an existing Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "post", "url": "/api/analytics/extracted_reports", "title": "Creates a new Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "basename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "savename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"manual\"", "\"scheduled\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "reportId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reportType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "delete", "url": "/api/analytics/extracted_reports/{id}", "title": "Deletes a Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports", "title": "Gets a list of Analytic Extacted Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/extracted_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/extracted_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/extracted_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/extracted_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/extracted_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}", "title": "Gets a single Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}/download", "title": "Download Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "put", "url": "/api/analytics/extracted_reports/{id}", "title": "Update an existing Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/create_many", "title": "Creates many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/create_many -d '[{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}]' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "BulkCreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/destroy_many?ids={ids}", "title": "Deletes many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/destroy_many?ids=1&ids=2&ids=3 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "BulkDeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports", "title": "Creates a new Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/{id}", "title": "Deletes a Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports", "title": "Gets a list of Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/field_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/field_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/field_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/field_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/field_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports/{id}", "title": "Gets a single Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/{id}/create_many", "title": "Rewrite fields set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id}/create_many -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFields", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "put", "url": "/api/analytics/field_reports/{id}", "title": "Update an existing Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/metrics", "title": "Creates a new Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Metric", "group": "Analytic_Metrics", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "metric", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "delete", "url": "/api/analytics/metrics/{id}", "title": "Deletes a Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics", "title": "Gets a list of Analytic Metric", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/metrics?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/metrics?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/metrics?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/metrics?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/metrics?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics/{id}", "title": "Gets a single Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "put", "url": "/api/analytics/metrics/{id}", "title": "Update an existing Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "post", "url": "/api/analytics/tree_reports", "title": "Creates a new Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "tree", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "delete", "url": "/api/analytics/tree_reports/{id}", "title": "Deletes a Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports", "title": "Gets a list of Analytic Tree Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/tree_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/tree_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/tree_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/tree_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/tree_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports/{id}", "title": "Gets a single Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "put", "url": "/api/analytics/tree_reports/{id}", "title": "Update an existing Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "post", "url": "/api/attachments/clone", "title": "Clone an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "delete", "url": "/api/attachments/{id}", "title": "Deletes a Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments", "title": "Gets a list of Attachments", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -v -u {name}:{password}", "type": "json" } ], "name": "GetAttachments", "group": "Attachments", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/attachments?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/attachments?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/attachments?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/attachments?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/attachments?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/{id}", "title": "Gets a single Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/attachments", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/:id/download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/:id/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/chat/interactions/{id}/attachment_download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Attachments" }, { "type": "put", "url": "/api/attachments/{id}", "title": "Update an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/auth/local/forgot", "title": "Creates a new password reset token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/forgot -d '{\"email\": \"john.doe@xcally.com\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Forgot_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "email", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local/reset/:token", "title": "Reset user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/reset/94b422c1fkdjhg766a198da6997yu6gcc963641d -d '{\"password\": \"My_newP@ssw0rd\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Reset_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/google", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/google -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authGoogle/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/automations", "title": "Creates a new Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAutomations", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "delete", "url": "/api/automations/{id}", "title": "Deletes a Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations", "title": "Gets a list of Automations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -v -u {name}:{password}", "type": "json" } ], "name": "GetAutomations", "group": "Automations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/automations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/automations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/automations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/automations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/automations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}", "title": "Gets a single Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addActions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/conditions", "title": "Creates new conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConditions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/actions", "title": "Gets Automation Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/conditions", "title": "Gets Automation Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConditions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "put", "url": "/api/automations/{id}", "title": "Update an existing Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/canned_answers", "title": "Create a new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "delete", "url": "/api/canned_answers/{id}", "title": "Deletes a Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers", "title": "Gets a list of Canned Answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -v -u {name}:{password}", "type": "json" } ], "name": "GetCanned_Answers", "group": "Canned_Answers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/canned_answers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/canned_answers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/canned_answers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/canned_answers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/canned_answers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers/{id}", "title": "Gets a single Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "put", "url": "/api/canned_answers/{id}", "title": "Update an existing Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/chat/internal/users", "title": "Gets Users Last Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/chat/internal/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLastUsersMessages", "group": "ChatInternalMessage", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "ChatInternalMessage" }, { "type": "delete", "url": "/api/chat/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "get", "url": "/api/chat/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "put", "url": "/api/chat/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "post", "url": "/api/chat/groups", "title": "Creates a new Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateGroups", "group": "Chat_Groups", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "write", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}", "title": "Deletes a Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/describe", "title": "Gets table info about Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups", "title": "Gets a list of Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -v -u {name}:{password}", "type": "json" } ], "name": "GetGroups", "group": "Chat_Groups", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/groups?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/groups?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/groups?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/groups?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/groups?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}/members", "title": "Removes members from a group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}", "title": "Gets a single Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/members", "title": "Add members to chat group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/messages", "title": "Creates a new group message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -d '{\"body\": \"Hi operator!\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/members", "title": "Gets Members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/messages", "title": "Gets Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/unread", "title": "Get unread chat group messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/unread -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUread", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "put", "url": "/api/chat/groups/{id}", "title": "Update an existing Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Chat_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/abandon", "title": "Abandon interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/abandon -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "abandon", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to set as abandon an interaction and stop the routing.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/close", "title": "Close Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/close -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/attachment_upload", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "attachmentUpload", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/vidaoo", "title": "Create Vidaoo Session", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/vidaoo -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createVidaooSession", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/custom_update", "title": "Update interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/custom_update -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "customUpdate", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to update an interaction.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/my_messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/my_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMyMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/internal/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Internal_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInternalMessageId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "delete", "url": "/api/chat/internal/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Internal_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/internal/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/internal/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/internal/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/internal/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/internal/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "put", "url": "/api/chat/internal/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "post", "url": "/api/chat/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "delete", "url": "/api/chat/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "put", "url": "/api/chat/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "post", "url": "/api/chat/offline_messages", "title": "Creates a new OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOfflineMessages", "group": "Chat_Offline_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "delete", "url": "/api/chat/offline_messages/{id}", "title": "Deletes a OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/describe", "title": "Gets table info about OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages", "title": "Gets a list of OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -v -u {name}:{password}", "type": "json" } ], "name": "GetOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/offline_messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/offline_messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/offline_messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/offline_messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/offline_messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/{id}", "title": "Gets a single OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "put", "url": "/api/chat/offline_messages/{id}", "title": "Update an existing OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "post", "url": "/api/chat/proactive_actions", "title": "Creates a new Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProactive_Actions", "group": "Chat_Proactive_Actions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "delete", "url": "/api/chat/proactive_actions/{id}", "title": "Deletes a Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "get", "url": "/api/chat/proactive_actions/{id}", "title": "Gets a single Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "put", "url": "/api/chat/proactive_actions/{id}", "title": "Update an existing Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "post", "url": "/api/chat/reports/queue", "title": "Creates a new Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Queue_Reports", "group": "Chat_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "delete", "url": "/api/chat/reports/queue/{id}", "title": "Deletes a Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/describe", "title": "Gets table info about Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue", "title": "Gets a list of Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/{id}", "title": "Gets a single Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "put", "url": "/api/chat/reports/queue/{id}", "title": "Update an existing Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "post", "url": "/api/chat/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Chat_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Chat_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "put", "url": "/api/chat/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/reports/transfer", "title": "Creates a new Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "delete", "url": "/api/chat/reports/transfer/{id}", "title": "Deletes a Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/describe", "title": "Gets table info about Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer", "title": "Gets a list of Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/{id}", "title": "Gets a single Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "put", "url": "/api/chat/reports/transfer/{id}", "title": "Update an existing Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "post", "url": "/api/chat/websites/{id}/users", "title": "Add agents to a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites", "title": "Creates a new Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWebsites", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "address", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKeyOffline", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentAlias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerAlias", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color_button", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "textColor", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "fontSize", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remote", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "animation", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rounded\"", "\"squared\"" ], "optional": true, "field": "header_shape", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_online", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "start_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offline_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_offline", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "download_transcript", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "whiteLabel", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultWhiteLabel", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "sitepic", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingQuestion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitSuccessMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitFailureMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "noteTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "placeholderMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessageButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipMessageButton", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "conditionAgreement", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableRating", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableFeedback", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableSendButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "feedbackTitle", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingStarsNumber", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "onlineForm", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "offlineForm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoclose", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerWriting", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardTranscriptMessage", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardOfflineAddress", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageSubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUnmanagedNote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unmanagedMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipUnmanaged", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sendUnmanaged", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerAttachment", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerCheckmarks", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "agentAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showAgentAvatar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timezone", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "hideWhenOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentIdentifier", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alignment", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "verticalAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messagesAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultTitle", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "customerAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showCustomerAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "messageFontSize", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "backgroundColor", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "systemAlias", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "systemAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "vidaooEscalation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vidaooApiKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}", "title": "Deletes a Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/describe", "title": "Gets table info about Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/users", "title": "Gets agents from website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites", "title": "Gets a list of Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -v -u {name}:{password}", "type": "json" } ], "name": "GetWebsites", "group": "Chat_Websites", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/websites?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/websites?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/websites?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/websites?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/websites?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/users", "title": "Removes agents from a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/dispositions", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}", "title": "Gets a single Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Add customer avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Creates new Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -d '[{\"name\": \"Satisfied\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addProactiveActions", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/system_avatar", "title": "Add system avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/applications", "title": "Gets Website Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Get Customer Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/fields", "title": "Gets Website Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/interactions", "title": "Gets Website Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/offline_messages", "title": "Gets Website Offline Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOfflineMessages", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Gets Website Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getProactiveActions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/snippet", "title": "Gets Website Snippet", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/snippet -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSnippet", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/system_avatar", "title": "Get System Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new chat message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/offline", "title": "Offline message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "offline", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/websites/{id}", "title": "Update an existing Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/cloudProviders", "title": "Creates a new CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCloudProviders", "group": "CloudProviders", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"AmazonAWS\"", "\"Google\"" ], "optional": false, "field": "service", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "delete", "url": "/api/cloudProviders/{id}", "title": "Deletes a CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders", "title": "Gets a list of CloudProviders", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -v -u {name}:{password}", "type": "json" } ], "name": "GetCloudProviders", "group": "CloudProviders", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cloudProviders?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cloudProviders?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cloudProviders?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cloudProviders?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cloudProviders?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders/{id}", "title": "Gets a single CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "put", "url": "/api/cloudProviders/{id}", "title": "Update an existing CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "post", "url": "/api/cm_contact_has_items", "title": "Creates a new CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasItems", "group": "CmContactHasItems", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "item", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ItemTypeId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ItemClass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "delete", "url": "/api/cm_contact_has_items/{id}", "title": "Deletes a CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items", "title": "Gets a list of CmContactHasItems", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_items?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_items?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_items?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_items?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_items?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items/{id}", "title": "Gets a single CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "put", "url": "/api/cm_contact_has_items/{id}", "title": "Update an existing CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "post", "url": "/api/cm_contact_has_phones", "title": "Creates a new CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasPhones", "group": "CmContactHasPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "delete", "url": "/api/cm_contact_has_phones/{id}", "title": "Deletes a CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones", "title": "Gets a list of CmContactHasPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones/{id}", "title": "Gets a single CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "put", "url": "/api/cm_contact_has_phones/{id}", "title": "Update an existing CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "post", "url": "/api/cm_hopper_additional_phones", "title": "Creates a new CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmHopperId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "delete", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Deletes a CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones", "title": "Gets a list of CmHopperAdditionalPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_hopper_additional_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_hopper_additional_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_hopper_additional_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_hopper_additional_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_hopper_additional_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Gets a single CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "put", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Update an existing CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "post", "url": "/api/cm/companies", "title": "Creates a new Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCompanies", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "companyId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "website", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailDomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sStreet", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sPostalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCity", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCountry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/companies/{id}", "title": "Deletes a Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/describe", "title": "Gets table info about Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies", "title": "Gets a list of Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -v -u {name}:{password}", "type": "json" } ], "name": "GetCompanies", "group": "Cm_Companies", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/companies?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/companies?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/companies?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/companies?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/companies?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}", "title": "Gets a single Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "post", "url": "/api/cm/companies/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/companies/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "put", "url": "/api/cm/companies/{id}", "title": "Update an existing Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/contacts/{id}", "title": "Deletes a Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/describe", "title": "Gets table info about Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts", "title": "Gets a list of Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -v -u {name}:{password}", "type": "json" } ], "name": "GetContacts", "group": "Cm_Contacts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/contacts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/contacts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/contacts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/contacts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/contacts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/finals", "title": "Gets contact hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hopper_histories", "title": "Gets contact hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hoppers", "title": "Gets contact hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/create_many", "title": "Create Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/create_many -d '[{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts", "title": "Create Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -d '{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/jscripty_sessions", "title": "Gets contact hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getJscriptySessions", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/merge", "title": "Merge Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/merge -d '{\"from\": 1, \"to\": 2}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "merge", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -d '{\"ids\": [1,12]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}", "title": "Gets a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "put", "url": "/api/cm/contacts/{id}", "title": "Update a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -d '{\"firstName\": \"John\", \"lastName\": \"Doe\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "delete", "url": "/api/cm/custom_fields/{id}", "title": "Deletes a Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields", "title": "Gets a list of Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields -v -u {name}:{password}", "type": "json" } ], "name": "GetCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/custom_fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/custom_fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/custom_fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/custom_fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/custom_fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields/{id}", "title": "Gets a single Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "put", "url": "/api/cm/custom_fields/{id}", "title": "Update an existing Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "post", "url": "/api/cm/hopper", "title": "Creates a new Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopper", "group": "Cm_Hopper", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ContactId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ListId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "VoiceQueueId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "CampaignId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/describe", "title": "Gets table info about Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper", "title": "Gets a list of Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper", "group": "Cm_Hopper", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/{id}", "title": "Gets a single Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "delete", "url": "/api/cm/hopper_black/{id}", "title": "Deletes a Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/describe", "title": "Gets table info about Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black", "title": "Gets a list of Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_black?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_black?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_black?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_black?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_black?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/{id}", "title": "Gets a single Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "put", "url": "/api/cm/hopper_black/{id}", "title": "Update an existing Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_final/describe", "title": "Gets table info about HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final", "title": "Gets a list of HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_final?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_final?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_final?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_final?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_final?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/{id}", "title": "Gets a single HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/checkContactHopper", "title": "Check if contact is in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/checkContactHopper -d '{\"VoiceQueueId\": \"VoiceQueueId\", \"CampaignId\": \"CampaignId\", \"ContactId\": \"ContactId\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "_checkContactHopper", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/campaign/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/voice/queue/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/campaign/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "moveContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/voice/queue/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password}", "type": "json" } ], "name": "moveContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "put", "url": "/api/cm/hopper_final/{id}", "title": "Update a single hopper final", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_history", "title": "Creates a new HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopperHistory", "group": "Cm_Hopper_History", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "state", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "statedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countglobal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "responsetime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "answertime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "droptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ringtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "followuptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dropreason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaign", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaigntype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "amd", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "editedat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "edited", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/describe", "title": "Gets table info about HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history", "title": "Gets a list of HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_history?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_history?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_history?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_history?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_history?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/{id}", "title": "Gets a single HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "put", "url": "/api/cm/hopper_history/{id}", "title": "Update a single hopper history", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_history/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "delete", "url": "/api/cm/hopper/{id}", "title": "Delete Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/opencontacts", "title": "Gets Open Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/opencontacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOpenContacts", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/hopper/preview", "title": "Gets Preview Dialer Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/preview -d '{\"hopperIds\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getPreview", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "put", "url": "/api/cm/hopper/{id}", "title": "Update an existing Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/lists", "title": "Creates a new List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateLists", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}", "title": "Deletes a List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/describe", "title": "Gets table info about Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/users", "title": "Gets agents from list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists", "title": "Gets a list of Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -v -u {name}:{password}", "type": "json" } ], "name": "GetLists", "group": "Cm_Lists", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/lists?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/lists?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/lists?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/lists?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/lists?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/users", "title": "Removes agents from a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}", "title": "Gets a single List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/users", "title": "Adds agents to a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/fields", "title": "Creates a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomField", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/fields", "title": "Gets Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomFields", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/dispositions", "title": "Gets list dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts/csv", "title": "Gets CSV List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts/csv -v -u {name}:{password} -X GET", "type": "json" } ], "name": "grunt", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "put", "url": "/api/cm/lists/{id}", "title": "Update an existing List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/contacts/upload/:id", "title": "Import new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload/:id -v -u {name}:{password} -X POST", "type": "json" } ], "name": "import", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/upload", "title": "Upload csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "upload", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/csv", "title": "Create new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/csv -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadCsv", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "delete", "url": "/api/conditions/{id}", "title": "Deletes a Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "put", "url": "/api/conditions/{id}", "title": "Update an existing Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "post", "url": "/api/contact_item_types", "title": "Creates a new ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateContactItemTypes", "group": "ContactItemType", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rgbBackgroundColor", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "delete", "url": "/api/contact_item_types/{id}", "title": "Deletes a ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types", "title": "Gets a list of ContactItemTypes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -v -u {name}:{password}", "type": "json" } ], "name": "GetContactItemTypes", "group": "ContactItemType", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/contact_item_types?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/contact_item_types?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/contact_item_types?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/contact_item_types?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/contact_item_types?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types/{id}", "title": "Gets a single ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "put", "url": "/api/contact_item_types/{id}", "title": "Update an existing ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "post", "url": "/api/cm/custom_field", "title": "Create a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_field -d '{\"name\": \"mycf\", \"type\": \"text\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCustomField", "group": "Custom_Fields", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Custom_Fields" }, { "type": "post", "url": "/api/dashboards/items", "title": "Create dasboard item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Create", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "delete", "url": "/api/dashboards/items/{id}", "title": "Deletes a Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "get", "url": "/api/dashboards/items/{id}", "title": "Gets a single Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "put", "url": "/api/dashboards/items/{id}", "title": "Update an existing item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "post", "url": "/api/dashboards/clone", "title": "Clone an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards", "title": "Creates a new Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDashboards", "group": "Dashboards", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "delete", "url": "/api/dashboards/{id}", "title": "Deletes a Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards", "title": "Gets a list of Dashboards", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -v -u {name}:{password}", "type": "json" } ], "name": "GetDashboards", "group": "Dashboards", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dashboards?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dashboards?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dashboards?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dashboards?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dashboards?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}", "title": "Gets a single Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards/{id}/items", "title": "Creates new item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -d '{\"type\": \"counter\", \"...\": \"...\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addItem", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}/items", "title": "Gets items", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getItems", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "put", "url": "/api/dashboards/{id}", "title": "Update an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/integrations/desk/accounts", "title": "Creates a new Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Accounts", "group": "Desk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"basic\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tokenSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "delete", "url": "/api/integrations/desk/accounts/{id}", "title": "Deletes a Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts", "title": "Gets a list of Desk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}", "title": "Gets a single Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "put", "url": "/api/integrations/desk/accounts/{id}", "title": "Update an existing Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/configurations", "title": "Creates a new Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Configurations", "group": "Desk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "delete", "url": "/api/integrations/desk/configurations/{id}", "title": "Deletes a Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations", "title": "Gets a list of Desk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}", "title": "Gets a single Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "put", "url": "/api/integrations/desk/configurations/{id}", "title": "Update an existing Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/fields", "title": "Creates a new Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Fields", "group": "Desk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "delete", "url": "/api/integrations/desk/fields/{id}", "title": "Deletes a Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields", "title": "Gets a list of Desk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Fields", "group": "Desk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields/{id}", "title": "Gets a single Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "put", "url": "/api/integrations/desk/fields/{id}", "title": "Update an existing Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "post", "url": "/api/dispositions", "title": "Creates a new Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDispositions", "group": "Dispositions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "delete", "url": "/api/dispositions/{id}", "title": "Deletes a Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions", "title": "Gets a list of Dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -v -u {name}:{password}", "type": "json" } ], "name": "GetDispositions", "group": "Dispositions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dispositions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dispositions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dispositions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dispositions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dispositions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions/{id}", "title": "Gets a single Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "put", "url": "/api/dispositions/{id}", "title": "Update an existing Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts", "title": "Creates a new Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Accounts", "group": "Dynamics365_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tenantId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "delete", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Deletes a Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts", "title": "Gets a list of Dynamics365 Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Gets a single Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "put", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Update an existing Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/configurations", "title": "Creates a new Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Configurations", "group": "Dynamics365_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"incident\"", "\"phonecall\"" ], "optional": true, "field": "ticketType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "delete", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Deletes a Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations", "title": "Gets a list of Dynamics365 Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Gets a single Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "put", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Update an existing Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "post", "url": "/api/integrations/dynamics365/fields", "title": "Creates a new Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Fields", "group": "Dynamics365_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "delete", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Deletes a Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields", "title": "Gets a list of Dynamics365 Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Gets a single Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "put", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Update an existing Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "post", "url": "/api/fax/accounts/{id}/users", "title": "Add agents to a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ecm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "headerinfo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "localstationid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "minrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "maxrate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "modem", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "gateway", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "faxdetect", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "t38timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SIP\"", "\"IAX\"", "\"DADHI\"", "\"KHOMP\"" ], "optional": true, "field": "tech", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Fax_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/users", "title": "Gets agents from fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/users", "title": "Removes agents from a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/addaccountapplications", "title": "Creates new account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/addaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -d '[{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/applications", "title": "Gets account pplications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/send", "title": "Send new fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/send -d '{from: '\"John Doe\" <123456>'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendFax", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "put", "url": "/api/fax/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/updateaccountapplications", "title": "Update account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/updateaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "updateApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Fax_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "delete", "url": "/api/fax/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Fax_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "put", "url": "/api/fax/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "post", "url": "/api/fax/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Fax_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/download", "title": "Get interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "put", "url": "/api/fax/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/messages/{id}/download", "title": "Get message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Message", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Message" }, { "type": "delete", "url": "/api/fax/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Fax_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/messages", "title": "Create message and send Fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/reports/queue", "title": "Creates a new Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Queue_Reports", "group": "Fax_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "delete", "url": "/api/fax/reports/queue/{id}", "title": "Deletes a Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/describe", "title": "Gets table info about Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue", "title": "Gets a list of Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/{id}", "title": "Gets a single Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "put", "url": "/api/fax/reports/queue/{id}", "title": "Update an existing Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "post", "url": "/api/fax/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Fax_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "lastAgent", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Fax_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "put", "url": "/api/fax/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/reports/transfer", "title": "Creates a new Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "delete", "url": "/api/fax/reports/transfer/{id}", "title": "Deletes a Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/describe", "title": "Gets table info about Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer", "title": "Gets a list of Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/{id}", "title": "Gets a single Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "put", "url": "/api/fax/reports/transfer/{id}", "title": "Update an existing Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts", "title": "Creates a new Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "delete", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Deletes a Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts", "title": "Gets a list of Freshdesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Gets a single Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "put", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Update an existing Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations", "title": "Creates a new Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "delete", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Deletes a Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations", "title": "Gets a list of Freshdesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Gets a single Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "put", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Update an existing Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/fields", "title": "Creates a new Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Fields", "group": "Freshdesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "delete", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Deletes a Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields", "title": "Gets a list of Freshdesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Gets a single Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "put", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Update an existing Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "post", "url": "/api/integrations/freshsales/accounts", "title": "Creates a new Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Accounts", "group": "Freshsales_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "delete", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Deletes a Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts", "title": "Gets a list of Freshsales Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Gets a single Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "put", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Update an existing Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/configurations", "title": "Creates a new Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Configurations", "group": "Freshsales_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "delete", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Deletes a Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations", "title": "Gets a list of Freshsales Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Gets a single Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "put", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Update an existing Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "post", "url": "/api/integrations/freshsales/fields", "title": "Creates a new Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Fields", "group": "Freshsales_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "delete", "url": "/api/integrations/freshsales/fields/{id}", "title": "Deletes a Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields", "title": "Gets a list of Freshsales Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields/{id}", "title": "Gets a single Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "put", "url": "/api/integrations/freshsales/fields/{id}", "title": "Update an existing Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "post", "url": "/api/campaigns/{id}/blacklists", "title": "Add blacklists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/{id}/lists", "title": "Add lists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/clone", "title": "Clone an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns", "title": "Creates a new IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIVR_Campaigns", "group": "IVR_Campaigns", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ivr\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "limitCalls", "description": "

Max 200 calls.

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}", "title": "Deletes a IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacklists", "title": "Get IVR campaign blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/finals", "title": "Gets IVR campaign hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hopper_histories", "title": "Gets IVR campaign hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hoppers", "title": "Gets IVR campaign hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns", "title": "Gets a list of IVR Campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "GetIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/campaigns?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/campaigns?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/campaigns?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/campaigns?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/campaigns?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/lists", "title": "Get IVR campaign lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/blacklists", "title": "Remove blacklists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/lists", "title": "Remove lists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}", "title": "Gets a single IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacks", "title": "Gets IVR campaign hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "put", "url": "/api/campaigns/{id}", "title": "Update an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/integrations/reports", "title": "Creates a new Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntegration_Reports", "group": "Integration_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "integration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "eventChannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitStatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ticketId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "integrationId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contacts", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interface", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcalledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentconnectAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentcomplete", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcompleteAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentacw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentringnoanswer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentringnoanswerAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentdump", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentdumpAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastevent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "channelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "destchannelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destlanguage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destpriority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "attachment", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "text", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SENT\"", "\"SENDING\"", "\"RECEIVED\"", "\"FAILED\"" ], "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "app", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "projectId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "delete", "url": "/api/integrations/reports/{id}", "title": "Deletes a Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/describe", "title": "Gets table info about Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports", "title": "Gets a list of Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/{id}", "title": "Gets a single Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "put", "url": "/api/integrations/reports/{id}", "title": "Update an existing Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "post", "url": "/api/intervals", "title": "Creates a new Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntervals", "group": "Intervals", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "delete", "url": "/api/intervals/{id}", "title": "Deletes a Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals", "title": "Gets a list of Intervals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -v -u {name}:{password}", "type": "json" } ], "name": "GetIntervals", "group": "Intervals", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/intervals?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/intervals?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/intervals?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/intervals?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/intervals?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}", "title": "Gets a single Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals", "title": "Creates a new sub interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -d '{\"interval\": \"00:00-08:30,mon-fri,*,*\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInterval", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals/create_many", "title": "Create new sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}/sub_intervals", "title": "Get sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "put", "url": "/api/intervals/{id}", "title": "Update an existing Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/jira", "title": "Creates a new issue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jira -d '{\"key\": \"Bug\", \"description\": \"I can't do it!\"}' \\\n -H \"Content-Type: application/json\" -X POST -v -u {name}:{password}", "type": "json" } ], "name": "Creates_Issue", "group": "Issue", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"Bug\"" ], "optional": true, "field": "issuetype", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "summary", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jira/index.js", "groupTitle": "Issue" }, { "type": "post", "url": "/api/jscripty/answers/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyAnswerReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "delete", "url": "/api/jscripty/answers/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyAnswerReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/answers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/answers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/answers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/answers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/answers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "put", "url": "/api/jscripty/answers/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "post", "url": "/api/jscripty/questions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyQuestionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "delete", "url": "/api/jscripty/questions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyQuestionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/questions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/questions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/questions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/questions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/questions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "put", "url": "/api/jscripty/questions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "post", "url": "/api/jscripty/sessions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptySessionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "completed", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "delete", "url": "/api/jscripty/sessions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptySessionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/sessions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/sessions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/sessions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/sessions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/sessions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}/questions", "title": "Gets Jscripty Session questions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id}/questions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getQuestions", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "put", "url": "/api/jscripty/sessions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "post", "url": "/api/jscripty/projects/clone", "title": "Clone an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "post", "url": "/api/jscripty/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Jscripty_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUncompleteSave", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendUnpauseOnSubmit", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "delete", "url": "/api/jscripty/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Jscripty_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/answers", "title": "Gets jscripty project answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/sessions", "title": "Gets jscripty project sessions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/sessions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSessions", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/summary", "title": "Gets jscripty project summary", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/summary -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSummary", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "put", "url": "/api/jscripty/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/license", "title": "Gets License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license -v -u {name}:{password} -X GET", "type": "json" } ], "name": "index", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "put", "url": "/api/license/{id}", "title": "Update License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "post", "url": "/api/mail/accounts/{id}/users", "title": "Add agents to a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/in_servers", "title": "Creates a new IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddImap", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tls", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "connTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "authTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/out_servers", "title": "Creates a new SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmtp", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}", "title": "Deletes a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMailAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Mail_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/users", "title": "Gets agents from mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/in_servers", "title": "Gets account IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetImap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/out_servers", "title": "Gets account SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/users", "title": "Removes agents from a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/in_servers", "title": "Removes IMAP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveImmap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/out_servers", "title": "Removes SMTP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -d '[{\"subject\": \"My printer is on fire!\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts", "title": "Create a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/send", "title": "Send new mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/send -d '{from: '\"John Doe\" '}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendMail", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "put", "url": "/api/mail/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/verify", "title": "Verify mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/verify -v -u {name}:{password} -X GET", "type": "json" } ], "name": "verifySmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "get", "url": "/api/mail/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "put", "url": "/api/mail/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "post", "url": "/api/mail/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Mail_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions/{id}/messages", "title": "Creates new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -d '[{\"to\": \"sales@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "plainBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originTo", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originCc", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "put", "url": "/api/mail/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Mail_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/messages", "title": "Create a message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}/download", "title": "Gets message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/reports/queue", "title": "Creates a new Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Queue_Reports", "group": "Mail_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "delete", "url": "/api/mail/reports/queue/{id}", "title": "Deletes a Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/describe", "title": "Gets table info about Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue", "title": "Gets a list of Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/{id}", "title": "Gets a single Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "put", "url": "/api/mail/reports/queue/{id}", "title": "Update an existing Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "post", "url": "/api/mail/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Mail_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Mail_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "put", "url": "/api/mail/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/out_servers", "title": "Creates a new SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSMTPs", "group": "Mail_SMTP", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "delete", "url": "/api/mail/out_servers/{id}", "title": "Deletes a SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers", "title": "Gets a list of SMTPs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -v -u {name}:{password}", "type": "json" } ], "name": "GetSMTPs", "group": "Mail_SMTP", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/out_servers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/out_servers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/out_servers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/out_servers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/out_servers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers/{id}", "title": "Gets a single SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "put", "url": "/api/mail/out_servers/{id}", "title": "Update an existing SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "post", "url": "/api/mail/substatuses", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSubstatuses", "group": "Mail_Substatuses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "delete", "url": "/api/mail/substatuses/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/describe", "title": "Gets table info about Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses", "title": "Gets a list of Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -v -u {name}:{password}", "type": "json" } ], "name": "GetSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/substatuses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/substatuses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/substatuses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/substatuses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/substatuses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "put", "url": "/api/mail/substatuses/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "post", "url": "/api/mail/reports/transfer", "title": "Creates a new Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "delete", "url": "/api/mail/reports/transfer/{id}", "title": "Deletes a Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/describe", "title": "Gets table info about Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer", "title": "Gets a list of Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/{id}", "title": "Gets a single Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "put", "url": "/api/mail/reports/transfer/{id}", "title": "Update an existing Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/members/reports/describe", "title": "Gets table info about Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports", "title": "Gets a list of Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetMember_Reports", "group": "Member_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/members/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/members/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/members/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/members/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/members/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports/{id}", "title": "Gets a single Member Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/migrations", "title": "Gets a list of Migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/migrations -v -u {name}:{password}", "type": "json" } ], "name": "GetMigrations", "group": "Migrations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/migrations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/migrations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/migrations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/migrations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/migrations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/migration/index.js", "groupTitle": "Migrations" }, { "type": "post", "url": "/api/voice/networks", "title": "Create a new network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Networks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "delete", "url": "/api/voice/networks/{id}", "title": "Deletes a network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Networks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks", "title": "Gets a list of Networks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks -v -u {name}:{password}", "type": "json" } ], "name": "GetNetworks", "group": "Networks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/networks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/networks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/networks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/networks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/networks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks/{id}", "title": "Gets a single Network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowNetworks", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "put", "url": "/api/voice/networks/{id}", "title": "Update an existing network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "post", "url": "/api/notifications", "title": "Send notification to user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/notifications -d '{\"text\": \"Hello!\", \"TemplateId\": 1}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Send", "group": "Notifications", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/notification/index.js", "groupTitle": "Notifications" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/users", "title": "Add agents to a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "replyUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Openchannel_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/users", "title": "Gets agents from openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/users", "title": "Removes agents from a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/interactions", "title": "Gets Openchannel Account Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

Follow this link to check the documentation:

https://wiki.xcallymotion.com/display/XMV/New+Channels+Configuration+Steps#NewChannelsConfigurationSteps-BuildyourownChannelservice

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/send", "title": "Send new openchannel message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/send -d '{from: 'John Doe', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendOpenchannel", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "put", "url": "/api/openchannel/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Openchannel_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "delete", "url": "/api/openchannel/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Openchannel_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "put", "url": "/api/openchannel/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "externalUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Openchannel_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "put", "url": "/api/openchannel/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Openchannel_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "delete", "url": "/api/openchannel/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Openchannel_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "post", "url": "/api/openchannel/reports/queue", "title": "Creates a new Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/queue/{id}", "title": "Deletes a Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/describe", "title": "Gets table info about Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue", "title": "Gets a list of Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/{id}", "title": "Gets a single Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "put", "url": "/api/openchannel/reports/queue/{id}", "title": "Update an existing Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "post", "url": "/api/openchannel/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Openchannel_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Openchannel_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "put", "url": "/api/openchannel/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/reports/transfer", "title": "Creates a new Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/transfer/{id}", "title": "Deletes a Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/describe", "title": "Gets table info about Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer", "title": "Gets a list of Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/{id}", "title": "Gets a single Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "put", "url": "/api/openchannel/reports/transfer/{id}", "title": "Update an existing Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "post", "url": "/api/pauses", "title": "Creates a new Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreatePauses", "group": "Pauses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "delete", "url": "/api/pauses/{id}", "title": "Deletes a Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses", "title": "Gets a list of Pauses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -v -u {name}:{password}", "type": "json" } ], "name": "GetPauses", "group": "Pauses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/pauses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/pauses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/pauses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/pauses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/pauses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses/{id}", "title": "Gets a single Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "put", "url": "/api/pauses/{id}", "title": "Update an existing Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/plugins", "title": "Gets a list of Plugins", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -v -u {name}:{password}", "type": "json" } ], "name": "GetPlugins", "group": "Plugins", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/plugins?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/plugins?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/plugins?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/plugins?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/plugins?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}", "title": "Gets a single Plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPlugins", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/plugins/{id}", "title": "Delete a plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroyPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}/download", "title": "Download plugin source code", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "put", "url": "/api/plugins/{id}", "title": "Update an existing plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins", "title": "Upload new plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -H 'Content-Type: application/json' -X POST", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/pm2/{id}", "title": "Deletes an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2/{id}", "title": "Gets a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2", "title": "Gets pm2 processes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Processes", "group": "Pm2", "description": "

Motion returns the pm2 processes list.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "post", "url": "/api/pm2", "title": "Start a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -d '{\"name\": \"process_name\", \"script\": \"/index.js\"}'\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "StartPm2Process", "group": "Pm2", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "script", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "put", "url": "/api/pm2/{id}", "title": "Update an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -d '{\"status\": \"online\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "UpdatePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/rpc/campaigns/", "title": "Gets a list of campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "Campaigns", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime campaigns parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/accounts", "title": "Gets a list of FaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "FaxAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "put", "url": "/api/rpc/agents/:id/capacity", "title": "Sets agent capacity", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/capacity -v -u {name}:{password}", "type": "json" } ], "name": "RTAgentCapacity", "group": "RPC_Realtime", "description": "

Motion will return the current agent capacity.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/agents", "title": "Gets a list of RTAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents -v -u {name}:{password}", "type": "json" } ], "name": "RTAgents", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime agents parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues", "title": "Gets a list of RTChatQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime chat queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues", "title": "Gets a list of RTFaxQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/accounts", "title": "Gets a list of RTMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "RTMailAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues", "title": "Gets a list of RTMailQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues", "title": "Gets a list of RTOpenchannelQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime openchannel queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound/channels", "title": "Gets a list of RTOutboundChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTOutboundChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues", "title": "Gets a list of RTSmsQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime sms queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/telephones", "title": "Gets a list of RTTelephones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/telephones -v -u {name}:{password}", "type": "json" } ], "name": "RTTelephones", "group": "RPC_Realtime", "description": "

Motion will return a list of telephones parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/trunks", "title": "Gets a list of RTTrunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/trunks -v -u {name}:{password}", "type": "json" } ], "name": "RTTrunks", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime trunks parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/mixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel mixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelStopMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/stopmixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelStopMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel stopmixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}", "title": "Gets a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannel", "group": "RPC_Realtime", "description": "

Motion will return a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/hangup", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/hangup -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelHangup", "group": "RPC_Realtime", "description": "

Motion will hangup a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten}", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelRedirect", "group": "RPC_Realtime", "description": "

Motion will redirect a specific realtime voice queue channel to a specific extension.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/preview/{id}", "title": "Gets a single preview contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/preview/{id} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuePreview", "group": "RPC_Realtime", "description": "

Motion will return a specific preview contact.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound", "title": "Gets a list of RTOutbound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues", "title": "Gets a list of RTVoiceQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels", "title": "Gets a list of RTVoiceQueuesChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuesChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/{id}", "title": "Gets a single RTChatQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/{id}", "title": "Gets a single RTFaxQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/{id}", "title": "Gets a single RTMailQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/{id}", "title": "Gets a single RTOpenchannelQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/{id}", "title": "Gets a single RTSmsQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/{id}", "title": "Gets a single RTVoiceQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/agents/:id/notify", "title": "Notify message to a specific agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/notify -d '{\"messageId\": \"5080\", \"channel\": \"mail\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "agentNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific agent.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/chat/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "chatQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/waitinginteractions", "title": "Gets a list of chatQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "chatQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting chat queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/fax/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "faxQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/waitinginteractions", "title": "Gets a list of faxQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "faxQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting fax queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/mail/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "mailQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/waitinginteractions", "title": "Gets a list of mailQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "mailQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting mail queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/openchannel/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "openchannelQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/:id/waitinginteractions", "title": "Gets a list of openchannelQueuesIdWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesIdWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/waitinginteractions", "title": "Gets a list of openchannelQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/sms/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "smsQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/waitinginteractions", "title": "Gets a list of smsQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "smsQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting sms queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/integrations/salesforce/accounts", "title": "Creates a new Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Accounts", "group": "Salesforce_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "securityToken", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "delete", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Deletes a Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts", "title": "Gets a list of Salesforce Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Gets a single Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "put", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Update an existing Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/configurations", "title": "Creates a new Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Configurations", "group": "Salesforce_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Task\"", "\"Case\"" ], "optional": true, "field": "ticketType", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"nothing\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleCreate", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "delete", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Deletes a Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations", "title": "Gets a list of Salesforce Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Gets a single Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "put", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Update an existing Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "post", "url": "/api/integrations/salesforce/fields", "title": "Creates a new Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Fields", "group": "Salesforce_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "delete", "url": "/api/integrations/salesforce/fields/{id}", "title": "Deletes a Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields", "title": "Gets a list of Salesforce Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields/{id}", "title": "Gets a single Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "put", "url": "/api/integrations/salesforce/fields/{id}", "title": "Update an existing Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "post", "url": "/api/schedules", "title": "Creates a new Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSchedules", "group": "Schedules", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "cron", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "startAt", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "endAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "subtractNumber", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"years\"", "\"quarters\"", "\"months\"", "\"weeks\"", "\"days\"", "\"hours\"", "\"minutes\"" ], "optional": false, "field": "subtractUnit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"custom\"", "\"default\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendMail", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendIfEmpty", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "delete", "url": "/api/schedules/{id}", "title": "Deletes a Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules", "title": "Gets a list of Schedules", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -v -u {name}:{password}", "type": "json" } ], "name": "GetSchedules", "group": "Schedules", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/schedules?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/schedules?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/schedules?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/schedules?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/schedules?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}", "title": "Gets a single Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}/run", "title": "Run Scheduler", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "put", "url": "/api/schedules/{id}", "title": "Update an existing Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "post", "url": "/api/screen/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Screen_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interactionid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Screen_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/screen/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/screen/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/screen/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/screen/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/screen/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "delete", "url": "/api/screen/recordings/{id}", "title": "Delete screen recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "put", "url": "/api/screen/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "post", "url": "/api/integrations/servicenow/accounts", "title": "Creates a new Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Accounts", "group": "Servicenow_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "delete", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Deletes a Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts", "title": "Gets a list of Servicenow Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Gets a single Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "put", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Update an existing Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/configurations", "title": "Creates a new Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Configurations", "group": "Servicenow_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "delete", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Deletes a Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations", "title": "Gets a list of Servicenow Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Gets a single Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "put", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Update an existing Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "post", "url": "/api/integrations/servicenow/fields", "title": "Creates a new Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Fields", "group": "Servicenow_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "delete", "url": "/api/integrations/servicenow/fields/{id}", "title": "Deletes a Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields", "title": "Gets a list of Servicenow Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields/{id}", "title": "Gets a single Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "put", "url": "/api/integrations/servicenow/fields/{id}", "title": "Update an existing Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/settings", "title": "Gets a list of Settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings -v -u {name}:{password}", "type": "json" } ], "name": "GetSettings", "group": "Settings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/settings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/settings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/settings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/settings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/settings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}", "title": "Gets a single Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/favicon", "title": "Add Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo_login", "title": "Add logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/preferred", "title": "Add Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/now", "title": "Get Server Current Date", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/now -v -X GET", "type": "json" } ], "name": "getDate", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/favicon", "title": "Get Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -v -X GET", "type": "json" } ], "name": "getFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/gdpr", "title": "Get gdpr settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/gdpr -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getGdpr", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -v -X GET", "type": "json" } ], "name": "getLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo_login", "title": "Get logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -v -X GET", "type": "json" } ], "name": "getLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/preferred", "title": "Get Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -v -X GET", "type": "json" } ], "name": "getPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "put", "url": "/api/settings/{id}", "title": "Update an existing Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/sms/accounts/{id}/users", "title": "Add agents to a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"", "\"skebby\"", "\"connectel\"", "\"clicksend\"", "\"plivo\"", "\"clickatell\"", "\"csc\"", "\"infobip\"", "\"intelepeer\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SI\"", "\"TI\"", "\"GP\"" ], "optional": true, "field": "smsMethod", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "senderString", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "deliveryReport", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "baseUrl", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Sms_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/users", "title": "Gets agents from sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/users", "title": "Removes agents from a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/interactions", "title": "Gets Sms Account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new sms message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/send", "title": "Send new sms message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendSms", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status as get request", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X GET", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Sms_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "delete", "url": "/api/sms/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Sms_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "put", "url": "/api/sms/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "post", "url": "/api/sms/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Sms_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "put", "url": "/api/sms/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Sms_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "delete", "url": "/api/sms/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Sms_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "put", "url": "/api/sms/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "post", "url": "/api/sms/reports/queue", "title": "Creates a new Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Queue_Reports", "group": "Sms_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "delete", "url": "/api/sms/reports/queue/{id}", "title": "Deletes a Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/describe", "title": "Gets table info about Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue", "title": "Gets a list of Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/{id}", "title": "Gets a single Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "put", "url": "/api/sms/reports/queue/{id}", "title": "Update an existing Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "post", "url": "/api/sms/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Sms_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Sms_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "put", "url": "/api/sms/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/reports/transfer", "title": "Creates a new Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "delete", "url": "/api/sms/reports/transfer/{id}", "title": "Deletes a Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/describe", "title": "Gets table info about Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer", "title": "Gets a list of Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/{id}", "title": "Gets a single Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "put", "url": "/api/sms/reports/transfer/{id}", "title": "Update an existing Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sounds", "title": "Gets a list of Sounds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -v -u {name}:{password}", "type": "json" } ], "name": "GetSounds", "group": "Sounds", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sounds?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sounds?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sounds?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sounds?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sounds?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}", "title": "Gets a single Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSounds", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/sounds", "title": "Create a new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "delete", "url": "/api/sounds/{id}", "title": "Deletes a sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroySound", "group": "Sounds", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}/download", "title": "Download Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "put", "url": "/api/sounds", "title": "Update an existing new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -d '[\"name\": \"sound_name\", \"description\": \"sound_desc\"]' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/square/details/reports", "title": "Creates a new Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Detail_Reports", "group": "Square_Details_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "node", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "application", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "delete", "url": "/api/square/details/reports/{id}", "title": "Deletes a Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/describe", "title": "Gets table info about Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports", "title": "Gets a list of Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/details/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/details/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/details/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/details/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/details/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/{id}", "title": "Gets a single Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "put", "url": "/api/square/details/reports/{id}", "title": "Update an existing Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "post", "url": "/api/square/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Square_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "delete", "url": "/api/square/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Square_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "put", "url": "/api/square/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "post", "url": "/api/square/odbc", "title": "Creates a new ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateODBCs", "group": "Square_ODBC", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dsn", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "delete", "url": "/api/square/odbc/{id}", "title": "Deletes a ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc", "title": "Gets a list of ODBCs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -v -u {name}:{password}", "type": "json" } ], "name": "GetODBCs", "group": "Square_ODBC", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/odbc?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/odbc?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/odbc?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/odbc?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/odbc?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}", "title": "Gets a single ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}/test", "title": "Test Odbc", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id}/test -v -u {name}:{password} -X GET", "type": "json" } ], "name": "test", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "put", "url": "/api/square/odbc/{id}", "title": "Update an existing ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "post", "url": "/api/square/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Square_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notes", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "preproduction", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "production", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "publishedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Square_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/projects/{id}/users", "title": "Adds user permissions to a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}/users", "title": "Gets users permissions from Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}/users", "title": "Removes user permissions from a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "removeUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "put", "url": "/api/square/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Square_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "saveName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "filename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savePath", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Square_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "delete", "url": "/api/square/recordings/{id}/delete", "title": "Delete recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/delete -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "put", "url": "/api/square/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "post", "url": "/api/square/reports", "title": "Creates a new Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Reports", "group": "Square_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "network", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "network_script", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "request", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "version", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingani2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callington", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingtns", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rdnis", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "enhanced", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "bot", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "delete", "url": "/api/square/reports/{id}", "title": "Deletes a Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/describe", "title": "Gets table info about Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports", "title": "Gets a list of Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Reports", "group": "Square_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/{id}", "title": "Gets a single Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "put", "url": "/api/square/reports/{id}", "title": "Update an existing Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "post", "url": "/api/integrations/sugarcrm/configurations", "title": "Creates a new SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "delete", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Deletes a SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations", "title": "Gets a list of SugarCRM Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Gets a single SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "put", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Update an existing SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts", "title": "Creates a new Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "delete", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Deletes a Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts", "title": "Gets a list of Sugarcrm Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Gets a single Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "put", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Update an existing Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/fields", "title": "Creates a new Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Fields", "group": "Sugarcrm_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "delete", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Deletes a Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields", "title": "Gets a list of Sugarcrm Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Gets a single Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "put", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Update an existing Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/system/process", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "get", "url": "/api/system", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "post", "url": "/api/tags", "title": "Creates a new Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTags", "group": "Tags", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "delete", "url": "/api/tags/{id}", "title": "Deletes a Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTags", "group": "Tags", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags", "title": "Gets a list of Tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -v -u {name}:{password}", "type": "json" } ], "name": "GetTags", "group": "Tags", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/tags?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/tags?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/tags?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/tags?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/tags?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags/{id}", "title": "Gets a single Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "put", "url": "/api/tags/{id}", "title": "Update an existing Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "post", "url": "/api/teams/{id}/queues", "title": "Add queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams", "title": "Creates a new Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTeams", "group": "Teams", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}", "title": "Deletes a Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/users", "title": "Gets agents from team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel={channel} -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams", "title": "Gets a list of Teams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Teams", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/teams?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/teams?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/teams?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/teams?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/teams?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/users", "title": "Removes agents from a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/queues", "title": "Remove queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel=voice&ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/mail/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/voice/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/fax/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/chat/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/sms/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}", "title": "Gets a single Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams/{id}/users", "title": "Adds agents to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "put", "url": "/api/teams/{id}", "title": "Update an existing Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/templates", "title": "Creates a new Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTemplates", "group": "Templates", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "delete", "url": "/api/templates/{id}", "title": "Deletes a Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates", "title": "Gets a list of Templates", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -v -u {name}:{password}", "type": "json" } ], "name": "GetTemplates", "group": "Templates", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/templates?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/templates?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/templates?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/templates?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/templates?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates/{id}", "title": "Gets a single Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "put", "url": "/api/templates/{id}", "title": "Update an existing Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "post", "url": "/api/triggers", "title": "Creates a new Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTriggers", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "delete", "url": "/api/triggers/{id}", "title": "Deletes a Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers", "title": "Gets a list of Triggers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -v -u {name}:{password}", "type": "json" } ], "name": "GetTriggers", "group": "Triggers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/triggers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/triggers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/triggers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/triggers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/triggers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}", "title": "Gets a single Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -d '{\"action\": \"contactManager\",\"data1\": \"1\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAction", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/all_conditions", "title": "Creates a new \"AND\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAllCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/any_conditions", "title": "Creates a new \"OR\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnyCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/actions", "title": "Gets Trigger Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/all_conditions", "title": "Gets \"AND\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAllConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/any_conditions", "title": "Gets \"OR\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnyConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "put", "url": "/api/triggers/{id}", "title": "Update an existing Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/trunks/clone", "title": "Clone an existing Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/trunks", "title": "Create a new trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Trunks", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"friend\"", "\"user\"", "\"peer\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "context", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ALLOWED_NOT_SCREENED\"", "\"ALLOWED_PASSED_SCREEN\"", "\"ALLOWED_FAILED_SCREEN\"", "\"ALLOWED\"", "\"PROHIB_NOT_SCREENED\"", "\"PROHIB_PASSED_SCREEN\"", "\"PROHIB_FAILED_SCREEN\"", "\"PROHIB\"" ], "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "permit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "md5secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remotesecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transport", "description": "

String is deprecated. Please use an Array as ["udp", "tcp"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rfc2833\"", "\"info\"", "\"shortinfo\"", "\"inband\"", "\"auto\"" ], "optional": true, "field": "dtmfmode", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"outgoing\"" ], "optional": true, "field": "directmedia", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "directrtpsetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediapermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediadeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nat", "description": "

String is deprecated. Please use an Array as ["force_rport", "comedia"]

" }, { "group": "Body", "type": "String", "optional": true, "field": "callgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedcallgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedpickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tonezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disallow", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "allow", "description": "

String is deprecated. Please use an Array as ["ulaw", "alaw", "alaw"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autoframing", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "insecure", "description": "

String is deprecated. Please use an Array as ["port", "invite"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trustrpid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trust_id_outbound", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"never\"" ], "optional": true, "field": "progressinband", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "promiscredir", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "useclientcode", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "setvar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "callcounter", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "busylevel", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowoverlap", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowsubscribe", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowtransfer", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ignoresdpversion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subscribecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "template", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"always\"" ], "optional": true, "field": "videosupport", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxcallbitrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "rfc2833compensate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"accept\"", "\"refuse\"", "\"originate\"" ], "optional": true, "field": "session_timers", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_expires", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_minse", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"uac\"", "\"uas\"" ], "optional": true, "field": "session_refresher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_usertpsource", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "regexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromdomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "qualify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "keepalive", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultip", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtptimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpholdtimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpkeepalive", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"pai\"" ], "optional": true, "field": "sendrpid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "outboundproxy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackextension", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timert1", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timerb", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "qualifyfreq", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactpermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactdeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactacl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unsolicited_mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "use_q850_reason", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxforwards", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "encryption", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "avpf", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "force_avp", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "icesupport", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "dtlsenable", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"fingerprint\"", "\"certificate\"" ], "optional": true, "field": "dtlsverify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dtlsrekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscertfile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsprivatekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscipher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscafile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscapath", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"active\"", "\"passive\"", "\"actpass\"" ], "optional": true, "field": "dtlssetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsfingerprint", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "usereqphone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordonfeature", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordofffeature", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "call_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "registertrying", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "subscribemwi", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vmexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohinterpret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohsuggest", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parkinglot", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"update,nonat\"" ], "optional": true, "field": "canreinvite", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "registry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "otherFields", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_udptl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "delete", "url": "/api/trunks/{id}", "title": "Deletes a trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Trunks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks", "title": "Gets a list of Trunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password}", "type": "json" } ], "name": "GetTrunks", "group": "Trunks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/trunks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/trunks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/trunks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/trunks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/trunks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks/{id}", "title": "Gets a single Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "put", "url": "/api/trunks/{id}", "title": "Update an existing trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/user_has_chat_interactions", "title": "Creates a new UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserChatInteractions", "group": "UserChatInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "delete", "url": "/api/user_has_chat_interactions/{id}", "title": "Deletes a UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions", "title": "Gets a list of UserChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_chat_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_chat_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_chat_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_chat_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_chat_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions/{id}", "title": "Gets a single UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "put", "url": "/api/user_has_chat_interactions/{id}", "title": "Update an existing UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "post", "url": "/api/user_has_fax_interactions", "title": "Creates a new UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserFaxInteractions", "group": "UserFaxInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "FaxInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "delete", "url": "/api/user_has_fax_interactions/{id}", "title": "Deletes a UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions", "title": "Gets a list of UserFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_fax_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_fax_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_fax_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_fax_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_fax_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions/{id}", "title": "Gets a single UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "put", "url": "/api/user_has_fax_interactions/{id}", "title": "Update an existing UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "post", "url": "/api/user_has_mail_interactions", "title": "Creates a new UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserMailInteractions", "group": "UserMailInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "MailInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "delete", "url": "/api/user_has_mail_interactions/{id}", "title": "Deletes a UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions", "title": "Gets a list of UserMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_mail_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_mail_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_mail_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_mail_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_mail_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions/{id}", "title": "Gets a single UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "put", "url": "/api/user_has_mail_interactions/{id}", "title": "Update an existing UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "post", "url": "/api/user_has_openchannel_interactions", "title": "Creates a new UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "OpenchannelInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "delete", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Deletes a UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions", "title": "Gets a list of UserOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_openchannel_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_openchannel_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_openchannel_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_openchannel_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_openchannel_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Gets a single UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "put", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Update an existing UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "post", "url": "/api/user_has_sms_interactions", "title": "Creates a new UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserSmsInteractions", "group": "UserSmsInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "SmsInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "delete", "url": "/api/user_has_sms_interactions/{id}", "title": "Deletes a UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions", "title": "Gets a list of UserSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_sms_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_sms_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_sms_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_sms_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_sms_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions/{id}", "title": "Gets a single UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "put", "url": "/api/user_has_sms_interactions/{id}", "title": "Update an existing UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "post", "url": "/api/user_has_whatsapp_interactions", "title": "Creates a new UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "WhatsappInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "delete", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Deletes a UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions", "title": "Gets a list of UserWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_whatsapp_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_whatsapp_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_whatsapp_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_whatsapp_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_whatsapp_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Gets a single UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "put", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Update an existing UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "post", "url": "/api/userProfile/resources", "title": "Creates a new User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Resources", "group": "User_Profile_Resources", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "resourceId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "delete", "url": "/api/userProfile/resources/{id}", "title": "Deletes a User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/describe", "title": "Gets table info about User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources", "title": "Gets a list of User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/resources?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/resources?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/resources?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/resources?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/resources?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/{id}", "title": "Gets a single User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "put", "url": "/api/userProfile/resources/{id}", "title": "Update an existing User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "post", "url": "/api/userProfile/sections", "title": "Creates a new User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Sections", "group": "User_Profile_Sections", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "category", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "sectionId", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enabled", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoAssociation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "crudPermissions", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "delete", "url": "/api/userProfile/sections/{id}", "title": "Deletes a User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/describe", "title": "Gets table info about User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections", "title": "Gets a list of User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/sections?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/sections?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/sections?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/sections?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/sections?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/{id}", "title": "Gets a single User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "put", "url": "/api/userProfile/sections/{id}", "title": "Update an existing User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "post", "url": "/api/userProfiles/{id}/resources", "title": "Add resources' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/{id}/sections", "title": "Add sections' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -d '[{\"sectionId\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/clone", "title": "Clone an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles", "title": "Creates a new User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profiles", "group": "User_Profiles", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "crudPermissions", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}", "title": "Deletes a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/describe", "title": "Gets table info about User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/resources?section={section}", "title": "Get Resources assigned to a Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?section={section} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/sections", "title": "Get sections associated to a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles", "title": "Gets a list of User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profiles", "group": "User_Profiles", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfiles?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfiles?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfiles?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfiles?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfiles?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/resources", "title": "Removes resources' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/sections", "title": "Removes sections' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}", "title": "Gets a single User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "put", "url": "/api/userProfiles/{id}", "title": "Update an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/users/{id}/chat_interactions", "title": "Add chat interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/chat_websites", "title": "Add a Chat Website to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/contacts", "title": "Add contacts to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -d '{\"ids\": [1,2]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddContacts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_accounts", "title": "Add a Fax Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_interactions", "title": "Add fax interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_accounts", "title": "Add a Mail Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_interactions", "title": "Add mail interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_accounts", "title": "Add a Open Channel Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_interactions", "title": "Add openchannel interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/queues", "title": "Add queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_accounts", "title": "Add a Sms Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_interactions", "title": "Add sms interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/square_projects", "title": "Add a Square Project to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/teams", "title": "Add teams to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_accounts", "title": "Add a Whatsapp Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_interactions", "title": "Add Whatsapp interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}/password", "title": "Change user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/password -d '{\"oldPassword\": \"1234\", \"newPassword\": \"5678\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "ChangePwd", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users", "title": "Create a new user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/api_key", "title": "Create a new API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}", "title": "Deletes a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/describe", "title": "Gets table info about Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/agents", "title": "GetAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/agents -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/api_key", "title": "Get the API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/groups", "title": "GetChatGroups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/groups -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatGroups", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat/interactions", "title": "GetChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat_websites", "title": "GetChatWebsites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/contacts", "title": "GetContacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetContacts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax_accounts", "title": "GetFaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax/interactions", "title": "GetFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/lists", "title": "GetLists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail_accounts", "title": "GetMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail/interactions", "title": "GetMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel_accounts", "title": "GetOpenchannelAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel/interactions", "title": "GetOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/prefixes", "title": "GetPrefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/prefixes -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetPrefixes", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues/?channel={channel} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetQueues", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/recordings", "title": "GetRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/scheduled_calls", "title": "GetScheduledCalls", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/scheduled_calls -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScheduledCalls", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/screen_recordings", "title": "GetScreenRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/screen_recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScreenRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms_accounts", "title": "GetSmsAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms/interactions", "title": "GetSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/square_projects", "title": "GetSquareProjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/teams", "title": "GetTeams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users", "title": "Gets a list of Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -v -u {name}:{password}", "type": "json" } ], "name": "GetUsers", "group": "Users", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/users?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/users?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/users?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/users?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/users?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues_rt", "title": "GetVoiceQueuesRt", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues_rt -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetVoiceQueuesRt", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp_accounts", "title": "GetWhatsappAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp/interactions", "title": "GetWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/login", "title": "Login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/login -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Login", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/logout", "title": "Logout", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/logout -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Logout", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/pause", "title": "Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/pause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Pause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/api_key", "title": "Remove API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_websites", "title": "Removes a Chat Website from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_accounts", "title": "Removes a Fax Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_accounts", "title": "Removes a Mail Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_accounts", "title": "Removes a Open Channel Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_interactions", "title": "Removes openchannel interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/queues", "title": "Remove queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_accounts", "title": "Removes a Sms Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/square_projects", "title": "Removes a Square Project from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/teams", "title": "Removes teams from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_accounts", "title": "Removes a Whatsapp Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_interactions", "title": "Removes Whatsapp interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}", "title": "Gets a single User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/unpause", "title": "Unpause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/unpause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Unpause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/whoami", "title": "WhoAmI", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/whoami -v -u {name}:{password} -X GET", "type": "json" } ], "name": "WhoAmI", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/create_many", "title": "Create Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/create_many -d '[{\"name\": \"john.doe\", \"role\": \"user\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}", "title": "Update an existing User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/variables", "title": "Creates a new Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVariables", "group": "Variables", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "delete", "url": "/api/variables/{id}", "title": "Deletes a Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables", "title": "Gets a list of Variables", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -v -u {name}:{password}", "type": "json" } ], "name": "GetVariables", "group": "Variables", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/variables?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/variables?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/variables?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/variables?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/variables?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables/{id}", "title": "Gets a single Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "put", "url": "/api/variables/{id}", "title": "Update an existing Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/version/fetch", "title": "Fetch git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/fetch -v -u {name}:{password}", "type": "json" } ], "name": "FetchVersion", "group": "Version", "description": "

Motion run the following command: git fetch origin master

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version", "title": "Gets version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version -v -u {name}:{password}", "type": "json" } ], "name": "GetVersion", "group": "Version", "description": "

Motion returns the current and latest motion version.

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/migrations", "title": "Launch database migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/migrations -v -u {name}:{password}", "type": "json" } ], "name": "MigrateVersion", "group": "Version", "description": "

Motion launch the database migrations, according to the application version

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/pull", "title": "Pull git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/pull -v -u {name}:{password}", "type": "json" } ], "name": "PullVersion", "group": "Version", "description": "

Motion run the following command: git pull

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/reset", "title": "Reset git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/reset -v -u {name}:{password}", "type": "json" } ], "name": "ResetVersion", "group": "Version", "description": "

Motion run the following command: git reset --hard FETCH_HEAD

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/restart", "title": "Restart motion2 after update", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/restart -v -u {name}:{password}", "type": "json" } ], "name": "RestartVersion", "group": "Version", "description": "

Motion run the following command: pm2 restart motion

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/voice/agents/reports/describe", "title": "Gets table info about Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports", "title": "Gets a list of Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/agents/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/agents/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/agents/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/agents/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/agents/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports/{id}", "title": "Gets a single Agent Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/describe", "title": "Gets table info about Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports", "title": "Gets a list of Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/calls/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/calls/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/calls/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/calls/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/calls/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/{id}", "title": "Gets a single Call Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "put", "url": "/api/voice/calls/reports/{id}", "title": "Update a single cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -d '{\"userDispositio\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "post", "url": "/api/voice/chanspy", "title": "Creates a new ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChanSpy", "group": "Voice_ChanSpy", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "prefix", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "options", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "auth", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "record", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordingFormat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "delete", "url": "/api/voice/chanspy/{id}", "title": "Deletes a ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy", "title": "Gets a list of ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -v -u {name}:{password}", "type": "json" } ], "name": "GetChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/chanspy?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/chanspy?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/chanspy?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/chanspy?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/chanspy?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy/{id}", "title": "Gets a single ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "put", "url": "/api/voice/chanspy/{id}", "title": "Update an existing ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "post", "url": "/api/voice/contexts", "title": "Create a new context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Voice_Contexts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultEntry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "delete", "url": "/api/voice/contexts/{id}", "title": "Deletes a context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts", "title": "Gets a list of Contexts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password}", "type": "json" } ], "name": "GetContexts", "group": "Voice_Contexts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/contexts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/contexts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/contexts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/contexts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/contexts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts/{id}", "title": "Gets a single Context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContexts", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "put", "url": "/api/voice/contexts/{id}", "title": "Update an existing context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/dials/reports/describe", "title": "Gets table info about Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports", "title": "Gets a list of Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/dials/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/dials/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/dials/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/dials/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/dials/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports/{id}", "title": "Gets a single Dial Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "delete", "url": "/api/voice/extensions/{id}", "title": "Deletes a Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions", "title": "Gets a list of Extensions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -v -u {name}:{password}", "type": "json" } ], "name": "GetExtensions", "group": "Voice_Extensions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/extensions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/extensions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/extensions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/extensions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/extensions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions/{id}", "title": "Gets a single Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id}/applications -d '[{\"app\": \"Set\", \"appdata\": \"CALLERDNID=${CALLER(dnid)}\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "put", "url": "/api/voice/extensions/{id}", "title": "Update an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/mohs", "title": "Create a new a new MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -d '{\"name\": \"xmas_musics\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mohs/{id}/sounds", "title": "Add sound to MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -d '{\"id\": 1}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}", "title": "Deletes an MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DestroyMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs", "title": "Gets a list of Music On Holds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -v -u {name}:{password}", "type": "json" } ], "name": "GetMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mohs?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mohs?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mohs?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mohs?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mohs?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}/sounds", "title": "Gets sounds from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "GetSounds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}/sounds/{id2}", "title": "Remove sound from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds/{id2} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}", "title": "Gets a single Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "put", "url": "/api/voice/mohs/{id}", "title": "Update an existing Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mails", "title": "Creates a new Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMails", "group": "Voice_Mails", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "customer_id", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fullname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pager", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tz", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "saycid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "review", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "envelope", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sayduration", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "saydurationm", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sendvoicemail", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "delete", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "nextaftercmd", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcegreetings", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "hidefromdir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "stamp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailsubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailbody", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxsecs", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxmsg", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "delete", "url": "/api/voice/mails/{id}", "title": "Deletes a Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails", "title": "Gets a list of Mails", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -v -u {name}:{password}", "type": "json" } ], "name": "GetMails", "group": "Voice_Mails", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}", "title": "Gets a single Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}/messages", "title": "Gets voice mail messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "put", "url": "/api/voice/mails/{id}", "title": "Update an existing Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "post", "url": "/api/voice/mails/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Voice_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "msgnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "macrocontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "origtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxuser", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxcontext", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "recording", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "flag", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "msg_id", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "stamp", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "delete", "url": "/api/voice/mails/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Voice_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "voice/mails/messages/{id}/download", "title": "Download Voice Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}voice/mails/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "put", "url": "/api/voice/mails/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "post", "url": "/api/voice/prefixes/{id}/users", "title": "Add agents to a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}", "title": "Deletes a Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/describe", "title": "Gets table info about Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}/users", "title": "Gets agents from prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes", "title": "Gets a list of Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -v -u {name}:{password}", "type": "json" } ], "name": "GetPrefixes", "group": "Voice_Prefixes", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/prefixes?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/prefixes?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/prefixes?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/prefixes?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/prefixes?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}/users", "title": "Removes agents from a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}", "title": "Gets a single Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "put", "url": "/api/voice/prefixes/{id}", "title": "Update an existing prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "post", "url": "/api/voice/prefixes", "title": "Create a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/queues/reports/describe", "title": "Gets table info about Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports", "title": "Gets a list of Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/{id}", "title": "Gets a single Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/index", "title": "Get Voice Queues Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/index -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getVoiceQueuesReport", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "post", "url": "/api/voice/queues/{id}/users", "title": "Add agents to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/blacklists", "title": "Add blacklists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/lists", "title": "Add lists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/teams", "title": "Add teams to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/clone", "title": "Clone an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Voice_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"inbound\"", "\"outbound\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "musiconhold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rr\"", "\"ringall\"", "\"leastrecent\"", "\"fewestcalls\"", "\"random\"", "\"rrmemory\"", "\"linear\"", "\"wrandom\"", "\"rrordered\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "servicelevel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "penaltymemberslimit", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "retry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timeoutpriority", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "weight", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "wrapuptime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autofill", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"all\"" ], "optional": true, "field": "autopause", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "autopausedelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopausebusy", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopauseunavail", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxlen", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setinterfacevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueueentryvar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueuevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "eventmemberstatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membermacro", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membergosub", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "min_announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "periodic_announce_frequency", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "random_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "relative_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"once\"" ], "optional": true, "field": "announce_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce_position", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "announce_to_first_user", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_position_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"0\"", "\"5\"", "\"10\"", "\"15\"", "\"20\"", "\"30\"" ], "optional": true, "field": "announce_round_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_youarenext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thereare", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_callswaiting", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minute", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minutes", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thankyou", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_reporthold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_less_than", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinempty", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leavewhenempty", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "reportholdtime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ringinuse", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "memberdelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "timeoutrestart", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultrule", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "acw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialActive", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"preview\"", "\"progressive\"", "\"power\"", "\"predictive\"", "\"booked\"" ], "optional": true, "field": "dialMethod", "description": "

Dial Method.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitChannel", "description": "

Max 9999 channels, 0 means unlimited.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitQueue", "description": "

Max 9999 member in queue(min:1, max:9999), 0 means unlimited.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPowerLevel", "description": "

Power Level: Calls for agents (min:1, max:10).

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"agentBusyFactor\"", "\"dropRate\"" ], "optional": true, "field": "dialPredictiveOptimization", "description": "

Only for predictive method.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPredictiveOptimizationPercentage", "description": "

Predictive Optimization Percentage (min: 1, max: 95)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveInterval", "description": "

Interval Predictive Minutes (min:5 max:30)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueOptions", "description": "

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialQueueTimeout", "description": "

Queue Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRecallMeTimeout", "description": "

#RecallMe Timeout (min:1)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialRecallInQueue", "description": "

Active/Disactive Recall In Queue

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject2", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupClient", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupAgent", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMaxThreshold", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMinThreshold", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacklists", "title": "Get queue blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/finals", "title": "Gets queue hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hopper_histories", "title": "Gets queue hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hoppers", "title": "Gets queue hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/lists", "title": "Get queue lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/members", "title": "Gets queue members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMembers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Voice_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/teams", "title": "Gets queue team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/blacklists", "title": "Remove blacklists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/lists", "title": "Remove lists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacks", "title": "Gets queue hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "put", "url": "/api/voice/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Voice_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userSecondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userThirdDisposition", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "location", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeStatus", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileUri", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileText", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failureReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentiment", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sPositive", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNegative", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNeutral", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sMixed", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tempSentiment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Voice_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "delete", "url": "/api/voice/recordings/{id}", "title": "Delete voice recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/downloads", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/downloads -v -u {name}:{password} -X GET", "type": "json" } ], "name": "downloads", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -d '{\"runSentiment\": \"true\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -v -u {name}:{password} -X GET", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "put", "url": "/api/voice/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/transfers/reports", "title": "Creates a new Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTransfer_Reports", "group": "Voice_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"blind\"", "\"attended\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "result", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereraccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererlinkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereechannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereelinkedid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Yes\"", "\"No\"" ], "optional": true, "field": "isexternal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "delete", "url": "/api/voice/transfers/reports/{id}", "title": "Deletes a Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports", "title": "Gets a list of Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/transfers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/transfers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/transfers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/transfers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/transfers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports/{id}", "title": "Gets a single Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "put", "url": "/api/voice/transfers/reports/{id}", "title": "Update an existing Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/vtiger/accounts", "title": "Creates a new Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Accounts", "group": "Vtiger_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "moduleName", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "accessKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "delete", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Deletes a Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts", "title": "Gets a list of Vtiger Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Gets a single Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "put", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Update an existing Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/configurations", "title": "Creates a new Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Configurations", "group": "Vtiger_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "delete", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Deletes a Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations", "title": "Gets a list of Vtiger Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Gets a single Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "put", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Update an existing Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "post", "url": "/api/integrations/vtiger/fields", "title": "Creates a new Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Fields", "group": "Vtiger_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "delete", "url": "/api/integrations/vtiger/fields/{id}", "title": "Deletes a Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields", "title": "Gets a list of Vtiger Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields/{id}", "title": "Gets a single Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "put", "url": "/api/integrations/vtiger/fields/{id}", "title": "Update an existing Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "post", "url": "/api/webbar/answer", "title": "answer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/answer -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_answer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/calls", "title": "webrtc call list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/calls -d '{\"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_calls", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hangup", "title": "hangup webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hangup -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hangup", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hold", "title": "hold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/unhold", "title": "unhold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/unhold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/originate", "title": "Originate new webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/originate -d '{\"callNumber\": \"0119692844\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_originate", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "callNumber", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callerId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callbackUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/transfer", "title": "blind transfer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/transfer -d '{\"userId\": 54, \"sessionId\":\"\", \"transferNumber\":\"\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_transfer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "transferNumber", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/users", "title": "Add agents to a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/users", "title": "Gets agents from whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/users", "title": "Removes agents from a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new whatsapp message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/send", "title": "Send new whatsapp message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendWhatsapp", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Whatsapp_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "delete", "url": "/api/whatsapp/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Whatsapp_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "put", "url": "/api/whatsapp/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "put", "url": "/api/whatsapp/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Whatsapp_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "delete", "url": "/api/whatsapp/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Whatsapp_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "put", "url": "/api/whatsapp/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "post", "url": "/api/whatsapp/reports/queue", "title": "Creates a new Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/queue/{id}", "title": "Deletes a Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/describe", "title": "Gets table info about Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue", "title": "Gets a list of Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/{id}", "title": "Gets a single Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/queue/{id}", "title": "Update an existing Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Whatsapp_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Whatsapp_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "put", "url": "/api/whatsapp/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/reports/transfer", "title": "Creates a new Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Deletes a Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/describe", "title": "Gets table info about Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer", "title": "Gets a list of Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Gets a single Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Update an existing Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/zendesk/accounts", "title": "Creates a new Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Accounts", "group": "Zendesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"password\"", "\"token\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "delete", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Deletes a Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts", "title": "Gets a list of Zendesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Gets a single Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "put", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Update an existing Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/configurations", "title": "Creates a new Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Configurations", "group": "Zendesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "delete", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Deletes a Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations", "title": "Gets a list of Zendesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Gets a single Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "put", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Update an existing Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/fields", "title": "Creates a new Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Fields", "group": "Zendesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "delete", "url": "/api/integrations/zendesk/fields/{id}", "title": "Deletes a Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields", "title": "Gets a list of Zendesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields/{id}", "title": "Gets a single Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "put", "url": "/api/integrations/zendesk/fields/{id}", "title": "Update an existing Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "post", "url": "/api/integrations/zoho/accounts", "title": "Creates a new Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Accounts", "group": "Zoho_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "zone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "code", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "refreshToken", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "delete", "url": "/api/integrations/zoho/accounts/{id}", "title": "Deletes a Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts", "title": "Gets a list of Zoho Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}", "title": "Gets a single Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "put", "url": "/api/integrations/zoho/accounts/{id}", "title": "Update an existing Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/configurations", "title": "Creates a new Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Configurations", "group": "Zoho_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"lead\"", "\"contact\"", "\"nothing\"" ], "optional": true, "field": "moduleCreate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "delete", "url": "/api/integrations/zoho/configurations/{id}", "title": "Deletes a Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations", "title": "Gets a list of Zoho Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}", "title": "Gets a single Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "put", "url": "/api/integrations/zoho/configurations/{id}", "title": "Update an existing Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "post", "url": "/api/integrations/zoho/fields", "title": "Creates a new Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Fields", "group": "Zoho_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "delete", "url": "/api/integrations/zoho/fields/{id}", "title": "Deletes a Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields", "title": "Gets a list of Zoho Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields/{id}", "title": "Gets a single Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "put", "url": "/api/integrations/zoho/fields/{id}", "title": "Update an existing Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "post", "url": "/api/cdr", "title": "Creates a new Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCdrs", "group": "cdr", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "calldate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "src", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dst", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dstchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastapp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "duration", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "billsec", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userfield", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "linkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sequence", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "peeraccount", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tag", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "delete", "url": "/api/cdr/{id}", "title": "Deletes a Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/describe", "title": "Gets table info about Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr", "title": "Gets a list of Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -v -u {name}:{password}", "type": "json" } ], "name": "GetCdrs", "group": "cdr", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cdr?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cdr?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cdr?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cdr?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cdr?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/{id}", "title": "Gets a single Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "put", "url": "/api/cdr/{id}", "title": "Update an existing Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "post", "url": "/api/voiceQueuesLog", "title": "Creates a new VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVoiceQueuesLogs", "group": "voiceQueuesLog", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "time", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callid", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "queuename", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "agent", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "event", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data2", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data3", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "dtm", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "delete", "url": "/api/voiceQueuesLog/{id}", "title": "Deletes a VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog", "title": "Gets a list of VoiceQueuesLogs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -v -u {name}:{password}", "type": "json" } ], "name": "GetVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voiceQueuesLog?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voiceQueuesLog?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voiceQueuesLog?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voiceQueuesLog?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voiceQueuesLog?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog/{id}", "title": "Gets a single VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "put", "url": "/api/voiceQueuesLog/{id}", "title": "Update an existing VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" } ] }); +define({ "api": [ { "type": "delete", "url": "/api/actions/{id}", "title": "Deletes a Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteActions", "group": "Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "put", "url": "/api/actions/{id}", "title": "Update an existing Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateActions", "group": "Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "post", "url": "/api/analytics/custom_reports", "title": "Creates a new Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "delete", "url": "/api/analytics/custom_reports/{id}", "title": "Deletes a Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports", "title": "Gets a list of Analytic Custom Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/custom_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/custom_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/custom_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/custom_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/custom_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}", "title": "Gets a single Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "put", "url": "/api/analytics/custom_reports/{id}", "title": "Update an existing Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "post", "url": "/api/analytics/default_reports", "title": "Creates a new Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "delete", "url": "/api/analytics/default_reports/{id}", "title": "Deletes a Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports", "title": "Gets a list of Analytic Default Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/default_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/default_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/default_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/default_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/default_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}", "title": "Gets a single Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "put", "url": "/api/analytics/default_reports/{id}", "title": "Update an existing Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "post", "url": "/api/analytics/extracted_reports", "title": "Creates a new Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "basename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "savename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"manual\"", "\"scheduled\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "reportId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reportType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "delete", "url": "/api/analytics/extracted_reports/{id}", "title": "Deletes a Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports", "title": "Gets a list of Analytic Extacted Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/extracted_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/extracted_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/extracted_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/extracted_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/extracted_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}", "title": "Gets a single Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}/download", "title": "Download Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "put", "url": "/api/analytics/extracted_reports/{id}", "title": "Update an existing Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/create_many", "title": "Creates many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/create_many -d '[{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}]' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "BulkCreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/destroy_many?ids={ids}", "title": "Deletes many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/destroy_many?ids=1&ids=2&ids=3 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "BulkDeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports", "title": "Creates a new Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/{id}", "title": "Deletes a Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports", "title": "Gets a list of Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/field_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/field_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/field_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/field_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/field_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports/{id}", "title": "Gets a single Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/{id}/create_many", "title": "Rewrite fields set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id}/create_many -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFields", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "put", "url": "/api/analytics/field_reports/{id}", "title": "Update an existing Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/metrics", "title": "Creates a new Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Metric", "group": "Analytic_Metrics", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "metric", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "delete", "url": "/api/analytics/metrics/{id}", "title": "Deletes a Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics", "title": "Gets a list of Analytic Metric", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/metrics?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/metrics?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/metrics?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/metrics?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/metrics?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics/{id}", "title": "Gets a single Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "put", "url": "/api/analytics/metrics/{id}", "title": "Update an existing Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "post", "url": "/api/analytics/tree_reports", "title": "Creates a new Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "tree", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "delete", "url": "/api/analytics/tree_reports/{id}", "title": "Deletes a Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports", "title": "Gets a list of Analytic Tree Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/tree_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/tree_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/tree_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/tree_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/tree_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports/{id}", "title": "Gets a single Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "put", "url": "/api/analytics/tree_reports/{id}", "title": "Update an existing Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "post", "url": "/api/attachments/clone", "title": "Clone an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "delete", "url": "/api/attachments/{id}", "title": "Deletes a Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments", "title": "Gets a list of Attachments", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -v -u {name}:{password}", "type": "json" } ], "name": "GetAttachments", "group": "Attachments", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/attachments?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/attachments?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/attachments?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/attachments?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/attachments?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/{id}", "title": "Gets a single Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/attachments", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/:id/download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/:id/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/chat/interactions/{id}/attachment_download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Attachments" }, { "type": "put", "url": "/api/attachments/{id}", "title": "Update an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/auth/local/forgot", "title": "Creates a new password reset token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/forgot -d '{\"email\": \"john.doe@xcally.com\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Forgot_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "email", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local/reset/:token", "title": "Reset user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/reset/94b422c1fkdjhg766a198da6997yu6gcc963641d -d '{\"password\": \"My_newP@ssw0rd\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Reset_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/google", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/google -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authGoogle/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/automations", "title": "Creates a new Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAutomations", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "delete", "url": "/api/automations/{id}", "title": "Deletes a Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations", "title": "Gets a list of Automations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -v -u {name}:{password}", "type": "json" } ], "name": "GetAutomations", "group": "Automations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/automations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/automations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/automations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/automations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/automations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}", "title": "Gets a single Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addActions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/conditions", "title": "Creates new conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConditions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/actions", "title": "Gets Automation Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/conditions", "title": "Gets Automation Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConditions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "put", "url": "/api/automations/{id}", "title": "Update an existing Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/canned_answers", "title": "Create a new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "delete", "url": "/api/canned_answers/{id}", "title": "Deletes a Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers", "title": "Gets a list of Canned Answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -v -u {name}:{password}", "type": "json" } ], "name": "GetCanned_Answers", "group": "Canned_Answers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/canned_answers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/canned_answers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/canned_answers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/canned_answers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/canned_answers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers/{id}", "title": "Gets a single Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "put", "url": "/api/canned_answers/{id}", "title": "Update an existing Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/chat/internal/users", "title": "Gets Users Last Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/chat/internal/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLastUsersMessages", "group": "ChatInternalMessage", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "ChatInternalMessage" }, { "type": "delete", "url": "/api/chat/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "get", "url": "/api/chat/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "put", "url": "/api/chat/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "post", "url": "/api/chat/groups", "title": "Creates a new Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateGroups", "group": "Chat_Groups", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "write", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}", "title": "Deletes a Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/describe", "title": "Gets table info about Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups", "title": "Gets a list of Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -v -u {name}:{password}", "type": "json" } ], "name": "GetGroups", "group": "Chat_Groups", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/groups?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/groups?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/groups?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/groups?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/groups?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}/members", "title": "Removes members from a group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}", "title": "Gets a single Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/members", "title": "Add members to chat group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/messages", "title": "Creates a new group message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -d '{\"body\": \"Hi operator!\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/members", "title": "Gets Members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/messages", "title": "Gets Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/unread", "title": "Get unread chat group messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/unread -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUread", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "put", "url": "/api/chat/groups/{id}", "title": "Update an existing Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Chat_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/abandon", "title": "Abandon interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/abandon -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "abandon", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to set as abandon an interaction and stop the routing.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/close", "title": "Close Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/close -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/attachment_upload", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "attachmentUpload", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/vidaoo", "title": "Create Vidaoo Session", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/vidaoo -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createVidaooSession", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/custom_update", "title": "Update interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/custom_update -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "customUpdate", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to update an interaction.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/my_messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/my_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMyMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/internal/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Internal_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInternalMessageId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "delete", "url": "/api/chat/internal/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Internal_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/internal/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/internal/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/internal/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/internal/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/internal/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "put", "url": "/api/chat/internal/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "post", "url": "/api/chat/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "delete", "url": "/api/chat/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "put", "url": "/api/chat/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "post", "url": "/api/chat/offline_messages", "title": "Creates a new OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOfflineMessages", "group": "Chat_Offline_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "delete", "url": "/api/chat/offline_messages/{id}", "title": "Deletes a OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/describe", "title": "Gets table info about OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages", "title": "Gets a list of OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -v -u {name}:{password}", "type": "json" } ], "name": "GetOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/offline_messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/offline_messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/offline_messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/offline_messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/offline_messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/{id}", "title": "Gets a single OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "put", "url": "/api/chat/offline_messages/{id}", "title": "Update an existing OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "post", "url": "/api/chat/proactive_actions", "title": "Creates a new Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProactive_Actions", "group": "Chat_Proactive_Actions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "delete", "url": "/api/chat/proactive_actions/{id}", "title": "Deletes a Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "get", "url": "/api/chat/proactive_actions/{id}", "title": "Gets a single Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "put", "url": "/api/chat/proactive_actions/{id}", "title": "Update an existing Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "post", "url": "/api/chat/reports/queue", "title": "Creates a new Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Queue_Reports", "group": "Chat_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "delete", "url": "/api/chat/reports/queue/{id}", "title": "Deletes a Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/describe", "title": "Gets table info about Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue", "title": "Gets a list of Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/{id}", "title": "Gets a single Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "put", "url": "/api/chat/reports/queue/{id}", "title": "Update an existing Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "post", "url": "/api/chat/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Chat_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Chat_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "put", "url": "/api/chat/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/reports/transfer", "title": "Creates a new Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "delete", "url": "/api/chat/reports/transfer/{id}", "title": "Deletes a Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/describe", "title": "Gets table info about Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer", "title": "Gets a list of Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/{id}", "title": "Gets a single Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "put", "url": "/api/chat/reports/transfer/{id}", "title": "Update an existing Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "post", "url": "/api/chat/websites/{id}/users", "title": "Add agents to a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites", "title": "Creates a new Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWebsites", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "address", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKeyOffline", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentAlias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerAlias", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color_button", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "textColor", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "fontSize", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remote", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "animation", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rounded\"", "\"squared\"" ], "optional": true, "field": "header_shape", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_online", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "start_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offline_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_offline", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "download_transcript", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "whiteLabel", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultWhiteLabel", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "sitepic", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingQuestion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitSuccessMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitFailureMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "noteTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "placeholderMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessageButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipMessageButton", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "conditionAgreement", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableRating", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableFeedback", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableSendButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "feedbackTitle", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingStarsNumber", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "onlineForm", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "offlineForm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoclose", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerWriting", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardTranscriptMessage", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardOfflineAddress", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageSubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUnmanagedNote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unmanagedMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipUnmanaged", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sendUnmanaged", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerAttachment", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerCheckmarks", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "agentAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showAgentAvatar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timezone", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "hideWhenOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentIdentifier", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alignment", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "verticalAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messagesAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultTitle", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "customerAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showCustomerAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "messageFontSize", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "backgroundColor", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "systemAlias", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "systemAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "vidaooEscalation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vidaooApiKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}", "title": "Deletes a Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/describe", "title": "Gets table info about Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/users", "title": "Gets agents from website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites", "title": "Gets a list of Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -v -u {name}:{password}", "type": "json" } ], "name": "GetWebsites", "group": "Chat_Websites", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/websites?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/websites?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/websites?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/websites?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/websites?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/users", "title": "Removes agents from a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/dispositions", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}", "title": "Gets a single Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Add customer avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Creates new Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -d '[{\"name\": \"Satisfied\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addProactiveActions", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/system_avatar", "title": "Add system avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/applications", "title": "Gets Website Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Get Customer Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/fields", "title": "Gets Website Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/interactions", "title": "Gets Website Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/offline_messages", "title": "Gets Website Offline Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOfflineMessages", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Gets Website Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getProactiveActions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/snippet", "title": "Gets Website Snippet", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/snippet -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSnippet", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/system_avatar", "title": "Get System Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new chat message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/offline", "title": "Offline message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "offline", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/websites/{id}", "title": "Update an existing Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/cloudProviders", "title": "Creates a new CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCloudProviders", "group": "CloudProviders", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"AmazonAWS\"", "\"Google\"" ], "optional": false, "field": "service", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "delete", "url": "/api/cloudProviders/{id}", "title": "Deletes a CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders", "title": "Gets a list of CloudProviders", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -v -u {name}:{password}", "type": "json" } ], "name": "GetCloudProviders", "group": "CloudProviders", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cloudProviders?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cloudProviders?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cloudProviders?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cloudProviders?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cloudProviders?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders/{id}", "title": "Gets a single CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "put", "url": "/api/cloudProviders/{id}", "title": "Update an existing CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "post", "url": "/api/cm_contact_has_items", "title": "Creates a new CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasItems", "group": "CmContactHasItems", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "item", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ItemTypeId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ItemClass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "delete", "url": "/api/cm_contact_has_items/{id}", "title": "Deletes a CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items", "title": "Gets a list of CmContactHasItems", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_items?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_items?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_items?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_items?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_items?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items/{id}", "title": "Gets a single CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "put", "url": "/api/cm_contact_has_items/{id}", "title": "Update an existing CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "post", "url": "/api/cm_contact_has_phones", "title": "Creates a new CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasPhones", "group": "CmContactHasPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "delete", "url": "/api/cm_contact_has_phones/{id}", "title": "Deletes a CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones", "title": "Gets a list of CmContactHasPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones/{id}", "title": "Gets a single CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "put", "url": "/api/cm_contact_has_phones/{id}", "title": "Update an existing CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "post", "url": "/api/cm_hopper_additional_phones", "title": "Creates a new CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmHopperId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "delete", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Deletes a CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones", "title": "Gets a list of CmHopperAdditionalPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_hopper_additional_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_hopper_additional_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_hopper_additional_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_hopper_additional_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_hopper_additional_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Gets a single CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "put", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Update an existing CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "post", "url": "/api/cm/companies", "title": "Creates a new Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCompanies", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "companyId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "website", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailDomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sStreet", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sPostalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCity", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCountry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/companies/{id}", "title": "Deletes a Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/describe", "title": "Gets table info about Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies", "title": "Gets a list of Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -v -u {name}:{password}", "type": "json" } ], "name": "GetCompanies", "group": "Cm_Companies", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/companies?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/companies?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/companies?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/companies?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/companies?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}", "title": "Gets a single Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "post", "url": "/api/cm/companies/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/companies/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "put", "url": "/api/cm/companies/{id}", "title": "Update an existing Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/contacts/{id}", "title": "Deletes a Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/describe", "title": "Gets table info about Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts", "title": "Gets a list of Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -v -u {name}:{password}", "type": "json" } ], "name": "GetContacts", "group": "Cm_Contacts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/contacts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/contacts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/contacts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/contacts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/contacts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/finals", "title": "Gets contact hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hopper_histories", "title": "Gets contact hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hoppers", "title": "Gets contact hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/create_many", "title": "Create Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/create_many -d '[{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts", "title": "Create Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -d '{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/journey", "title": "Gets customer journey", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/journey -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getJourney", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/jscripty_sessions", "title": "Gets contact hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getJscriptySessions", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/merge", "title": "Merge Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/merge -d '{\"from\": 1, \"to\": 2}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "merge", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -d '{\"ids\": [1,12]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}", "title": "Gets a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "put", "url": "/api/cm/contacts/{id}", "title": "Update a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -d '{\"firstName\": \"John\", \"lastName\": \"Doe\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "delete", "url": "/api/cm/custom_fields/{id}", "title": "Deletes a Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields", "title": "Gets a list of Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields -v -u {name}:{password}", "type": "json" } ], "name": "GetCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/custom_fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/custom_fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/custom_fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/custom_fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/custom_fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields/{id}", "title": "Gets a single Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "put", "url": "/api/cm/custom_fields/{id}", "title": "Update an existing Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "post", "url": "/api/cm/hopper", "title": "Creates a new Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopper", "group": "Cm_Hopper", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ContactId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ListId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "VoiceQueueId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "CampaignId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/describe", "title": "Gets table info about Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper", "title": "Gets a list of Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper", "group": "Cm_Hopper", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/{id}", "title": "Gets a single Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "delete", "url": "/api/cm/hopper_black/{id}", "title": "Deletes a Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/describe", "title": "Gets table info about Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black", "title": "Gets a list of Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_black?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_black?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_black?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_black?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_black?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/{id}", "title": "Gets a single Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "put", "url": "/api/cm/hopper_black/{id}", "title": "Update an existing Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_final/describe", "title": "Gets table info about HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final", "title": "Gets a list of HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_final?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_final?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_final?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_final?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_final?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/{id}", "title": "Gets a single HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/checkContactHopper", "title": "Check if contact is in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/checkContactHopper -d '{\"VoiceQueueId\": \"VoiceQueueId\", \"CampaignId\": \"CampaignId\", \"ContactId\": \"ContactId\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "_checkContactHopper", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/campaign/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/voice/queue/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/campaign/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "moveContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/voice/queue/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password}", "type": "json" } ], "name": "moveContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "put", "url": "/api/cm/hopper_final/{id}", "title": "Update a single hopper final", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_history", "title": "Creates a new HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopperHistory", "group": "Cm_Hopper_History", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "state", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "statedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countglobal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "responsetime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "answertime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "droptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ringtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "followuptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dropreason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaign", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaigntype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "amd", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "editedat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "edited", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/describe", "title": "Gets table info about HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history", "title": "Gets a list of HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_history?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_history?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_history?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_history?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_history?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/{id}", "title": "Gets a single HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "put", "url": "/api/cm/hopper_history/{id}", "title": "Update a single hopper history", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_history/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "delete", "url": "/api/cm/hopper/{id}", "title": "Delete Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/opencontacts", "title": "Gets Open Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/opencontacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOpenContacts", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/hopper/preview", "title": "Gets Preview Dialer Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/preview -d '{\"hopperIds\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getPreview", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "put", "url": "/api/cm/hopper/{id}", "title": "Update an existing Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/lists", "title": "Creates a new List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateLists", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}", "title": "Deletes a List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/describe", "title": "Gets table info about Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/users", "title": "Gets agents from list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists", "title": "Gets a list of Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -v -u {name}:{password}", "type": "json" } ], "name": "GetLists", "group": "Cm_Lists", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/lists?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/lists?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/lists?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/lists?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/lists?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/users", "title": "Removes agents from a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}", "title": "Gets a single List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/users", "title": "Adds agents to a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/fields", "title": "Creates a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomField", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/fields", "title": "Gets Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomFields", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/dispositions", "title": "Gets list dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts/csv", "title": "Gets CSV List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts/csv -v -u {name}:{password} -X GET", "type": "json" } ], "name": "grunt", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "put", "url": "/api/cm/lists/{id}", "title": "Update an existing List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/contacts/upload/:id", "title": "Import new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload/:id -v -u {name}:{password} -X POST", "type": "json" } ], "name": "import", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/upload", "title": "Upload csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "upload", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/csv", "title": "Create new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/csv -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadCsv", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "delete", "url": "/api/conditions/{id}", "title": "Deletes a Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "put", "url": "/api/conditions/{id}", "title": "Update an existing Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "post", "url": "/api/contact_item_types", "title": "Creates a new ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateContactItemTypes", "group": "ContactItemType", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rgbBackgroundColor", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "delete", "url": "/api/contact_item_types/{id}", "title": "Deletes a ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types", "title": "Gets a list of ContactItemTypes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -v -u {name}:{password}", "type": "json" } ], "name": "GetContactItemTypes", "group": "ContactItemType", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/contact_item_types?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/contact_item_types?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/contact_item_types?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/contact_item_types?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/contact_item_types?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types/{id}", "title": "Gets a single ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "put", "url": "/api/contact_item_types/{id}", "title": "Update an existing ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "post", "url": "/api/cm/custom_field", "title": "Create a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_field -d '{\"name\": \"mycf\", \"type\": \"text\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCustomField", "group": "Custom_Fields", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Custom_Fields" }, { "type": "post", "url": "/api/dashboards/items", "title": "Create dasboard item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Create", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "delete", "url": "/api/dashboards/items/{id}", "title": "Deletes a Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "get", "url": "/api/dashboards/items/{id}", "title": "Gets a single Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "put", "url": "/api/dashboards/items/{id}", "title": "Update an existing item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "post", "url": "/api/dashboards/clone", "title": "Clone an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards", "title": "Creates a new Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDashboards", "group": "Dashboards", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "delete", "url": "/api/dashboards/{id}", "title": "Deletes a Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards", "title": "Gets a list of Dashboards", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -v -u {name}:{password}", "type": "json" } ], "name": "GetDashboards", "group": "Dashboards", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dashboards?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dashboards?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dashboards?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dashboards?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dashboards?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}", "title": "Gets a single Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards/{id}/items", "title": "Creates new item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -d '{\"type\": \"counter\", \"...\": \"...\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addItem", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}/items", "title": "Gets items", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getItems", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "put", "url": "/api/dashboards/{id}", "title": "Update an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/integrations/desk/accounts", "title": "Creates a new Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Accounts", "group": "Desk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"basic\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tokenSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "delete", "url": "/api/integrations/desk/accounts/{id}", "title": "Deletes a Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts", "title": "Gets a list of Desk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}", "title": "Gets a single Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "put", "url": "/api/integrations/desk/accounts/{id}", "title": "Update an existing Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/configurations", "title": "Creates a new Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Configurations", "group": "Desk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "delete", "url": "/api/integrations/desk/configurations/{id}", "title": "Deletes a Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations", "title": "Gets a list of Desk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}", "title": "Gets a single Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "put", "url": "/api/integrations/desk/configurations/{id}", "title": "Update an existing Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/fields", "title": "Creates a new Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Fields", "group": "Desk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "delete", "url": "/api/integrations/desk/fields/{id}", "title": "Deletes a Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields", "title": "Gets a list of Desk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Fields", "group": "Desk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields/{id}", "title": "Gets a single Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "put", "url": "/api/integrations/desk/fields/{id}", "title": "Update an existing Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "post", "url": "/api/dispositions", "title": "Creates a new Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDispositions", "group": "Dispositions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "delete", "url": "/api/dispositions/{id}", "title": "Deletes a Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions", "title": "Gets a list of Dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -v -u {name}:{password}", "type": "json" } ], "name": "GetDispositions", "group": "Dispositions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dispositions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dispositions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dispositions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dispositions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dispositions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions/{id}", "title": "Gets a single Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "put", "url": "/api/dispositions/{id}", "title": "Update an existing Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts", "title": "Creates a new Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Accounts", "group": "Dynamics365_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tenantId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "delete", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Deletes a Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts", "title": "Gets a list of Dynamics365 Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Gets a single Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "put", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Update an existing Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/configurations", "title": "Creates a new Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Configurations", "group": "Dynamics365_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"incident\"", "\"phonecall\"" ], "optional": true, "field": "ticketType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "delete", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Deletes a Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations", "title": "Gets a list of Dynamics365 Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Gets a single Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "put", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Update an existing Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "post", "url": "/api/integrations/dynamics365/fields", "title": "Creates a new Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Fields", "group": "Dynamics365_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "delete", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Deletes a Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields", "title": "Gets a list of Dynamics365 Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Gets a single Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "put", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Update an existing Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "post", "url": "/api/fax/accounts/{id}/users", "title": "Add agents to a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ecm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "headerinfo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "localstationid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "minrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "maxrate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "modem", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "gateway", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "faxdetect", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "t38timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SIP\"", "\"IAX\"", "\"DADHI\"", "\"KHOMP\"" ], "optional": true, "field": "tech", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Fax_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/users", "title": "Gets agents from fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/users", "title": "Removes agents from a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/addaccountapplications", "title": "Creates new account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/addaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -d '[{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/applications", "title": "Gets account pplications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/send", "title": "Send new fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/send -d '{from: '\"John Doe\" <123456>'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendFax", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "put", "url": "/api/fax/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/updateaccountapplications", "title": "Update account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/updateaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "updateApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Fax_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "delete", "url": "/api/fax/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Fax_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "put", "url": "/api/fax/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "post", "url": "/api/fax/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Fax_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/download", "title": "Get interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "put", "url": "/api/fax/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/messages/{id}/download", "title": "Get message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Message", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Message" }, { "type": "delete", "url": "/api/fax/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Fax_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/messages", "title": "Create message and send Fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/reports/queue", "title": "Creates a new Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Queue_Reports", "group": "Fax_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "delete", "url": "/api/fax/reports/queue/{id}", "title": "Deletes a Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/describe", "title": "Gets table info about Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue", "title": "Gets a list of Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/{id}", "title": "Gets a single Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "put", "url": "/api/fax/reports/queue/{id}", "title": "Update an existing Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "post", "url": "/api/fax/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Fax_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "lastAgent", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Fax_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "put", "url": "/api/fax/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/reports/transfer", "title": "Creates a new Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "delete", "url": "/api/fax/reports/transfer/{id}", "title": "Deletes a Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/describe", "title": "Gets table info about Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer", "title": "Gets a list of Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/{id}", "title": "Gets a single Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "put", "url": "/api/fax/reports/transfer/{id}", "title": "Update an existing Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts", "title": "Creates a new Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "delete", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Deletes a Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts", "title": "Gets a list of Freshdesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Gets a single Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "put", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Update an existing Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations", "title": "Creates a new Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "delete", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Deletes a Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations", "title": "Gets a list of Freshdesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Gets a single Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "put", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Update an existing Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/fields", "title": "Creates a new Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Fields", "group": "Freshdesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "delete", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Deletes a Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields", "title": "Gets a list of Freshdesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Gets a single Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "put", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Update an existing Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "post", "url": "/api/integrations/freshsales/accounts", "title": "Creates a new Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Accounts", "group": "Freshsales_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "delete", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Deletes a Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts", "title": "Gets a list of Freshsales Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Gets a single Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "put", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Update an existing Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/configurations", "title": "Creates a new Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Configurations", "group": "Freshsales_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "delete", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Deletes a Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations", "title": "Gets a list of Freshsales Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Gets a single Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "put", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Update an existing Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "post", "url": "/api/integrations/freshsales/fields", "title": "Creates a new Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Fields", "group": "Freshsales_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "delete", "url": "/api/integrations/freshsales/fields/{id}", "title": "Deletes a Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields", "title": "Gets a list of Freshsales Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields/{id}", "title": "Gets a single Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "put", "url": "/api/integrations/freshsales/fields/{id}", "title": "Update an existing Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "post", "url": "/api/campaigns/{id}/blacklists", "title": "Add blacklists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/{id}/lists", "title": "Add lists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/clone", "title": "Clone an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns", "title": "Creates a new IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIVR_Campaigns", "group": "IVR_Campaigns", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ivr\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "limitCalls", "description": "

Max 200 calls.

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}", "title": "Deletes a IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacklists", "title": "Get IVR campaign blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/finals", "title": "Gets IVR campaign hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hopper_histories", "title": "Gets IVR campaign hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hoppers", "title": "Gets IVR campaign hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns", "title": "Gets a list of IVR Campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "GetIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/campaigns?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/campaigns?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/campaigns?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/campaigns?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/campaigns?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/lists", "title": "Get IVR campaign lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/blacklists", "title": "Remove blacklists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/lists", "title": "Remove lists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}", "title": "Gets a single IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacks", "title": "Gets IVR campaign hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "put", "url": "/api/campaigns/{id}", "title": "Update an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/integrations/reports", "title": "Creates a new Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntegration_Reports", "group": "Integration_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "integration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "eventChannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitStatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ticketId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "integrationId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contacts", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interface", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcalledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentconnectAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentcomplete", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcompleteAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentacw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentringnoanswer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentringnoanswerAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentdump", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentdumpAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastevent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "channelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "destchannelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destlanguage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destpriority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "attachment", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "text", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SENT\"", "\"SENDING\"", "\"RECEIVED\"", "\"FAILED\"" ], "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "app", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "projectId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "delete", "url": "/api/integrations/reports/{id}", "title": "Deletes a Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/describe", "title": "Gets table info about Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports", "title": "Gets a list of Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/{id}", "title": "Gets a single Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "put", "url": "/api/integrations/reports/{id}", "title": "Update an existing Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "post", "url": "/api/intervals", "title": "Creates a new Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntervals", "group": "Intervals", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "delete", "url": "/api/intervals/{id}", "title": "Deletes a Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals", "title": "Gets a list of Intervals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -v -u {name}:{password}", "type": "json" } ], "name": "GetIntervals", "group": "Intervals", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/intervals?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/intervals?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/intervals?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/intervals?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/intervals?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}", "title": "Gets a single Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals", "title": "Creates a new sub interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -d '{\"interval\": \"00:00-08:30,mon-fri,*,*\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInterval", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals/create_many", "title": "Create new sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}/sub_intervals", "title": "Get sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "put", "url": "/api/intervals/{id}", "title": "Update an existing Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/jira", "title": "Creates a new issue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jira -d '{\"key\": \"Bug\", \"description\": \"I can't do it!\"}' \\\n -H \"Content-Type: application/json\" -X POST -v -u {name}:{password}", "type": "json" } ], "name": "Creates_Issue", "group": "Issue", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"Bug\"" ], "optional": true, "field": "issuetype", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "summary", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jira/index.js", "groupTitle": "Issue" }, { "type": "post", "url": "/api/jscripty/answers/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyAnswerReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "delete", "url": "/api/jscripty/answers/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyAnswerReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/answers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/answers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/answers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/answers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/answers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "put", "url": "/api/jscripty/answers/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "post", "url": "/api/jscripty/questions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyQuestionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "delete", "url": "/api/jscripty/questions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyQuestionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/questions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/questions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/questions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/questions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/questions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "put", "url": "/api/jscripty/questions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "post", "url": "/api/jscripty/sessions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptySessionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "completed", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "delete", "url": "/api/jscripty/sessions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptySessionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/sessions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/sessions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/sessions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/sessions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/sessions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}/questions", "title": "Gets Jscripty Session questions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id}/questions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getQuestions", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "put", "url": "/api/jscripty/sessions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "post", "url": "/api/jscripty/projects/clone", "title": "Clone an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "post", "url": "/api/jscripty/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Jscripty_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUncompleteSave", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendUnpauseOnSubmit", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "delete", "url": "/api/jscripty/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Jscripty_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/answers", "title": "Gets jscripty project answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/sessions", "title": "Gets jscripty project sessions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/sessions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSessions", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/summary", "title": "Gets jscripty project summary", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/summary -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSummary", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "put", "url": "/api/jscripty/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/license", "title": "Gets License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license -v -u {name}:{password} -X GET", "type": "json" } ], "name": "index", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "put", "url": "/api/license/{id}", "title": "Update License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "post", "url": "/api/mail/accounts/{id}/users", "title": "Add agents to a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/in_servers", "title": "Creates a new IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddImap", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tls", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "connTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "authTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/out_servers", "title": "Creates a new SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmtp", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}", "title": "Deletes a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMailAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Mail_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/users", "title": "Gets agents from mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/in_servers", "title": "Gets account IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetImap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/out_servers", "title": "Gets account SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/users", "title": "Removes agents from a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/in_servers", "title": "Removes IMAP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveImmap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/out_servers", "title": "Removes SMTP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -d '[{\"subject\": \"My printer is on fire!\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts", "title": "Create a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/send", "title": "Send new mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/send -d '{from: '\"John Doe\" '}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendMail", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "put", "url": "/api/mail/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/verify", "title": "Verify mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/verify -v -u {name}:{password} -X GET", "type": "json" } ], "name": "verifySmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "get", "url": "/api/mail/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "put", "url": "/api/mail/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "post", "url": "/api/mail/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Mail_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions/{id}/messages", "title": "Creates new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -d '[{\"to\": \"sales@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "plainBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originTo", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originCc", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "put", "url": "/api/mail/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Mail_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/messages", "title": "Create a message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}/download", "title": "Gets message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/reports/queue", "title": "Creates a new Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Queue_Reports", "group": "Mail_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "delete", "url": "/api/mail/reports/queue/{id}", "title": "Deletes a Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/describe", "title": "Gets table info about Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue", "title": "Gets a list of Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/{id}", "title": "Gets a single Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "put", "url": "/api/mail/reports/queue/{id}", "title": "Update an existing Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "post", "url": "/api/mail/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Mail_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Mail_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "put", "url": "/api/mail/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/out_servers", "title": "Creates a new SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSMTPs", "group": "Mail_SMTP", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "delete", "url": "/api/mail/out_servers/{id}", "title": "Deletes a SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers", "title": "Gets a list of SMTPs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -v -u {name}:{password}", "type": "json" } ], "name": "GetSMTPs", "group": "Mail_SMTP", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/out_servers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/out_servers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/out_servers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/out_servers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/out_servers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers/{id}", "title": "Gets a single SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "put", "url": "/api/mail/out_servers/{id}", "title": "Update an existing SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "post", "url": "/api/mail/substatuses", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSubstatuses", "group": "Mail_Substatuses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "delete", "url": "/api/mail/substatuses/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/describe", "title": "Gets table info about Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses", "title": "Gets a list of Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -v -u {name}:{password}", "type": "json" } ], "name": "GetSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/substatuses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/substatuses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/substatuses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/substatuses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/substatuses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "put", "url": "/api/mail/substatuses/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "post", "url": "/api/mail/reports/transfer", "title": "Creates a new Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "delete", "url": "/api/mail/reports/transfer/{id}", "title": "Deletes a Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/describe", "title": "Gets table info about Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer", "title": "Gets a list of Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/{id}", "title": "Gets a single Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "put", "url": "/api/mail/reports/transfer/{id}", "title": "Update an existing Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/members/reports/describe", "title": "Gets table info about Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports", "title": "Gets a list of Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetMember_Reports", "group": "Member_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/members/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/members/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/members/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/members/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/members/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports/{id}", "title": "Gets a single Member Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/migrations", "title": "Gets a list of Migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/migrations -v -u {name}:{password}", "type": "json" } ], "name": "GetMigrations", "group": "Migrations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/migrations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/migrations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/migrations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/migrations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/migrations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/migration/index.js", "groupTitle": "Migrations" }, { "type": "post", "url": "/api/voice/networks", "title": "Create a new network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Networks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "delete", "url": "/api/voice/networks/{id}", "title": "Deletes a network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Networks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks", "title": "Gets a list of Networks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks -v -u {name}:{password}", "type": "json" } ], "name": "GetNetworks", "group": "Networks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/networks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/networks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/networks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/networks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/networks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks/{id}", "title": "Gets a single Network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowNetworks", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "put", "url": "/api/voice/networks/{id}", "title": "Update an existing network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "post", "url": "/api/notifications", "title": "Send notification to user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/notifications -d '{\"text\": \"Hello!\", \"TemplateId\": 1}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Send", "group": "Notifications", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/notification/index.js", "groupTitle": "Notifications" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/users", "title": "Add agents to a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "replyUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Openchannel_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/users", "title": "Gets agents from openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/users", "title": "Removes agents from a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/interactions", "title": "Gets Openchannel Account Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

Follow this link to check the documentation:

https://wiki.xcallymotion.com/display/XMV/New+Channels+Configuration+Steps#NewChannelsConfigurationSteps-BuildyourownChannelservice

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/send", "title": "Send new openchannel message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/send -d '{from: 'John Doe', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendOpenchannel", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "put", "url": "/api/openchannel/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Openchannel_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "delete", "url": "/api/openchannel/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Openchannel_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "put", "url": "/api/openchannel/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "externalUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Openchannel_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "put", "url": "/api/openchannel/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Openchannel_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "delete", "url": "/api/openchannel/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Openchannel_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "post", "url": "/api/openchannel/reports/queue", "title": "Creates a new Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/queue/{id}", "title": "Deletes a Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/describe", "title": "Gets table info about Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue", "title": "Gets a list of Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/{id}", "title": "Gets a single Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "put", "url": "/api/openchannel/reports/queue/{id}", "title": "Update an existing Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "post", "url": "/api/openchannel/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Openchannel_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Openchannel_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "put", "url": "/api/openchannel/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/reports/transfer", "title": "Creates a new Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/transfer/{id}", "title": "Deletes a Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/describe", "title": "Gets table info about Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer", "title": "Gets a list of Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/{id}", "title": "Gets a single Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "put", "url": "/api/openchannel/reports/transfer/{id}", "title": "Update an existing Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "post", "url": "/api/pauses", "title": "Creates a new Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreatePauses", "group": "Pauses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "delete", "url": "/api/pauses/{id}", "title": "Deletes a Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses", "title": "Gets a list of Pauses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -v -u {name}:{password}", "type": "json" } ], "name": "GetPauses", "group": "Pauses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/pauses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/pauses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/pauses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/pauses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/pauses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses/{id}", "title": "Gets a single Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "put", "url": "/api/pauses/{id}", "title": "Update an existing Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/plugins", "title": "Gets a list of Plugins", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -v -u {name}:{password}", "type": "json" } ], "name": "GetPlugins", "group": "Plugins", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/plugins?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/plugins?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/plugins?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/plugins?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/plugins?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}", "title": "Gets a single Plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPlugins", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/plugins/{id}", "title": "Delete a plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroyPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}/download", "title": "Download plugin source code", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "put", "url": "/api/plugins/{id}", "title": "Update an existing plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins", "title": "Upload new plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -H 'Content-Type: application/json' -X POST", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/pm2/{id}", "title": "Deletes an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2/{id}", "title": "Gets a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2", "title": "Gets pm2 processes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Processes", "group": "Pm2", "description": "

Motion returns the pm2 processes list.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "post", "url": "/api/pm2", "title": "Start a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -d '{\"name\": \"process_name\", \"script\": \"/index.js\"}'\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "StartPm2Process", "group": "Pm2", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "script", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "put", "url": "/api/pm2/{id}", "title": "Update an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -d '{\"status\": \"online\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "UpdatePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/rpc/campaigns/", "title": "Gets a list of campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "Campaigns", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime campaigns parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/accounts", "title": "Gets a list of FaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "FaxAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "put", "url": "/api/rpc/agents/:id/capacity", "title": "Sets agent capacity", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/capacity -v -u {name}:{password}", "type": "json" } ], "name": "RTAgentCapacity", "group": "RPC_Realtime", "description": "

Motion will return the current agent capacity.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/agents", "title": "Gets a list of RTAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents -v -u {name}:{password}", "type": "json" } ], "name": "RTAgents", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime agents parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues", "title": "Gets a list of RTChatQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime chat queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues", "title": "Gets a list of RTFaxQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/accounts", "title": "Gets a list of RTMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "RTMailAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues", "title": "Gets a list of RTMailQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues", "title": "Gets a list of RTOpenchannelQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime openchannel queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound/channels", "title": "Gets a list of RTOutboundChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTOutboundChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues", "title": "Gets a list of RTSmsQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime sms queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/telephones", "title": "Gets a list of RTTelephones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/telephones -v -u {name}:{password}", "type": "json" } ], "name": "RTTelephones", "group": "RPC_Realtime", "description": "

Motion will return a list of telephones parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/trunks", "title": "Gets a list of RTTrunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/trunks -v -u {name}:{password}", "type": "json" } ], "name": "RTTrunks", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime trunks parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/mixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel mixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelStopMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/stopmixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelStopMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel stopmixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}", "title": "Gets a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannel", "group": "RPC_Realtime", "description": "

Motion will return a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/hangup", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/hangup -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelHangup", "group": "RPC_Realtime", "description": "

Motion will hangup a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten}", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelRedirect", "group": "RPC_Realtime", "description": "

Motion will redirect a specific realtime voice queue channel to a specific extension.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/preview/{id}", "title": "Gets a single preview contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/preview/{id} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuePreview", "group": "RPC_Realtime", "description": "

Motion will return a specific preview contact.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound", "title": "Gets a list of RTOutbound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues", "title": "Gets a list of RTVoiceQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels", "title": "Gets a list of RTVoiceQueuesChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuesChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/{id}", "title": "Gets a single RTChatQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/{id}", "title": "Gets a single RTFaxQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/{id}", "title": "Gets a single RTMailQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/{id}", "title": "Gets a single RTOpenchannelQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/{id}", "title": "Gets a single RTSmsQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/{id}", "title": "Gets a single RTVoiceQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/agents/:id/notify", "title": "Notify message to a specific agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/notify -d '{\"messageId\": \"5080\", \"channel\": \"mail\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "agentNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific agent.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/chat/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "chatQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/waitinginteractions", "title": "Gets a list of chatQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "chatQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting chat queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/fax/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "faxQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/waitinginteractions", "title": "Gets a list of faxQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "faxQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting fax queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/mail/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "mailQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/waitinginteractions", "title": "Gets a list of mailQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "mailQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting mail queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/openchannel/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "openchannelQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/:id/waitinginteractions", "title": "Gets a list of openchannelQueuesIdWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesIdWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/waitinginteractions", "title": "Gets a list of openchannelQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/sms/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "smsQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/waitinginteractions", "title": "Gets a list of smsQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "smsQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting sms queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/integrations/salesforce/accounts", "title": "Creates a new Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Accounts", "group": "Salesforce_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "securityToken", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "delete", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Deletes a Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts", "title": "Gets a list of Salesforce Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Gets a single Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "put", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Update an existing Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/configurations", "title": "Creates a new Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Configurations", "group": "Salesforce_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Task\"", "\"Case\"" ], "optional": true, "field": "ticketType", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"nothing\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleCreate", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "delete", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Deletes a Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations", "title": "Gets a list of Salesforce Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Gets a single Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "put", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Update an existing Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "post", "url": "/api/integrations/salesforce/fields", "title": "Creates a new Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Fields", "group": "Salesforce_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "delete", "url": "/api/integrations/salesforce/fields/{id}", "title": "Deletes a Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields", "title": "Gets a list of Salesforce Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields/{id}", "title": "Gets a single Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "put", "url": "/api/integrations/salesforce/fields/{id}", "title": "Update an existing Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "post", "url": "/api/schedules", "title": "Creates a new Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSchedules", "group": "Schedules", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "cron", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "startAt", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "endAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "subtractNumber", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"years\"", "\"quarters\"", "\"months\"", "\"weeks\"", "\"days\"", "\"hours\"", "\"minutes\"" ], "optional": false, "field": "subtractUnit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"custom\"", "\"default\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendMail", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendIfEmpty", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "delete", "url": "/api/schedules/{id}", "title": "Deletes a Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules", "title": "Gets a list of Schedules", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -v -u {name}:{password}", "type": "json" } ], "name": "GetSchedules", "group": "Schedules", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/schedules?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/schedules?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/schedules?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/schedules?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/schedules?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}", "title": "Gets a single Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}/run", "title": "Run Scheduler", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "put", "url": "/api/schedules/{id}", "title": "Update an existing Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "post", "url": "/api/screen/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Screen_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interactionid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Screen_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/screen/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/screen/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/screen/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/screen/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/screen/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "delete", "url": "/api/screen/recordings/{id}", "title": "Delete screen recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "put", "url": "/api/screen/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "post", "url": "/api/integrations/servicenow/accounts", "title": "Creates a new Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Accounts", "group": "Servicenow_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "delete", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Deletes a Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts", "title": "Gets a list of Servicenow Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Gets a single Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "put", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Update an existing Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/configurations", "title": "Creates a new Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Configurations", "group": "Servicenow_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "delete", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Deletes a Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations", "title": "Gets a list of Servicenow Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Gets a single Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "put", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Update an existing Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "post", "url": "/api/integrations/servicenow/fields", "title": "Creates a new Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Fields", "group": "Servicenow_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "delete", "url": "/api/integrations/servicenow/fields/{id}", "title": "Deletes a Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields", "title": "Gets a list of Servicenow Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields/{id}", "title": "Gets a single Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "put", "url": "/api/integrations/servicenow/fields/{id}", "title": "Update an existing Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/settings", "title": "Gets a list of Settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings -v -u {name}:{password}", "type": "json" } ], "name": "GetSettings", "group": "Settings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/settings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/settings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/settings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/settings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/settings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}", "title": "Gets a single Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/favicon", "title": "Add Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo_login", "title": "Add logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/preferred", "title": "Add Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/now", "title": "Get Server Current Date", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/now -v -X GET", "type": "json" } ], "name": "getDate", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/favicon", "title": "Get Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -v -X GET", "type": "json" } ], "name": "getFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/gdpr", "title": "Get gdpr settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/gdpr -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getGdpr", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -v -X GET", "type": "json" } ], "name": "getLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo_login", "title": "Get logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -v -X GET", "type": "json" } ], "name": "getLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/preferred", "title": "Get Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -v -X GET", "type": "json" } ], "name": "getPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "put", "url": "/api/settings/{id}", "title": "Update an existing Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/sms/accounts/{id}/users", "title": "Add agents to a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"", "\"skebby\"", "\"connectel\"", "\"clicksend\"", "\"plivo\"", "\"clickatell\"", "\"bandwidth\"", "\"csc\"", "\"infobip\"", "\"intelepeer\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SI\"", "\"TI\"", "\"GP\"" ], "optional": true, "field": "smsMethod", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "applicationId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "senderString", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "deliveryReport", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "baseUrl", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Sms_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/users", "title": "Gets agents from sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/users", "title": "Removes agents from a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/interactions", "title": "Gets Sms Account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new sms message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/send", "title": "Send new sms message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendSms", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status as get request", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X GET", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Sms_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "delete", "url": "/api/sms/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Sms_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "put", "url": "/api/sms/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "post", "url": "/api/sms/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Sms_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "put", "url": "/api/sms/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Sms_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "delete", "url": "/api/sms/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Sms_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "put", "url": "/api/sms/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "post", "url": "/api/sms/reports/queue", "title": "Creates a new Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Queue_Reports", "group": "Sms_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "delete", "url": "/api/sms/reports/queue/{id}", "title": "Deletes a Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/describe", "title": "Gets table info about Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue", "title": "Gets a list of Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/{id}", "title": "Gets a single Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "put", "url": "/api/sms/reports/queue/{id}", "title": "Update an existing Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "post", "url": "/api/sms/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Sms_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Sms_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "put", "url": "/api/sms/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/reports/transfer", "title": "Creates a new Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "delete", "url": "/api/sms/reports/transfer/{id}", "title": "Deletes a Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/describe", "title": "Gets table info about Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer", "title": "Gets a list of Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/{id}", "title": "Gets a single Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "put", "url": "/api/sms/reports/transfer/{id}", "title": "Update an existing Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sounds", "title": "Gets a list of Sounds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -v -u {name}:{password}", "type": "json" } ], "name": "GetSounds", "group": "Sounds", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sounds?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sounds?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sounds?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sounds?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sounds?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}", "title": "Gets a single Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSounds", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/sounds", "title": "Create a new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "delete", "url": "/api/sounds/{id}", "title": "Deletes a sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroySound", "group": "Sounds", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}/download", "title": "Download Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "put", "url": "/api/sounds", "title": "Update an existing new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -d '[\"name\": \"sound_name\", \"description\": \"sound_desc\"]' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/square/details/reports", "title": "Creates a new Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Detail_Reports", "group": "Square_Details_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "node", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "application", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "delete", "url": "/api/square/details/reports/{id}", "title": "Deletes a Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/describe", "title": "Gets table info about Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports", "title": "Gets a list of Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/details/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/details/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/details/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/details/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/details/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/{id}", "title": "Gets a single Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "put", "url": "/api/square/details/reports/{id}", "title": "Update an existing Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "post", "url": "/api/square/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Square_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "delete", "url": "/api/square/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Square_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "put", "url": "/api/square/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "post", "url": "/api/square/odbc", "title": "Creates a new ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateODBCs", "group": "Square_ODBC", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dsn", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "delete", "url": "/api/square/odbc/{id}", "title": "Deletes a ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc", "title": "Gets a list of ODBCs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -v -u {name}:{password}", "type": "json" } ], "name": "GetODBCs", "group": "Square_ODBC", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/odbc?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/odbc?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/odbc?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/odbc?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/odbc?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}", "title": "Gets a single ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}/test", "title": "Test Odbc", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id}/test -v -u {name}:{password} -X GET", "type": "json" } ], "name": "test", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "put", "url": "/api/square/odbc/{id}", "title": "Update an existing ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "post", "url": "/api/square/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Square_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notes", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "preproduction", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "production", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "publishedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Square_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/projects/{id}/users", "title": "Adds user permissions to a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}/users", "title": "Gets users permissions from Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}/users", "title": "Removes user permissions from a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "removeUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "put", "url": "/api/square/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Square_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "saveName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "filename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savePath", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Square_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "delete", "url": "/api/square/recordings/{id}/delete", "title": "Delete recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/delete -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "put", "url": "/api/square/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "post", "url": "/api/square/reports", "title": "Creates a new Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Reports", "group": "Square_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "network", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "network_script", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "request", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "version", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingani2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callington", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingtns", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rdnis", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "enhanced", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "bot", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "delete", "url": "/api/square/reports/{id}", "title": "Deletes a Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/describe", "title": "Gets table info about Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports", "title": "Gets a list of Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Reports", "group": "Square_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/{id}", "title": "Gets a single Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "put", "url": "/api/square/reports/{id}", "title": "Update an existing Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "post", "url": "/api/integrations/sugarcrm/configurations", "title": "Creates a new SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "delete", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Deletes a SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations", "title": "Gets a list of SugarCRM Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Gets a single SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "put", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Update an existing SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts", "title": "Creates a new Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "delete", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Deletes a Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts", "title": "Gets a list of Sugarcrm Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Gets a single Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "put", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Update an existing Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/fields", "title": "Creates a new Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Fields", "group": "Sugarcrm_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "delete", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Deletes a Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields", "title": "Gets a list of Sugarcrm Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Gets a single Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "put", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Update an existing Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/system/process", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "get", "url": "/api/system", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "post", "url": "/api/tags", "title": "Creates a new Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTags", "group": "Tags", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "delete", "url": "/api/tags/{id}", "title": "Deletes a Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTags", "group": "Tags", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags", "title": "Gets a list of Tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -v -u {name}:{password}", "type": "json" } ], "name": "GetTags", "group": "Tags", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/tags?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/tags?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/tags?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/tags?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/tags?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags/{id}", "title": "Gets a single Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "put", "url": "/api/tags/{id}", "title": "Update an existing Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "post", "url": "/api/teams/{id}/queues", "title": "Add queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams", "title": "Creates a new Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTeams", "group": "Teams", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}", "title": "Deletes a Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/users", "title": "Gets agents from team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel={channel} -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams", "title": "Gets a list of Teams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Teams", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/teams?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/teams?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/teams?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/teams?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/teams?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/users", "title": "Removes agents from a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/queues", "title": "Remove queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel=voice&ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/mail/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/voice/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/fax/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/chat/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/sms/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}", "title": "Gets a single Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams/{id}/users", "title": "Adds agents to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "put", "url": "/api/teams/{id}", "title": "Update an existing Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/templates", "title": "Creates a new Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTemplates", "group": "Templates", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "delete", "url": "/api/templates/{id}", "title": "Deletes a Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates", "title": "Gets a list of Templates", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -v -u {name}:{password}", "type": "json" } ], "name": "GetTemplates", "group": "Templates", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/templates?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/templates?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/templates?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/templates?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/templates?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates/{id}", "title": "Gets a single Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "put", "url": "/api/templates/{id}", "title": "Update an existing Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "post", "url": "/api/triggers", "title": "Creates a new Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTriggers", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "delete", "url": "/api/triggers/{id}", "title": "Deletes a Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers", "title": "Gets a list of Triggers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -v -u {name}:{password}", "type": "json" } ], "name": "GetTriggers", "group": "Triggers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/triggers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/triggers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/triggers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/triggers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/triggers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}", "title": "Gets a single Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -d '{\"action\": \"contactManager\",\"data1\": \"1\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAction", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/all_conditions", "title": "Creates a new \"AND\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAllCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/any_conditions", "title": "Creates a new \"OR\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnyCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/actions", "title": "Gets Trigger Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/all_conditions", "title": "Gets \"AND\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAllConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/any_conditions", "title": "Gets \"OR\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnyConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "put", "url": "/api/triggers/{id}", "title": "Update an existing Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/trunks/clone", "title": "Clone an existing Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/trunks", "title": "Create a new trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Trunks", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"friend\"", "\"user\"", "\"peer\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "context", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ALLOWED_NOT_SCREENED\"", "\"ALLOWED_PASSED_SCREEN\"", "\"ALLOWED_FAILED_SCREEN\"", "\"ALLOWED\"", "\"PROHIB_NOT_SCREENED\"", "\"PROHIB_PASSED_SCREEN\"", "\"PROHIB_FAILED_SCREEN\"", "\"PROHIB\"" ], "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "permit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "md5secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remotesecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transport", "description": "

String is deprecated. Please use an Array as ["udp", "tcp"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rfc2833\"", "\"info\"", "\"shortinfo\"", "\"inband\"", "\"auto\"" ], "optional": true, "field": "dtmfmode", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"outgoing\"" ], "optional": true, "field": "directmedia", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "directrtpsetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediapermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediadeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nat", "description": "

String is deprecated. Please use an Array as ["force_rport", "comedia"]

" }, { "group": "Body", "type": "String", "optional": true, "field": "callgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedcallgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedpickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tonezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disallow", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "allow", "description": "

String is deprecated. Please use an Array as ["ulaw", "alaw", "alaw"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autoframing", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "insecure", "description": "

String is deprecated. Please use an Array as ["port", "invite"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trustrpid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trust_id_outbound", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"never\"" ], "optional": true, "field": "progressinband", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "promiscredir", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "useclientcode", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "setvar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "callcounter", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "busylevel", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowoverlap", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowsubscribe", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowtransfer", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ignoresdpversion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subscribecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "template", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"always\"" ], "optional": true, "field": "videosupport", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxcallbitrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "rfc2833compensate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"accept\"", "\"refuse\"", "\"originate\"" ], "optional": true, "field": "session_timers", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_expires", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_minse", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"uac\"", "\"uas\"" ], "optional": true, "field": "session_refresher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_usertpsource", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "regexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromdomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "qualify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "keepalive", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultip", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtptimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpholdtimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpkeepalive", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"pai\"" ], "optional": true, "field": "sendrpid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "outboundproxy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackextension", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timert1", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timerb", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "qualifyfreq", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactpermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactdeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactacl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unsolicited_mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "use_q850_reason", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxforwards", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "encryption", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "avpf", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "force_avp", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "icesupport", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "dtlsenable", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"fingerprint\"", "\"certificate\"" ], "optional": true, "field": "dtlsverify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dtlsrekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscertfile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsprivatekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscipher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscafile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscapath", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"active\"", "\"passive\"", "\"actpass\"" ], "optional": true, "field": "dtlssetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsfingerprint", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "usereqphone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordonfeature", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordofffeature", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "call_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "registertrying", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "subscribemwi", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vmexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohinterpret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohsuggest", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parkinglot", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"update,nonat\"" ], "optional": true, "field": "canreinvite", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "registry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "otherFields", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_udptl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "delete", "url": "/api/trunks/{id}", "title": "Deletes a trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Trunks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks", "title": "Gets a list of Trunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password}", "type": "json" } ], "name": "GetTrunks", "group": "Trunks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/trunks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/trunks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/trunks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/trunks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/trunks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks/{id}", "title": "Gets a single Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "put", "url": "/api/trunks/{id}", "title": "Update an existing trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/user_has_chat_interactions", "title": "Creates a new UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserChatInteractions", "group": "UserChatInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "delete", "url": "/api/user_has_chat_interactions/{id}", "title": "Deletes a UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions", "title": "Gets a list of UserChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_chat_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_chat_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_chat_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_chat_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_chat_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions/{id}", "title": "Gets a single UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "put", "url": "/api/user_has_chat_interactions/{id}", "title": "Update an existing UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "post", "url": "/api/user_has_fax_interactions", "title": "Creates a new UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserFaxInteractions", "group": "UserFaxInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "FaxInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "delete", "url": "/api/user_has_fax_interactions/{id}", "title": "Deletes a UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions", "title": "Gets a list of UserFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_fax_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_fax_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_fax_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_fax_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_fax_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions/{id}", "title": "Gets a single UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "put", "url": "/api/user_has_fax_interactions/{id}", "title": "Update an existing UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "post", "url": "/api/user_has_mail_interactions", "title": "Creates a new UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserMailInteractions", "group": "UserMailInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "MailInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "delete", "url": "/api/user_has_mail_interactions/{id}", "title": "Deletes a UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions", "title": "Gets a list of UserMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_mail_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_mail_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_mail_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_mail_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_mail_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions/{id}", "title": "Gets a single UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "put", "url": "/api/user_has_mail_interactions/{id}", "title": "Update an existing UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "post", "url": "/api/userNotifications", "title": "Send notification to user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userNotifications -d '{\"text\": \"Hello!\", \"TemplateId\": 1}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Send", "group": "UserNotifications", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userNotification/index.js", "groupTitle": "UserNotifications" }, { "type": "post", "url": "/api/user_has_openchannel_interactions", "title": "Creates a new UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "OpenchannelInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "delete", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Deletes a UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions", "title": "Gets a list of UserOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_openchannel_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_openchannel_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_openchannel_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_openchannel_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_openchannel_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Gets a single UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "put", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Update an existing UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "post", "url": "/api/user_has_sms_interactions", "title": "Creates a new UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserSmsInteractions", "group": "UserSmsInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "SmsInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "delete", "url": "/api/user_has_sms_interactions/{id}", "title": "Deletes a UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions", "title": "Gets a list of UserSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_sms_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_sms_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_sms_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_sms_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_sms_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions/{id}", "title": "Gets a single UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "put", "url": "/api/user_has_sms_interactions/{id}", "title": "Update an existing UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "post", "url": "/api/user_has_whatsapp_interactions", "title": "Creates a new UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "WhatsappInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "delete", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Deletes a UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions", "title": "Gets a list of UserWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_whatsapp_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_whatsapp_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_whatsapp_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_whatsapp_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_whatsapp_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Gets a single UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "put", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Update an existing UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "post", "url": "/api/userProfile/resources", "title": "Creates a new User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Resources", "group": "User_Profile_Resources", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "resourceId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "delete", "url": "/api/userProfile/resources/{id}", "title": "Deletes a User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/describe", "title": "Gets table info about User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources", "title": "Gets a list of User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/resources?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/resources?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/resources?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/resources?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/resources?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/{id}", "title": "Gets a single User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "put", "url": "/api/userProfile/resources/{id}", "title": "Update an existing User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "post", "url": "/api/userProfile/sections", "title": "Creates a new User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Sections", "group": "User_Profile_Sections", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "category", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "sectionId", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enabled", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoAssociation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "crudPermissions", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "delete", "url": "/api/userProfile/sections/{id}", "title": "Deletes a User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/describe", "title": "Gets table info about User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections", "title": "Gets a list of User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/sections?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/sections?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/sections?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/sections?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/sections?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/{id}", "title": "Gets a single User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "put", "url": "/api/userProfile/sections/{id}", "title": "Update an existing User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "post", "url": "/api/userProfiles/{id}/resources", "title": "Add resources' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/{id}/sections", "title": "Add sections' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -d '[{\"sectionId\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/clone", "title": "Clone an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles", "title": "Creates a new User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profiles", "group": "User_Profiles", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "crudPermissions", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}", "title": "Deletes a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/describe", "title": "Gets table info about User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/resources?section={section}", "title": "Get Resources assigned to a Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?section={section} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/sections", "title": "Get sections associated to a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles", "title": "Gets a list of User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profiles", "group": "User_Profiles", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfiles?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfiles?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfiles?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfiles?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfiles?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/resources", "title": "Removes resources' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/sections", "title": "Removes sections' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}", "title": "Gets a single User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "put", "url": "/api/userProfiles/{id}", "title": "Update an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/users/{id}/chat_interactions", "title": "Add chat interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/chat_websites", "title": "Add a Chat Website to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/contacts", "title": "Add contacts to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -d '{\"ids\": [1,2]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddContacts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_accounts", "title": "Add a Fax Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_interactions", "title": "Add fax interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_accounts", "title": "Add a Mail Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_interactions", "title": "Add mail interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_accounts", "title": "Add a Open Channel Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_interactions", "title": "Add openchannel interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/queues", "title": "Add queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_accounts", "title": "Add a Sms Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_interactions", "title": "Add sms interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/square_projects", "title": "Add a Square Project to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/teams", "title": "Add teams to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_accounts", "title": "Add a Whatsapp Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_interactions", "title": "Add Whatsapp interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}/password", "title": "Change user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/password -d '{\"oldPassword\": \"1234\", \"newPassword\": \"5678\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "ChangePwd", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users", "title": "Create a new user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/api_key", "title": "Create a new API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}", "title": "Deletes a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/describe", "title": "Gets table info about Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/agents", "title": "GetAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/agents -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/api_key", "title": "Get the API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/groups", "title": "GetChatGroups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/groups -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatGroups", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat/interactions", "title": "GetChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat_websites", "title": "GetChatWebsites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/contacts", "title": "GetContacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetContacts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax_accounts", "title": "GetFaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax/interactions", "title": "GetFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/lists", "title": "GetLists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail_accounts", "title": "GetMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail/interactions", "title": "GetMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel_accounts", "title": "GetOpenchannelAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel/interactions", "title": "GetOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/prefixes", "title": "GetPrefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/prefixes -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetPrefixes", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues/?channel={channel} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetQueues", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/recordings", "title": "GetRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/scheduled_calls", "title": "GetScheduledCalls", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/scheduled_calls -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScheduledCalls", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/screen_recordings", "title": "GetScreenRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/screen_recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScreenRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms_accounts", "title": "GetSmsAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms/interactions", "title": "GetSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/square_projects", "title": "GetSquareProjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/teams", "title": "GetTeams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users", "title": "Gets a list of Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -v -u {name}:{password}", "type": "json" } ], "name": "GetUsers", "group": "Users", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/users?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/users?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/users?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/users?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/users?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues_rt", "title": "GetVoiceQueuesRt", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues_rt -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetVoiceQueuesRt", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp_accounts", "title": "GetWhatsappAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp/interactions", "title": "GetWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/login", "title": "Login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/login -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Login", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/logout", "title": "Logout", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/logout -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Logout", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/pause", "title": "Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/pause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Pause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/api_key", "title": "Remove API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_websites", "title": "Removes a Chat Website from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_accounts", "title": "Removes a Fax Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_accounts", "title": "Removes a Mail Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_accounts", "title": "Removes a Open Channel Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_interactions", "title": "Removes openchannel interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/queues", "title": "Remove queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_accounts", "title": "Removes a Sms Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/square_projects", "title": "Removes a Square Project from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/teams", "title": "Removes teams from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_accounts", "title": "Removes a Whatsapp Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_interactions", "title": "Removes Whatsapp interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}", "title": "Gets a single User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/unpause", "title": "Unpause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/unpause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Unpause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/whoami", "title": "WhoAmI", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/whoami -v -u {name}:{password} -X GET", "type": "json" } ], "name": "WhoAmI", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/create_many", "title": "Create Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/create_many -d '[{\"name\": \"john.doe\", \"role\": \"user\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}", "title": "Update an existing User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/variables", "title": "Creates a new Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVariables", "group": "Variables", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "delete", "url": "/api/variables/{id}", "title": "Deletes a Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables", "title": "Gets a list of Variables", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -v -u {name}:{password}", "type": "json" } ], "name": "GetVariables", "group": "Variables", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/variables?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/variables?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/variables?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/variables?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/variables?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables/{id}", "title": "Gets a single Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "put", "url": "/api/variables/{id}", "title": "Update an existing Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/version/fetch", "title": "Fetch git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/fetch -v -u {name}:{password}", "type": "json" } ], "name": "FetchVersion", "group": "Version", "description": "

Motion run the following command: git fetch origin master

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version", "title": "Gets version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version -v -u {name}:{password}", "type": "json" } ], "name": "GetVersion", "group": "Version", "description": "

Motion returns the current and latest motion version.

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/migrations", "title": "Launch database migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/migrations -v -u {name}:{password}", "type": "json" } ], "name": "MigrateVersion", "group": "Version", "description": "

Motion launch the database migrations, according to the application version

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/pull", "title": "Pull git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/pull -v -u {name}:{password}", "type": "json" } ], "name": "PullVersion", "group": "Version", "description": "

Motion run the following command: git pull

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/reset", "title": "Reset git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/reset -v -u {name}:{password}", "type": "json" } ], "name": "ResetVersion", "group": "Version", "description": "

Motion run the following command: git reset --hard FETCH_HEAD

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/restart", "title": "Restart motion2 after update", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/restart -v -u {name}:{password}", "type": "json" } ], "name": "RestartVersion", "group": "Version", "description": "

Motion run the following command: pm2 restart motion

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/voice/agents/reports/describe", "title": "Gets table info about Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports", "title": "Gets a list of Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/agents/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/agents/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/agents/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/agents/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/agents/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports/{id}", "title": "Gets a single Agent Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/describe", "title": "Gets table info about Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports", "title": "Gets a list of Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/calls/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/calls/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/calls/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/calls/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/calls/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/{id}", "title": "Gets a single Call Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "put", "url": "/api/voice/calls/reports/{id}", "title": "Update a single cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -d '{\"userDispositio\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "post", "url": "/api/voice/chanspy", "title": "Creates a new ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChanSpy", "group": "Voice_ChanSpy", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "prefix", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "options", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "auth", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "record", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordingFormat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "delete", "url": "/api/voice/chanspy/{id}", "title": "Deletes a ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy", "title": "Gets a list of ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -v -u {name}:{password}", "type": "json" } ], "name": "GetChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/chanspy?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/chanspy?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/chanspy?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/chanspy?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/chanspy?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy/{id}", "title": "Gets a single ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "put", "url": "/api/voice/chanspy/{id}", "title": "Update an existing ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "post", "url": "/api/voice/contexts", "title": "Create a new context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Voice_Contexts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultEntry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "delete", "url": "/api/voice/contexts/{id}", "title": "Deletes a context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts", "title": "Gets a list of Contexts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password}", "type": "json" } ], "name": "GetContexts", "group": "Voice_Contexts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/contexts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/contexts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/contexts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/contexts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/contexts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts/{id}", "title": "Gets a single Context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContexts", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "put", "url": "/api/voice/contexts/{id}", "title": "Update an existing context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/dials/reports/describe", "title": "Gets table info about Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports", "title": "Gets a list of Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/dials/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/dials/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/dials/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/dials/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/dials/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports/{id}", "title": "Gets a single Dial Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "delete", "url": "/api/voice/extensions/{id}", "title": "Deletes a Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions", "title": "Gets a list of Extensions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -v -u {name}:{password}", "type": "json" } ], "name": "GetExtensions", "group": "Voice_Extensions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/extensions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/extensions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/extensions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/extensions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/extensions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions/{id}", "title": "Gets a single Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id}/applications -d '[{\"app\": \"Set\", \"appdata\": \"CALLERDNID=${CALLER(dnid)}\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "put", "url": "/api/voice/extensions/{id}", "title": "Update an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/mohs", "title": "Create a new a new MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -d '{\"name\": \"xmas_musics\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mohs/{id}/sounds", "title": "Add sound to MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -d '{\"id\": 1}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}", "title": "Deletes an MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DestroyMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs", "title": "Gets a list of Music On Holds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -v -u {name}:{password}", "type": "json" } ], "name": "GetMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mohs?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mohs?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mohs?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mohs?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mohs?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}/sounds", "title": "Gets sounds from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "GetSounds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}/sounds/{id2}", "title": "Remove sound from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds/{id2} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}", "title": "Gets a single Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "put", "url": "/api/voice/mohs/{id}", "title": "Update an existing Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mails", "title": "Creates a new Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMails", "group": "Voice_Mails", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "customer_id", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fullname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pager", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tz", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "saycid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "review", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "envelope", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sayduration", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "saydurationm", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sendvoicemail", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "delete", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "nextaftercmd", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcegreetings", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "hidefromdir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "stamp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailsubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailbody", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxsecs", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxmsg", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "delete", "url": "/api/voice/mails/{id}", "title": "Deletes a Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails", "title": "Gets a list of Mails", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -v -u {name}:{password}", "type": "json" } ], "name": "GetMails", "group": "Voice_Mails", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}", "title": "Gets a single Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}/messages", "title": "Gets voice mail messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "put", "url": "/api/voice/mails/{id}", "title": "Update an existing Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "post", "url": "/api/voice/mails/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Voice_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "msgnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "macrocontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "origtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxuser", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxcontext", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "recording", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "flag", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "msg_id", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "stamp", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "delete", "url": "/api/voice/mails/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Voice_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "voice/mails/messages/{id}/download", "title": "Download Voice Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}voice/mails/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "put", "url": "/api/voice/mails/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "post", "url": "/api/voice/prefixes/{id}/users", "title": "Add agents to a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}", "title": "Deletes a Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/describe", "title": "Gets table info about Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}/users", "title": "Gets agents from prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes", "title": "Gets a list of Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -v -u {name}:{password}", "type": "json" } ], "name": "GetPrefixes", "group": "Voice_Prefixes", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/prefixes?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/prefixes?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/prefixes?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/prefixes?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/prefixes?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}/users", "title": "Removes agents from a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}", "title": "Gets a single Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "put", "url": "/api/voice/prefixes/{id}", "title": "Update an existing prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "post", "url": "/api/voice/prefixes", "title": "Create a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/queues/reports/describe", "title": "Gets table info about Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports", "title": "Gets a list of Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/{id}", "title": "Gets a single Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/index", "title": "Get Voice Queues Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/index -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getVoiceQueuesReport", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "post", "url": "/api/voice/queues/{id}/users", "title": "Add agents to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/blacklists", "title": "Add blacklists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/lists", "title": "Add lists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/teams", "title": "Add teams to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/clone", "title": "Clone an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Voice_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"inbound\"", "\"outbound\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "musiconhold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rr\"", "\"ringall\"", "\"leastrecent\"", "\"fewestcalls\"", "\"random\"", "\"rrmemory\"", "\"linear\"", "\"wrandom\"", "\"rrordered\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "servicelevel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "penaltymemberslimit", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "retry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timeoutpriority", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "weight", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "wrapuptime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autofill", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"all\"" ], "optional": true, "field": "autopause", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "autopausedelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopausebusy", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopauseunavail", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxlen", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setinterfacevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueueentryvar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueuevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "eventmemberstatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membermacro", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membergosub", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "min_announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "periodic_announce_frequency", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "random_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "relative_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"once\"" ], "optional": true, "field": "announce_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce_position", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "announce_to_first_user", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_position_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"0\"", "\"5\"", "\"10\"", "\"15\"", "\"20\"", "\"30\"" ], "optional": true, "field": "announce_round_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_youarenext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thereare", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_callswaiting", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minute", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minutes", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thankyou", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_reporthold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_less_than", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinempty", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leavewhenempty", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "reportholdtime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ringinuse", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "memberdelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "timeoutrestart", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultrule", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "acw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialActive", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"preview\"", "\"progressive\"", "\"power\"", "\"predictive\"", "\"booked\"" ], "optional": true, "field": "dialMethod", "description": "

Dial Method.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitChannel", "description": "

Max 9999 channels, 0 means unlimited.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitQueue", "description": "

Max 9999 member in queue(min:1, max:9999), 0 means unlimited.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPowerLevel", "description": "

Power Level: Calls for agents (min:1, max:10).

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"agentBusyFactor\"", "\"dropRate\"" ], "optional": true, "field": "dialPredictiveOptimization", "description": "

Only for predictive method.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPredictiveOptimizationPercentage", "description": "

Predictive Optimization Percentage (min: 1, max: 95)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveInterval", "description": "

Interval Predictive Minutes (min:5 max:30)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueOptions", "description": "

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialQueueTimeout", "description": "

Queue Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRecallMeTimeout", "description": "

#RecallMe Timeout (min:1)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialRecallInQueue", "description": "

Active/Disactive Recall In Queue

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject2", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupClient", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupAgent", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMaxThreshold", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMinThreshold", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacklists", "title": "Get queue blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/finals", "title": "Gets queue hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hopper_histories", "title": "Gets queue hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hoppers", "title": "Gets queue hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/lists", "title": "Get queue lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/members", "title": "Gets queue members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMembers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Voice_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/teams", "title": "Gets queue team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/blacklists", "title": "Remove blacklists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/lists", "title": "Remove lists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacks", "title": "Gets queue hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "put", "url": "/api/voice/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Voice_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userSecondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userThirdDisposition", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "location", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeStatus", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileUri", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileText", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failureReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentiment", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sPositive", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNegative", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNeutral", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sMixed", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tempSentiment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Voice_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "delete", "url": "/api/voice/recordings/{id}", "title": "Delete voice recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/downloads", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/downloads -v -u {name}:{password} -X GET", "type": "json" } ], "name": "downloads", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -d '{\"runSentiment\": \"true\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -v -u {name}:{password} -X GET", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "put", "url": "/api/voice/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/transfers/reports", "title": "Creates a new Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTransfer_Reports", "group": "Voice_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"blind\"", "\"attended\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "result", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereraccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererlinkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereechannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereelinkedid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Yes\"", "\"No\"" ], "optional": true, "field": "isexternal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "delete", "url": "/api/voice/transfers/reports/{id}", "title": "Deletes a Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports/describe", "title": "Gets table info about Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports", "title": "Gets a list of Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/transfers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/transfers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/transfers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/transfers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/transfers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports/{id}", "title": "Gets a single Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "put", "url": "/api/voice/transfers/reports/{id}", "title": "Update an existing Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/vtiger/accounts", "title": "Creates a new Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Accounts", "group": "Vtiger_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "moduleName", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "accessKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "delete", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Deletes a Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts", "title": "Gets a list of Vtiger Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Gets a single Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "put", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Update an existing Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/configurations", "title": "Creates a new Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Configurations", "group": "Vtiger_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "delete", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Deletes a Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations", "title": "Gets a list of Vtiger Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Gets a single Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "put", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Update an existing Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "post", "url": "/api/integrations/vtiger/fields", "title": "Creates a new Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Fields", "group": "Vtiger_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "delete", "url": "/api/integrations/vtiger/fields/{id}", "title": "Deletes a Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields", "title": "Gets a list of Vtiger Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields/{id}", "title": "Gets a single Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "put", "url": "/api/integrations/vtiger/fields/{id}", "title": "Update an existing Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "post", "url": "/api/webbar/answer", "title": "answer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/answer -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_answer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/calls", "title": "webrtc call list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/calls -d '{\"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_calls", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hangup", "title": "hangup webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hangup -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hangup", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hold", "title": "hold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/unhold", "title": "unhold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/unhold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/originate", "title": "Originate new webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/originate -d '{\"callNumber\": \"0119692844\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_originate", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "callNumber", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callerId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callbackUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/transfer", "title": "blind transfer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/transfer -d '{\"userId\": 54, \"sessionId\":\"\", \"transferNumber\":\"\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_transfer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "transferNumber", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/users", "title": "Add agents to a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/users", "title": "Gets agents from whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/users", "title": "Removes agents from a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new whatsapp message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/send", "title": "Send new whatsapp message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendWhatsapp", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Whatsapp_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "delete", "url": "/api/whatsapp/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Whatsapp_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "put", "url": "/api/whatsapp/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "put", "url": "/api/whatsapp/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Whatsapp_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "delete", "url": "/api/whatsapp/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Whatsapp_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "put", "url": "/api/whatsapp/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "post", "url": "/api/whatsapp/reports/queue", "title": "Creates a new Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/queue/{id}", "title": "Deletes a Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/describe", "title": "Gets table info about Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue", "title": "Gets a list of Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/{id}", "title": "Gets a single Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/queue/{id}", "title": "Update an existing Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Whatsapp_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Whatsapp_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "put", "url": "/api/whatsapp/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/reports/transfer", "title": "Creates a new Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Deletes a Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/describe", "title": "Gets table info about Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer", "title": "Gets a list of Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Gets a single Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Update an existing Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/zendesk/accounts", "title": "Creates a new Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Accounts", "group": "Zendesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"password\"", "\"token\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "delete", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Deletes a Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts", "title": "Gets a list of Zendesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Gets a single Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "put", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Update an existing Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/configurations", "title": "Creates a new Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Configurations", "group": "Zendesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "delete", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Deletes a Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations", "title": "Gets a list of Zendesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Gets a single Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "put", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Update an existing Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/fields", "title": "Creates a new Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Fields", "group": "Zendesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "delete", "url": "/api/integrations/zendesk/fields/{id}", "title": "Deletes a Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields", "title": "Gets a list of Zendesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields/{id}", "title": "Gets a single Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "put", "url": "/api/integrations/zendesk/fields/{id}", "title": "Update an existing Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "post", "url": "/api/integrations/zoho/accounts", "title": "Creates a new Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Accounts", "group": "Zoho_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "zone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "code", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "refreshToken", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "delete", "url": "/api/integrations/zoho/accounts/{id}", "title": "Deletes a Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts", "title": "Gets a list of Zoho Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}", "title": "Gets a single Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "put", "url": "/api/integrations/zoho/accounts/{id}", "title": "Update an existing Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/configurations", "title": "Creates a new Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Configurations", "group": "Zoho_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"lead\"", "\"contact\"", "\"nothing\"" ], "optional": true, "field": "moduleCreate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "delete", "url": "/api/integrations/zoho/configurations/{id}", "title": "Deletes a Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations", "title": "Gets a list of Zoho Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}", "title": "Gets a single Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "put", "url": "/api/integrations/zoho/configurations/{id}", "title": "Update an existing Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "post", "url": "/api/integrations/zoho/fields", "title": "Creates a new Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Fields", "group": "Zoho_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "delete", "url": "/api/integrations/zoho/fields/{id}", "title": "Deletes a Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields", "title": "Gets a list of Zoho Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields/{id}", "title": "Gets a single Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "put", "url": "/api/integrations/zoho/fields/{id}", "title": "Update an existing Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "post", "url": "/api/cdr", "title": "Creates a new Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCdrs", "group": "cdr", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "calldate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "src", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dst", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dstchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastapp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "duration", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "billsec", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userfield", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "linkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sequence", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "peeraccount", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tag", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "delete", "url": "/api/cdr/{id}", "title": "Deletes a Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/describe", "title": "Gets table info about Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr", "title": "Gets a list of Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -v -u {name}:{password}", "type": "json" } ], "name": "GetCdrs", "group": "cdr", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cdr?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cdr?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cdr?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cdr?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cdr?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/{id}", "title": "Gets a single Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "put", "url": "/api/cdr/{id}", "title": "Update an existing Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "post", "url": "/api/voiceQueuesLog", "title": "Creates a new VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVoiceQueuesLogs", "group": "voiceQueuesLog", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "time", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callid", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "queuename", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "agent", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "event", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data2", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data3", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "dtm", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "delete", "url": "/api/voiceQueuesLog/{id}", "title": "Deletes a VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog", "title": "Gets a list of VoiceQueuesLogs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -v -u {name}:{password}", "type": "json" } ], "name": "GetVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voiceQueuesLog?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voiceQueuesLog?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voiceQueuesLog?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voiceQueuesLog?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voiceQueuesLog?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog/{id}", "title": "Gets a single VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "put", "url": "/api/voiceQueuesLog/{id}", "title": "Update an existing VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" } ] }); diff --git a/apidoc/api_data.json b/apidoc/api_data.json index a2953e1..04690d4 100644 --- a/apidoc/api_data.json +++ b/apidoc/api_data.json @@ -1 +1 @@ -[ { "type": "delete", "url": "/api/actions/{id}", "title": "Deletes a Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteActions", "group": "Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "put", "url": "/api/actions/{id}", "title": "Update an existing Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateActions", "group": "Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "post", "url": "/api/analytics/custom_reports", "title": "Creates a new Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "delete", "url": "/api/analytics/custom_reports/{id}", "title": "Deletes a Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports", "title": "Gets a list of Analytic Custom Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/custom_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/custom_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/custom_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/custom_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/custom_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}", "title": "Gets a single Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "put", "url": "/api/analytics/custom_reports/{id}", "title": "Update an existing Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "post", "url": "/api/analytics/default_reports", "title": "Creates a new Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "delete", "url": "/api/analytics/default_reports/{id}", "title": "Deletes a Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports", "title": "Gets a list of Analytic Default Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/default_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/default_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/default_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/default_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/default_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}", "title": "Gets a single Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "put", "url": "/api/analytics/default_reports/{id}", "title": "Update an existing Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "post", "url": "/api/analytics/extracted_reports", "title": "Creates a new Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "basename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "savename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"manual\"", "\"scheduled\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "reportId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reportType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "delete", "url": "/api/analytics/extracted_reports/{id}", "title": "Deletes a Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports", "title": "Gets a list of Analytic Extacted Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/extracted_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/extracted_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/extracted_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/extracted_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/extracted_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}", "title": "Gets a single Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}/download", "title": "Download Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "put", "url": "/api/analytics/extracted_reports/{id}", "title": "Update an existing Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/create_many", "title": "Creates many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/create_many -d '[{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}]' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "BulkCreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/destroy_many?ids={ids}", "title": "Deletes many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/destroy_many?ids=1&ids=2&ids=3 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "BulkDeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports", "title": "Creates a new Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/{id}", "title": "Deletes a Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports", "title": "Gets a list of Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/field_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/field_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/field_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/field_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/field_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports/{id}", "title": "Gets a single Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/{id}/create_many", "title": "Rewrite fields set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id}/create_many -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFields", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "put", "url": "/api/analytics/field_reports/{id}", "title": "Update an existing Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/metrics", "title": "Creates a new Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Metric", "group": "Analytic_Metrics", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "metric", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "delete", "url": "/api/analytics/metrics/{id}", "title": "Deletes a Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics", "title": "Gets a list of Analytic Metric", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/metrics?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/metrics?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/metrics?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/metrics?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/metrics?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics/{id}", "title": "Gets a single Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "put", "url": "/api/analytics/metrics/{id}", "title": "Update an existing Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "post", "url": "/api/analytics/tree_reports", "title": "Creates a new Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "tree", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "delete", "url": "/api/analytics/tree_reports/{id}", "title": "Deletes a Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports", "title": "Gets a list of Analytic Tree Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/tree_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/tree_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/tree_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/tree_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/tree_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports/{id}", "title": "Gets a single Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "put", "url": "/api/analytics/tree_reports/{id}", "title": "Update an existing Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "post", "url": "/api/attachments/clone", "title": "Clone an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "delete", "url": "/api/attachments/{id}", "title": "Deletes a Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments", "title": "Gets a list of Attachments", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -v -u {name}:{password}", "type": "json" } ], "name": "GetAttachments", "group": "Attachments", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/attachments?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/attachments?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/attachments?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/attachments?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/attachments?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/{id}", "title": "Gets a single Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/attachments", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/:id/download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/:id/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/chat/interactions/{id}/attachment_download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Attachments" }, { "type": "put", "url": "/api/attachments/{id}", "title": "Update an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/auth/local/forgot", "title": "Creates a new password reset token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/forgot -d '{\"email\": \"john.doe@xcally.com\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Forgot_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "email", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local/reset/:token", "title": "Reset user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/reset/94b422c1fkdjhg766a198da6997yu6gcc963641d -d '{\"password\": \"My_newP@ssw0rd\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Reset_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/google", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/google -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authGoogle/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/automations", "title": "Creates a new Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAutomations", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "delete", "url": "/api/automations/{id}", "title": "Deletes a Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations", "title": "Gets a list of Automations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -v -u {name}:{password}", "type": "json" } ], "name": "GetAutomations", "group": "Automations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/automations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/automations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/automations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/automations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/automations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}", "title": "Gets a single Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addActions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/conditions", "title": "Creates new conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConditions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/actions", "title": "Gets Automation Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/conditions", "title": "Gets Automation Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConditions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "put", "url": "/api/automations/{id}", "title": "Update an existing Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/canned_answers", "title": "Create a new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "delete", "url": "/api/canned_answers/{id}", "title": "Deletes a Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers", "title": "Gets a list of Canned Answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -v -u {name}:{password}", "type": "json" } ], "name": "GetCanned_Answers", "group": "Canned_Answers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/canned_answers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/canned_answers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/canned_answers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/canned_answers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/canned_answers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers/{id}", "title": "Gets a single Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "put", "url": "/api/canned_answers/{id}", "title": "Update an existing Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/chat/internal/users", "title": "Gets Users Last Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/chat/internal/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLastUsersMessages", "group": "ChatInternalMessage", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "ChatInternalMessage" }, { "type": "delete", "url": "/api/chat/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "get", "url": "/api/chat/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "put", "url": "/api/chat/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "post", "url": "/api/chat/groups", "title": "Creates a new Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateGroups", "group": "Chat_Groups", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "write", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}", "title": "Deletes a Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/describe", "title": "Gets table info about Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups", "title": "Gets a list of Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -v -u {name}:{password}", "type": "json" } ], "name": "GetGroups", "group": "Chat_Groups", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/groups?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/groups?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/groups?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/groups?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/groups?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}/members", "title": "Removes members from a group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}", "title": "Gets a single Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/members", "title": "Add members to chat group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/messages", "title": "Creates a new group message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -d '{\"body\": \"Hi operator!\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/members", "title": "Gets Members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/messages", "title": "Gets Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/unread", "title": "Get unread chat group messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/unread -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUread", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "put", "url": "/api/chat/groups/{id}", "title": "Update an existing Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Chat_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/abandon", "title": "Abandon interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/abandon -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "abandon", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to set as abandon an interaction and stop the routing.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/close", "title": "Close Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/close -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/attachment_upload", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "attachmentUpload", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/vidaoo", "title": "Create Vidaoo Session", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/vidaoo -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createVidaooSession", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/custom_update", "title": "Update interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/custom_update -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "customUpdate", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to update an interaction.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/my_messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/my_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMyMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/internal/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Internal_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInternalMessageId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "delete", "url": "/api/chat/internal/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Internal_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/internal/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/internal/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/internal/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/internal/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/internal/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "put", "url": "/api/chat/internal/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "post", "url": "/api/chat/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "delete", "url": "/api/chat/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "put", "url": "/api/chat/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "post", "url": "/api/chat/offline_messages", "title": "Creates a new OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOfflineMessages", "group": "Chat_Offline_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "delete", "url": "/api/chat/offline_messages/{id}", "title": "Deletes a OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/describe", "title": "Gets table info about OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages", "title": "Gets a list of OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -v -u {name}:{password}", "type": "json" } ], "name": "GetOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/offline_messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/offline_messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/offline_messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/offline_messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/offline_messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/{id}", "title": "Gets a single OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "put", "url": "/api/chat/offline_messages/{id}", "title": "Update an existing OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "post", "url": "/api/chat/proactive_actions", "title": "Creates a new Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProactive_Actions", "group": "Chat_Proactive_Actions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "delete", "url": "/api/chat/proactive_actions/{id}", "title": "Deletes a Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "get", "url": "/api/chat/proactive_actions/{id}", "title": "Gets a single Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "put", "url": "/api/chat/proactive_actions/{id}", "title": "Update an existing Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "post", "url": "/api/chat/reports/queue", "title": "Creates a new Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Queue_Reports", "group": "Chat_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "delete", "url": "/api/chat/reports/queue/{id}", "title": "Deletes a Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/describe", "title": "Gets table info about Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue", "title": "Gets a list of Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/{id}", "title": "Gets a single Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "put", "url": "/api/chat/reports/queue/{id}", "title": "Update an existing Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "post", "url": "/api/chat/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Chat_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Chat_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "put", "url": "/api/chat/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/reports/transfer", "title": "Creates a new Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "delete", "url": "/api/chat/reports/transfer/{id}", "title": "Deletes a Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/describe", "title": "Gets table info about Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer", "title": "Gets a list of Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/{id}", "title": "Gets a single Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "put", "url": "/api/chat/reports/transfer/{id}", "title": "Update an existing Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "post", "url": "/api/chat/websites/{id}/users", "title": "Add agents to a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites", "title": "Creates a new Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWebsites", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "address", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKeyOffline", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentAlias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerAlias", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color_button", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "textColor", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "fontSize", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remote", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "animation", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rounded\"", "\"squared\"" ], "optional": true, "field": "header_shape", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_online", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "start_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offline_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_offline", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "download_transcript", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "whiteLabel", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultWhiteLabel", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "sitepic", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingQuestion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitSuccessMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitFailureMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "noteTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "placeholderMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessageButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipMessageButton", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "conditionAgreement", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableRating", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableFeedback", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableSendButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "feedbackTitle", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingStarsNumber", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "onlineForm", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "offlineForm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoclose", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerWriting", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardTranscriptMessage", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardOfflineAddress", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageSubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUnmanagedNote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unmanagedMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipUnmanaged", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sendUnmanaged", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerAttachment", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerCheckmarks", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "agentAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showAgentAvatar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timezone", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "hideWhenOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentIdentifier", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alignment", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "verticalAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messagesAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultTitle", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "customerAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showCustomerAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "messageFontSize", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "backgroundColor", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "systemAlias", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "systemAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "vidaooEscalation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vidaooApiKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}", "title": "Deletes a Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/describe", "title": "Gets table info about Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/users", "title": "Gets agents from website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites", "title": "Gets a list of Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -v -u {name}:{password}", "type": "json" } ], "name": "GetWebsites", "group": "Chat_Websites", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/websites?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/websites?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/websites?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/websites?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/websites?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/users", "title": "Removes agents from a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/dispositions", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}", "title": "Gets a single Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Add customer avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Creates new Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -d '[{\"name\": \"Satisfied\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addProactiveActions", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/system_avatar", "title": "Add system avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/applications", "title": "Gets Website Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Get Customer Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/fields", "title": "Gets Website Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/interactions", "title": "Gets Website Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/offline_messages", "title": "Gets Website Offline Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOfflineMessages", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Gets Website Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getProactiveActions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/snippet", "title": "Gets Website Snippet", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/snippet -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSnippet", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/system_avatar", "title": "Get System Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new chat message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/offline", "title": "Offline message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "offline", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/websites/{id}", "title": "Update an existing Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/cloudProviders", "title": "Creates a new CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCloudProviders", "group": "CloudProviders", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"AmazonAWS\"", "\"Google\"" ], "optional": false, "field": "service", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "delete", "url": "/api/cloudProviders/{id}", "title": "Deletes a CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders", "title": "Gets a list of CloudProviders", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -v -u {name}:{password}", "type": "json" } ], "name": "GetCloudProviders", "group": "CloudProviders", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cloudProviders?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cloudProviders?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cloudProviders?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cloudProviders?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cloudProviders?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders/{id}", "title": "Gets a single CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "put", "url": "/api/cloudProviders/{id}", "title": "Update an existing CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "post", "url": "/api/cm_contact_has_items", "title": "Creates a new CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasItems", "group": "CmContactHasItems", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "item", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ItemTypeId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ItemClass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "delete", "url": "/api/cm_contact_has_items/{id}", "title": "Deletes a CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items", "title": "Gets a list of CmContactHasItems", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_items?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_items?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_items?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_items?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_items?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items/{id}", "title": "Gets a single CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "put", "url": "/api/cm_contact_has_items/{id}", "title": "Update an existing CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "post", "url": "/api/cm_contact_has_phones", "title": "Creates a new CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasPhones", "group": "CmContactHasPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "delete", "url": "/api/cm_contact_has_phones/{id}", "title": "Deletes a CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones", "title": "Gets a list of CmContactHasPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones/{id}", "title": "Gets a single CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "put", "url": "/api/cm_contact_has_phones/{id}", "title": "Update an existing CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "post", "url": "/api/cm_hopper_additional_phones", "title": "Creates a new CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmHopperId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "delete", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Deletes a CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones", "title": "Gets a list of CmHopperAdditionalPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_hopper_additional_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_hopper_additional_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_hopper_additional_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_hopper_additional_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_hopper_additional_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Gets a single CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "put", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Update an existing CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "post", "url": "/api/cm/companies", "title": "Creates a new Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCompanies", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "companyId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "website", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailDomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sStreet", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sPostalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCity", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCountry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/companies/{id}", "title": "Deletes a Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/describe", "title": "Gets table info about Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies", "title": "Gets a list of Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -v -u {name}:{password}", "type": "json" } ], "name": "GetCompanies", "group": "Cm_Companies", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/companies?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/companies?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/companies?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/companies?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/companies?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}", "title": "Gets a single Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "post", "url": "/api/cm/companies/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/companies/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "put", "url": "/api/cm/companies/{id}", "title": "Update an existing Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/contacts/{id}", "title": "Deletes a Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/describe", "title": "Gets table info about Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts", "title": "Gets a list of Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -v -u {name}:{password}", "type": "json" } ], "name": "GetContacts", "group": "Cm_Contacts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/contacts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/contacts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/contacts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/contacts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/contacts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/finals", "title": "Gets contact hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hopper_histories", "title": "Gets contact hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hoppers", "title": "Gets contact hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/create_many", "title": "Create Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/create_many -d '[{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts", "title": "Create Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -d '{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/jscripty_sessions", "title": "Gets contact hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getJscriptySessions", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/merge", "title": "Merge Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/merge -d '{\"from\": 1, \"to\": 2}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "merge", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -d '{\"ids\": [1,12]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}", "title": "Gets a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "put", "url": "/api/cm/contacts/{id}", "title": "Update a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -d '{\"firstName\": \"John\", \"lastName\": \"Doe\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "delete", "url": "/api/cm/custom_fields/{id}", "title": "Deletes a Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields", "title": "Gets a list of Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields -v -u {name}:{password}", "type": "json" } ], "name": "GetCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/custom_fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/custom_fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/custom_fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/custom_fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/custom_fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields/{id}", "title": "Gets a single Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "put", "url": "/api/cm/custom_fields/{id}", "title": "Update an existing Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "post", "url": "/api/cm/hopper", "title": "Creates a new Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopper", "group": "Cm_Hopper", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ContactId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ListId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "VoiceQueueId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "CampaignId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/describe", "title": "Gets table info about Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper", "title": "Gets a list of Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper", "group": "Cm_Hopper", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/{id}", "title": "Gets a single Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "delete", "url": "/api/cm/hopper_black/{id}", "title": "Deletes a Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/describe", "title": "Gets table info about Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black", "title": "Gets a list of Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_black?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_black?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_black?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_black?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_black?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/{id}", "title": "Gets a single Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "put", "url": "/api/cm/hopper_black/{id}", "title": "Update an existing Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_final/describe", "title": "Gets table info about HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final", "title": "Gets a list of HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_final?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_final?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_final?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_final?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_final?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/{id}", "title": "Gets a single HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/checkContactHopper", "title": "Check if contact is in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/checkContactHopper -d '{\"VoiceQueueId\": \"VoiceQueueId\", \"CampaignId\": \"CampaignId\", \"ContactId\": \"ContactId\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "_checkContactHopper", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/campaign/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/voice/queue/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/campaign/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "moveContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/voice/queue/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password}", "type": "json" } ], "name": "moveContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "put", "url": "/api/cm/hopper_final/{id}", "title": "Update a single hopper final", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_history", "title": "Creates a new HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopperHistory", "group": "Cm_Hopper_History", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "state", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "statedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countglobal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "responsetime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "answertime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "droptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ringtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "followuptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dropreason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaign", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaigntype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "amd", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "editedat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "edited", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/describe", "title": "Gets table info about HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history", "title": "Gets a list of HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_history?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_history?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_history?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_history?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_history?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/{id}", "title": "Gets a single HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "put", "url": "/api/cm/hopper_history/{id}", "title": "Update a single hopper history", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_history/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "delete", "url": "/api/cm/hopper/{id}", "title": "Delete Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/opencontacts", "title": "Gets Open Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/opencontacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOpenContacts", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/hopper/preview", "title": "Gets Preview Dialer Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/preview -d '{\"hopperIds\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getPreview", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "put", "url": "/api/cm/hopper/{id}", "title": "Update an existing Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/lists", "title": "Creates a new List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateLists", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}", "title": "Deletes a List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/describe", "title": "Gets table info about Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/users", "title": "Gets agents from list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists", "title": "Gets a list of Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -v -u {name}:{password}", "type": "json" } ], "name": "GetLists", "group": "Cm_Lists", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/lists?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/lists?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/lists?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/lists?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/lists?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/users", "title": "Removes agents from a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}", "title": "Gets a single List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/users", "title": "Adds agents to a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/fields", "title": "Creates a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomField", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/fields", "title": "Gets Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomFields", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/dispositions", "title": "Gets list dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts/csv", "title": "Gets CSV List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts/csv -v -u {name}:{password} -X GET", "type": "json" } ], "name": "grunt", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "put", "url": "/api/cm/lists/{id}", "title": "Update an existing List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/contacts/upload/:id", "title": "Import new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload/:id -v -u {name}:{password} -X POST", "type": "json" } ], "name": "import", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/upload", "title": "Upload csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "upload", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/csv", "title": "Create new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/csv -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadCsv", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "delete", "url": "/api/conditions/{id}", "title": "Deletes a Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "put", "url": "/api/conditions/{id}", "title": "Update an existing Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "post", "url": "/api/contact_item_types", "title": "Creates a new ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateContactItemTypes", "group": "ContactItemType", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rgbBackgroundColor", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "delete", "url": "/api/contact_item_types/{id}", "title": "Deletes a ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types", "title": "Gets a list of ContactItemTypes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -v -u {name}:{password}", "type": "json" } ], "name": "GetContactItemTypes", "group": "ContactItemType", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/contact_item_types?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/contact_item_types?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/contact_item_types?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/contact_item_types?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/contact_item_types?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types/{id}", "title": "Gets a single ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "put", "url": "/api/contact_item_types/{id}", "title": "Update an existing ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "post", "url": "/api/cm/custom_field", "title": "Create a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_field -d '{\"name\": \"mycf\", \"type\": \"text\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCustomField", "group": "Custom_Fields", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Custom_Fields" }, { "type": "post", "url": "/api/dashboards/items", "title": "Create dasboard item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Create", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "delete", "url": "/api/dashboards/items/{id}", "title": "Deletes a Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "get", "url": "/api/dashboards/items/{id}", "title": "Gets a single Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "put", "url": "/api/dashboards/items/{id}", "title": "Update an existing item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "post", "url": "/api/dashboards/clone", "title": "Clone an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards", "title": "Creates a new Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDashboards", "group": "Dashboards", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "delete", "url": "/api/dashboards/{id}", "title": "Deletes a Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards", "title": "Gets a list of Dashboards", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -v -u {name}:{password}", "type": "json" } ], "name": "GetDashboards", "group": "Dashboards", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dashboards?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dashboards?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dashboards?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dashboards?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dashboards?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}", "title": "Gets a single Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards/{id}/items", "title": "Creates new item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -d '{\"type\": \"counter\", \"...\": \"...\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addItem", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}/items", "title": "Gets items", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getItems", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "put", "url": "/api/dashboards/{id}", "title": "Update an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/integrations/desk/accounts", "title": "Creates a new Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Accounts", "group": "Desk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"basic\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tokenSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "delete", "url": "/api/integrations/desk/accounts/{id}", "title": "Deletes a Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts", "title": "Gets a list of Desk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}", "title": "Gets a single Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "put", "url": "/api/integrations/desk/accounts/{id}", "title": "Update an existing Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/configurations", "title": "Creates a new Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Configurations", "group": "Desk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "delete", "url": "/api/integrations/desk/configurations/{id}", "title": "Deletes a Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations", "title": "Gets a list of Desk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}", "title": "Gets a single Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "put", "url": "/api/integrations/desk/configurations/{id}", "title": "Update an existing Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/fields", "title": "Creates a new Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Fields", "group": "Desk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "delete", "url": "/api/integrations/desk/fields/{id}", "title": "Deletes a Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields", "title": "Gets a list of Desk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Fields", "group": "Desk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields/{id}", "title": "Gets a single Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "put", "url": "/api/integrations/desk/fields/{id}", "title": "Update an existing Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "post", "url": "/api/dispositions", "title": "Creates a new Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDispositions", "group": "Dispositions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "delete", "url": "/api/dispositions/{id}", "title": "Deletes a Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions", "title": "Gets a list of Dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -v -u {name}:{password}", "type": "json" } ], "name": "GetDispositions", "group": "Dispositions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dispositions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dispositions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dispositions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dispositions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dispositions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions/{id}", "title": "Gets a single Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "put", "url": "/api/dispositions/{id}", "title": "Update an existing Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts", "title": "Creates a new Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Accounts", "group": "Dynamics365_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tenantId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "delete", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Deletes a Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts", "title": "Gets a list of Dynamics365 Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Gets a single Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "put", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Update an existing Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/configurations", "title": "Creates a new Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Configurations", "group": "Dynamics365_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"incident\"", "\"phonecall\"" ], "optional": true, "field": "ticketType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "delete", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Deletes a Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations", "title": "Gets a list of Dynamics365 Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Gets a single Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "put", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Update an existing Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "post", "url": "/api/integrations/dynamics365/fields", "title": "Creates a new Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Fields", "group": "Dynamics365_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "delete", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Deletes a Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields", "title": "Gets a list of Dynamics365 Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Gets a single Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "put", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Update an existing Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "post", "url": "/api/fax/accounts/{id}/users", "title": "Add agents to a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ecm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "headerinfo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "localstationid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "minrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "maxrate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "modem", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "gateway", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "faxdetect", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "t38timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SIP\"", "\"IAX\"", "\"DADHI\"", "\"KHOMP\"" ], "optional": true, "field": "tech", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Fax_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/users", "title": "Gets agents from fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/users", "title": "Removes agents from a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/addaccountapplications", "title": "Creates new account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/addaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -d '[{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/applications", "title": "Gets account pplications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/send", "title": "Send new fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/send -d '{from: '\"John Doe\" <123456>'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendFax", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "put", "url": "/api/fax/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/updateaccountapplications", "title": "Update account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/updateaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "updateApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Fax_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "delete", "url": "/api/fax/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Fax_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "put", "url": "/api/fax/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "post", "url": "/api/fax/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Fax_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/download", "title": "Get interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "put", "url": "/api/fax/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/messages/{id}/download", "title": "Get message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Message", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Message" }, { "type": "delete", "url": "/api/fax/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Fax_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/messages", "title": "Create message and send Fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/reports/queue", "title": "Creates a new Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Queue_Reports", "group": "Fax_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "delete", "url": "/api/fax/reports/queue/{id}", "title": "Deletes a Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/describe", "title": "Gets table info about Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue", "title": "Gets a list of Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/{id}", "title": "Gets a single Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "put", "url": "/api/fax/reports/queue/{id}", "title": "Update an existing Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "post", "url": "/api/fax/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Fax_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "lastAgent", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Fax_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "put", "url": "/api/fax/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/reports/transfer", "title": "Creates a new Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "delete", "url": "/api/fax/reports/transfer/{id}", "title": "Deletes a Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/describe", "title": "Gets table info about Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer", "title": "Gets a list of Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/{id}", "title": "Gets a single Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "put", "url": "/api/fax/reports/transfer/{id}", "title": "Update an existing Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts", "title": "Creates a new Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "delete", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Deletes a Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts", "title": "Gets a list of Freshdesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Gets a single Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "put", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Update an existing Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations", "title": "Creates a new Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "delete", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Deletes a Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations", "title": "Gets a list of Freshdesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Gets a single Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "put", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Update an existing Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/fields", "title": "Creates a new Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Fields", "group": "Freshdesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "delete", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Deletes a Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields", "title": "Gets a list of Freshdesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Gets a single Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "put", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Update an existing Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "post", "url": "/api/integrations/freshsales/accounts", "title": "Creates a new Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Accounts", "group": "Freshsales_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "delete", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Deletes a Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts", "title": "Gets a list of Freshsales Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Gets a single Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "put", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Update an existing Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/configurations", "title": "Creates a new Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Configurations", "group": "Freshsales_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "delete", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Deletes a Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations", "title": "Gets a list of Freshsales Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Gets a single Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "put", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Update an existing Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "post", "url": "/api/integrations/freshsales/fields", "title": "Creates a new Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Fields", "group": "Freshsales_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "delete", "url": "/api/integrations/freshsales/fields/{id}", "title": "Deletes a Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields", "title": "Gets a list of Freshsales Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields/{id}", "title": "Gets a single Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "put", "url": "/api/integrations/freshsales/fields/{id}", "title": "Update an existing Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "post", "url": "/api/campaigns/{id}/blacklists", "title": "Add blacklists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/{id}/lists", "title": "Add lists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/clone", "title": "Clone an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns", "title": "Creates a new IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIVR_Campaigns", "group": "IVR_Campaigns", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ivr\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "limitCalls", "description": "

Max 200 calls.

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}", "title": "Deletes a IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacklists", "title": "Get IVR campaign blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/finals", "title": "Gets IVR campaign hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hopper_histories", "title": "Gets IVR campaign hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hoppers", "title": "Gets IVR campaign hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns", "title": "Gets a list of IVR Campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "GetIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/campaigns?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/campaigns?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/campaigns?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/campaigns?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/campaigns?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/lists", "title": "Get IVR campaign lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/blacklists", "title": "Remove blacklists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/lists", "title": "Remove lists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}", "title": "Gets a single IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacks", "title": "Gets IVR campaign hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "put", "url": "/api/campaigns/{id}", "title": "Update an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/integrations/reports", "title": "Creates a new Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntegration_Reports", "group": "Integration_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "integration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "eventChannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitStatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ticketId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "integrationId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contacts", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interface", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcalledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentconnectAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentcomplete", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcompleteAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentacw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentringnoanswer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentringnoanswerAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentdump", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentdumpAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastevent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "channelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "destchannelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destlanguage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destpriority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "attachment", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "text", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SENT\"", "\"SENDING\"", "\"RECEIVED\"", "\"FAILED\"" ], "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "app", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "projectId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "delete", "url": "/api/integrations/reports/{id}", "title": "Deletes a Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/describe", "title": "Gets table info about Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports", "title": "Gets a list of Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/{id}", "title": "Gets a single Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "put", "url": "/api/integrations/reports/{id}", "title": "Update an existing Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "post", "url": "/api/intervals", "title": "Creates a new Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntervals", "group": "Intervals", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "delete", "url": "/api/intervals/{id}", "title": "Deletes a Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals", "title": "Gets a list of Intervals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -v -u {name}:{password}", "type": "json" } ], "name": "GetIntervals", "group": "Intervals", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/intervals?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/intervals?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/intervals?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/intervals?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/intervals?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}", "title": "Gets a single Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals", "title": "Creates a new sub interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -d '{\"interval\": \"00:00-08:30,mon-fri,*,*\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInterval", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals/create_many", "title": "Create new sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}/sub_intervals", "title": "Get sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "put", "url": "/api/intervals/{id}", "title": "Update an existing Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/jira", "title": "Creates a new issue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jira -d '{\"key\": \"Bug\", \"description\": \"I can't do it!\"}' \\\n -H \"Content-Type: application/json\" -X POST -v -u {name}:{password}", "type": "json" } ], "name": "Creates_Issue", "group": "Issue", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"Bug\"" ], "optional": true, "field": "issuetype", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "summary", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jira/index.js", "groupTitle": "Issue" }, { "type": "post", "url": "/api/jscripty/answers/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyAnswerReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "delete", "url": "/api/jscripty/answers/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyAnswerReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/answers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/answers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/answers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/answers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/answers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "put", "url": "/api/jscripty/answers/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "post", "url": "/api/jscripty/questions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyQuestionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "delete", "url": "/api/jscripty/questions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyQuestionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/questions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/questions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/questions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/questions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/questions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "put", "url": "/api/jscripty/questions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "post", "url": "/api/jscripty/sessions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptySessionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "completed", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "delete", "url": "/api/jscripty/sessions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptySessionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/sessions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/sessions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/sessions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/sessions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/sessions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}/questions", "title": "Gets Jscripty Session questions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id}/questions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getQuestions", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "put", "url": "/api/jscripty/sessions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "post", "url": "/api/jscripty/projects/clone", "title": "Clone an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "post", "url": "/api/jscripty/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Jscripty_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUncompleteSave", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendUnpauseOnSubmit", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "delete", "url": "/api/jscripty/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Jscripty_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/answers", "title": "Gets jscripty project answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/sessions", "title": "Gets jscripty project sessions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/sessions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSessions", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/summary", "title": "Gets jscripty project summary", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/summary -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSummary", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "put", "url": "/api/jscripty/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/license", "title": "Gets License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license -v -u {name}:{password} -X GET", "type": "json" } ], "name": "index", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "put", "url": "/api/license/{id}", "title": "Update License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "post", "url": "/api/mail/accounts/{id}/users", "title": "Add agents to a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/in_servers", "title": "Creates a new IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddImap", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tls", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "connTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "authTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/out_servers", "title": "Creates a new SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmtp", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}", "title": "Deletes a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMailAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Mail_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/users", "title": "Gets agents from mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/in_servers", "title": "Gets account IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetImap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/out_servers", "title": "Gets account SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/users", "title": "Removes agents from a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/in_servers", "title": "Removes IMAP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveImmap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/out_servers", "title": "Removes SMTP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -d '[{\"subject\": \"My printer is on fire!\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts", "title": "Create a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/send", "title": "Send new mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/send -d '{from: '\"John Doe\" '}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendMail", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "put", "url": "/api/mail/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/verify", "title": "Verify mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/verify -v -u {name}:{password} -X GET", "type": "json" } ], "name": "verifySmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "get", "url": "/api/mail/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "put", "url": "/api/mail/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "post", "url": "/api/mail/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Mail_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions/{id}/messages", "title": "Creates new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -d '[{\"to\": \"sales@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "plainBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originTo", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originCc", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "put", "url": "/api/mail/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Mail_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/messages", "title": "Create a message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}/download", "title": "Gets message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/reports/queue", "title": "Creates a new Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Queue_Reports", "group": "Mail_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "delete", "url": "/api/mail/reports/queue/{id}", "title": "Deletes a Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/describe", "title": "Gets table info about Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue", "title": "Gets a list of Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/{id}", "title": "Gets a single Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "put", "url": "/api/mail/reports/queue/{id}", "title": "Update an existing Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "post", "url": "/api/mail/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Mail_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Mail_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "put", "url": "/api/mail/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/out_servers", "title": "Creates a new SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSMTPs", "group": "Mail_SMTP", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "delete", "url": "/api/mail/out_servers/{id}", "title": "Deletes a SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers", "title": "Gets a list of SMTPs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -v -u {name}:{password}", "type": "json" } ], "name": "GetSMTPs", "group": "Mail_SMTP", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/out_servers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/out_servers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/out_servers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/out_servers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/out_servers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers/{id}", "title": "Gets a single SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "put", "url": "/api/mail/out_servers/{id}", "title": "Update an existing SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "post", "url": "/api/mail/substatuses", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSubstatuses", "group": "Mail_Substatuses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "delete", "url": "/api/mail/substatuses/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/describe", "title": "Gets table info about Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses", "title": "Gets a list of Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -v -u {name}:{password}", "type": "json" } ], "name": "GetSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/substatuses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/substatuses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/substatuses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/substatuses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/substatuses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "put", "url": "/api/mail/substatuses/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "post", "url": "/api/mail/reports/transfer", "title": "Creates a new Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "delete", "url": "/api/mail/reports/transfer/{id}", "title": "Deletes a Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/describe", "title": "Gets table info about Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer", "title": "Gets a list of Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/{id}", "title": "Gets a single Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "put", "url": "/api/mail/reports/transfer/{id}", "title": "Update an existing Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/members/reports/describe", "title": "Gets table info about Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports", "title": "Gets a list of Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetMember_Reports", "group": "Member_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/members/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/members/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/members/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/members/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/members/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports/{id}", "title": "Gets a single Member Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/migrations", "title": "Gets a list of Migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/migrations -v -u {name}:{password}", "type": "json" } ], "name": "GetMigrations", "group": "Migrations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/migrations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/migrations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/migrations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/migrations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/migrations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/migration/index.js", "groupTitle": "Migrations" }, { "type": "post", "url": "/api/voice/networks", "title": "Create a new network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Networks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "delete", "url": "/api/voice/networks/{id}", "title": "Deletes a network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Networks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks", "title": "Gets a list of Networks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks -v -u {name}:{password}", "type": "json" } ], "name": "GetNetworks", "group": "Networks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/networks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/networks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/networks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/networks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/networks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks/{id}", "title": "Gets a single Network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowNetworks", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "put", "url": "/api/voice/networks/{id}", "title": "Update an existing network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "post", "url": "/api/notifications", "title": "Send notification to user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/notifications -d '{\"text\": \"Hello!\", \"TemplateId\": 1}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Send", "group": "Notifications", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/notification/index.js", "groupTitle": "Notifications" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/users", "title": "Add agents to a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "replyUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Openchannel_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/users", "title": "Gets agents from openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/users", "title": "Removes agents from a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/interactions", "title": "Gets Openchannel Account Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

Follow this link to check the documentation:

https://wiki.xcallymotion.com/display/XMV/New+Channels+Configuration+Steps#NewChannelsConfigurationSteps-BuildyourownChannelservice

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/send", "title": "Send new openchannel message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/send -d '{from: 'John Doe', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendOpenchannel", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "put", "url": "/api/openchannel/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Openchannel_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "delete", "url": "/api/openchannel/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Openchannel_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "put", "url": "/api/openchannel/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "externalUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Openchannel_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "put", "url": "/api/openchannel/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Openchannel_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "delete", "url": "/api/openchannel/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Openchannel_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "post", "url": "/api/openchannel/reports/queue", "title": "Creates a new Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/queue/{id}", "title": "Deletes a Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/describe", "title": "Gets table info about Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue", "title": "Gets a list of Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/{id}", "title": "Gets a single Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "put", "url": "/api/openchannel/reports/queue/{id}", "title": "Update an existing Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "post", "url": "/api/openchannel/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Openchannel_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Openchannel_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "put", "url": "/api/openchannel/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/reports/transfer", "title": "Creates a new Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/transfer/{id}", "title": "Deletes a Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/describe", "title": "Gets table info about Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer", "title": "Gets a list of Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/{id}", "title": "Gets a single Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "put", "url": "/api/openchannel/reports/transfer/{id}", "title": "Update an existing Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "post", "url": "/api/pauses", "title": "Creates a new Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreatePauses", "group": "Pauses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "delete", "url": "/api/pauses/{id}", "title": "Deletes a Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses", "title": "Gets a list of Pauses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -v -u {name}:{password}", "type": "json" } ], "name": "GetPauses", "group": "Pauses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/pauses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/pauses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/pauses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/pauses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/pauses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses/{id}", "title": "Gets a single Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "put", "url": "/api/pauses/{id}", "title": "Update an existing Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/plugins", "title": "Gets a list of Plugins", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -v -u {name}:{password}", "type": "json" } ], "name": "GetPlugins", "group": "Plugins", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/plugins?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/plugins?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/plugins?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/plugins?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/plugins?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}", "title": "Gets a single Plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPlugins", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/plugins/{id}", "title": "Delete a plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroyPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}/download", "title": "Download plugin source code", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "put", "url": "/api/plugins/{id}", "title": "Update an existing plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins", "title": "Upload new plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -H 'Content-Type: application/json' -X POST", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/pm2/{id}", "title": "Deletes an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2/{id}", "title": "Gets a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2", "title": "Gets pm2 processes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Processes", "group": "Pm2", "description": "

Motion returns the pm2 processes list.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "post", "url": "/api/pm2", "title": "Start a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -d '{\"name\": \"process_name\", \"script\": \"/index.js\"}'\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "StartPm2Process", "group": "Pm2", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "script", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "put", "url": "/api/pm2/{id}", "title": "Update an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -d '{\"status\": \"online\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "UpdatePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/rpc/campaigns/", "title": "Gets a list of campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "Campaigns", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime campaigns parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/accounts", "title": "Gets a list of FaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "FaxAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "put", "url": "/api/rpc/agents/:id/capacity", "title": "Sets agent capacity", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/capacity -v -u {name}:{password}", "type": "json" } ], "name": "RTAgentCapacity", "group": "RPC_Realtime", "description": "

Motion will return the current agent capacity.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/agents", "title": "Gets a list of RTAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents -v -u {name}:{password}", "type": "json" } ], "name": "RTAgents", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime agents parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues", "title": "Gets a list of RTChatQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime chat queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues", "title": "Gets a list of RTFaxQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/accounts", "title": "Gets a list of RTMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "RTMailAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues", "title": "Gets a list of RTMailQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues", "title": "Gets a list of RTOpenchannelQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime openchannel queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound/channels", "title": "Gets a list of RTOutboundChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTOutboundChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues", "title": "Gets a list of RTSmsQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime sms queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/telephones", "title": "Gets a list of RTTelephones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/telephones -v -u {name}:{password}", "type": "json" } ], "name": "RTTelephones", "group": "RPC_Realtime", "description": "

Motion will return a list of telephones parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/trunks", "title": "Gets a list of RTTrunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/trunks -v -u {name}:{password}", "type": "json" } ], "name": "RTTrunks", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime trunks parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/mixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel mixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelStopMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/stopmixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelStopMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel stopmixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}", "title": "Gets a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannel", "group": "RPC_Realtime", "description": "

Motion will return a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/hangup", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/hangup -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelHangup", "group": "RPC_Realtime", "description": "

Motion will hangup a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten}", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelRedirect", "group": "RPC_Realtime", "description": "

Motion will redirect a specific realtime voice queue channel to a specific extension.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/preview/{id}", "title": "Gets a single preview contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/preview/{id} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuePreview", "group": "RPC_Realtime", "description": "

Motion will return a specific preview contact.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound", "title": "Gets a list of RTOutbound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues", "title": "Gets a list of RTVoiceQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels", "title": "Gets a list of RTVoiceQueuesChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuesChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/{id}", "title": "Gets a single RTChatQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/{id}", "title": "Gets a single RTFaxQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/{id}", "title": "Gets a single RTMailQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/{id}", "title": "Gets a single RTOpenchannelQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/{id}", "title": "Gets a single RTSmsQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/{id}", "title": "Gets a single RTVoiceQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/agents/:id/notify", "title": "Notify message to a specific agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/notify -d '{\"messageId\": \"5080\", \"channel\": \"mail\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "agentNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific agent.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/chat/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "chatQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/waitinginteractions", "title": "Gets a list of chatQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "chatQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting chat queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/fax/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "faxQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/waitinginteractions", "title": "Gets a list of faxQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "faxQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting fax queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/mail/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "mailQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/waitinginteractions", "title": "Gets a list of mailQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "mailQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting mail queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/openchannel/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "openchannelQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/:id/waitinginteractions", "title": "Gets a list of openchannelQueuesIdWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesIdWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/waitinginteractions", "title": "Gets a list of openchannelQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/sms/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "smsQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/waitinginteractions", "title": "Gets a list of smsQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "smsQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting sms queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/integrations/salesforce/accounts", "title": "Creates a new Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Accounts", "group": "Salesforce_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "securityToken", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "delete", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Deletes a Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts", "title": "Gets a list of Salesforce Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Gets a single Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "put", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Update an existing Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/configurations", "title": "Creates a new Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Configurations", "group": "Salesforce_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Task\"", "\"Case\"" ], "optional": true, "field": "ticketType", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"nothing\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleCreate", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "delete", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Deletes a Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations", "title": "Gets a list of Salesforce Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Gets a single Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "put", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Update an existing Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "post", "url": "/api/integrations/salesforce/fields", "title": "Creates a new Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Fields", "group": "Salesforce_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "delete", "url": "/api/integrations/salesforce/fields/{id}", "title": "Deletes a Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields", "title": "Gets a list of Salesforce Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields/{id}", "title": "Gets a single Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "put", "url": "/api/integrations/salesforce/fields/{id}", "title": "Update an existing Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "post", "url": "/api/schedules", "title": "Creates a new Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSchedules", "group": "Schedules", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "cron", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "startAt", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "endAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "subtractNumber", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"years\"", "\"quarters\"", "\"months\"", "\"weeks\"", "\"days\"", "\"hours\"", "\"minutes\"" ], "optional": false, "field": "subtractUnit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"custom\"", "\"default\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendMail", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendIfEmpty", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "delete", "url": "/api/schedules/{id}", "title": "Deletes a Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules", "title": "Gets a list of Schedules", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -v -u {name}:{password}", "type": "json" } ], "name": "GetSchedules", "group": "Schedules", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/schedules?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/schedules?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/schedules?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/schedules?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/schedules?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}", "title": "Gets a single Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}/run", "title": "Run Scheduler", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "put", "url": "/api/schedules/{id}", "title": "Update an existing Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "post", "url": "/api/screen/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Screen_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interactionid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Screen_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/screen/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/screen/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/screen/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/screen/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/screen/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "delete", "url": "/api/screen/recordings/{id}", "title": "Delete screen recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "put", "url": "/api/screen/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "post", "url": "/api/integrations/servicenow/accounts", "title": "Creates a new Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Accounts", "group": "Servicenow_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "delete", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Deletes a Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts", "title": "Gets a list of Servicenow Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Gets a single Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "put", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Update an existing Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/configurations", "title": "Creates a new Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Configurations", "group": "Servicenow_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "delete", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Deletes a Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations", "title": "Gets a list of Servicenow Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Gets a single Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "put", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Update an existing Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "post", "url": "/api/integrations/servicenow/fields", "title": "Creates a new Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Fields", "group": "Servicenow_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "delete", "url": "/api/integrations/servicenow/fields/{id}", "title": "Deletes a Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields", "title": "Gets a list of Servicenow Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields/{id}", "title": "Gets a single Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "put", "url": "/api/integrations/servicenow/fields/{id}", "title": "Update an existing Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/settings", "title": "Gets a list of Settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings -v -u {name}:{password}", "type": "json" } ], "name": "GetSettings", "group": "Settings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/settings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/settings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/settings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/settings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/settings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}", "title": "Gets a single Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/favicon", "title": "Add Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo_login", "title": "Add logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/preferred", "title": "Add Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/now", "title": "Get Server Current Date", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/now -v -X GET", "type": "json" } ], "name": "getDate", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/favicon", "title": "Get Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -v -X GET", "type": "json" } ], "name": "getFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/gdpr", "title": "Get gdpr settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/gdpr -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getGdpr", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -v -X GET", "type": "json" } ], "name": "getLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo_login", "title": "Get logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -v -X GET", "type": "json" } ], "name": "getLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/preferred", "title": "Get Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -v -X GET", "type": "json" } ], "name": "getPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "put", "url": "/api/settings/{id}", "title": "Update an existing Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/sms/accounts/{id}/users", "title": "Add agents to a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"", "\"skebby\"", "\"connectel\"", "\"clicksend\"", "\"plivo\"", "\"clickatell\"", "\"csc\"", "\"infobip\"", "\"intelepeer\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SI\"", "\"TI\"", "\"GP\"" ], "optional": true, "field": "smsMethod", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "senderString", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "deliveryReport", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "baseUrl", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Sms_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/users", "title": "Gets agents from sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/users", "title": "Removes agents from a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/interactions", "title": "Gets Sms Account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new sms message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/send", "title": "Send new sms message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendSms", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status as get request", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X GET", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Sms_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "delete", "url": "/api/sms/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Sms_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "put", "url": "/api/sms/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "post", "url": "/api/sms/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Sms_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "put", "url": "/api/sms/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Sms_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "delete", "url": "/api/sms/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Sms_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "put", "url": "/api/sms/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "post", "url": "/api/sms/reports/queue", "title": "Creates a new Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Queue_Reports", "group": "Sms_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "delete", "url": "/api/sms/reports/queue/{id}", "title": "Deletes a Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/describe", "title": "Gets table info about Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue", "title": "Gets a list of Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/{id}", "title": "Gets a single Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "put", "url": "/api/sms/reports/queue/{id}", "title": "Update an existing Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "post", "url": "/api/sms/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Sms_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Sms_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "put", "url": "/api/sms/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/reports/transfer", "title": "Creates a new Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "delete", "url": "/api/sms/reports/transfer/{id}", "title": "Deletes a Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/describe", "title": "Gets table info about Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer", "title": "Gets a list of Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/{id}", "title": "Gets a single Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "put", "url": "/api/sms/reports/transfer/{id}", "title": "Update an existing Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sounds", "title": "Gets a list of Sounds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -v -u {name}:{password}", "type": "json" } ], "name": "GetSounds", "group": "Sounds", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sounds?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sounds?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sounds?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sounds?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sounds?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}", "title": "Gets a single Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSounds", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/sounds", "title": "Create a new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "delete", "url": "/api/sounds/{id}", "title": "Deletes a sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroySound", "group": "Sounds", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}/download", "title": "Download Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "put", "url": "/api/sounds", "title": "Update an existing new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -d '[\"name\": \"sound_name\", \"description\": \"sound_desc\"]' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/square/details/reports", "title": "Creates a new Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Detail_Reports", "group": "Square_Details_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "node", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "application", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "delete", "url": "/api/square/details/reports/{id}", "title": "Deletes a Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/describe", "title": "Gets table info about Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports", "title": "Gets a list of Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/details/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/details/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/details/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/details/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/details/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/{id}", "title": "Gets a single Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "put", "url": "/api/square/details/reports/{id}", "title": "Update an existing Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "post", "url": "/api/square/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Square_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "delete", "url": "/api/square/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Square_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "put", "url": "/api/square/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "post", "url": "/api/square/odbc", "title": "Creates a new ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateODBCs", "group": "Square_ODBC", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dsn", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "delete", "url": "/api/square/odbc/{id}", "title": "Deletes a ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc", "title": "Gets a list of ODBCs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -v -u {name}:{password}", "type": "json" } ], "name": "GetODBCs", "group": "Square_ODBC", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/odbc?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/odbc?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/odbc?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/odbc?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/odbc?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}", "title": "Gets a single ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}/test", "title": "Test Odbc", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id}/test -v -u {name}:{password} -X GET", "type": "json" } ], "name": "test", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "put", "url": "/api/square/odbc/{id}", "title": "Update an existing ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "post", "url": "/api/square/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Square_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notes", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "preproduction", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "production", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "publishedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Square_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/projects/{id}/users", "title": "Adds user permissions to a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}/users", "title": "Gets users permissions from Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}/users", "title": "Removes user permissions from a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "removeUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "put", "url": "/api/square/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Square_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "saveName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "filename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savePath", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Square_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "delete", "url": "/api/square/recordings/{id}/delete", "title": "Delete recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/delete -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "put", "url": "/api/square/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "post", "url": "/api/square/reports", "title": "Creates a new Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Reports", "group": "Square_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "network", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "network_script", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "request", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "version", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingani2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callington", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingtns", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rdnis", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "enhanced", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "bot", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "delete", "url": "/api/square/reports/{id}", "title": "Deletes a Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/describe", "title": "Gets table info about Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports", "title": "Gets a list of Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Reports", "group": "Square_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/{id}", "title": "Gets a single Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "put", "url": "/api/square/reports/{id}", "title": "Update an existing Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "post", "url": "/api/integrations/sugarcrm/configurations", "title": "Creates a new SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "delete", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Deletes a SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations", "title": "Gets a list of SugarCRM Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Gets a single SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "put", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Update an existing SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts", "title": "Creates a new Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "delete", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Deletes a Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts", "title": "Gets a list of Sugarcrm Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Gets a single Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "put", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Update an existing Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/fields", "title": "Creates a new Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Fields", "group": "Sugarcrm_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "delete", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Deletes a Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields", "title": "Gets a list of Sugarcrm Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Gets a single Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "put", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Update an existing Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/system/process", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "get", "url": "/api/system", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "post", "url": "/api/tags", "title": "Creates a new Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTags", "group": "Tags", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "delete", "url": "/api/tags/{id}", "title": "Deletes a Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTags", "group": "Tags", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags", "title": "Gets a list of Tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -v -u {name}:{password}", "type": "json" } ], "name": "GetTags", "group": "Tags", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/tags?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/tags?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/tags?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/tags?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/tags?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags/{id}", "title": "Gets a single Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "put", "url": "/api/tags/{id}", "title": "Update an existing Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "post", "url": "/api/teams/{id}/queues", "title": "Add queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams", "title": "Creates a new Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTeams", "group": "Teams", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}", "title": "Deletes a Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/users", "title": "Gets agents from team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel={channel} -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams", "title": "Gets a list of Teams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Teams", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/teams?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/teams?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/teams?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/teams?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/teams?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/users", "title": "Removes agents from a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/queues", "title": "Remove queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel=voice&ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/mail/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/voice/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/fax/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/chat/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/sms/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}", "title": "Gets a single Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams/{id}/users", "title": "Adds agents to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "put", "url": "/api/teams/{id}", "title": "Update an existing Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/templates", "title": "Creates a new Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTemplates", "group": "Templates", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "delete", "url": "/api/templates/{id}", "title": "Deletes a Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates", "title": "Gets a list of Templates", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -v -u {name}:{password}", "type": "json" } ], "name": "GetTemplates", "group": "Templates", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/templates?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/templates?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/templates?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/templates?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/templates?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates/{id}", "title": "Gets a single Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "put", "url": "/api/templates/{id}", "title": "Update an existing Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "post", "url": "/api/triggers", "title": "Creates a new Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTriggers", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "delete", "url": "/api/triggers/{id}", "title": "Deletes a Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers", "title": "Gets a list of Triggers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -v -u {name}:{password}", "type": "json" } ], "name": "GetTriggers", "group": "Triggers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/triggers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/triggers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/triggers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/triggers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/triggers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}", "title": "Gets a single Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -d '{\"action\": \"contactManager\",\"data1\": \"1\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAction", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/all_conditions", "title": "Creates a new \"AND\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAllCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/any_conditions", "title": "Creates a new \"OR\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnyCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/actions", "title": "Gets Trigger Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/all_conditions", "title": "Gets \"AND\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAllConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/any_conditions", "title": "Gets \"OR\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnyConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "put", "url": "/api/triggers/{id}", "title": "Update an existing Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/trunks/clone", "title": "Clone an existing Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/trunks", "title": "Create a new trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Trunks", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"friend\"", "\"user\"", "\"peer\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "context", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ALLOWED_NOT_SCREENED\"", "\"ALLOWED_PASSED_SCREEN\"", "\"ALLOWED_FAILED_SCREEN\"", "\"ALLOWED\"", "\"PROHIB_NOT_SCREENED\"", "\"PROHIB_PASSED_SCREEN\"", "\"PROHIB_FAILED_SCREEN\"", "\"PROHIB\"" ], "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "permit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "md5secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remotesecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transport", "description": "

String is deprecated. Please use an Array as ["udp", "tcp"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rfc2833\"", "\"info\"", "\"shortinfo\"", "\"inband\"", "\"auto\"" ], "optional": true, "field": "dtmfmode", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"outgoing\"" ], "optional": true, "field": "directmedia", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "directrtpsetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediapermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediadeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nat", "description": "

String is deprecated. Please use an Array as ["force_rport", "comedia"]

" }, { "group": "Body", "type": "String", "optional": true, "field": "callgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedcallgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedpickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tonezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disallow", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "allow", "description": "

String is deprecated. Please use an Array as ["ulaw", "alaw", "alaw"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autoframing", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "insecure", "description": "

String is deprecated. Please use an Array as ["port", "invite"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trustrpid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trust_id_outbound", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"never\"" ], "optional": true, "field": "progressinband", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "promiscredir", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "useclientcode", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "setvar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "callcounter", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "busylevel", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowoverlap", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowsubscribe", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowtransfer", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ignoresdpversion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subscribecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "template", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"always\"" ], "optional": true, "field": "videosupport", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxcallbitrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "rfc2833compensate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"accept\"", "\"refuse\"", "\"originate\"" ], "optional": true, "field": "session_timers", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_expires", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_minse", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"uac\"", "\"uas\"" ], "optional": true, "field": "session_refresher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_usertpsource", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "regexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromdomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "qualify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "keepalive", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultip", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtptimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpholdtimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpkeepalive", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"pai\"" ], "optional": true, "field": "sendrpid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "outboundproxy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackextension", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timert1", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timerb", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "qualifyfreq", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactpermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactdeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactacl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unsolicited_mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "use_q850_reason", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxforwards", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "encryption", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "avpf", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "force_avp", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "icesupport", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "dtlsenable", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"fingerprint\"", "\"certificate\"" ], "optional": true, "field": "dtlsverify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dtlsrekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscertfile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsprivatekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscipher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscafile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscapath", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"active\"", "\"passive\"", "\"actpass\"" ], "optional": true, "field": "dtlssetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsfingerprint", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "usereqphone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordonfeature", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordofffeature", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "call_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "registertrying", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "subscribemwi", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vmexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohinterpret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohsuggest", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parkinglot", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"update,nonat\"" ], "optional": true, "field": "canreinvite", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "registry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "otherFields", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_udptl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "delete", "url": "/api/trunks/{id}", "title": "Deletes a trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Trunks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks", "title": "Gets a list of Trunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password}", "type": "json" } ], "name": "GetTrunks", "group": "Trunks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/trunks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/trunks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/trunks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/trunks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/trunks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks/{id}", "title": "Gets a single Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "put", "url": "/api/trunks/{id}", "title": "Update an existing trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/user_has_chat_interactions", "title": "Creates a new UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserChatInteractions", "group": "UserChatInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "delete", "url": "/api/user_has_chat_interactions/{id}", "title": "Deletes a UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions", "title": "Gets a list of UserChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_chat_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_chat_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_chat_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_chat_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_chat_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions/{id}", "title": "Gets a single UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "put", "url": "/api/user_has_chat_interactions/{id}", "title": "Update an existing UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "post", "url": "/api/user_has_fax_interactions", "title": "Creates a new UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserFaxInteractions", "group": "UserFaxInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "FaxInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "delete", "url": "/api/user_has_fax_interactions/{id}", "title": "Deletes a UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions", "title": "Gets a list of UserFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_fax_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_fax_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_fax_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_fax_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_fax_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions/{id}", "title": "Gets a single UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "put", "url": "/api/user_has_fax_interactions/{id}", "title": "Update an existing UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "post", "url": "/api/user_has_mail_interactions", "title": "Creates a new UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserMailInteractions", "group": "UserMailInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "MailInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "delete", "url": "/api/user_has_mail_interactions/{id}", "title": "Deletes a UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions", "title": "Gets a list of UserMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_mail_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_mail_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_mail_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_mail_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_mail_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions/{id}", "title": "Gets a single UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "put", "url": "/api/user_has_mail_interactions/{id}", "title": "Update an existing UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "post", "url": "/api/user_has_openchannel_interactions", "title": "Creates a new UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "OpenchannelInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "delete", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Deletes a UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions", "title": "Gets a list of UserOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_openchannel_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_openchannel_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_openchannel_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_openchannel_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_openchannel_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Gets a single UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "put", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Update an existing UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "post", "url": "/api/user_has_sms_interactions", "title": "Creates a new UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserSmsInteractions", "group": "UserSmsInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "SmsInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "delete", "url": "/api/user_has_sms_interactions/{id}", "title": "Deletes a UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions", "title": "Gets a list of UserSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_sms_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_sms_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_sms_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_sms_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_sms_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions/{id}", "title": "Gets a single UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "put", "url": "/api/user_has_sms_interactions/{id}", "title": "Update an existing UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "post", "url": "/api/user_has_whatsapp_interactions", "title": "Creates a new UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "WhatsappInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "delete", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Deletes a UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions", "title": "Gets a list of UserWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_whatsapp_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_whatsapp_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_whatsapp_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_whatsapp_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_whatsapp_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Gets a single UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "put", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Update an existing UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "post", "url": "/api/userProfile/resources", "title": "Creates a new User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Resources", "group": "User_Profile_Resources", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "resourceId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "delete", "url": "/api/userProfile/resources/{id}", "title": "Deletes a User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/describe", "title": "Gets table info about User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources", "title": "Gets a list of User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/resources?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/resources?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/resources?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/resources?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/resources?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/{id}", "title": "Gets a single User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "put", "url": "/api/userProfile/resources/{id}", "title": "Update an existing User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "post", "url": "/api/userProfile/sections", "title": "Creates a new User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Sections", "group": "User_Profile_Sections", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "category", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "sectionId", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enabled", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoAssociation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "crudPermissions", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "delete", "url": "/api/userProfile/sections/{id}", "title": "Deletes a User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/describe", "title": "Gets table info about User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections", "title": "Gets a list of User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/sections?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/sections?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/sections?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/sections?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/sections?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/{id}", "title": "Gets a single User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "put", "url": "/api/userProfile/sections/{id}", "title": "Update an existing User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "post", "url": "/api/userProfiles/{id}/resources", "title": "Add resources' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/{id}/sections", "title": "Add sections' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -d '[{\"sectionId\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/clone", "title": "Clone an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles", "title": "Creates a new User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profiles", "group": "User_Profiles", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "crudPermissions", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}", "title": "Deletes a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/describe", "title": "Gets table info about User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/resources?section={section}", "title": "Get Resources assigned to a Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?section={section} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/sections", "title": "Get sections associated to a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles", "title": "Gets a list of User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profiles", "group": "User_Profiles", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfiles?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfiles?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfiles?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfiles?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfiles?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/resources", "title": "Removes resources' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/sections", "title": "Removes sections' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}", "title": "Gets a single User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "put", "url": "/api/userProfiles/{id}", "title": "Update an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/users/{id}/chat_interactions", "title": "Add chat interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/chat_websites", "title": "Add a Chat Website to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/contacts", "title": "Add contacts to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -d '{\"ids\": [1,2]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddContacts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_accounts", "title": "Add a Fax Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_interactions", "title": "Add fax interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_accounts", "title": "Add a Mail Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_interactions", "title": "Add mail interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_accounts", "title": "Add a Open Channel Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_interactions", "title": "Add openchannel interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/queues", "title": "Add queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_accounts", "title": "Add a Sms Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_interactions", "title": "Add sms interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/square_projects", "title": "Add a Square Project to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/teams", "title": "Add teams to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_accounts", "title": "Add a Whatsapp Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_interactions", "title": "Add Whatsapp interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}/password", "title": "Change user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/password -d '{\"oldPassword\": \"1234\", \"newPassword\": \"5678\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "ChangePwd", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users", "title": "Create a new user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/api_key", "title": "Create a new API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}", "title": "Deletes a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/describe", "title": "Gets table info about Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/agents", "title": "GetAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/agents -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/api_key", "title": "Get the API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/groups", "title": "GetChatGroups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/groups -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatGroups", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat/interactions", "title": "GetChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat_websites", "title": "GetChatWebsites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/contacts", "title": "GetContacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetContacts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax_accounts", "title": "GetFaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax/interactions", "title": "GetFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/lists", "title": "GetLists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail_accounts", "title": "GetMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail/interactions", "title": "GetMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel_accounts", "title": "GetOpenchannelAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel/interactions", "title": "GetOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/prefixes", "title": "GetPrefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/prefixes -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetPrefixes", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues/?channel={channel} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetQueues", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/recordings", "title": "GetRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/scheduled_calls", "title": "GetScheduledCalls", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/scheduled_calls -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScheduledCalls", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/screen_recordings", "title": "GetScreenRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/screen_recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScreenRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms_accounts", "title": "GetSmsAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms/interactions", "title": "GetSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/square_projects", "title": "GetSquareProjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/teams", "title": "GetTeams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users", "title": "Gets a list of Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -v -u {name}:{password}", "type": "json" } ], "name": "GetUsers", "group": "Users", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/users?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/users?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/users?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/users?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/users?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues_rt", "title": "GetVoiceQueuesRt", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues_rt -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetVoiceQueuesRt", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp_accounts", "title": "GetWhatsappAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp/interactions", "title": "GetWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/login", "title": "Login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/login -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Login", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/logout", "title": "Logout", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/logout -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Logout", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/pause", "title": "Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/pause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Pause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/api_key", "title": "Remove API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_websites", "title": "Removes a Chat Website from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_accounts", "title": "Removes a Fax Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_accounts", "title": "Removes a Mail Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_accounts", "title": "Removes a Open Channel Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_interactions", "title": "Removes openchannel interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/queues", "title": "Remove queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_accounts", "title": "Removes a Sms Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/square_projects", "title": "Removes a Square Project from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/teams", "title": "Removes teams from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_accounts", "title": "Removes a Whatsapp Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_interactions", "title": "Removes Whatsapp interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}", "title": "Gets a single User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/unpause", "title": "Unpause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/unpause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Unpause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/whoami", "title": "WhoAmI", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/whoami -v -u {name}:{password} -X GET", "type": "json" } ], "name": "WhoAmI", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/create_many", "title": "Create Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/create_many -d '[{\"name\": \"john.doe\", \"role\": \"user\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}", "title": "Update an existing User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/variables", "title": "Creates a new Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVariables", "group": "Variables", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "delete", "url": "/api/variables/{id}", "title": "Deletes a Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables", "title": "Gets a list of Variables", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -v -u {name}:{password}", "type": "json" } ], "name": "GetVariables", "group": "Variables", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/variables?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/variables?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/variables?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/variables?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/variables?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables/{id}", "title": "Gets a single Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "put", "url": "/api/variables/{id}", "title": "Update an existing Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/version/fetch", "title": "Fetch git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/fetch -v -u {name}:{password}", "type": "json" } ], "name": "FetchVersion", "group": "Version", "description": "

Motion run the following command: git fetch origin master

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version", "title": "Gets version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version -v -u {name}:{password}", "type": "json" } ], "name": "GetVersion", "group": "Version", "description": "

Motion returns the current and latest motion version.

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/migrations", "title": "Launch database migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/migrations -v -u {name}:{password}", "type": "json" } ], "name": "MigrateVersion", "group": "Version", "description": "

Motion launch the database migrations, according to the application version

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/pull", "title": "Pull git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/pull -v -u {name}:{password}", "type": "json" } ], "name": "PullVersion", "group": "Version", "description": "

Motion run the following command: git pull

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/reset", "title": "Reset git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/reset -v -u {name}:{password}", "type": "json" } ], "name": "ResetVersion", "group": "Version", "description": "

Motion run the following command: git reset --hard FETCH_HEAD

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/restart", "title": "Restart motion2 after update", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/restart -v -u {name}:{password}", "type": "json" } ], "name": "RestartVersion", "group": "Version", "description": "

Motion run the following command: pm2 restart motion

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/voice/agents/reports/describe", "title": "Gets table info about Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports", "title": "Gets a list of Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/agents/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/agents/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/agents/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/agents/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/agents/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports/{id}", "title": "Gets a single Agent Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/describe", "title": "Gets table info about Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports", "title": "Gets a list of Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/calls/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/calls/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/calls/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/calls/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/calls/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/{id}", "title": "Gets a single Call Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "put", "url": "/api/voice/calls/reports/{id}", "title": "Update a single cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -d '{\"userDispositio\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "post", "url": "/api/voice/chanspy", "title": "Creates a new ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChanSpy", "group": "Voice_ChanSpy", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "prefix", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "options", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "auth", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "record", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordingFormat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "delete", "url": "/api/voice/chanspy/{id}", "title": "Deletes a ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy", "title": "Gets a list of ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -v -u {name}:{password}", "type": "json" } ], "name": "GetChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/chanspy?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/chanspy?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/chanspy?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/chanspy?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/chanspy?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy/{id}", "title": "Gets a single ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "put", "url": "/api/voice/chanspy/{id}", "title": "Update an existing ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "post", "url": "/api/voice/contexts", "title": "Create a new context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Voice_Contexts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultEntry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "delete", "url": "/api/voice/contexts/{id}", "title": "Deletes a context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts", "title": "Gets a list of Contexts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password}", "type": "json" } ], "name": "GetContexts", "group": "Voice_Contexts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/contexts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/contexts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/contexts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/contexts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/contexts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts/{id}", "title": "Gets a single Context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContexts", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "put", "url": "/api/voice/contexts/{id}", "title": "Update an existing context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/dials/reports/describe", "title": "Gets table info about Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports", "title": "Gets a list of Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/dials/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/dials/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/dials/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/dials/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/dials/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports/{id}", "title": "Gets a single Dial Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "delete", "url": "/api/voice/extensions/{id}", "title": "Deletes a Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions", "title": "Gets a list of Extensions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -v -u {name}:{password}", "type": "json" } ], "name": "GetExtensions", "group": "Voice_Extensions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/extensions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/extensions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/extensions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/extensions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/extensions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions/{id}", "title": "Gets a single Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id}/applications -d '[{\"app\": \"Set\", \"appdata\": \"CALLERDNID=${CALLER(dnid)}\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "put", "url": "/api/voice/extensions/{id}", "title": "Update an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/mohs", "title": "Create a new a new MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -d '{\"name\": \"xmas_musics\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mohs/{id}/sounds", "title": "Add sound to MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -d '{\"id\": 1}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}", "title": "Deletes an MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DestroyMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs", "title": "Gets a list of Music On Holds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -v -u {name}:{password}", "type": "json" } ], "name": "GetMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mohs?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mohs?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mohs?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mohs?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mohs?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}/sounds", "title": "Gets sounds from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "GetSounds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}/sounds/{id2}", "title": "Remove sound from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds/{id2} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}", "title": "Gets a single Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "put", "url": "/api/voice/mohs/{id}", "title": "Update an existing Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mails", "title": "Creates a new Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMails", "group": "Voice_Mails", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "customer_id", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fullname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pager", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tz", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "saycid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "review", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "envelope", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sayduration", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "saydurationm", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sendvoicemail", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "delete", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "nextaftercmd", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcegreetings", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "hidefromdir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "stamp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailsubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailbody", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxsecs", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxmsg", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "delete", "url": "/api/voice/mails/{id}", "title": "Deletes a Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails", "title": "Gets a list of Mails", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -v -u {name}:{password}", "type": "json" } ], "name": "GetMails", "group": "Voice_Mails", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}", "title": "Gets a single Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}/messages", "title": "Gets voice mail messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "put", "url": "/api/voice/mails/{id}", "title": "Update an existing Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "post", "url": "/api/voice/mails/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Voice_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "msgnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "macrocontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "origtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxuser", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxcontext", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "recording", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "flag", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "msg_id", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "stamp", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "delete", "url": "/api/voice/mails/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Voice_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "voice/mails/messages/{id}/download", "title": "Download Voice Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}voice/mails/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "put", "url": "/api/voice/mails/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "post", "url": "/api/voice/prefixes/{id}/users", "title": "Add agents to a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}", "title": "Deletes a Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/describe", "title": "Gets table info about Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}/users", "title": "Gets agents from prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes", "title": "Gets a list of Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -v -u {name}:{password}", "type": "json" } ], "name": "GetPrefixes", "group": "Voice_Prefixes", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/prefixes?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/prefixes?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/prefixes?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/prefixes?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/prefixes?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}/users", "title": "Removes agents from a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}", "title": "Gets a single Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "put", "url": "/api/voice/prefixes/{id}", "title": "Update an existing prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "post", "url": "/api/voice/prefixes", "title": "Create a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/queues/reports/describe", "title": "Gets table info about Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports", "title": "Gets a list of Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/{id}", "title": "Gets a single Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/index", "title": "Get Voice Queues Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/index -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getVoiceQueuesReport", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "post", "url": "/api/voice/queues/{id}/users", "title": "Add agents to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/blacklists", "title": "Add blacklists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/lists", "title": "Add lists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/teams", "title": "Add teams to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/clone", "title": "Clone an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Voice_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"inbound\"", "\"outbound\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "musiconhold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rr\"", "\"ringall\"", "\"leastrecent\"", "\"fewestcalls\"", "\"random\"", "\"rrmemory\"", "\"linear\"", "\"wrandom\"", "\"rrordered\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "servicelevel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "penaltymemberslimit", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "retry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timeoutpriority", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "weight", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "wrapuptime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autofill", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"all\"" ], "optional": true, "field": "autopause", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "autopausedelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopausebusy", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopauseunavail", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxlen", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setinterfacevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueueentryvar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueuevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "eventmemberstatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membermacro", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membergosub", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "min_announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "periodic_announce_frequency", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "random_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "relative_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"once\"" ], "optional": true, "field": "announce_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce_position", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "announce_to_first_user", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_position_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"0\"", "\"5\"", "\"10\"", "\"15\"", "\"20\"", "\"30\"" ], "optional": true, "field": "announce_round_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_youarenext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thereare", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_callswaiting", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minute", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minutes", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thankyou", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_reporthold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_less_than", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinempty", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leavewhenempty", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "reportholdtime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ringinuse", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "memberdelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "timeoutrestart", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultrule", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "acw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialActive", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"preview\"", "\"progressive\"", "\"power\"", "\"predictive\"", "\"booked\"" ], "optional": true, "field": "dialMethod", "description": "

Dial Method.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitChannel", "description": "

Max 9999 channels, 0 means unlimited.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitQueue", "description": "

Max 9999 member in queue(min:1, max:9999), 0 means unlimited.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPowerLevel", "description": "

Power Level: Calls for agents (min:1, max:10).

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"agentBusyFactor\"", "\"dropRate\"" ], "optional": true, "field": "dialPredictiveOptimization", "description": "

Only for predictive method.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPredictiveOptimizationPercentage", "description": "

Predictive Optimization Percentage (min: 1, max: 95)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveInterval", "description": "

Interval Predictive Minutes (min:5 max:30)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueOptions", "description": "

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialQueueTimeout", "description": "

Queue Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRecallMeTimeout", "description": "

#RecallMe Timeout (min:1)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialRecallInQueue", "description": "

Active/Disactive Recall In Queue

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject2", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupClient", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupAgent", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMaxThreshold", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMinThreshold", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacklists", "title": "Get queue blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/finals", "title": "Gets queue hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hopper_histories", "title": "Gets queue hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hoppers", "title": "Gets queue hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/lists", "title": "Get queue lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/members", "title": "Gets queue members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMembers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Voice_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/teams", "title": "Gets queue team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/blacklists", "title": "Remove blacklists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/lists", "title": "Remove lists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacks", "title": "Gets queue hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "put", "url": "/api/voice/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Voice_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userSecondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userThirdDisposition", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "location", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeStatus", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileUri", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileText", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failureReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentiment", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sPositive", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNegative", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNeutral", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sMixed", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tempSentiment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Voice_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "delete", "url": "/api/voice/recordings/{id}", "title": "Delete voice recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/downloads", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/downloads -v -u {name}:{password} -X GET", "type": "json" } ], "name": "downloads", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -d '{\"runSentiment\": \"true\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -v -u {name}:{password} -X GET", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "put", "url": "/api/voice/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/transfers/reports", "title": "Creates a new Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTransfer_Reports", "group": "Voice_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"blind\"", "\"attended\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "result", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereraccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererlinkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereechannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereelinkedid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Yes\"", "\"No\"" ], "optional": true, "field": "isexternal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "delete", "url": "/api/voice/transfers/reports/{id}", "title": "Deletes a Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports", "title": "Gets a list of Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/transfers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/transfers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/transfers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/transfers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/transfers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports/{id}", "title": "Gets a single Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "put", "url": "/api/voice/transfers/reports/{id}", "title": "Update an existing Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/vtiger/accounts", "title": "Creates a new Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Accounts", "group": "Vtiger_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "moduleName", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "accessKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "delete", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Deletes a Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts", "title": "Gets a list of Vtiger Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Gets a single Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "put", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Update an existing Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/configurations", "title": "Creates a new Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Configurations", "group": "Vtiger_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "delete", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Deletes a Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations", "title": "Gets a list of Vtiger Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Gets a single Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "put", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Update an existing Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "post", "url": "/api/integrations/vtiger/fields", "title": "Creates a new Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Fields", "group": "Vtiger_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "delete", "url": "/api/integrations/vtiger/fields/{id}", "title": "Deletes a Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields", "title": "Gets a list of Vtiger Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields/{id}", "title": "Gets a single Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "put", "url": "/api/integrations/vtiger/fields/{id}", "title": "Update an existing Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "post", "url": "/api/webbar/answer", "title": "answer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/answer -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_answer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/calls", "title": "webrtc call list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/calls -d '{\"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_calls", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hangup", "title": "hangup webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hangup -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hangup", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hold", "title": "hold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/unhold", "title": "unhold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/unhold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/originate", "title": "Originate new webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/originate -d '{\"callNumber\": \"0119692844\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_originate", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "callNumber", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callerId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callbackUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/transfer", "title": "blind transfer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/transfer -d '{\"userId\": 54, \"sessionId\":\"\", \"transferNumber\":\"\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_transfer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "transferNumber", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/users", "title": "Add agents to a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/users", "title": "Gets agents from whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/users", "title": "Removes agents from a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new whatsapp message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/send", "title": "Send new whatsapp message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendWhatsapp", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Whatsapp_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "delete", "url": "/api/whatsapp/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Whatsapp_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "put", "url": "/api/whatsapp/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "put", "url": "/api/whatsapp/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Whatsapp_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "delete", "url": "/api/whatsapp/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Whatsapp_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "put", "url": "/api/whatsapp/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "post", "url": "/api/whatsapp/reports/queue", "title": "Creates a new Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/queue/{id}", "title": "Deletes a Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/describe", "title": "Gets table info about Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue", "title": "Gets a list of Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/{id}", "title": "Gets a single Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/queue/{id}", "title": "Update an existing Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Whatsapp_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Whatsapp_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "put", "url": "/api/whatsapp/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/reports/transfer", "title": "Creates a new Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Deletes a Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/describe", "title": "Gets table info about Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer", "title": "Gets a list of Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Gets a single Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Update an existing Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/zendesk/accounts", "title": "Creates a new Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Accounts", "group": "Zendesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"password\"", "\"token\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "delete", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Deletes a Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts", "title": "Gets a list of Zendesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Gets a single Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "put", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Update an existing Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/configurations", "title": "Creates a new Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Configurations", "group": "Zendesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "delete", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Deletes a Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations", "title": "Gets a list of Zendesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Gets a single Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "put", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Update an existing Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/fields", "title": "Creates a new Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Fields", "group": "Zendesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "delete", "url": "/api/integrations/zendesk/fields/{id}", "title": "Deletes a Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields", "title": "Gets a list of Zendesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields/{id}", "title": "Gets a single Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "put", "url": "/api/integrations/zendesk/fields/{id}", "title": "Update an existing Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "post", "url": "/api/integrations/zoho/accounts", "title": "Creates a new Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Accounts", "group": "Zoho_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "zone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "code", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "refreshToken", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "delete", "url": "/api/integrations/zoho/accounts/{id}", "title": "Deletes a Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts", "title": "Gets a list of Zoho Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}", "title": "Gets a single Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "put", "url": "/api/integrations/zoho/accounts/{id}", "title": "Update an existing Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/configurations", "title": "Creates a new Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Configurations", "group": "Zoho_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"lead\"", "\"contact\"", "\"nothing\"" ], "optional": true, "field": "moduleCreate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "delete", "url": "/api/integrations/zoho/configurations/{id}", "title": "Deletes a Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations", "title": "Gets a list of Zoho Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}", "title": "Gets a single Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "put", "url": "/api/integrations/zoho/configurations/{id}", "title": "Update an existing Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "post", "url": "/api/integrations/zoho/fields", "title": "Creates a new Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Fields", "group": "Zoho_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "delete", "url": "/api/integrations/zoho/fields/{id}", "title": "Deletes a Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields", "title": "Gets a list of Zoho Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields/{id}", "title": "Gets a single Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "put", "url": "/api/integrations/zoho/fields/{id}", "title": "Update an existing Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "post", "url": "/api/cdr", "title": "Creates a new Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCdrs", "group": "cdr", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "calldate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "src", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dst", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dstchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastapp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "duration", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "billsec", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userfield", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "linkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sequence", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "peeraccount", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tag", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "delete", "url": "/api/cdr/{id}", "title": "Deletes a Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/describe", "title": "Gets table info about Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr", "title": "Gets a list of Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -v -u {name}:{password}", "type": "json" } ], "name": "GetCdrs", "group": "cdr", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cdr?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cdr?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cdr?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cdr?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cdr?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/{id}", "title": "Gets a single Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "put", "url": "/api/cdr/{id}", "title": "Update an existing Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "post", "url": "/api/voiceQueuesLog", "title": "Creates a new VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVoiceQueuesLogs", "group": "voiceQueuesLog", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "time", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callid", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "queuename", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "agent", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "event", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data2", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data3", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "dtm", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "delete", "url": "/api/voiceQueuesLog/{id}", "title": "Deletes a VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog", "title": "Gets a list of VoiceQueuesLogs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -v -u {name}:{password}", "type": "json" } ], "name": "GetVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voiceQueuesLog?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voiceQueuesLog?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voiceQueuesLog?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voiceQueuesLog?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voiceQueuesLog?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog/{id}", "title": "Gets a single VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "put", "url": "/api/voiceQueuesLog/{id}", "title": "Update an existing VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" } ] +[ { "type": "delete", "url": "/api/actions/{id}", "title": "Deletes a Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteActions", "group": "Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "put", "url": "/api/actions/{id}", "title": "Update an existing Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateActions", "group": "Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/action/index.js", "groupTitle": "Actions" }, { "type": "post", "url": "/api/analytics/custom_reports", "title": "Creates a new Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "delete", "url": "/api/analytics/custom_reports/{id}", "title": "Deletes a Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports", "title": "Gets a list of Analytic Custom Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/custom_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/custom_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/custom_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/custom_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/custom_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}", "title": "Gets a single Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "get", "url": "/api/analytics/custom_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "put", "url": "/api/analytics/custom_reports/{id}", "title": "Update an existing Analytic Custom Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/custom_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Custom_Reports", "group": "Analytic_Custom_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticCustomReport/index.js", "groupTitle": "Analytic_Custom_Reports" }, { "type": "post", "url": "/api/analytics/default_reports", "title": "Creates a new Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "conditions", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "joins", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "delete", "url": "/api/analytics/default_reports/{id}", "title": "Deletes a Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports", "title": "Gets a list of Analytic Default Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/default_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/default_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/default_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/default_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/default_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}", "title": "Gets a single Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/preview", "title": "Report Preview", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/preview -v -u {name}:{password} -X GET", "type": "json" } ], "name": "preview", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/query", "title": "Report Query SQL", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/query -v -u {name}:{password} -X GET", "type": "json" } ], "name": "query", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "get", "url": "/api/analytics/default_reports/{id}/run", "title": "Report Run", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "put", "url": "/api/analytics/default_reports/{id}", "title": "Update an existing Analytic Default Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/default_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Default_Reports", "group": "Analytic_Default_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticDefaultReport/index.js", "groupTitle": "Analytic_Default_Reports" }, { "type": "post", "url": "/api/analytics/extracted_reports", "title": "Creates a new Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "basename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "savename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endDate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"manual\"", "\"scheduled\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "reportId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reportType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "delete", "url": "/api/analytics/extracted_reports/{id}", "title": "Deletes a Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports", "title": "Gets a list of Analytic Extacted Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/extracted_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/extracted_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/extracted_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/extracted_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/extracted_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}", "title": "Gets a single Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "get", "url": "/api/analytics/extracted_reports/{id}/download", "title": "Download Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "put", "url": "/api/analytics/extracted_reports/{id}", "title": "Update an existing Analytic Extracted Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/extracted_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Extacted_Reports", "group": "Analytic_Extracted_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticExtractedReport/index.js", "groupTitle": "Analytic_Extracted_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/create_many", "title": "Creates many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/create_many -d '[{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}]' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "BulkCreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/destroy_many?ids={ids}", "title": "Deletes many Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/destroy_many?ids=1&ids=2&ids=3 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "BulkDeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports", "title": "Creates a new Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "function", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "groupBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "orderBy", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "custom", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "delete", "url": "/api/analytics/field_reports/{id}", "title": "Deletes a Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports", "title": "Gets a list of Analytic Field Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/field_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/field_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/field_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/field_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/field_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "get", "url": "/api/analytics/field_reports/{id}", "title": "Gets a single Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/field_reports/{id}/create_many", "title": "Rewrite fields set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id}/create_many -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFields", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "put", "url": "/api/analytics/field_reports/{id}", "title": "Update an existing Analytic Field Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/field_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Field_Reports", "group": "Analytic_Field_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticFieldReport/index.js", "groupTitle": "Analytic_Field_Reports" }, { "type": "post", "url": "/api/analytics/metrics", "title": "Creates a new Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Metric", "group": "Analytic_Metrics", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "table", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "metric", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "delete", "url": "/api/analytics/metrics/{id}", "title": "Deletes a Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics", "title": "Gets a list of Analytic Metric", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/metrics?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/metrics?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/metrics?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/metrics?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/metrics?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "get", "url": "/api/analytics/metrics/{id}", "title": "Gets a single Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "put", "url": "/api/analytics/metrics/{id}", "title": "Update an existing Analytic Metrics", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/metrics/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Metric", "group": "Analytic_Metrics", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticMetric/index.js", "groupTitle": "Analytic_Metrics" }, { "type": "post", "url": "/api/analytics/tree_reports", "title": "Creates a new Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "tree", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "delete", "url": "/api/analytics/tree_reports/{id}", "title": "Deletes a Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports", "title": "Gets a list of Analytic Tree Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/analytics/tree_reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/analytics/tree_reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/analytics/tree_reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/analytics/tree_reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/analytics/tree_reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "get", "url": "/api/analytics/tree_reports/{id}", "title": "Gets a single Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "put", "url": "/api/analytics/tree_reports/{id}", "title": "Update an existing Analytic Tree Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/analytics/tree_reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAnalytic_Tree_Reports", "group": "Analytic_Tree_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/analyticTreeReport/index.js", "groupTitle": "Analytic_Tree_Reports" }, { "type": "post", "url": "/api/attachments/clone", "title": "Clone an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "delete", "url": "/api/attachments/{id}", "title": "Deletes a Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments", "title": "Gets a list of Attachments", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -v -u {name}:{password}", "type": "json" } ], "name": "GetAttachments", "group": "Attachments", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/attachments?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/attachments?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/attachments?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/attachments?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/attachments?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/{id}", "title": "Gets a single Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/attachments", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Attachments", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/attachments/:id/download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/:id/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "get", "url": "/api/chat/interactions/{id}/attachment_download", "title": "Download attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Attachments" }, { "type": "put", "url": "/api/attachments/{id}", "title": "Update an existing Attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/attachments/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAttachments", "group": "Attachments", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/attachment/index.js", "groupTitle": "Attachments" }, { "type": "post", "url": "/api/auth/local/forgot", "title": "Creates a new password reset token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/forgot -d '{\"email\": \"john.doe@xcally.com\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Forgot_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "email", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local/reset/:token", "title": "Reset user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local/reset/94b422c1fkdjhg766a198da6997yu6gcc963641d -d '{\"password\": \"My_newP@ssw0rd\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_Reset_Password", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/google", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/google -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authGoogle/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/auth/local", "title": "Creates a new User token", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/auth/local -d '{\"name\": \"john.doe\", \"password\": \"password\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Local_login", "group": "Authentication", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "password", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/authLocal/index.js", "groupTitle": "Authentication" }, { "type": "post", "url": "/api/automations", "title": "Creates a new Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAutomations", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "delete", "url": "/api/automations/{id}", "title": "Deletes a Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations", "title": "Gets a list of Automations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations -v -u {name}:{password}", "type": "json" } ], "name": "GetAutomations", "group": "Automations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/automations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/automations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/automations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/automations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/automations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}", "title": "Gets a single Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addActions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/automations/{id}/conditions", "title": "Creates new conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConditions", "group": "Automations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/actions", "title": "Gets Automation Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "get", "url": "/api/automations/{id}/conditions", "title": "Gets Automation Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id}/conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConditions", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "put", "url": "/api/automations/{id}", "title": "Update an existing Automation", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/automations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAutomations", "group": "Automations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/automation/index.js", "groupTitle": "Automations" }, { "type": "post", "url": "/api/canned_answers", "title": "Create a new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "delete", "url": "/api/canned_answers/{id}", "title": "Deletes a Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers", "title": "Gets a list of Canned Answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers -v -u {name}:{password}", "type": "json" } ], "name": "GetCanned_Answers", "group": "Canned_Answers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/canned_answers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/canned_answers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/canned_answers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/canned_answers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/canned_answers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/api/canned_answers/{id}", "title": "Gets a single Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "put", "url": "/api/canned_answers/{id}", "title": "Update an existing Canned Answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/canned_answers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCanned_Answers", "group": "Canned_Answers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cannedAnswer/index.js", "groupTitle": "Canned_Answers" }, { "type": "get", "url": "/chat/internal/users", "title": "Gets Users Last Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/chat/internal/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLastUsersMessages", "group": "ChatInternalMessage", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "ChatInternalMessage" }, { "type": "delete", "url": "/api/chat/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "get", "url": "/api/chat/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "put", "url": "/api/chat/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Chat_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatApplication/index.js", "groupTitle": "Chat_Applications" }, { "type": "post", "url": "/api/chat/groups", "title": "Creates a new Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateGroups", "group": "Chat_Groups", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "write", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}", "title": "Deletes a Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/describe", "title": "Gets table info about Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups", "title": "Gets a list of Groups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups -v -u {name}:{password}", "type": "json" } ], "name": "GetGroups", "group": "Chat_Groups", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/groups?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/groups?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/groups?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/groups?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/groups?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "delete", "url": "/api/chat/groups/{id}/members", "title": "Removes members from a group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}", "title": "Gets a single Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/members", "title": "Add members to chat group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/groups/{id}/messages", "title": "Creates a new group message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -d '{\"body\": \"Hi operator!\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/members", "title": "Gets Members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMembers", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/messages", "title": "Gets Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "get", "url": "/api/chat/groups/{id}/unread", "title": "Get unread chat group messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id}/unread -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUread", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "put", "url": "/api/chat/groups/{id}", "title": "Update an existing Group", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/groups/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateGroups", "group": "Chat_Groups", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatGroup/index.js", "groupTitle": "Chat_Groups" }, { "type": "post", "url": "/api/chat/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Chat_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "delete", "url": "/api/chat/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/abandon", "title": "Abandon interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/abandon -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "abandon", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to set as abandon an interaction and stop the routing.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/close", "title": "Close Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/close -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/attachment_upload", "title": "Add attachment", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/attachment_upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "attachmentUpload", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/interactions/{id}/vidaoo", "title": "Create Vidaoo Session", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/vidaoo -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createVidaooSession", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}/custom_update", "title": "Update interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/custom_update -d '{\"channel\": \"chat\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "customUpdate", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

This API is used to update an interaction.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "get", "url": "/api/chat/interactions/{id}/my_messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id}/my_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMyMessages", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "put", "url": "/api/chat/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Chat_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInteraction/index.js", "groupTitle": "Chat_Interactions" }, { "type": "post", "url": "/api/chat/internal/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Internal_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInternalMessageId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "delete", "url": "/api/chat/internal/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Internal_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/internal/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/internal/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/internal/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/internal/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/internal/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "get", "url": "/api/chat/internal/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "put", "url": "/api/chat/internal/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/internal/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Internal_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatInternalMessage/index.js", "groupTitle": "Chat_Internal_Messages" }, { "type": "post", "url": "/api/chat/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Chat_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "delete", "url": "/api/chat/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Chat_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "get", "url": "/api/chat/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "put", "url": "/api/chat/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Chat_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Messages" }, { "type": "post", "url": "/api/chat/offline_messages", "title": "Creates a new OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOfflineMessages", "group": "Chat_Offline_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "delete", "url": "/api/chat/offline_messages/{id}", "title": "Deletes a OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/describe", "title": "Gets table info about OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages", "title": "Gets a list of OfflineMessages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages -v -u {name}:{password}", "type": "json" } ], "name": "GetOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/offline_messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/offline_messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/offline_messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/offline_messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/offline_messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "get", "url": "/api/chat/offline_messages/{id}", "title": "Gets a single OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "put", "url": "/api/chat/offline_messages/{id}", "title": "Update an existing OfflineMessage", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/offline_messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOfflineMessages", "group": "Chat_Offline_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatOfflineMessage/index.js", "groupTitle": "Chat_Offline_Messages" }, { "type": "post", "url": "/api/chat/proactive_actions", "title": "Creates a new Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProactive_Actions", "group": "Chat_Proactive_Actions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "delete", "url": "/api/chat/proactive_actions/{id}", "title": "Deletes a Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "get", "url": "/api/chat/proactive_actions/{id}", "title": "Gets a single Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "put", "url": "/api/chat/proactive_actions/{id}", "title": "Update an existing Proactive Action", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/proactive_actions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProactive_Actions", "group": "Chat_Proactive_Actions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatProactiveAction/index.js", "groupTitle": "Chat_Proactive_Actions" }, { "type": "post", "url": "/api/chat/reports/queue", "title": "Creates a new Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Queue_Reports", "group": "Chat_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "delete", "url": "/api/chat/reports/queue/{id}", "title": "Deletes a Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/describe", "title": "Gets table info about Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue", "title": "Gets a list of Chat Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "get", "url": "/api/chat/reports/queue/{id}", "title": "Gets a single Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "put", "url": "/api/chat/reports/queue/{id}", "title": "Update an existing Chat Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Queue_Reports", "group": "Chat_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueueReport/index.js", "groupTitle": "Chat_Queue_Reports" }, { "type": "post", "url": "/api/chat/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Chat_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Chat_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "delete", "url": "/api/chat/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "get", "url": "/api/chat/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "put", "url": "/api/chat/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Chat_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Chat_Queues" }, { "type": "post", "url": "/api/chat/reports/transfer", "title": "Creates a new Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "delete", "url": "/api/chat/reports/transfer/{id}", "title": "Deletes a Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/describe", "title": "Gets table info about Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer", "title": "Gets a list of Chat Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "get", "url": "/api/chat/reports/transfer/{id}", "title": "Gets a single Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "put", "url": "/api/chat/reports/transfer/{id}", "title": "Update an existing Chat Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChat_Transfer_Reports", "group": "Chat_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatTransferReport/index.js", "groupTitle": "Chat_Transfer_Reports" }, { "type": "post", "url": "/api/chat/websites/{id}/users", "title": "Add agents to a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites", "title": "Creates a new Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWebsites", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "address", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKeyOffline", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentAlias", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerAlias", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "color_button", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "textColor", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "fontSize", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remote", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "animation", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rounded\"", "\"squared\"" ], "optional": true, "field": "header_shape", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_online", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "start_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offline_chat_button", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "header_offline", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "download_transcript", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "whiteLabel", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultWhiteLabel", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "sitepic", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingQuestion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitSuccessMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "formSubmitFailureMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "noteTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "placeholderMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closingMessageButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipMessageButton", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "conditionAgreement", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableRating", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableFeedback", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableSendButton", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "feedbackTitle", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingStarsNumber", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "onlineForm", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "offlineForm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoclose", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerWriting", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardTranscriptMessage", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "forwardOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "forwardOfflineAddress", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingTitle", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "waitingMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageSubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "offlineMessageBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUnmanagedNote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unmanagedMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skipUnmanaged", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sendUnmanaged", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerAttachment", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableCustomerCheckmarks", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "agentAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showAgentAvatar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timezone", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "hideWhenOffline", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentIdentifier", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "alignment", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "verticalAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messagesAlignment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultTitle", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "customerAvatar", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "showCustomerAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "messageFontSize", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "backgroundColor", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "systemAlias", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "systemAvatar", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "vidaooEscalation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vidaooApiKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}", "title": "Deletes a Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/describe", "title": "Gets table info about Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/users", "title": "Gets agents from website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites", "title": "Gets a list of Websites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites -v -u {name}:{password}", "type": "json" } ], "name": "GetWebsites", "group": "Chat_Websites", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/chat/websites?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/chat/websites?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/chat/websites?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/chat/websites?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/chat/websites?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/users", "title": "Removes agents from a website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "delete", "url": "/api/chat/websites/{id}/dispositions", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}", "title": "Gets a single Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Add customer avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ratingValue", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"star\"", "\"thumb\"" ], "optional": true, "field": "ratingType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "ratingMessage", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "pathTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailTranscript", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "browserVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "osVersion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceModel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceVendor", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deviceType", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "referer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerIp", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closeReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "customerPort", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "vidaooSessionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Creates new Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -d '[{\"name\": \"Satisfied\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addProactiveActions", "group": "Chat_Websites", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"mouseOver\"", "\"timeout\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "selector", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/system_avatar", "title": "Add system avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/applications", "title": "Gets Website Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/customer_avatar", "title": "Get Customer Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/customer_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomerAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/fields", "title": "Gets Website Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/interactions", "title": "Gets Website Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/logo -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getLogo", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/offline_messages", "title": "Gets Website Offline Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline_messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOfflineMessages", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/proactive_actions", "title": "Gets Website Proactive Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/proactive_actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getProactiveActions", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/snippet", "title": "Gets Website Snippet", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/snippet -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSnippet", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "get", "url": "/api/chat/websites/{id}/system_avatar", "title": "Get System Avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/system_avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSystemAvatar", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new chat message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/chat/websites/{id}/offline", "title": "Offline message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id}/offline -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "offline", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatMessage/index.js", "groupTitle": "Chat_Websites" }, { "type": "put", "url": "/api/chat/websites/{id}", "title": "Update an existing Website", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/websites/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWebsites", "group": "Chat_Websites", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatWebsite/index.js", "groupTitle": "Chat_Websites" }, { "type": "post", "url": "/api/cloudProviders", "title": "Creates a new CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCloudProviders", "group": "CloudProviders", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"AmazonAWS\"", "\"Google\"" ], "optional": false, "field": "service", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "delete", "url": "/api/cloudProviders/{id}", "title": "Deletes a CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders", "title": "Gets a list of CloudProviders", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders -v -u {name}:{password}", "type": "json" } ], "name": "GetCloudProviders", "group": "CloudProviders", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cloudProviders?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cloudProviders?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cloudProviders?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cloudProviders?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cloudProviders?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "get", "url": "/api/cloudProviders/{id}", "title": "Gets a single CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "put", "url": "/api/cloudProviders/{id}", "title": "Update an existing CloudProvider", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cloudProviders/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCloudProviders", "group": "CloudProviders", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cloudProvider/index.js", "groupTitle": "CloudProviders" }, { "type": "post", "url": "/api/cm_contact_has_items", "title": "Creates a new CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasItems", "group": "CmContactHasItems", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "item", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ItemTypeId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ItemClass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "delete", "url": "/api/cm_contact_has_items/{id}", "title": "Deletes a CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items", "title": "Gets a list of CmContactHasItems", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_items?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_items?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_items?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_items?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_items?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "get", "url": "/api/cm_contact_has_items/{id}", "title": "Gets a single CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "put", "url": "/api/cm_contact_has_items/{id}", "title": "Update an existing CmContactHasItem", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_items/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasItems", "group": "CmContactHasItems", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasItem/index.js", "groupTitle": "CmContactHasItems" }, { "type": "post", "url": "/api/cm_contact_has_phones", "title": "Creates a new CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmContactHasPhones", "group": "CmContactHasPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmContactId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "delete", "url": "/api/cm_contact_has_phones/{id}", "title": "Deletes a CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones", "title": "Gets a list of CmContactHasPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_contact_has_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_contact_has_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_contact_has_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_contact_has_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_contact_has_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "get", "url": "/api/cm_contact_has_phones/{id}", "title": "Gets a single CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "put", "url": "/api/cm_contact_has_phones/{id}", "title": "Update an existing CmContactHasPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_contact_has_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmContactHasPhones", "group": "CmContactHasPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContactHasPhone/index.js", "groupTitle": "CmContactHasPhones" }, { "type": "post", "url": "/api/cm_hopper_additional_phones", "title": "Creates a new CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "CmHopperId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "delete", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Deletes a CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones", "title": "Gets a list of CmHopperAdditionalPhones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones -v -u {name}:{password}", "type": "json" } ], "name": "GetCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm_hopper_additional_phones?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm_hopper_additional_phones?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm_hopper_additional_phones?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm_hopper_additional_phones?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm_hopper_additional_phones?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "get", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Gets a single CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "put", "url": "/api/cm_hopper_additional_phones/{id}", "title": "Update an existing CmHopperAdditionalPhone", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm_hopper_additional_phones/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCmHopperAdditionalPhones", "group": "CmHopperAdditionalPhones", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperAdditionalPhone/index.js", "groupTitle": "CmHopperAdditionalPhones" }, { "type": "post", "url": "/api/cm/companies", "title": "Creates a new Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCompanies", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "companyId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "website", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailDomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sStreet", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sPostalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCity", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sCountry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/companies/{id}", "title": "Deletes a Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/describe", "title": "Gets table info about Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies", "title": "Gets a list of Companies", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies -v -u {name}:{password}", "type": "json" } ], "name": "GetCompanies", "group": "Cm_Companies", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/companies?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/companies?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/companies?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/companies?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/companies?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}", "title": "Gets a single Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "post", "url": "/api/cm/companies/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Companies", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "get", "url": "/api/cm/companies/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/companies/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "put", "url": "/api/cm/companies/{id}", "title": "Update an existing Company", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/companies/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCompanies", "group": "Cm_Companies", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCompany/index.js", "groupTitle": "Cm_Companies" }, { "type": "delete", "url": "/api/cm/contacts/{id}", "title": "Deletes a Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/describe", "title": "Gets table info about Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeContacts", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts", "title": "Gets a list of Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -v -u {name}:{password}", "type": "json" } ], "name": "GetContacts", "group": "Cm_Contacts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/contacts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/contacts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/contacts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/contacts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/contacts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/finals", "title": "Gets contact hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hopper_histories", "title": "Gets contact hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/hoppers", "title": "Gets contact hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/create_many", "title": "Create Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/create_many -d '[{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts", "title": "Create Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts -d '{\"firstName\": \"John\", \"lastName\": \"doe\", \"...\": \"...\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/journey", "title": "Gets customer journey", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/journey -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getJourney", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/jscripty_sessions", "title": "Gets contact hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getJscriptySessions", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/merge", "title": "Merge Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/merge -d '{\"from\": 1, \"to\": 2}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "merge", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "post", "url": "/api/cm/contacts/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id}/tags -d '{\"ids\": [1,12]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "get", "url": "/api/cm/contacts/{id}", "title": "Gets a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "show", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "put", "url": "/api/cm/contacts/{id}", "title": "Update a single Contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/{id} -d '{\"firstName\": \"John\", \"lastName\": \"Doe\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Contacts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_Contacts" }, { "type": "delete", "url": "/api/cm/custom_fields/{id}", "title": "Deletes a Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields", "title": "Gets a list of Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields -v -u {name}:{password}", "type": "json" } ], "name": "GetCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/custom_fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/custom_fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/custom_fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/custom_fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/custom_fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "get", "url": "/api/cm/custom_fields/{id}", "title": "Gets a single Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "put", "url": "/api/cm/custom_fields/{id}", "title": "Update an existing Custom Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCustom_Fields", "group": "Cm_Custom_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Cm_Custom_Fields" }, { "type": "post", "url": "/api/cm/hopper", "title": "Creates a new Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopper", "group": "Cm_Hopper", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "phone", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ContactId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ListId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "VoiceQueueId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "CampaignId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/describe", "title": "Gets table info about Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper", "title": "Gets a list of Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper", "group": "Cm_Hopper", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/{id}", "title": "Gets a single Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "delete", "url": "/api/cm/hopper_black/{id}", "title": "Deletes a Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/describe", "title": "Gets table info about Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black", "title": "Gets a list of Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black -v -u {name}:{password}", "type": "json" } ], "name": "GetHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_black?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_black?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_black?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_black?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_black?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_black/{id}", "title": "Gets a single Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "put", "url": "/api/cm/hopper_black/{id}", "title": "Update an existing Hopper Black", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_black/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper_Black", "group": "Cm_Hopper_Black", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperBlack/index.js", "groupTitle": "Cm_Hopper_Black" }, { "type": "get", "url": "/api/cm/hopper_final/describe", "title": "Gets table info about HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final", "title": "Gets a list of HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_final?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_final?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_final?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_final?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_final?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/{id}", "title": "Gets a single HopperFinal", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_final/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/checkContactHopper", "title": "Check if contact is in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/checkContactHopper -d '{\"VoiceQueueId\": \"VoiceQueueId\", \"CampaignId\": \"CampaignId\", \"ContactId\": \"ContactId\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "_checkContactHopper", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/campaign/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "get", "url": "/api/cm/hopper_final/voice/queue/countAttributes/{id}", "title": "Return number contacts for attributes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/countAttributes/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "countContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/campaign/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/campaign/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "moveContactsIvrCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_final/voice/queue/{id}", "title": "Move contacts in hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/voice/queue/moveContacts/{id} -d '{\"state\": \"state\"}' -H 'Content-Type: application/json' -v -u {name}:{password}", "type": "json" } ], "name": "moveContactsQueueCampaignHopperFinal", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "put", "url": "/api/cm/hopper_final/{id}", "title": "Update a single hopper final", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_final/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_Final", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperFinal/index.js", "groupTitle": "Cm_Hopper_Final" }, { "type": "post", "url": "/api/cm/hopper_history", "title": "Creates a new HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateHopperHistory", "group": "Cm_Hopper_History", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "state", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "statedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countbusyretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countcongestionretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnoanswerretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countglobal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "originatecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "responsetime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "answertime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "droptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "ringtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "followuptime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dropreason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaign", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "campaigntype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "amd", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "recallme", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "editedat", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "edited", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countnosuchnumberretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countdropretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countabandonedretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countmachineretry", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "countagentrejectretry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/describe", "title": "Gets table info about HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history", "title": "Gets a list of HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history -v -u {name}:{password}", "type": "json" } ], "name": "GetHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/hopper_history?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/hopper_history?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/hopper_history?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/hopper_history?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/hopper_history?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "get", "url": "/api/cm/hopper_history/{id}", "title": "Gets a single HopperHistory", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper_history/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowHopperHistory", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "put", "url": "/api/cm/hopper_history/{id}", "title": "Update a single hopper history", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/hopper_history/{id} -d '{\"disposition\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Cm_Hopper_History", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopperHistory/index.js", "groupTitle": "Cm_Hopper_History" }, { "type": "delete", "url": "/api/cm/hopper/{id}", "title": "Delete Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "get", "url": "/api/cm/hopper/opencontacts", "title": "Gets Open Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/opencontacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getOpenContacts", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/hopper/preview", "title": "Gets Preview Dialer Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/preview -d '{\"hopperIds\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getPreview", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "put", "url": "/api/cm/hopper/{id}", "title": "Update an existing Hopper", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/hopper/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateHopper", "group": "Cm_Hopper", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmHopper/index.js", "groupTitle": "Cm_Hopper" }, { "type": "post", "url": "/api/cm/lists", "title": "Creates a new List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateLists", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}", "title": "Deletes a List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/describe", "title": "Gets table info about Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/users", "title": "Gets agents from list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists", "title": "Gets a list of Lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists -v -u {name}:{password}", "type": "json" } ], "name": "GetLists", "group": "Cm_Lists", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cm/lists?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cm/lists?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cm/lists?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cm/lists?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cm/lists?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/users", "title": "Removes agents from a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "delete", "url": "/api/cm/lists/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}", "title": "Gets a single List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/users", "title": "Adds agents to a list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/contacts", "title": "Creates new contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -d '[{\"firstName\": \"John Doe\", \"email\": \"john.doe@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addContacts", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "firstName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "street", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "postalCode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "city", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "country", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dateOfBirth", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mobile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "facebook", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fb_data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "twitter", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "skype", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "teams", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "viber", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "line", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "wechat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "telegram", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "scheduledat", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/fields", "title": "Creates a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addCustomField", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/lists/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Cm_Lists", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts", "title": "Gets List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getContacts", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/fields", "title": "Gets Custom Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getCustomFields", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/dispositions", "title": "Gets list dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "get", "url": "/api/cm/lists/{id}/contacts/csv", "title": "Gets CSV List Contacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id}/contacts/csv -v -u {name}:{password} -X GET", "type": "json" } ], "name": "grunt", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "put", "url": "/api/cm/lists/{id}", "title": "Update an existing List", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/lists/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateLists", "group": "Cm_Lists", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmList/index.js", "groupTitle": "Cm_Lists" }, { "type": "post", "url": "/api/cm/contacts/upload/:id", "title": "Import new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload/:id -v -u {name}:{password} -X POST", "type": "json" } ], "name": "import", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/upload", "title": "Upload csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/upload -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "upload", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "post", "url": "/api/cm/contacts/csv", "title": "Create new contacts by csv", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/contacts/csv -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadCsv", "group": "Cm_contacts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmContact/index.js", "groupTitle": "Cm_contacts" }, { "type": "delete", "url": "/api/conditions/{id}", "title": "Deletes a Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "put", "url": "/api/conditions/{id}", "title": "Update an existing Condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/conditions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateConditions", "group": "Conditions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/condition/index.js", "groupTitle": "Conditions" }, { "type": "post", "url": "/api/contact_item_types", "title": "Creates a new ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateContactItemTypes", "group": "ContactItemType", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "OrderBy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rgbBackgroundColor", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "delete", "url": "/api/contact_item_types/{id}", "title": "Deletes a ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types", "title": "Gets a list of ContactItemTypes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types -v -u {name}:{password}", "type": "json" } ], "name": "GetContactItemTypes", "group": "ContactItemType", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/contact_item_types?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/contact_item_types?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/contact_item_types?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/contact_item_types?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/contact_item_types?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "get", "url": "/api/contact_item_types/{id}", "title": "Gets a single ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "put", "url": "/api/contact_item_types/{id}", "title": "Update an existing ContactItemType", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/contact_item_types/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateContactItemTypes", "group": "ContactItemType", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/contactItemType/index.js", "groupTitle": "ContactItemType" }, { "type": "post", "url": "/api/cm/custom_field", "title": "Create a new custom field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cm/custom_field -d '{\"name\": \"mycf\", \"type\": \"text\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCustomField", "group": "Custom_Fields", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cmCustomField/index.js", "groupTitle": "Custom_Fields" }, { "type": "post", "url": "/api/dashboards/items", "title": "Create dasboard item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Create", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "delete", "url": "/api/dashboards/items/{id}", "title": "Deletes a Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "get", "url": "/api/dashboards/items/{id}", "title": "Gets a single Dashboard Item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboard_Items", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "put", "url": "/api/dashboards/items/{id}", "title": "Update an existing item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/items/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Dashboard_Items", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboardItem/index.js", "groupTitle": "Dashboard_Items" }, { "type": "post", "url": "/api/dashboards/clone", "title": "Clone an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards", "title": "Creates a new Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDashboards", "group": "Dashboards", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "delete", "url": "/api/dashboards/{id}", "title": "Deletes a Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards", "title": "Gets a list of Dashboards", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards -v -u {name}:{password}", "type": "json" } ], "name": "GetDashboards", "group": "Dashboards", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dashboards?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dashboards?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dashboards?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dashboards?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dashboards?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}", "title": "Gets a single Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/dashboards/{id}/items", "title": "Creates new item", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -d '{\"type\": \"counter\", \"...\": \"...\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addItem", "group": "Dashboards", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "get", "url": "/api/dashboards/{id}/items", "title": "Gets items", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id}/items -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getItems", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "put", "url": "/api/dashboards/{id}", "title": "Update an existing Dashboard", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dashboards/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDashboards", "group": "Dashboards", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/dashboard/index.js", "groupTitle": "Dashboards" }, { "type": "post", "url": "/api/integrations/desk/accounts", "title": "Creates a new Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Accounts", "group": "Desk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"basic\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "consumerSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tokenSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "delete", "url": "/api/integrations/desk/accounts/{id}", "title": "Deletes a Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts", "title": "Gets a list of Desk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}", "title": "Gets a single Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "get", "url": "/api/integrations/desk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "put", "url": "/api/integrations/desk/accounts/{id}", "title": "Update an existing Desk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Accounts", "group": "Desk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskAccount/index.js", "groupTitle": "Desk_Accounts" }, { "type": "post", "url": "/api/integrations/desk/configurations", "title": "Creates a new Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Configurations", "group": "Desk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "delete", "url": "/api/integrations/desk/configurations/{id}", "title": "Deletes a Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations", "title": "Gets a list of Desk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}", "title": "Gets a single Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "get", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "put", "url": "/api/integrations/desk/configurations/{id}", "title": "Update an existing Desk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Configurations", "group": "Desk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskConfiguration/index.js", "groupTitle": "Desk_Configurations" }, { "type": "post", "url": "/api/integrations/desk/fields", "title": "Creates a new Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDesk_Fields", "group": "Desk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "delete", "url": "/api/integrations/desk/fields/{id}", "title": "Deletes a Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields", "title": "Gets a list of Desk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDesk_Fields", "group": "Desk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/desk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/desk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/desk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/desk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/desk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "get", "url": "/api/integrations/desk/fields/{id}", "title": "Gets a single Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "put", "url": "/api/integrations/desk/fields/{id}", "title": "Update an existing Desk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/desk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDesk_Fields", "group": "Desk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDeskField/index.js", "groupTitle": "Desk_Fields" }, { "type": "post", "url": "/api/dispositions", "title": "Creates a new Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDispositions", "group": "Dispositions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "delete", "url": "/api/dispositions/{id}", "title": "Deletes a Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions", "title": "Gets a list of Dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions -v -u {name}:{password}", "type": "json" } ], "name": "GetDispositions", "group": "Dispositions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/dispositions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/dispositions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/dispositions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/dispositions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/dispositions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "get", "url": "/api/dispositions/{id}", "title": "Gets a single Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "put", "url": "/api/dispositions/{id}", "title": "Update an existing Disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/dispositions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDispositions", "group": "Dispositions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/disposition/index.js", "groupTitle": "Dispositions" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts", "title": "Creates a new Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Accounts", "group": "Dynamics365_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tenantId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "delete", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Deletes a Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts", "title": "Gets a list of Dynamics365 Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Gets a single Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "get", "url": "/api/integrations/dynamics365/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "put", "url": "/api/integrations/dynamics365/accounts/{id}", "title": "Update an existing Dynamics365 Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Accounts", "group": "Dynamics365_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Account/index.js", "groupTitle": "Dynamics365_Accounts" }, { "type": "post", "url": "/api/integrations/dynamics365/configurations", "title": "Creates a new Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Configurations", "group": "Dynamics365_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"incident\"", "\"phonecall\"" ], "optional": true, "field": "ticketType", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "delete", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Deletes a Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations", "title": "Gets a list of Dynamics365 Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Gets a single Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/dynamics365/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "put", "url": "/api/integrations/dynamics365/configurations/{id}", "title": "Update an existing Dynamics365 Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Configurations", "group": "Dynamics365_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Configuration/index.js", "groupTitle": "Dynamics365_Configurations" }, { "type": "post", "url": "/api/integrations/dynamics365/fields", "title": "Creates a new Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateDynamics365_Fields", "group": "Dynamics365_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "delete", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Deletes a Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields", "title": "Gets a list of Dynamics365 Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/dynamics365/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/dynamics365/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/dynamics365/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/dynamics365/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/dynamics365/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "get", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Gets a single Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "put", "url": "/api/integrations/dynamics365/fields/{id}", "title": "Update an existing Dynamics365 Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/dynamics365/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateDynamics365_Fields", "group": "Dynamics365_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intDynamics365Field/index.js", "groupTitle": "Dynamics365_Fields" }, { "type": "post", "url": "/api/fax/accounts/{id}/users", "title": "Add agents to a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ecm", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "headerinfo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "localstationid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "minrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"2400\"", "\"4800\"", "\"7200\"", "\"9600\"", "\"12000\"", "\"14400\"" ], "optional": true, "field": "maxrate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "modem", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "gateway", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "faxdetect", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "t38timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SIP\"", "\"IAX\"", "\"DADHI\"", "\"KHOMP\"" ], "optional": true, "field": "tech", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Fax_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/users", "title": "Gets agents from fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/users", "title": "Removes agents from a fax account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "delete", "url": "/api/fax/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/addaccountapplications", "title": "Creates new account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/addaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -d '[{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/applications", "title": "Gets account pplications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "get", "url": "/api/fax/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/{id}/send", "title": "Send new fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id}/send -d '{from: '\"John Doe\" <123456>'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendFax", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "put", "url": "/api/fax/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Fax_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/accounts/updateaccountapplications", "title": "Update account and applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/accounts/updateaccountapplications -d '[{\"name\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "updateApplications", "group": "Fax_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxAccount/index.js", "groupTitle": "Fax_Accounts" }, { "type": "post", "url": "/api/fax/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Fax_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "delete", "url": "/api/fax/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Fax_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "get", "url": "/api/fax/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "put", "url": "/api/fax/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Fax_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxApplication/index.js", "groupTitle": "Fax_Applications" }, { "type": "post", "url": "/api/fax/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fax", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Fax_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "delete", "url": "/api/fax/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "post", "url": "/api/fax/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Fax_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failMessage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/download", "title": "Get interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "put", "url": "/api/fax/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Fax_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxInteraction/index.js", "groupTitle": "Fax_Interactions" }, { "type": "get", "url": "/api/fax/messages/{id}/download", "title": "Get message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Fax_Message", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Message" }, { "type": "delete", "url": "/api/fax/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Fax_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "get", "url": "/api/fax/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/messages", "title": "Create message and send Fax", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "put", "url": "/api/fax/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Fax_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxMessage/index.js", "groupTitle": "Fax_Messages" }, { "type": "post", "url": "/api/fax/reports/queue", "title": "Creates a new Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Queue_Reports", "group": "Fax_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "delete", "url": "/api/fax/reports/queue/{id}", "title": "Deletes a Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/describe", "title": "Gets table info about Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue", "title": "Gets a list of Fax Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "get", "url": "/api/fax/reports/queue/{id}", "title": "Gets a single Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "put", "url": "/api/fax/reports/queue/{id}", "title": "Update an existing Fax Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Queue_Reports", "group": "Fax_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueueReport/index.js", "groupTitle": "Fax_Queue_Reports" }, { "type": "post", "url": "/api/fax/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Fax_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "lastAgent", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Fax_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "delete", "url": "/api/fax/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "get", "url": "/api/fax/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "put", "url": "/api/fax/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Fax_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Fax_Queues" }, { "type": "post", "url": "/api/fax/reports/transfer", "title": "Creates a new Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "delete", "url": "/api/fax/reports/transfer/{id}", "title": "Deletes a Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/describe", "title": "Gets table info about Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer", "title": "Gets a list of Fax Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/fax/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/fax/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/fax/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/fax/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/fax/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "get", "url": "/api/fax/reports/transfer/{id}", "title": "Gets a single Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "put", "url": "/api/fax/reports/transfer/{id}", "title": "Update an existing Fax Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFax_Transfer_Reports", "group": "Fax_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxTransferReport/index.js", "groupTitle": "Fax_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts", "title": "Creates a new Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "delete", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Deletes a Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts", "title": "Gets a list of Freshdesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Gets a single Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "get", "url": "/api/integrations/freshdesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "put", "url": "/api/integrations/freshdesk/accounts/{id}", "title": "Update an existing Freshdesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Accounts", "group": "Freshdesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskAccount/index.js", "groupTitle": "Freshdesk_Accounts" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations", "title": "Creates a new Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "delete", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Deletes a Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations", "title": "Gets a list of Freshdesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Gets a single Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "get", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "put", "url": "/api/integrations/freshdesk/configurations/{id}", "title": "Update an existing Freshdesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Configurations", "group": "Freshdesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskConfiguration/index.js", "groupTitle": "Freshdesk_Configurations" }, { "type": "post", "url": "/api/integrations/freshdesk/fields", "title": "Creates a new Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshdesk_Fields", "group": "Freshdesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "delete", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Deletes a Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields", "title": "Gets a list of Freshdesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshdesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshdesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshdesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshdesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshdesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "get", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Gets a single Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "put", "url": "/api/integrations/freshdesk/fields/{id}", "title": "Update an existing Freshdesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshdesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshdesk_Fields", "group": "Freshdesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshdeskField/index.js", "groupTitle": "Freshdesk_Fields" }, { "type": "post", "url": "/api/integrations/freshsales/accounts", "title": "Creates a new Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Accounts", "group": "Freshsales_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "delete", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Deletes a Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts", "title": "Gets a list of Freshsales Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Gets a single Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "get", "url": "/api/integrations/freshsales/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "put", "url": "/api/integrations/freshsales/accounts/{id}", "title": "Update an existing Freshsales Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Accounts", "group": "Freshsales_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesAccount/index.js", "groupTitle": "Freshsales_Accounts" }, { "type": "post", "url": "/api/integrations/freshsales/configurations", "title": "Creates a new Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Configurations", "group": "Freshsales_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "delete", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Deletes a Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations", "title": "Gets a list of Freshsales Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Gets a single Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "get", "url": "/api/integrations/freshsales/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "put", "url": "/api/integrations/freshsales/configurations/{id}", "title": "Update an existing Freshsales Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Configurations", "group": "Freshsales_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesConfiguration/index.js", "groupTitle": "Freshsales_Configurations" }, { "type": "post", "url": "/api/integrations/freshsales/fields", "title": "Creates a new Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateFreshsales_Fields", "group": "Freshsales_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "delete", "url": "/api/integrations/freshsales/fields/{id}", "title": "Deletes a Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields", "title": "Gets a list of Freshsales Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/freshsales/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/freshsales/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/freshsales/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/freshsales/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/freshsales/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "get", "url": "/api/integrations/freshsales/fields/{id}", "title": "Gets a single Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "put", "url": "/api/integrations/freshsales/fields/{id}", "title": "Update an existing Freshsales Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/freshsales/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateFreshsales_Fields", "group": "Freshsales_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intFreshsalesField/index.js", "groupTitle": "Freshsales_Fields" }, { "type": "post", "url": "/api/campaigns/{id}/blacklists", "title": "Add blacklists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/{id}/lists", "title": "Add lists to an IVR campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns/clone", "title": "Clone an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/campaigns", "title": "Creates a new IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIVR_Campaigns", "group": "IVR_Campaigns", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ivr\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "active", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "limitCalls", "description": "

Max 200 calls.

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}", "title": "Deletes a IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacklists", "title": "Get IVR campaign blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/finals", "title": "Gets IVR campaign hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hopper_histories", "title": "Gets IVR campaign hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/hoppers", "title": "Gets IVR campaign hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns", "title": "Gets a list of IVR Campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "GetIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/campaigns?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/campaigns?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/campaigns?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/campaigns?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/campaigns?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/lists", "title": "Get IVR campaign lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/blacklists", "title": "Remove blacklists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "delete", "url": "/api/campaigns/{id}/lists", "title": "Remove lists from an IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}", "title": "Gets a single IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "get", "url": "/api/campaigns/{id}/blacks", "title": "Gets IVR campaign hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "put", "url": "/api/campaigns/{id}", "title": "Update an existing IVR Campaign", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/campaigns/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIVR_Campaigns", "group": "IVR_Campaigns", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/campaign/index.js", "groupTitle": "IVR_Campaigns" }, { "type": "post", "url": "/api/integrations/reports", "title": "Creates a new Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntegration_Reports", "group": "Integration_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "integration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "eventChannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitStatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "ticketId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "integrationId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contacts", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interface", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcalledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentconnectAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "holdtime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentcomplete", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentcompleteAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "talktime", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentacw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentringnoanswer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentringnoanswerAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentdump", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "agentdumpAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastevent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "channelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannel", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "destchannelstate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destchannelstatedesc", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destlanguage", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destpriority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "destuniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "attachment", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "text", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SENT\"", "\"SENDING\"", "\"RECEIVED\"", "\"FAILED\"" ], "optional": true, "field": "status", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "url", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "app", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "projectId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "delete", "url": "/api/integrations/reports/{id}", "title": "Deletes a Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/describe", "title": "Gets table info about Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports", "title": "Gets a list of Integration Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "get", "url": "/api/integrations/reports/{id}", "title": "Gets a single Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "put", "url": "/api/integrations/reports/{id}", "title": "Update an existing Integration Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntegration_Reports", "group": "Integration_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/integrationReport/index.js", "groupTitle": "Integration_Reports" }, { "type": "post", "url": "/api/intervals", "title": "Creates a new Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateIntervals", "group": "Intervals", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "delete", "url": "/api/intervals/{id}", "title": "Deletes a Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals", "title": "Gets a list of Intervals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals -v -u {name}:{password}", "type": "json" } ], "name": "GetIntervals", "group": "Intervals", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/intervals?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/intervals?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/intervals?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/intervals?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/intervals?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}", "title": "Gets a single Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals", "title": "Creates a new sub interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -d '{\"interval\": \"00:00-08:30,mon-fri,*,*\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInterval", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/intervals/{id}/sub_intervals/create_many", "title": "Create new sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "get", "url": "/api/intervals/{id}/sub_intervals", "title": "Get sub intervals set", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id}/sub_intervals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "put", "url": "/api/intervals/{id}", "title": "Update an existing Interval", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/intervals/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateIntervals", "group": "Intervals", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/interval/index.js", "groupTitle": "Intervals" }, { "type": "post", "url": "/api/jira", "title": "Creates a new issue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jira -d '{\"key\": \"Bug\", \"description\": \"I can't do it!\"}' \\\n -H \"Content-Type: application/json\" -X POST -v -u {name}:{password}", "type": "json" } ], "name": "Creates_Issue", "group": "Issue", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"Bug\"" ], "optional": true, "field": "issuetype", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "summary", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jira/index.js", "groupTitle": "Issue" }, { "type": "post", "url": "/api/jscripty/answers/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyAnswerReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "delete", "url": "/api/jscripty/answers/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyAnswerReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/answers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/answers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/answers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/answers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/answers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "get", "url": "/api/jscripty/answers/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "put", "url": "/api/jscripty/answers/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/answers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyAnswerReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyAnswerReport/index.js", "groupTitle": "JscriptyAnswerReport" }, { "type": "post", "url": "/api/jscripty/questions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptyQuestionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": true, "field": "question", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "answer", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "questionId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "delete", "url": "/api/jscripty/questions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptyQuestionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/questions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/questions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/questions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/questions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/questions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "get", "url": "/api/jscripty/questions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "put", "url": "/api/jscripty/questions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/questions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptyQuestionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyQuestionReport/index.js", "groupTitle": "JscriptyQuestionReport" }, { "type": "post", "url": "/api/jscripty/sessions/reports", "title": "Creates a new Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateReports", "group": "JscriptySessionReport", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "starttime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "endtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "completed", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "delete", "url": "/api/jscripty/sessions/reports/{id}", "title": "Deletes a Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/describe", "title": "Gets table info about Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports", "title": "Gets a list of Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetReports", "group": "JscriptySessionReport", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/sessions/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/sessions/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/sessions/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/sessions/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/sessions/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}", "title": "Gets a single Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "get", "url": "/api/jscripty/sessions/reports/{id}/questions", "title": "Gets Jscripty Session questions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id}/questions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getQuestions", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "put", "url": "/api/jscripty/sessions/reports/{id}", "title": "Update an existing Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/sessions/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateReports", "group": "JscriptySessionReport", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptySessionReport/index.js", "groupTitle": "JscriptySessionReport" }, { "type": "post", "url": "/api/jscripty/projects/clone", "title": "Clone an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "post", "url": "/api/jscripty/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Jscripty_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "formData", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enableUncompleteSave", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendUnpauseOnSubmit", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "delete", "url": "/api/jscripty/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Jscripty_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/jscripty/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/jscripty/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/jscripty/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/jscripty/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/jscripty/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/answers", "title": "Gets jscripty project answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/sessions", "title": "Gets jscripty project sessions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/sessions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSessions", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/jscripty/projects/{id}/summary", "title": "Gets jscripty project summary", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id}/summary -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSummary", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "put", "url": "/api/jscripty/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/jscripty/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Jscripty_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/jscriptyProject/index.js", "groupTitle": "Jscripty_Projects" }, { "type": "get", "url": "/api/license", "title": "Gets License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license -v -u {name}:{password} -X GET", "type": "json" } ], "name": "index", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "put", "url": "/api/license/{id}", "title": "Update License Info", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/license/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "License", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/license/index.js", "groupTitle": "License" }, { "type": "post", "url": "/api/mail/accounts/{id}/users", "title": "Add agents to a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/in_servers", "title": "Creates a new IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddImap", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tls", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "connTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "authTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/out_servers", "title": "Creates a new SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -d '{\"host\": \"host\", \"username\": \"username\", \"password\": \"password\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmtp", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}", "title": "Deletes a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMailAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Mail_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/users", "title": "Gets agents from mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/in_servers", "title": "Gets account IMAP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetImap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/out_servers", "title": "Gets account SMTP server", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/users", "title": "Removes agents from a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/in_servers", "title": "Removes IMAP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/in_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveImmap", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/accounts/{id}/out_servers", "title": "Removes SMTP server from an account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/out_servers -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/interactions", "title": "Creates new interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -d '[{\"subject\": \"My printer is on fire!\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addInteraction", "group": "Mail_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts", "title": "Create a mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/interactions", "title": "Gets account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteraction", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/messages", "title": "Gets account messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "post", "url": "/api/mail/accounts/{id}/send", "title": "Send new mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/send -d '{from: '\"John Doe\" '}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendMail", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "put", "url": "/api/mail/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "get", "url": "/api/mail/accounts/{id}/verify", "title": "Verify mail account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/accounts/{id}/verify -v -u {name}:{password} -X GET", "type": "json" } ], "name": "verifySmtp", "group": "Mail_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailAccount/index.js", "groupTitle": "Mail_Accounts" }, { "type": "delete", "url": "/api/mail/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "get", "url": "/api/mail/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "put", "url": "/api/mail/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Mail_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailApplication/index.js", "groupTitle": "Mail_Applications" }, { "type": "post", "url": "/api/mail/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "inReplyTo", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "substatusAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgBody", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "lastMsgText", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Mail_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "post", "url": "/api/mail/interactions/{id}/messages", "title": "Creates new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -d '[{\"to\": \"sales@xcally.com\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Mail_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "plainBody", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "to", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "subject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "attach", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originTo", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "originCc", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "get", "url": "/api/mail/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "put", "url": "/api/mail/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Mail_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailInteraction/index.js", "groupTitle": "Mail_Interactions" }, { "type": "delete", "url": "/api/mail/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Mail_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/messages", "title": "Create a message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "createMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "get", "url": "/api/mail/messages/{id}/download", "title": "Gets message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "put", "url": "/api/mail/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Mail_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailMessage/index.js", "groupTitle": "Mail_Messages" }, { "type": "post", "url": "/api/mail/reports/queue", "title": "Creates a new Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Queue_Reports", "group": "Mail_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "delete", "url": "/api/mail/reports/queue/{id}", "title": "Deletes a Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/describe", "title": "Gets table info about Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue", "title": "Gets a list of Mail Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "get", "url": "/api/mail/reports/queue/{id}", "title": "Gets a single Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "put", "url": "/api/mail/reports/queue/{id}", "title": "Update an existing Mail Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Queue_Reports", "group": "Mail_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueueReport/index.js", "groupTitle": "Mail_Queue_Reports" }, { "type": "post", "url": "/api/mail/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Mail_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Mail_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "delete", "url": "/api/mail/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "get", "url": "/api/mail/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "put", "url": "/api/mail/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Mail_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Mail_Queues" }, { "type": "post", "url": "/api/mail/out_servers", "title": "Creates a new SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSMTPs", "group": "Mail_SMTP", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "user", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pass", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secure", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "service", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "authentication", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "delete", "url": "/api/mail/out_servers/{id}", "title": "Deletes a SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers", "title": "Gets a list of SMTPs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers -v -u {name}:{password}", "type": "json" } ], "name": "GetSMTPs", "group": "Mail_SMTP", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/out_servers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/out_servers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/out_servers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/out_servers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/out_servers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "get", "url": "/api/mail/out_servers/{id}", "title": "Gets a single SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "put", "url": "/api/mail/out_servers/{id}", "title": "Update an existing SMTP", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/out_servers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSMTPs", "group": "Mail_SMTP", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailServerOut/index.js", "groupTitle": "Mail_SMTP" }, { "type": "post", "url": "/api/mail/substatuses", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSubstatuses", "group": "Mail_Substatuses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "delete", "url": "/api/mail/substatuses/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/describe", "title": "Gets table info about Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses", "title": "Gets a list of Substatuses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses -v -u {name}:{password}", "type": "json" } ], "name": "GetSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/substatuses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/substatuses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/substatuses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/substatuses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/substatuses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "get", "url": "/api/mail/substatuses/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "put", "url": "/api/mail/substatuses/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/substatuses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSubstatuses", "group": "Mail_Substatuses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailSubstatus/index.js", "groupTitle": "Mail_Substatuses" }, { "type": "post", "url": "/api/mail/reports/transfer", "title": "Creates a new Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "delete", "url": "/api/mail/reports/transfer/{id}", "title": "Deletes a Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/describe", "title": "Gets table info about Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer", "title": "Gets a list of Mail Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/mail/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/mail/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/mail/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/mail/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/mail/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/mail/reports/transfer/{id}", "title": "Gets a single Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "put", "url": "/api/mail/reports/transfer/{id}", "title": "Update an existing Mail Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMail_Transfer_Reports", "group": "Mail_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailTransferReport/index.js", "groupTitle": "Mail_Transfer_Reports" }, { "type": "get", "url": "/api/members/reports/describe", "title": "Gets table info about Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports", "title": "Gets a list of Member Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetMember_Reports", "group": "Member_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/members/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/members/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/members/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/members/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/members/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/members/reports/{id}", "title": "Gets a single Member Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/members/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMember_Reports", "group": "Member_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/memberReport/index.js", "groupTitle": "Member_Reports" }, { "type": "get", "url": "/api/migrations", "title": "Gets a list of Migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/migrations -v -u {name}:{password}", "type": "json" } ], "name": "GetMigrations", "group": "Migrations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/migrations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/migrations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/migrations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/migrations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/migrations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/migration/index.js", "groupTitle": "Migrations" }, { "type": "post", "url": "/api/voice/networks", "title": "Create a new network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Networks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "delete", "url": "/api/voice/networks/{id}", "title": "Deletes a network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Networks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks", "title": "Gets a list of Networks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks -v -u {name}:{password}", "type": "json" } ], "name": "GetNetworks", "group": "Networks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/networks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/networks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/networks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/networks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/networks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "get", "url": "/api/networks/{id}", "title": "Gets a single Network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/networks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowNetworks", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "put", "url": "/api/voice/networks/{id}", "title": "Update an existing network", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/networks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Networks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/network/index.js", "groupTitle": "Networks" }, { "type": "post", "url": "/api/notifications", "title": "Send notification to user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/notifications -d '{\"text\": \"Hello!\", \"TemplateId\": 1}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Send", "group": "Notifications", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/notification/index.js", "groupTitle": "Notifications" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/users", "title": "Add agents to a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "replyUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mapKey", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Openchannel_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/users", "title": "Gets agents from openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/users", "title": "Removes agents from a openchannel account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "delete", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Openchannel_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "get", "url": "/api/openchannel/accounts/{id}/interactions", "title": "Gets Openchannel Account Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

Follow this link to check the documentation:

https://wiki.xcallymotion.com/display/XMV/New+Channels+Configuration+Steps#NewChannelsConfigurationSteps-BuildyourownChannelservice

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/accounts/{id}/send", "title": "Send new openchannel message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id}/send -d '{from: 'John Doe', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendOpenchannel", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "put", "url": "/api/openchannel/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Openchannel_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelAccount/index.js", "groupTitle": "Openchannel_Accounts" }, { "type": "post", "url": "/api/openchannel/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Openchannel_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "delete", "url": "/api/openchannel/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Openchannel_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "get", "url": "/api/openchannel/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "put", "url": "/api/openchannel/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Openchannel_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelApplication/index.js", "groupTitle": "Openchannel_Applications" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "externalUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Openchannel_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "delete", "url": "/api/openchannel/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Openchannel_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "get", "url": "/api/openchannel/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "put", "url": "/api/openchannel/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Openchannel_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelInteraction/index.js", "groupTitle": "Openchannel_Interactions" }, { "type": "post", "url": "/api/openchannel/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Openchannel_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "delete", "url": "/api/openchannel/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Openchannel_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "get", "url": "/api/openchannel/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "put", "url": "/api/openchannel/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Openchannel_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelMessage/index.js", "groupTitle": "Openchannel_Messages" }, { "type": "post", "url": "/api/openchannel/reports/queue", "title": "Creates a new Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/queue/{id}", "title": "Deletes a Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/describe", "title": "Gets table info about Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue", "title": "Gets a list of Openchannel Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "get", "url": "/api/openchannel/reports/queue/{id}", "title": "Gets a single Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "put", "url": "/api/openchannel/reports/queue/{id}", "title": "Update an existing Openchannel Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Queue_Reports", "group": "Openchannel_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueueReport/index.js", "groupTitle": "Openchannel_Queue_Reports" }, { "type": "post", "url": "/api/openchannel/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Openchannel_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Openchannel_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "get", "url": "/api/openchannel/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "put", "url": "/api/openchannel/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Openchannel_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Openchannel_Queues" }, { "type": "post", "url": "/api/openchannel/reports/transfer", "title": "Creates a new Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "delete", "url": "/api/openchannel/reports/transfer/{id}", "title": "Deletes a Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/describe", "title": "Gets table info about Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer", "title": "Gets a list of Openchannel Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/openchannel/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/openchannel/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/openchannel/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/openchannel/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/openchannel/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "get", "url": "/api/openchannel/reports/transfer/{id}", "title": "Gets a single Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "put", "url": "/api/openchannel/reports/transfer/{id}", "title": "Update an existing Openchannel Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateOpenchannel_Transfer_Reports", "group": "Openchannel_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelTransferReport/index.js", "groupTitle": "Openchannel_Transfer_Reports" }, { "type": "post", "url": "/api/pauses", "title": "Creates a new Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreatePauses", "group": "Pauses", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "delete", "url": "/api/pauses/{id}", "title": "Deletes a Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses", "title": "Gets a list of Pauses", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses -v -u {name}:{password}", "type": "json" } ], "name": "GetPauses", "group": "Pauses", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/pauses?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/pauses?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/pauses?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/pauses?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/pauses?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/pauses/{id}", "title": "Gets a single Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "put", "url": "/api/pauses/{id}", "title": "Update an existing Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pauses/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePauses", "group": "Pauses", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pause/index.js", "groupTitle": "Pauses" }, { "type": "get", "url": "/api/plugins", "title": "Gets a list of Plugins", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -v -u {name}:{password}", "type": "json" } ], "name": "GetPlugins", "group": "Plugins", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/plugins?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/plugins?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/plugins?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/plugins?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/plugins?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}", "title": "Gets a single Plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPlugins", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/plugins/{id}", "title": "Delete a plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroyPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/{id}/download", "title": "Download plugin source code", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "put", "url": "/api/plugins/{id}", "title": "Update an existing plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updatePlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins", "title": "Upload new plugin", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "uploadPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "post", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -H 'Content-Type: application/json' -X POST", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "get", "url": "/api/plugins/webhook?hostname={host}&port={port}&encoding={encoding}&json={json}&path={path}", "title": "Redirect a plugin request to the specified path", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/plugins/webhook?port={port}&path={path} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "webhookPlugin", "group": "Plugins", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/plugin/index.js", "groupTitle": "Plugins" }, { "type": "delete", "url": "/api/pm2/{id}", "title": "Deletes an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2/{id}", "title": "Gets a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/pm2", "title": "Gets pm2 processes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -v -u {name}:{password}", "type": "json" } ], "name": "GetPm2Processes", "group": "Pm2", "description": "

Motion returns the pm2 processes list.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "post", "url": "/api/pm2", "title": "Start a single pm2 process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2 -d '{\"name\": \"process_name\", \"script\": \"/index.js\"}'\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "StartPm2Process", "group": "Pm2", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "script", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "put", "url": "/api/pm2/{id}", "title": "Update an existing process", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/pm2/{id} -d '{\"status\": \"online\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "UpdatePm2Process", "group": "Pm2", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/pm2/index.js", "groupTitle": "Pm2" }, { "type": "get", "url": "/api/rpc/campaigns/", "title": "Gets a list of campaigns", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/campaigns -v -u {name}:{password}", "type": "json" } ], "name": "Campaigns", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime campaigns parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/accounts", "title": "Gets a list of FaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/accounts -v -u {name}:{password}", "type": "json" } ], "name": "FaxAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "put", "url": "/api/rpc/agents/:id/capacity", "title": "Sets agent capacity", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/capacity -v -u {name}:{password}", "type": "json" } ], "name": "RTAgentCapacity", "group": "RPC_Realtime", "description": "

Motion will return the current agent capacity.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/agents", "title": "Gets a list of RTAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents -v -u {name}:{password}", "type": "json" } ], "name": "RTAgents", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime agents parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues", "title": "Gets a list of RTChatQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime chat queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues", "title": "Gets a list of RTFaxQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime fax queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/accounts", "title": "Gets a list of RTMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/accounts -v -u {name}:{password}", "type": "json" } ], "name": "RTMailAccounts", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail account parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues", "title": "Gets a list of RTMailQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime mail queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues", "title": "Gets a list of RTOpenchannelQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime openchannel queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound/channels", "title": "Gets a list of RTOutboundChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTOutboundChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues", "title": "Gets a list of RTSmsQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime sms queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/telephones", "title": "Gets a list of RTTelephones", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/telephones -v -u {name}:{password}", "type": "json" } ], "name": "RTTelephones", "group": "RPC_Realtime", "description": "

Motion will return a list of telephones parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/trunks", "title": "Gets a list of RTTrunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/trunks -v -u {name}:{password}", "type": "json" } ], "name": "RTTrunks", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime trunks parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/mixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel mixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannelStopMixMonitor", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels/{uniqueid}/stopmixmonitor -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannelStopMixMonitor", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channel stopmixmonitor.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/channels", "title": "Gets a list of RTVoiceChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}", "title": "Gets a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannel", "group": "RPC_Realtime", "description": "

Motion will return a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/hangup", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/hangup -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelHangup", "group": "RPC_Realtime", "description": "

Motion will hangup a specific realtime voice queue channel.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten}", "title": "Hangup a single RTVoiceQueueChannel", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels/{uniqueid}/redirect/{exten} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueueChannelRedirect", "group": "RPC_Realtime", "description": "

Motion will redirect a specific realtime voice queue channel to a specific extension.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/preview/{id}", "title": "Gets a single preview contact", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/preview/{id} -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuePreview", "group": "RPC_Realtime", "description": "

Motion will return a specific preview contact.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/outbound", "title": "Gets a list of RTOutbound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/outbound -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime outbound parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues", "title": "Gets a list of RTVoiceQueues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues parameters.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/channels", "title": "Gets a list of RTVoiceQueuesChannels", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/channels -v -u {name}:{password}", "type": "json" } ], "name": "RTVoiceQueuesChannels", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime voice queues channels.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/{id}", "title": "Gets a single RTChatQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTChatQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/{id}", "title": "Gets a single RTFaxQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTFaxQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/{id}", "title": "Gets a single RTMailQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTMailQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/{id}", "title": "Gets a single RTOpenchannelQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTOpenchannelQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/{id}", "title": "Gets a single RTSmsQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTSmsQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/voice/queues/{id}", "title": "Gets a single RTVoiceQueue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRTVoiceQueues", "group": "RPC_Realtime", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/agents/:id/notify", "title": "Notify message to a specific agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/agents/:id/notify -d '{\"messageId\": \"5080\", \"channel\": \"mail\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "agentNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific agent.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/chat/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "chatQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/chat/queues/waitinginteractions", "title": "Gets a list of chatQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/chat/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "chatQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting chat queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/fax/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "faxQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/fax/queues/waitinginteractions", "title": "Gets a list of faxQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/fax/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "faxQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting fax queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/mail/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "mailQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/mail/queues/waitinginteractions", "title": "Gets a list of mailQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/mail/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "mailQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting mail queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/openchannel/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "openchannelQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/:id/waitinginteractions", "title": "Gets a list of openchannelQueuesIdWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/:id/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesIdWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/openchannel/queues/waitinginteractions", "title": "Gets a list of openchannelQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/openchannel/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "openchannelQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting openchannel queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/rpc/sms/queues/:id/notify", "title": "Notify message to a specific queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/:id/notify -d '{\"messageId\": \"5080\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "smsQueueNotify", "group": "RPC_Realtime", "description": "

Notify message to a specific queue.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "get", "url": "/api/rpc/sms/queues/waitinginteractions", "title": "Gets a list of smsQueuesWaitingInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/rpc/sms/queues/waitinginteractions -v -u {name}:{password}", "type": "json" } ], "name": "smsQueuesWaitingInteractions", "group": "RPC_Realtime", "description": "

Motion will return a list of realtime waiting sms queues interctions.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/rpc/index.js", "groupTitle": "RPC_Realtime" }, { "type": "post", "url": "/api/integrations/salesforce/accounts", "title": "Creates a new Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Accounts", "group": "Salesforce_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "securityToken", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "delete", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Deletes a Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts", "title": "Gets a list of Salesforce Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Gets a single Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "get", "url": "/api/integrations/salesforce/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "put", "url": "/api/integrations/salesforce/accounts/{id}", "title": "Update an existing Salesforce Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Accounts", "group": "Salesforce_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceAccount/index.js", "groupTitle": "Salesforce_Accounts" }, { "type": "post", "url": "/api/integrations/salesforce/configurations", "title": "Creates a new Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Configurations", "group": "Salesforce_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Task\"", "\"Case\"" ], "optional": true, "field": "ticketType", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"nothing\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleCreate", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "delete", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Deletes a Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations", "title": "Gets a list of Salesforce Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Gets a single Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "get", "url": "/api/integrations/salesforce/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "put", "url": "/api/integrations/salesforce/configurations/{id}", "title": "Update an existing Salesforce Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Configurations", "group": "Salesforce_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceConfiguration/index.js", "groupTitle": "Salesforce_Configurations" }, { "type": "post", "url": "/api/integrations/salesforce/fields", "title": "Creates a new Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSalesforce_Fields", "group": "Salesforce_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "delete", "url": "/api/integrations/salesforce/fields/{id}", "title": "Deletes a Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields", "title": "Gets a list of Salesforce Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/salesforce/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/salesforce/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/salesforce/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/salesforce/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/salesforce/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "get", "url": "/api/integrations/salesforce/fields/{id}", "title": "Gets a single Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "put", "url": "/api/integrations/salesforce/fields/{id}", "title": "Update an existing Salesforce Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/salesforce/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSalesforce_Fields", "group": "Salesforce_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSalesforceField/index.js", "groupTitle": "Salesforce_Fields" }, { "type": "post", "url": "/api/schedules", "title": "Creates a new Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSchedules", "group": "Schedules", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "cron", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "startAt", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "endAt", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "subtractNumber", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"years\"", "\"quarters\"", "\"months\"", "\"weeks\"", "\"days\"", "\"hours\"", "\"minutes\"" ], "optional": false, "field": "subtractUnit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"csv\"", "\"pdf\"", "\"xlsx\"" ], "optional": false, "field": "output", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"custom\"", "\"default\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendMail", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "cc", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "bcc", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "sendIfEmpty", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "delete", "url": "/api/schedules/{id}", "title": "Deletes a Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules", "title": "Gets a list of Schedules", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules -v -u {name}:{password}", "type": "json" } ], "name": "GetSchedules", "group": "Schedules", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/schedules?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/schedules?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/schedules?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/schedules?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/schedules?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}", "title": "Gets a single Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "get", "url": "/api/schedules/{id}/run", "title": "Run Scheduler", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id}/run -v -u {name}:{password} -X GET", "type": "json" } ], "name": "run", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "put", "url": "/api/schedules/{id}", "title": "Update an existing Schedule", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/schedules/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSchedules", "group": "Schedules", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/schedule/index.js", "groupTitle": "Schedules" }, { "type": "post", "url": "/api/screen/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Screen_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interactionid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "startedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Screen_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/screen/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/screen/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/screen/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/screen/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/screen/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "delete", "url": "/api/screen/recordings/{id}", "title": "Delete screen recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "get", "url": "/api/screen/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "put", "url": "/api/screen/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/screen/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Screen_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/screenRecording/index.js", "groupTitle": "Screen_Recordings" }, { "type": "post", "url": "/api/integrations/servicenow/accounts", "title": "Creates a new Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Accounts", "group": "Servicenow_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "delete", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Deletes a Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts", "title": "Gets a list of Servicenow Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Gets a single Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "get", "url": "/api/integrations/servicenow/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "put", "url": "/api/integrations/servicenow/accounts/{id}", "title": "Update an existing Servicenow Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Accounts", "group": "Servicenow_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowAccount/index.js", "groupTitle": "Servicenow_Accounts" }, { "type": "post", "url": "/api/integrations/servicenow/configurations", "title": "Creates a new Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Configurations", "group": "Servicenow_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "delete", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Deletes a Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations", "title": "Gets a list of Servicenow Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Gets a single Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "get", "url": "/api/integrations/servicenow/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "put", "url": "/api/integrations/servicenow/configurations/{id}", "title": "Update an existing Servicenow Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Configurations", "group": "Servicenow_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowConfiguration/index.js", "groupTitle": "Servicenow_Configurations" }, { "type": "post", "url": "/api/integrations/servicenow/fields", "title": "Creates a new Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateServicenow_Fields", "group": "Servicenow_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "delete", "url": "/api/integrations/servicenow/fields/{id}", "title": "Deletes a Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields", "title": "Gets a list of Servicenow Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/servicenow/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/servicenow/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/servicenow/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/servicenow/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/servicenow/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/integrations/servicenow/fields/{id}", "title": "Gets a single Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "put", "url": "/api/integrations/servicenow/fields/{id}", "title": "Update an existing Servicenow Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/servicenow/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateServicenow_Fields", "group": "Servicenow_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intServicenowField/index.js", "groupTitle": "Servicenow_Fields" }, { "type": "get", "url": "/api/settings", "title": "Gets a list of Settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings -v -u {name}:{password}", "type": "json" } ], "name": "GetSettings", "group": "Settings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/settings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/settings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/settings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/settings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/settings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}", "title": "Gets a single Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/favicon", "title": "Add Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo", "title": "Add logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/logo_login", "title": "Add logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/settings/{id}/preferred", "title": "Add Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/now", "title": "Get Server Current Date", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/now -v -X GET", "type": "json" } ], "name": "getDate", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/favicon", "title": "Get Favicon", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/favicon -v -X GET", "type": "json" } ], "name": "getFavicon", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/gdpr", "title": "Get gdpr settings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/gdpr -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getGdpr", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo", "title": "Get logo", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo -v -X GET", "type": "json" } ], "name": "getLogo", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/logo_login", "title": "Get logo login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/logo_login -v -X GET", "type": "json" } ], "name": "getLogoLogin", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "get", "url": "/api/settings/{id}/preferred", "title": "Get Preferred", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id}/preferred -v -X GET", "type": "json" } ], "name": "getPreferred", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "put", "url": "/api/settings/{id}", "title": "Update an existing Setting", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/settings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSettings", "group": "Settings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/setting/index.js", "groupTitle": "Settings" }, { "type": "post", "url": "/api/sms/accounts/{id}/users", "title": "Add agents to a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"", "\"skebby\"", "\"connectel\"", "\"clicksend\"", "\"plivo\"", "\"clickatell\"", "\"bandwidth\"", "\"csc\"", "\"infobip\"", "\"intelepeer\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"SI\"", "\"TI\"", "\"GP\"" ], "optional": true, "field": "smsMethod", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "apiKey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "applicationId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "senderString", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "deliveryReport", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "baseUrl", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Sms_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/users", "title": "Gets agents from sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/users", "title": "Removes agents from a sms account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "delete", "url": "/api/sms/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Sms_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/interactions", "title": "Gets Sms Account interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getInteractions", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new sms message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/send", "title": "Send new sms message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendSms", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "get", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status as get request", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X GET", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/accounts/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id}/status -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "put", "url": "/api/sms/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Sms_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsAccount/index.js", "groupTitle": "Sms_Accounts" }, { "type": "post", "url": "/api/sms/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Sms_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "delete", "url": "/api/sms/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Sms_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "get", "url": "/api/sms/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "put", "url": "/api/sms/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Sms_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsApplication/index.js", "groupTitle": "Sms_Applications" }, { "type": "post", "url": "/api/sms/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Sms_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "delete", "url": "/api/sms/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Sms_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "get", "url": "/api/sms/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "put", "url": "/api/sms/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Sms_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsInteraction/index.js", "groupTitle": "Sms_Interactions" }, { "type": "post", "url": "/api/sms/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Sms_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "delete", "url": "/api/sms/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Sms_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "get", "url": "/api/sms/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "put", "url": "/api/sms/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Sms_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsMessage/index.js", "groupTitle": "Sms_Messages" }, { "type": "post", "url": "/api/sms/reports/queue", "title": "Creates a new Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Queue_Reports", "group": "Sms_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "delete", "url": "/api/sms/reports/queue/{id}", "title": "Deletes a Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/describe", "title": "Gets table info about Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue", "title": "Gets a list of Sms Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "get", "url": "/api/sms/reports/queue/{id}", "title": "Gets a single Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "put", "url": "/api/sms/reports/queue/{id}", "title": "Update an existing Sms Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Queue_Reports", "group": "Sms_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueueReport/index.js", "groupTitle": "Sms_Queue_Reports" }, { "type": "post", "url": "/api/sms/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Sms_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Sms_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "delete", "url": "/api/sms/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "get", "url": "/api/sms/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "put", "url": "/api/sms/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Sms_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Sms_Queues" }, { "type": "post", "url": "/api/sms/reports/transfer", "title": "Creates a new Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "delete", "url": "/api/sms/reports/transfer/{id}", "title": "Deletes a Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/describe", "title": "Gets table info about Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer", "title": "Gets a list of Sms Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sms/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sms/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sms/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sms/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sms/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sms/reports/transfer/{id}", "title": "Gets a single Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "put", "url": "/api/sms/reports/transfer/{id}", "title": "Update an existing Sms Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSms_Transfer_Reports", "group": "Sms_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsTransferReport/index.js", "groupTitle": "Sms_Transfer_Reports" }, { "type": "get", "url": "/api/sounds", "title": "Gets a list of Sounds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -v -u {name}:{password}", "type": "json" } ], "name": "GetSounds", "group": "Sounds", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/sounds?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/sounds?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/sounds?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/sounds?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/sounds?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}", "title": "Gets a single Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSounds", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/sounds", "title": "Create a new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "delete", "url": "/api/sounds/{id}", "title": "Deletes a sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroySound", "group": "Sounds", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "get", "url": "/api/sounds/{id}/download", "title": "Download Sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "put", "url": "/api/sounds", "title": "Update an existing new sound", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sounds -d '[\"name\": \"sound_name\", \"description\": \"sound_desc\"]' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSound", "group": "Sounds", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/sound/index.js", "groupTitle": "Sounds" }, { "type": "post", "url": "/api/square/details/reports", "title": "Creates a new Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Detail_Reports", "group": "Square_Details_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "node", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "application", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "delete", "url": "/api/square/details/reports/{id}", "title": "Deletes a Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/describe", "title": "Gets table info about Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports", "title": "Gets a list of Square Detail Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/details/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/details/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/details/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/details/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/details/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "get", "url": "/api/square/details/reports/{id}", "title": "Gets a single Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "put", "url": "/api/square/details/reports/{id}", "title": "Update an existing Square Detail Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/details/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Detail_Reports", "group": "Square_Details_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReportDetail/index.js", "groupTitle": "Square_Details_Reports" }, { "type": "post", "url": "/api/square/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Square_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "delete", "url": "/api/square/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Square_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "get", "url": "/api/square/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "put", "url": "/api/square/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Square_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareMessage/index.js", "groupTitle": "Square_Messages" }, { "type": "post", "url": "/api/square/odbc", "title": "Creates a new ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateODBCs", "group": "Square_ODBC", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dsn", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "delete", "url": "/api/square/odbc/{id}", "title": "Deletes a ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc", "title": "Gets a list of ODBCs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc -v -u {name}:{password}", "type": "json" } ], "name": "GetODBCs", "group": "Square_ODBC", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/odbc?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/odbc?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/odbc?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/odbc?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/odbc?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}", "title": "Gets a single ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "get", "url": "/api/square/odbc/{id}/test", "title": "Test Odbc", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id}/test -v -u {name}:{password} -X GET", "type": "json" } ], "name": "test", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "put", "url": "/api/square/odbc/{id}", "title": "Update an existing ODBC", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/odbc/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateODBCs", "group": "Square_ODBC", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareOdbc/index.js", "groupTitle": "Square_ODBC" }, { "type": "post", "url": "/api/square/projects", "title": "Creates a new Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateProjects", "group": "Square_Projects", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notes", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "preproduction", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "production", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "publishedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}", "title": "Deletes a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects", "title": "Gets a list of Projects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects -v -u {name}:{password}", "type": "json" } ], "name": "GetProjects", "group": "Square_Projects", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/projects?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/projects?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/projects?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/projects?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/projects?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}", "title": "Gets a single Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/projects/{id}/users", "title": "Adds user permissions to a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "get", "url": "/api/square/projects/{id}/users", "title": "Gets users permissions from Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "delete", "url": "/api/square/projects/{id}/users", "title": "Removes user permissions from a Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "removeUsers", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "put", "url": "/api/square/projects/{id}", "title": "Update an existing Project", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/projects/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateProjects", "group": "Square_Projects", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareProject/index.js", "groupTitle": "Square_Projects" }, { "type": "post", "url": "/api/square/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Square_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "projectName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "saveName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "filename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "savePath", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Square_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "delete", "url": "/api/square/recordings/{id}/delete", "title": "Delete recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/delete -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "get", "url": "/api/square/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "put", "url": "/api/square/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Square_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareRecording/index.js", "groupTitle": "Square_Recordings" }, { "type": "post", "url": "/api/square/reports", "title": "Creates a new Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSquare_Reports", "group": "Square_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "network", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "network_script", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "request", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "version", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingani2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callington", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callingtns", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dnid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "rdnis", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "enhanced", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "threadid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "project_name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "bot", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "delete", "url": "/api/square/reports/{id}", "title": "Deletes a Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/describe", "title": "Gets table info about Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports", "title": "Gets a list of Square Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetSquare_Reports", "group": "Square_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/square/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/square/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/square/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/square/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/square/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "get", "url": "/api/square/reports/{id}", "title": "Gets a single Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "put", "url": "/api/square/reports/{id}", "title": "Update an existing Square Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/square/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSquare_Reports", "group": "Square_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/squareReport/index.js", "groupTitle": "Square_Reports" }, { "type": "post", "url": "/api/integrations/sugarcrm/configurations", "title": "Creates a new SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "delete", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Deletes a SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations", "title": "Gets a list of SugarCRM Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Gets a single SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "put", "url": "/api/integrations/sugarcrm/configurations/{id}", "title": "Update an existing SugarCRM Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarCRM_Configurations", "group": "SugarCRM_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "SugarCRM_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts", "title": "Creates a new Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "delete", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Deletes a Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts", "title": "Gets a list of Sugarcrm Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Gets a single Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "post", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "put", "url": "/api/integrations/sugarcrm/accounts/{id}", "title": "Update an existing Sugarcrm Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Accounts", "group": "Sugarcrm_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmAccount/index.js", "groupTitle": "Sugarcrm_Accounts" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "get", "url": "/api/integrations/sugarcrm/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Sugarcrm_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmConfiguration/index.js", "groupTitle": "Sugarcrm_Configurations" }, { "type": "post", "url": "/api/integrations/sugarcrm/fields", "title": "Creates a new Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateSugarcrm_Fields", "group": "Sugarcrm_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "delete", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Deletes a Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields", "title": "Gets a list of Sugarcrm Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/sugarcrm/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/sugarcrm/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/sugarcrm/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/sugarcrm/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/sugarcrm/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Gets a single Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "put", "url": "/api/integrations/sugarcrm/fields/{id}", "title": "Update an existing Sugarcrm Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/sugarcrm/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateSugarcrm_Fields", "group": "Sugarcrm_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intSugarcrmField/index.js", "groupTitle": "Sugarcrm_Fields" }, { "type": "get", "url": "/api/system/process", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "get", "url": "/api/system", "title": "Gets system information", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/system -v -u {name}:{password}", "type": "json" } ], "name": "GetSystemInformation", "group": "System_Information", "description": "

Motion returns the system information.

", "version": "0.0.0", "filename": "server/api/system/index.js", "groupTitle": "System_Information" }, { "type": "post", "url": "/api/tags", "title": "Creates a new Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTags", "group": "Tags", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "color", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "delete", "url": "/api/tags/{id}", "title": "Deletes a Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTags", "group": "Tags", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags", "title": "Gets a list of Tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags -v -u {name}:{password}", "type": "json" } ], "name": "GetTags", "group": "Tags", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/tags?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/tags?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/tags?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/tags?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/tags?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "get", "url": "/api/tags/{id}", "title": "Gets a single Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "put", "url": "/api/tags/{id}", "title": "Update an existing Tag", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/tags/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTags", "group": "Tags", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/tag/index.js", "groupTitle": "Tags" }, { "type": "post", "url": "/api/teams/{id}/queues", "title": "Add queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams", "title": "Creates a new Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTeams", "group": "Teams", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}", "title": "Deletes a Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/users", "title": "Gets agents from team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel={channel} -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams", "title": "Gets a list of Teams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Teams", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/teams?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/teams?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/teams?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/teams?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/teams?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/users", "title": "Removes agents from a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/teams/{id}/queues", "title": "Remove queues to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/queues?channel=voice&ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/openchannel/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/openchannel/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/openchannelQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/mail/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/mail/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/mailQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/voice/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/fax/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/fax/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/faxQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/chat/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/chat/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/chatQueue/index.js", "groupTitle": "Teams" }, { "type": "delete", "url": "/api/sms/queues/{id}/teams", "title": "Remove teams from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/sms/queues/{id}/teams -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/smsQueue/index.js", "groupTitle": "Teams" }, { "type": "get", "url": "/api/teams/{id}", "title": "Gets a single Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/teams/{id}/users", "title": "Adds agents to a team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAgents", "group": "Teams", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "put", "url": "/api/teams/{id}", "title": "Update an existing Team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/teams/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTeams", "group": "Teams", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/team/index.js", "groupTitle": "Teams" }, { "type": "post", "url": "/api/templates", "title": "Creates a new Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTemplates", "group": "Templates", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "html", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "delete", "url": "/api/templates/{id}", "title": "Deletes a Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates", "title": "Gets a list of Templates", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates -v -u {name}:{password}", "type": "json" } ], "name": "GetTemplates", "group": "Templates", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/templates?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/templates?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/templates?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/templates?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/templates?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "get", "url": "/api/templates/{id}", "title": "Gets a single Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "put", "url": "/api/templates/{id}", "title": "Update an existing Template", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/templates/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTemplates", "group": "Templates", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/template/index.js", "groupTitle": "Templates" }, { "type": "post", "url": "/api/triggers", "title": "Creates a new Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTriggers", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "status", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "delete", "url": "/api/triggers/{id}", "title": "Deletes a Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers", "title": "Gets a list of Triggers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers -v -u {name}:{password}", "type": "json" } ], "name": "GetTriggers", "group": "Triggers", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/triggers?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/triggers?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/triggers?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/triggers?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/triggers?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}", "title": "Gets a single Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/actions", "title": "Creates new actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -d '{\"action\": \"contactManager\",\"data1\": \"1\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAction", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "action", "description": "

Allowed values: contactManager, integration, motionbar, jscripty, urlForward, browser, bot, script

" }, { "group": "Body", "type": "String", "optional": true, "field": "data1", "description": "

contactManager[ListId], integration[intName(zendesk)], motionbar[Popup(0),URL(1),WinApp(2)], urlForward[GET,POST], browser[TemplateId(0),URL(1)]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data2", "description": "

integration[AccountId], motionbar[TemplateId,URL,WinAppPath], urlForward[URL]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data3", "description": "

motionbar[NULL,NULL,WinAppArguments]

" }, { "group": "Body", "type": "String", "optional": true, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "data6", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "data7", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/all_conditions", "title": "Creates a new \"AND\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAllCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/triggers/{id}/any_conditions", "title": "Creates a new \"OR\"condition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -d '{\"field\": \"name\", \"operator\": \"equal\", \"value\": \"John Doe\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnyCondition", "group": "Triggers", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "field", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "value", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/actions", "title": "Gets Trigger Actions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/actions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getActions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/all_conditions", "title": "Gets \"AND\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/all_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAllConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "get", "url": "/api/triggers/{id}/any_conditions", "title": "Gets \"OR\" Trigger Conditions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id}/any_conditions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnyConditions", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "put", "url": "/api/triggers/{id}", "title": "Update an existing Trigger", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/triggers/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTriggers", "group": "Triggers", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trigger/index.js", "groupTitle": "Triggers" }, { "type": "post", "url": "/api/trunks/clone", "title": "Clone an existing Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/trunks", "title": "Create a new trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Trunks", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"friend\"", "\"user\"", "\"peer\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "context", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"ALLOWED_NOT_SCREENED\"", "\"ALLOWED_PASSED_SCREEN\"", "\"ALLOWED_FAILED_SCREEN\"", "\"ALLOWED\"", "\"PROHIB_NOT_SCREENED\"", "\"PROHIB_PASSED_SCREEN\"", "\"PROHIB_FAILED_SCREEN\"", "\"PROHIB\"" ], "optional": true, "field": "callingpres", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "deny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "permit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "md5secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remotesecret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transport", "description": "

String is deprecated. Please use an Array as ["udp", "tcp"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rfc2833\"", "\"info\"", "\"shortinfo\"", "\"inband\"", "\"auto\"" ], "optional": true, "field": "dtmfmode", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"outgoing\"" ], "optional": true, "field": "directmedia", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "directrtpsetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediapermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "directmediadeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nat", "description": "

String is deprecated. Please use an Array as ["force_rport", "comedia"]

" }, { "group": "Body", "type": "String", "optional": true, "field": "callgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedcallgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "namedpickupgroup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "language", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tonezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disallow", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "allow", "description": "

String is deprecated. Please use an Array as ["ulaw", "alaw", "alaw"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autoframing", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "insecure", "description": "

String is deprecated. Please use an Array as ["port", "invite"]

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trustrpid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "trust_id_outbound", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"never\"" ], "optional": true, "field": "progressinband", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "promiscredir", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "useclientcode", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "setvar", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "callcounter", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "busylevel", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowoverlap", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowsubscribe", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "allowtransfer", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ignoresdpversion", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "subscribecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "template", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"always\"" ], "optional": true, "field": "videosupport", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxcallbitrate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "rfc2833compensate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"accept\"", "\"refuse\"", "\"originate\"" ], "optional": true, "field": "session_timers", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_expires", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "session_minse", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"uac\"", "\"uas\"" ], "optional": true, "field": "session_refresher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_usertpsource", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "regexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromdomain", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fromuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "port", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "qualify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "keepalive", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultip", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultuser", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtptimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpholdtimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rtpkeepalive", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"pai\"" ], "optional": true, "field": "sendrpid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "outboundproxy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callbackextension", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timert1", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timerb", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "qualifyfreq", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactpermit", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactdeny", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "contactacl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "unsolicited_mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "use_q850_reason", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxforwards", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "encryption", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "avpf", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "force_avp", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "icesupport", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "dtlsenable", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"fingerprint\"", "\"certificate\"" ], "optional": true, "field": "dtlsverify", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dtlsrekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscertfile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsprivatekey", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscipher", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscafile", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlscapath", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"active\"", "\"passive\"", "\"actpass\"" ], "optional": true, "field": "dtlssetup", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dtlsfingerprint", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "usereqphone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordonfeature", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordofffeature", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "call_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "registertrying", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "subscribemwi", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "vmexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohinterpret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mohsuggest", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "parkinglot", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"nonat\"", "\"update\"", "\"update,nonat\"" ], "optional": true, "field": "canreinvite", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "registry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "otherFields", "description": "" }, { "group": "Body", "type": "Boolean", "optional": false, "field": "active", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "t38pt_udptl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "delete", "url": "/api/trunks/{id}", "title": "Deletes a trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Trunks", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks", "title": "Gets a list of Trunks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks -v -u {name}:{password}", "type": "json" } ], "name": "GetTrunks", "group": "Trunks", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/trunks?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/trunks?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/trunks?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/trunks?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/trunks?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "get", "url": "/api/trunks/{id}", "title": "Gets a single Trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTrunks", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "put", "url": "/api/trunks/{id}", "title": "Update an existing trunk", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/trunks/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Trunks", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/trunk/index.js", "groupTitle": "Trunks" }, { "type": "post", "url": "/api/user_has_chat_interactions", "title": "Creates a new UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserChatInteractions", "group": "UserChatInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "ChatInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "delete", "url": "/api/user_has_chat_interactions/{id}", "title": "Deletes a UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions", "title": "Gets a list of UserChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_chat_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_chat_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_chat_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_chat_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_chat_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "get", "url": "/api/user_has_chat_interactions/{id}", "title": "Gets a single UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "put", "url": "/api/user_has_chat_interactions/{id}", "title": "Update an existing UserChatInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_chat_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserChatInteractions", "group": "UserChatInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserChatInteraction/index.js", "groupTitle": "UserChatInteractions" }, { "type": "post", "url": "/api/user_has_fax_interactions", "title": "Creates a new UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserFaxInteractions", "group": "UserFaxInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "FaxInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "delete", "url": "/api/user_has_fax_interactions/{id}", "title": "Deletes a UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions", "title": "Gets a list of UserFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_fax_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_fax_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_fax_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_fax_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_fax_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "get", "url": "/api/user_has_fax_interactions/{id}", "title": "Gets a single UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "put", "url": "/api/user_has_fax_interactions/{id}", "title": "Update an existing UserFaxInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_fax_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserFaxInteractions", "group": "UserFaxInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserFaxInteraction/index.js", "groupTitle": "UserFaxInteractions" }, { "type": "post", "url": "/api/user_has_mail_interactions", "title": "Creates a new UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserMailInteractions", "group": "UserMailInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "MailInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "delete", "url": "/api/user_has_mail_interactions/{id}", "title": "Deletes a UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions", "title": "Gets a list of UserMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_mail_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_mail_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_mail_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_mail_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_mail_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "get", "url": "/api/user_has_mail_interactions/{id}", "title": "Gets a single UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "put", "url": "/api/user_has_mail_interactions/{id}", "title": "Update an existing UserMailInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_mail_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserMailInteractions", "group": "UserMailInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserMailInteraction/index.js", "groupTitle": "UserMailInteractions" }, { "type": "post", "url": "/api/userNotifications", "title": "Send notification to user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userNotifications -d '{\"text\": \"Hello!\", \"TemplateId\": 1}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Send", "group": "UserNotifications", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userNotification/index.js", "groupTitle": "UserNotifications" }, { "type": "post", "url": "/api/user_has_openchannel_interactions", "title": "Creates a new UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "OpenchannelInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "delete", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Deletes a UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions", "title": "Gets a list of UserOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_openchannel_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_openchannel_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_openchannel_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_openchannel_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_openchannel_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "get", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Gets a single UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "put", "url": "/api/user_has_openchannel_interactions/{id}", "title": "Update an existing UserOpenchannelInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_openchannel_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserOpenchannelInteractions", "group": "UserOpenchannelInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserOpenchannelInteraction/index.js", "groupTitle": "UserOpenchannelInteractions" }, { "type": "post", "url": "/api/user_has_sms_interactions", "title": "Creates a new UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserSmsInteractions", "group": "UserSmsInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "SmsInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "delete", "url": "/api/user_has_sms_interactions/{id}", "title": "Deletes a UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions", "title": "Gets a list of UserSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_sms_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_sms_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_sms_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_sms_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_sms_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "get", "url": "/api/user_has_sms_interactions/{id}", "title": "Gets a single UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "put", "url": "/api/user_has_sms_interactions/{id}", "title": "Update an existing UserSmsInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_sms_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserSmsInteractions", "group": "UserSmsInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserSmsInteraction/index.js", "groupTitle": "UserSmsInteractions" }, { "type": "post", "url": "/api/user_has_whatsapp_interactions", "title": "Creates a new UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": true, "field": "WhatsappInteractionId", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "UserId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "delete", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Deletes a UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions", "title": "Gets a list of UserWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/user_has_whatsapp_interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/user_has_whatsapp_interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/user_has_whatsapp_interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/user_has_whatsapp_interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/user_has_whatsapp_interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "get", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Gets a single UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "put", "url": "/api/user_has_whatsapp_interactions/{id}", "title": "Update an existing UserWhatsappInteraction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/user_has_whatsapp_interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUserWhatsappInteractions", "group": "UserWhatsappInteractions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/UserWhatsappInteraction/index.js", "groupTitle": "UserWhatsappInteractions" }, { "type": "post", "url": "/api/userProfile/resources", "title": "Creates a new User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Resources", "group": "User_Profile_Resources", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "resourceId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "delete", "url": "/api/userProfile/resources/{id}", "title": "Deletes a User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/describe", "title": "Gets table info about User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources", "title": "Gets a list of User Profile Resources", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/resources?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/resources?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/resources?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/resources?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/resources?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "get", "url": "/api/userProfile/resources/{id}", "title": "Gets a single User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "put", "url": "/api/userProfile/resources/{id}", "title": "Update an existing User Profile Resource", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/resources/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Resources", "group": "User_Profile_Resources", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileResource/index.js", "groupTitle": "User_Profile_Resources" }, { "type": "post", "url": "/api/userProfile/sections", "title": "Creates a new User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profile_Sections", "group": "User_Profile_Sections", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "category", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "sectionId", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "enabled", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "autoAssociation", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "crudPermissions", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "delete", "url": "/api/userProfile/sections/{id}", "title": "Deletes a User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/describe", "title": "Gets table info about User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections", "title": "Gets a list of User Profile Sections", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfile/sections?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfile/sections?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfile/sections?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfile/sections?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfile/sections?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "get", "url": "/api/userProfile/sections/{id}", "title": "Gets a single User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "put", "url": "/api/userProfile/sections/{id}", "title": "Update an existing User Profile Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfile/sections/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profile_Sections", "group": "User_Profile_Sections", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfileSection/index.js", "groupTitle": "User_Profile_Sections" }, { "type": "post", "url": "/api/userProfiles/{id}/resources", "title": "Add resources' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/{id}/sections", "title": "Add sections' permissions to User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -d '[{\"sectionId\": \"name\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles/clone", "title": "Clone an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/userProfiles", "title": "Creates a new User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateUser_Profiles", "group": "User_Profiles", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "crudPermissions", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}", "title": "Deletes a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/describe", "title": "Gets table info about User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/resources?section={section}", "title": "Get Resources assigned to a Section", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?section={section} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}/sections", "title": "Get sections associated to a User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles", "title": "Gets a list of User Profiles", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles -v -u {name}:{password}", "type": "json" } ], "name": "GetUser_Profiles", "group": "User_Profiles", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/userProfiles?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/userProfiles?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/userProfiles?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/userProfiles?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/userProfiles?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/resources", "title": "Removes resources' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/resources?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveResources", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "delete", "url": "/api/userProfiles/{id}/sections", "title": "Removes sections' permissions from User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id}/sections?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSections", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "get", "url": "/api/userProfiles/{id}", "title": "Gets a single User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "put", "url": "/api/userProfiles/{id}", "title": "Update an existing User Profile", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/userProfiles/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUser_Profiles", "group": "User_Profiles", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/userProfile/index.js", "groupTitle": "User_Profiles" }, { "type": "post", "url": "/api/users/{id}/chat_interactions", "title": "Add chat interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/chat_websites", "title": "Add a Chat Website to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/contacts", "title": "Add contacts to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -d '{\"ids\": [1,2]}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddContacts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_accounts", "title": "Add a Fax Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/fax_interactions", "title": "Add fax interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_accounts", "title": "Add a Mail Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/mail_interactions", "title": "Add mail interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_accounts", "title": "Add a Open Channel Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/openchannel_interactions", "title": "Add openchannel interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/queues", "title": "Add queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddQueues", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_accounts", "title": "Add a Sms Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/sms_interactions", "title": "Add sms interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/square_projects", "title": "Add a Square Project to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/teams", "title": "Add teams to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_accounts", "title": "Add a Whatsapp Account to a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/whatsapp_interactions", "title": "Add Whatsapp interaction tabs to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}/password", "title": "Change user password", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/password -d '{\"oldPassword\": \"1234\", \"newPassword\": \"5678\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "ChangePwd", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users", "title": "Create a new user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/api_key", "title": "Create a new API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}", "title": "Deletes a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/describe", "title": "Gets table info about Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/agents", "title": "GetAgents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/agents -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/api_key", "title": "Get the API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/groups", "title": "GetChatGroups", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/groups -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatGroups", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat/interactions", "title": "GetChatInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/chat_websites", "title": "GetChatWebsites", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/contacts", "title": "GetContacts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/contacts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetContacts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax_accounts", "title": "GetFaxAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/fax/interactions", "title": "GetFaxInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/lists", "title": "GetLists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail_accounts", "title": "GetMailAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/mail/interactions", "title": "GetMailInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel_accounts", "title": "GetOpenchannelAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/openchannel/interactions", "title": "GetOpenchannelInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/prefixes", "title": "GetPrefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/prefixes -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetPrefixes", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues?channel={channel}", "title": "Gets Queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues/?channel={channel} -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetQueues", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/recordings", "title": "GetRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/scheduled_calls", "title": "GetScheduledCalls", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/scheduled_calls -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScheduledCalls", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/screen_recordings", "title": "GetScreenRecordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/screen_recordings -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetScreenRecordings", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms_accounts", "title": "GetSmsAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/sms/interactions", "title": "GetSmsInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/square_projects", "title": "GetSquareProjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/teams", "title": "GetTeams", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users", "title": "Gets a list of Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users -v -u {name}:{password}", "type": "json" } ], "name": "GetUsers", "group": "Users", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/users?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/users?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/users?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/users?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/users?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/queues_rt", "title": "GetVoiceQueuesRt", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues_rt -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetVoiceQueuesRt", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp_accounts", "title": "GetWhatsappAccounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/whatsapp/interactions", "title": "GetWhatsappInteractions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp/interactions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/login", "title": "Login", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/login -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Login", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/logout", "title": "Logout", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/logout -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Logout", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/pause", "title": "Pause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/pause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Pause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/api_key", "title": "Remove API access key for the user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/:id/api_key -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveApiKey", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/chat_websites", "title": "Removes a Chat Website from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/chat_websites?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveChatWebsites", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_accounts", "title": "Removes a Fax Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/fax_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/fax_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveFaxInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_accounts", "title": "Removes a Mail Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/mail_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/mail_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveMailInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_accounts", "title": "Removes a Open Channel Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/openchannel_interactions", "title": "Removes openchannel interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/openchannel_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveOpenchannelInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/queues", "title": "Remove queues to an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/queues?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveQueues", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_accounts", "title": "Removes a Sms Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/sms_interactions", "title": "Removes interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/sms_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSmsInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/square_projects", "title": "Removes a Square Project from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/square_projects?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSquareProjects", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/teams", "title": "Removes teams from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/teams?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTeams", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_accounts", "title": "Removes a Whatsapp Account from a user", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_accounts?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappAccounts", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "delete", "url": "/api/users/{id}/whatsapp_interactions", "title": "Removes Whatsapp interactions from an agent", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/whatsapp_interactions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveWhatsappInteractions", "group": "Users", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}", "title": "Gets a single User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/unpause", "title": "Unpause", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/unpause -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Unpause", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/whoami", "title": "WhoAmI", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/whoami -v -u {name}:{password} -X GET", "type": "json" } ], "name": "WhoAmI", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/{id}/avatar", "title": "Add avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -H 'Content-Type: multipart/form-data' -F 'file=@{filename}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/users/create_many", "title": "Create Users", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/create_many -d '[{\"name\": \"john.doe\", \"role\": \"user\", \"...\": \"...\"}]' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "bulkCreate", "group": "Users", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "get", "url": "/api/users/{id}/avatar", "title": "Get avatar", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id}/avatar -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAvatar", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "put", "url": "/api/users/{id}", "title": "Update an existing User", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/users/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateUsers", "group": "Users", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/user/index.js", "groupTitle": "Users" }, { "type": "post", "url": "/api/variables", "title": "Creates a new Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVariables", "group": "Variables", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "delete", "url": "/api/variables/{id}", "title": "Deletes a Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables", "title": "Gets a list of Variables", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables -v -u {name}:{password}", "type": "json" } ], "name": "GetVariables", "group": "Variables", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/variables?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/variables?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/variables?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/variables?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/variables?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/variables/{id}", "title": "Gets a single Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "put", "url": "/api/variables/{id}", "title": "Update an existing Variable", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/variables/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVariables", "group": "Variables", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/variable/index.js", "groupTitle": "Variables" }, { "type": "get", "url": "/api/version/fetch", "title": "Fetch git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/fetch -v -u {name}:{password}", "type": "json" } ], "name": "FetchVersion", "group": "Version", "description": "

Motion run the following command: git fetch origin master

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version", "title": "Gets version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version -v -u {name}:{password}", "type": "json" } ], "name": "GetVersion", "group": "Version", "description": "

Motion returns the current and latest motion version.

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/migrations", "title": "Launch database migrations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/migrations -v -u {name}:{password}", "type": "json" } ], "name": "MigrateVersion", "group": "Version", "description": "

Motion launch the database migrations, according to the application version

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/pull", "title": "Pull git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/pull -v -u {name}:{password}", "type": "json" } ], "name": "PullVersion", "group": "Version", "description": "

Motion run the following command: git pull

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/reset", "title": "Reset git version", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/reset -v -u {name}:{password}", "type": "json" } ], "name": "ResetVersion", "group": "Version", "description": "

Motion run the following command: git reset --hard FETCH_HEAD

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/version/restart", "title": "Restart motion2 after update", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/version/restart -v -u {name}:{password}", "type": "json" } ], "name": "RestartVersion", "group": "Version", "description": "

Motion run the following command: pm2 restart motion

", "version": "0.0.0", "filename": "server/api/version/index.js", "groupTitle": "Version" }, { "type": "get", "url": "/api/voice/agents/reports/describe", "title": "Gets table info about Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports", "title": "Gets a list of Agent Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/agents/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/agents/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/agents/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/agents/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/agents/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/agents/reports/{id}", "title": "Gets a single Agent Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/agents/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAgent_Reports", "group": "Voice_Agent_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceAgentReport/index.js", "groupTitle": "Voice_Agent_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/describe", "title": "Gets table info about Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports", "title": "Gets a list of Call Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/calls/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/calls/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/calls/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/calls/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/calls/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "get", "url": "/api/voice/calls/reports/{id}", "title": "Gets a single Call Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCall_Reports", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "put", "url": "/api/voice/calls/reports/{id}", "title": "Update a single cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/calls/reports/{id} -d '{\"userDispositio\": \"OK\"}' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Call_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceCallReport/index.js", "groupTitle": "Voice_Call_Reports" }, { "type": "post", "url": "/api/voice/chanspy", "title": "Creates a new ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateChanSpy", "group": "Voice_ChanSpy", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "prefix", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "options", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "auth", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "record", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "recordingFormat", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "delete", "url": "/api/voice/chanspy/{id}", "title": "Deletes a ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy", "title": "Gets a list of ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy -v -u {name}:{password}", "type": "json" } ], "name": "GetChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/chanspy?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/chanspy?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/chanspy?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/chanspy?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/chanspy?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "get", "url": "/api/voice/chanspy/{id}", "title": "Gets a single ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "put", "url": "/api/voice/chanspy/{id}", "title": "Update an existing ChanSpy", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/chanspy/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateChanSpy", "group": "Voice_ChanSpy", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceChanSpy/index.js", "groupTitle": "Voice_ChanSpy" }, { "type": "post", "url": "/api/voice/contexts", "title": "Create a new context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password} -X POST", "type": "json" } ], "name": "Create", "group": "Voice_Contexts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "defaultEntry", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "delete", "url": "/api/voice/contexts/{id}", "title": "Deletes a context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "Delete", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts", "title": "Gets a list of Contexts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts -v -u {name}:{password}", "type": "json" } ], "name": "GetContexts", "group": "Voice_Contexts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/contexts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/contexts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/contexts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/contexts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/contexts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/contexts/{id}", "title": "Gets a single Context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowContexts", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "put", "url": "/api/voice/contexts/{id}", "title": "Update an existing context", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/contexts/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Contexts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceContext/index.js", "groupTitle": "Voice_Contexts" }, { "type": "get", "url": "/api/voice/dials/reports/describe", "title": "Gets table info about Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports", "title": "Gets a list of Dial Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/dials/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/dials/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/dials/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/dials/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/dials/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "get", "url": "/api/voice/dials/reports/{id}", "title": "Gets a single Dial Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/dials/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowDial_Reports", "group": "Voice_Dial_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceDialReport/index.js", "groupTitle": "Voice_Dial_Reports" }, { "type": "delete", "url": "/api/voice/extensions/{id}", "title": "Deletes a Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions", "title": "Gets a list of Extensions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -v -u {name}:{password}", "type": "json" } ], "name": "GetExtensions", "group": "Voice_Extensions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/extensions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/extensions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/extensions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/extensions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/extensions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "get", "url": "/api/voice/extensions/{id}", "title": "Gets a single Extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowExtensions", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id}/applications -d '[{\"app\": \"Set\", \"appdata\": \"CALLERDNID=${CALLER(dnid)}\"}]' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/extensions", "title": "Create an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "put", "url": "/api/voice/extensions/{id}", "title": "Update an extension", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/extensions/{id} -d '{\"exten\": \"12345\", \"context\": \"from-custom\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "update", "group": "Voice_Extensions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceExtension/index.js", "groupTitle": "Voice_Extensions" }, { "type": "post", "url": "/api/voice/mohs", "title": "Create a new a new MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -d '{\"name\": \"xmas_musics\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mohs/{id}/sounds", "title": "Add sound to MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -d '{\"id\": 1}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}", "title": "Deletes an MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DestroyMoh", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs", "title": "Gets a list of Music On Holds", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs -v -u {name}:{password}", "type": "json" } ], "name": "GetMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mohs?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mohs?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mohs?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mohs?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mohs?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}/sounds", "title": "Gets sounds from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "GetSounds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "delete", "url": "/api/voice/mohs/{id}/sounds/{id2}", "title": "Remove sound from MOH", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id}/sounds/{id2} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveSound", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "get", "url": "/api/voice/mohs/{id}", "title": "Gets a single Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "put", "url": "/api/voice/mohs/{id}", "title": "Update an existing Music On Hold", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mohs/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMusic_On_Holds", "group": "Voice_MOHs", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMusicOnHold/index.js", "groupTitle": "Voice_MOHs" }, { "type": "post", "url": "/api/voice/mails", "title": "Creates a new Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMails", "group": "Voice_Mails", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "customer_id", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "mailbox", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "fullname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "email", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "pager", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tz", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "attach", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "saycid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialout", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callback", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "review", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "operator", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "envelope", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sayduration", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "saydurationm", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "sendvoicemail", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "delete", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "nextaftercmd", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcename", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "forcegreetings", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": false, "field": "hidefromdir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "stamp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailsubject", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "emailbody", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxsecs", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "maxmsg", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "delete", "url": "/api/voice/mails/{id}", "title": "Deletes a Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails", "title": "Gets a list of Mails", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails -v -u {name}:{password}", "type": "json" } ], "name": "GetMails", "group": "Voice_Mails", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}", "title": "Gets a single Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "get", "url": "/api/voice/mails/{id}/messages", "title": "Gets voice mail messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "put", "url": "/api/voice/mails/{id}", "title": "Update an existing Mail", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMails", "group": "Voice_Mails", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMail/index.js", "groupTitle": "Voice_Mails" }, { "type": "post", "url": "/api/voice/mails/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Voice_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "msgnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dir", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "macrocontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "callerid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "origtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "duration", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxuser", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "mailboxcontext", "description": "" }, { "group": "Body", "type": "Blob", "optional": true, "field": "recording", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "flag", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "msg_id", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "stamp", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "delete", "url": "/api/voice/mails/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Voice_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/mails/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/mails/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/mails/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/mails/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/mails/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "/api/voice/mails/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "get", "url": "voice/mails/messages/{id}/download", "title": "Download Voice Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}voice/mails/messages/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "put", "url": "/api/voice/mails/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/mails/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Voice_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceMailMessage/index.js", "groupTitle": "Voice_Messages" }, { "type": "post", "url": "/api/voice/prefixes/{id}/users", "title": "Add agents to a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}", "title": "Deletes a Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeletePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/describe", "title": "Gets table info about Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribePrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}/users", "title": "Gets agents from prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes", "title": "Gets a list of Prefixes", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -v -u {name}:{password}", "type": "json" } ], "name": "GetPrefixes", "group": "Voice_Prefixes", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/prefixes?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/prefixes?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/prefixes?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/prefixes?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/prefixes?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "delete", "url": "/api/voice/prefixes/{id}/users", "title": "Removes agents from a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/prefixes/{id}", "title": "Gets a single Prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowPrefixes", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "put", "url": "/api/voice/prefixes/{id}", "title": "Update an existing prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes/{id} -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "Update", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "post", "url": "/api/voice/prefixes", "title": "Create a prefix", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/prefixes -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "create", "group": "Voice_Prefixes", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voicePrefix/index.js", "groupTitle": "Voice_Prefixes" }, { "type": "get", "url": "/api/voice/queues/reports/describe", "title": "Gets table info about Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports", "title": "Gets a list of Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/{id}", "title": "Gets a single Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueue_Reports", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "get", "url": "/api/voice/queues/reports/index", "title": "Get Voice Queues Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/reports/index -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getVoiceQueuesReport", "group": "Voice_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueueReport/index.js", "groupTitle": "Voice_Queue_Reports" }, { "type": "post", "url": "/api/voice/queues/{id}/users", "title": "Add agents to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/blacklists", "title": "Add blacklists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/lists", "title": "Add lists to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/{id}/teams", "title": "Add teams to queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues/clone", "title": "Clone an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/clone -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CloneQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Voice_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"inbound\"", "\"outbound\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "musiconhold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rr\"", "\"ringall\"", "\"leastrecent\"", "\"fewestcalls\"", "\"random\"", "\"rrmemory\"", "\"linear\"", "\"wrandom\"", "\"rrordered\"" ], "optional": false, "field": "strategy", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "servicelevel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "penaltymemberslimit", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "retry", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "timeoutpriority", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "weight", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "wrapuptime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autofill", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"all\"" ], "optional": true, "field": "autopause", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "autopausedelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopausebusy", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "autopauseunavail", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "maxlen", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setinterfacevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueueentryvar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "setqueuevar", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "eventmemberstatus", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membermacro", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membergosub", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "min_announce_frequency", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "periodic_announce_frequency", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "random_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "relative_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"", "\"once\"" ], "optional": true, "field": "announce_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "announce_position", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "announce_to_first_user", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "announce_position_limit", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"0\"", "\"5\"", "\"10\"", "\"15\"", "\"20\"", "\"30\"" ], "optional": true, "field": "announce_round_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "monitor_type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_youarenext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thereare", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_callswaiting", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_holdtime", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minute", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_minutes", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_seconds", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_thankyou", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_reporthold", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity1", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_quantity2", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue_less_than", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "periodic_announce", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinempty", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leavewhenempty", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "reportholdtime", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "ringinuse", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "memberdelay", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"yes\"", "\"no\"" ], "optional": true, "field": "timeoutrestart", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "defaultrule", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "acw", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "acwTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialActive", "description": "

Active/Disactive Campaign

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"preview\"", "\"progressive\"", "\"power\"", "\"predictive\"", "\"booked\"" ], "optional": true, "field": "dialMethod", "description": "

Dial Method.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitChannel", "description": "

Max 9999 channels, 0 means unlimited.

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialLimitQueue", "description": "

Max 9999 member in queue(min:1, max:9999), 0 means unlimited.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPowerLevel", "description": "

Power Level: Calls for agents (min:1, max:10).

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"agentBusyFactor\"", "\"dropRate\"" ], "optional": true, "field": "dialPredictiveOptimization", "description": "

Only for predictive method.

" }, { "group": "Body", "type": "Float", "optional": true, "field": "dialPredictiveOptimizationPercentage", "description": "

Predictive Optimization Percentage (min: 1, max: 95)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveInterval", "description": "

Interval Predictive Minutes (min:5 max:30)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialOriginateCallerIdNumber", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialOriginateTimeout", "description": "

Originate Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueOptions", "description": "

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialQueueTimeout", "description": "

Queue Timeout Seconds (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionMaxRetry", "description": "

#Congestion Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCongestionRetryFrequency", "description": "

Congestion Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyMaxRetry", "description": "

#Busy Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialBusyRetryFrequency", "description": "

Busy Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerMaxRetry", "description": "

#NoAnswer Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoAnswerRetryFrequency", "description": "

NoAnswer Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialGlobalMaxRetry", "description": "

#Global Max Retry (min:1, max:999)

" }, { "group": "Body", "type": "String", "optional": true, "field": "dialTimezone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialGlobalInterval", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialPrefix", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"always\"", "\"never\"", "\"onlyIfOpen\"" ], "optional": true, "field": "dialCheckDuplicateType", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAMDActive", "description": "

Active/Disactive AMD

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDInitialSilence", "description": "

#AMD Initial Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDGreeting", "description": "

#AMD Greeting

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDAfterGreetingSilence", "description": "

#AMD After Greeting Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDTotalAnalysisTime", "description": "

#AMD Total Analysis Time

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMinWordLength", "description": "

#AMD Min Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDBetweenWordsSilence", "description": "

#AMD Between Words Silence

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumNumberOfWords", "description": "

#AMD Maximum Number Of Words

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDSilenceThreshold", "description": "

#AMD Silence Threshold (min:0, max:32767)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAMDMaximumWordLength", "description": "

#AMD Maximum Word Length

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRecallMeTimeout", "description": "

#RecallMe Timeout (min:1)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialRecallInQueue", "description": "

Active/Disactive Recall In Queue

" }, { "group": "Body", "type": "String", "allowedValues": [ "\"DESC\"", "\"ASC\"" ], "optional": true, "field": "dialOrderByScheduledAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dialQueueProject2", "description": "

AGI queue option (use: agi://127.0.0.1/square,<project_name>)

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupClient", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "dialAgiAfterHangupAgent", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialRandomLastDigitCallerIdNumber", "description": "

Random Last Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialCutDigit", "description": "

Cut Digit (min:1, max:15)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberMaxRetry", "description": "

#NoSuchNumber Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialNoSuchNumberRetryFrequency", "description": "

NoSuchNumber Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropMaxRetry", "description": "

#Drop Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialDropRetryFrequency", "description": "

Drop Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedMaxRetry", "description": "

#Abandoned Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAbandonedRetryFrequency", "description": "

Abandoned Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineMaxRetry", "description": "

#Machine Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialMachineRetryFrequency", "description": "

Machine Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectMaxRetry", "description": "

#AgentReject Retry (min:1, max:999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialAgentRejectRetryFrequency", "description": "

AgentReject Retry Frequency Minutes (min:1, max:99999)

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMaxThreshold", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "dialPredictiveIntervalMinThreshold", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacklists", "title": "Get queue blacklists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/finals", "title": "Gets queue hopper finals", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_finals -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperFinals", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hopper_histories", "title": "Gets queue hopper histories", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_histories -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHopperHistories", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/hoppers", "title": "Gets queue hoppers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hoppers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetHoppers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/lists", "title": "Get queue lists", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/members", "title": "Gets queue members", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/members -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetMembers", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Voice_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/teams", "title": "Gets queue team", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/teams -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetTeams", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/blacklists", "title": "Remove blacklists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/blacklists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveBlackLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "delete", "url": "/api/voice/queues/{id}/lists", "title": "Remove lists from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/lists?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveLists", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "get", "url": "/api/voice/queues/{id}/blacks", "title": "Gets queue hopper blacks", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id}/hopper_black -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getHopperBlacks", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "put", "url": "/api/voice/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Voice_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueue/index.js", "groupTitle": "Voice_Queues" }, { "type": "post", "url": "/api/voice/recordings", "title": "Creates a new Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateRecordings", "group": "Voice_Recordings", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Virtual", "optional": true, "field": "format", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "membername", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "calleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "connectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "rating", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "queue", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userSecondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userThirdDisposition", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "location", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeName", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transcribeStatus", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileUri", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "fileText", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "failureReason", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sentiment", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sPositive", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNegative", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sNeutral", "description": "" }, { "group": "Body", "type": "Float", "optional": true, "field": "sMixed", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "tempSentiment", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "createdAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "updatedAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/describe", "title": "Gets table info about Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings", "title": "Gets a list of Recordings", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings -v -u {name}:{password}", "type": "json" } ], "name": "GetRecordings", "group": "Voice_Recordings", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/recordings?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/recordings?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/recordings?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/recordings?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/recordings?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}", "title": "Gets a single Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "delete", "url": "/api/voice/recordings/{id}", "title": "Delete voice recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "destroy", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/download", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/downloads", "title": "Download Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/downloads -v -u {name}:{password} -X GET", "type": "json" } ], "name": "downloads", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -d '{\"runSentiment\": \"true\"}' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "get", "url": "/api/voice/recordings/{id}/transcribe", "title": "Run Transcribe Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id}/transcribe -v -u {name}:{password} -X GET", "type": "json" } ], "name": "transcribe", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "put", "url": "/api/voice/recordings/{id}", "title": "Update an existing Recording", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/recordings/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateRecordings", "group": "Voice_Recordings", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceRecording/index.js", "groupTitle": "Voice_Recordings" }, { "type": "post", "url": "/api/voice/transfers/reports", "title": "Creates a new Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateTransfer_Reports", "group": "Voice_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"blind\"", "\"attended\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "result", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereraccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferercontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfererlinkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereechannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridnum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecalleridname", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinenum", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeconnectedlinename", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeaccountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereecontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereeexten", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transfereelinkedid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"Yes\"", "\"No\"" ], "optional": true, "field": "isexternal", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "context", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "extension", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "delete", "url": "/api/voice/transfers/reports/{id}", "title": "Deletes a Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports/describe", "title": "Gets table info about Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports", "title": "Gets a list of Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports -v -u {name}:{password}", "type": "json" } ], "name": "GetTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voice/transfers/reports?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voice/transfers/reports?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voice/transfers/reports?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voice/transfers/reports?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voice/transfers/reports?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "get", "url": "/api/voice/transfers/reports/{id}", "title": "Gets a single Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "put", "url": "/api/voice/transfers/reports/{id}", "title": "Update an existing Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voice/transfers/reports/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateTransfer_Reports", "group": "Voice_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceTransferReport/index.js", "groupTitle": "Voice_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/vtiger/accounts", "title": "Creates a new Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Accounts", "group": "Vtiger_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "moduleName", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "accessKey", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "delete", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Deletes a Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts", "title": "Gets a list of Vtiger Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Gets a single Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "get", "url": "/api/integrations/vtiger/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "put", "url": "/api/integrations/vtiger/accounts/{id}", "title": "Update an existing Vtiger Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Accounts", "group": "Vtiger_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerAccount/index.js", "groupTitle": "Vtiger_Accounts" }, { "type": "post", "url": "/api/integrations/vtiger/configurations", "title": "Creates a new Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Configurations", "group": "Vtiger_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "delete", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Deletes a Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations", "title": "Gets a list of Vtiger Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Gets a single Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "get", "url": "/api/integrations/vtiger/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "put", "url": "/api/integrations/vtiger/configurations/{id}", "title": "Update an existing Vtiger Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Configurations", "group": "Vtiger_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerConfiguration/index.js", "groupTitle": "Vtiger_Configurations" }, { "type": "post", "url": "/api/integrations/vtiger/fields", "title": "Creates a new Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVtiger_Fields", "group": "Vtiger_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "delete", "url": "/api/integrations/vtiger/fields/{id}", "title": "Deletes a Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields", "title": "Gets a list of Vtiger Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/vtiger/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/vtiger/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/vtiger/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/vtiger/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/vtiger/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "get", "url": "/api/integrations/vtiger/fields/{id}", "title": "Gets a single Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "put", "url": "/api/integrations/vtiger/fields/{id}", "title": "Update an existing Vtiger Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/vtiger/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVtiger_Fields", "group": "Vtiger_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intVtigerField/index.js", "groupTitle": "Vtiger_Fields" }, { "type": "post", "url": "/api/webbar/answer", "title": "answer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/answer -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_answer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/calls", "title": "webrtc call list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/calls -d '{\"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_calls", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hangup", "title": "hangup webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hangup -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hangup", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/hold", "title": "hold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/hold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/unhold", "title": "unhold webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/unhold -d '{\"sessionId\": \"\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_hold", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/originate", "title": "Originate new webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/originate -d '{\"callNumber\": \"0119692844\", \"userId\": 54}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_originate", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "callNumber", "description": "" }, { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callerId", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callbackUrl", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/webbar/transfer", "title": "blind transfer webrtc call", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/webbar/transfer -d '{\"userId\": 54, \"sessionId\":\"\", \"transferNumber\":\"\"}' \\\n -H \"Content-Type: application/json\" -X POST", "type": "json" } ], "name": "Web_Bar_transfer", "group": "WebBar", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "number", "optional": false, "field": "userId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "sessionId", "description": "" }, { "group": "Body", "type": "string", "optional": false, "field": "transferNumber", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/webbar/index.js", "groupTitle": "WebBar" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/users", "title": "Add agents to a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts", "title": "Creates a new Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateAccounts", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "remote", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"twilio\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountSid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "authToken", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "notificationTemplate", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationSound", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "notificationShake", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "waitForTheAssignedAgent", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "queueTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "queueTransferTimeout", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "agentTransfer", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "agentTransferTimeout", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "mandatoryDispositionPauseId", "description": "

Status to put when mandatory disposition is enabled

" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "mandatoryDisposition", "description": "

Enabled/disables mandatory dispo on a queue

" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}", "title": "Deletes a Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/describe", "title": "Gets table info about Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts", "title": "Gets a list of Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/users", "title": "Gets agents from whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users -v -u {name}:{password} -X GET", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/users", "title": "Removes agents from a whatsapp account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Removes canned answers from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "delete", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Removes dispositions from account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}", "title": "Gets a single Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/accept", "title": "Accepts message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/accept \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "acceptMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Creates new canned answer", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -d '{\"name\": \"vip\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addAnswer", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "key", "description": "" }, { "group": "Body", "type": "Text", "optional": false, "field": "value", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "Virtual", "optional": true, "field": "name", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Creates new applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -d '[{\"app\": \"queue\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addApplications", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Creates new disposition", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -d '{\"name\": \"vip\"}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addDisposition", "group": "Whatsapp_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"first\"", "\"second\"", "\"third\"" ], "optional": false, "field": "level", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/canned_answers", "title": "Gets account canned answers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/canned_answers -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getAnswers", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/applications", "title": "Gets account applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/applications -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getApplications", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "get", "url": "/api/whatsapp/accounts/{id}/dispositions", "title": "Gets account dispositions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/dispositions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDispositions", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/notify", "title": "Notify new message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/notify -d '{\"body\": \"hello world\", \"...\": \"...\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "notify", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

This API is used to create a new whatsapp message to be sent to the system.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/messages/{id}/reject", "title": "Rejects message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/reject \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "rejectMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/accounts/{id}/send", "title": "Send new whatsapp message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id}/send -d '{from: '+39333123456', body: 'This is a test'}' -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "sendWhatsapp", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/messages/{id}/status", "title": "Receive message status", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id}/status \\ \n -H 'Content-Type: application/json' -v -X POST", "type": "json" } ], "name": "statusMessage", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "put", "url": "/api/whatsapp/accounts/{id}", "title": "Update an existing Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateAccounts", "group": "Whatsapp_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappAccount/index.js", "groupTitle": "Whatsapp_Accounts" }, { "type": "post", "url": "/api/whatsapp/applications", "title": "Creates a new Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateApplications", "group": "Whatsapp_Applications", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Integer", "optional": false, "field": "priority", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "app", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "appdata", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "interval", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "delete", "url": "/api/whatsapp/applications/{id}", "title": "Deletes a Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications", "title": "Gets a list of Applications", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications -v -u {name}:{password}", "type": "json" } ], "name": "GetApplications", "group": "Whatsapp_Applications", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/applications?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/applications?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/applications?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/applications?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/applications?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "get", "url": "/api/whatsapp/applications/{id}", "title": "Gets a single Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "put", "url": "/api/whatsapp/applications/{id}", "title": "Update an existing Application", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/applications/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateApplications", "group": "Whatsapp_Applications", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappApplication/index.js", "groupTitle": "Whatsapp_Applications" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Add tags to the interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interaction/{id}/tags -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions", "title": "Creates a new Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateInteractions", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Boolean", "optional": true, "field": "closed", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "closedAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "secondDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "thirdDisposition", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "note", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "read1stAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "firstMsgDirection", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastMsgAt", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "lastMsgDirection", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}", "title": "Deletes a Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/describe", "title": "Gets table info about Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions", "title": "Gets a list of Interactions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions -v -u {name}:{password}", "type": "json" } ], "name": "GetInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/interactions?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/interactions?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/interactions?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/interactions?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/interactions?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "delete", "url": "/api/whatsapp/interactions/{id}/tags", "title": "Removes tags from interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/tags?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveTags", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}", "title": "Gets a single Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Creates new messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -d '[{\"to\": \"+3901119886500\", \"...\": \"...\"}]' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addMessage", "group": "Whatsapp_Interactions", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/download", "title": "Gets interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/download -v -u {name}:{password} -X GET", "type": "json" } ], "name": "download", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "get", "url": "/api/whatsapp/interactions/{id}/messages", "title": "Gets interaction messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id}/messages -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getMessages", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "put", "url": "/api/whatsapp/interactions/{id}", "title": "Update an existing Interaction", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/interactions/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateInteractions", "group": "Whatsapp_Interactions", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappInteraction/index.js", "groupTitle": "Whatsapp_Interactions" }, { "type": "post", "url": "/api/whatsapp/messages", "title": "Creates a new Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateMessages", "group": "Whatsapp_Messages", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "Text", "optional": false, "field": "body", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "read", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"in\"", "\"out\"" ], "optional": false, "field": "direction", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "messageId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "phone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "readAt", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "secret", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "providerName", "description": "" }, { "group": "Body", "type": "Text", "optional": true, "field": "providerResponse", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "delete", "url": "/api/whatsapp/messages/{id}", "title": "Deletes a Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/describe", "title": "Gets table info about Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages", "title": "Gets a list of Messages", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages -v -u {name}:{password}", "type": "json" } ], "name": "GetMessages", "group": "Whatsapp_Messages", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/messages?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/messages?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/messages?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/messages?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/messages?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "get", "url": "/api/whatsapp/messages/{id}", "title": "Gets a single Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "put", "url": "/api/whatsapp/messages/{id}", "title": "Update an existing Message", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/messages/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateMessages", "group": "Whatsapp_Messages", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappMessage/index.js", "groupTitle": "Whatsapp_Messages" }, { "type": "post", "url": "/api/whatsapp/reports/queue", "title": "Creates a new Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "from", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "joinAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "leaveAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "acceptAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "exitAt", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "reason", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/queue/{id}", "title": "Deletes a Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/describe", "title": "Gets table info about Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue", "title": "Gets a list of Whatsapp Queue Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/queue?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/queue?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/queue?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/queue?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/queue?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/queue/{id}", "title": "Gets a single Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/queue/{id}", "title": "Update an existing Whatsapp Queue Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/queue/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Queue_Reports", "group": "Whatsapp_Queue_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueueReport/index.js", "groupTitle": "Whatsapp_Queue_Reports" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/users", "title": "Add agents to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -d '{\"ids\": [1,2], \"penalty\": 2}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues/{id}/teams", "title": "Add teams to a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -d '{\"ids\": [1,2]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "AddTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/queues", "title": "Creates a new Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateQueues", "group": "Whatsapp_Queues", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "Integer", "optional": true, "field": "timeout", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"rrmemory\"", "\"beepall\"", "\"roundrobin\"" ], "optional": true, "field": "strategy", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}", "title": "Deletes a Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/describe", "title": "Gets table info about Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/users", "title": "Gets queue agents", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users -v -u {name}:{password} -X POST", "type": "json" } ], "name": "GetAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/members", "title": "GetMembers", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/members -v -u {name}:{password}", "type": "json" } ], "name": "GetMembers", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues", "title": "Gets a list of Queues", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues -v -u {name}:{password}", "type": "json" } ], "name": "GetQueues", "group": "Whatsapp_Queues", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/queues?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/queues?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/queues?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/queues?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/queues?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}/teams", "title": "Gets queues list", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/teams -v -u {name}:{password}", "type": "json" } ], "name": "GetTeams", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "delete", "url": "/api/whatsapp/queues/{id}/users", "title": "Removes agents from a queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id}/users?ids=1&ids=2 -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "RemoveAgents", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "get", "url": "/api/whatsapp/queues/{id}", "title": "Gets a single Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "put", "url": "/api/whatsapp/queues/{id}", "title": "Update an existing Queue", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/queues/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateQueues", "group": "Whatsapp_Queues", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappQueue/index.js", "groupTitle": "Whatsapp_Queues" }, { "type": "post", "url": "/api/whatsapp/reports/transfer", "title": "Creates a new Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"account\"", "\"agent\"", "\"queue\"" ], "optional": false, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "transferredAt", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "delete", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Deletes a Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/describe", "title": "Gets table info about Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer", "title": "Gets a list of Whatsapp Transfer Reports", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer -v -u {name}:{password}", "type": "json" } ], "name": "GetWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/whatsapp/reports/transfer?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/whatsapp/reports/transfer?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/whatsapp/reports/transfer?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/whatsapp/reports/transfer?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/whatsapp/reports/transfer?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "get", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Gets a single Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "put", "url": "/api/whatsapp/reports/transfer/{id}", "title": "Update an existing Whatsapp Transfer Report", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/whatsapp/reports/transfer/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateWhatsapp_Transfer_Reports", "group": "Whatsapp_Transfer_Reports", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/whatsappTransferReport/index.js", "groupTitle": "Whatsapp_Transfer_Reports" }, { "type": "post", "url": "/api/integrations/zendesk/accounts", "title": "Creates a new Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Accounts", "group": "Zendesk_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "username", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "password", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "token", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "remoteUri", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"password\"", "\"token\"" ], "optional": true, "field": "authType", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"integrationTab\"", "\"newTab\"" ], "optional": true, "field": "type", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "delete", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Deletes a Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts", "title": "Gets a list of Zendesk Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Gets a single Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "get", "url": "/api/integrations/zendesk/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "put", "url": "/api/integrations/zendesk/accounts/{id}", "title": "Update an existing Zendesk Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Accounts", "group": "Zendesk_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskAccount/index.js", "groupTitle": "Zendesk_Accounts" }, { "type": "post", "url": "/api/integrations/zendesk/configurations", "title": "Creates a new Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Configurations", "group": "Zendesk_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "delete", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Deletes a Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations", "title": "Gets a list of Zendesk Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Gets a single Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "get", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Gets configurations tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/configurations/{id}/tags", "title": "Sets new tags", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id}/tags -d '{\"ids\": [1,12]}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "setTags", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "put", "url": "/api/integrations/zendesk/configurations/{id}", "title": "Update an existing Zendesk Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Configurations", "group": "Zendesk_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskConfiguration/index.js", "groupTitle": "Zendesk_Configurations" }, { "type": "post", "url": "/api/integrations/zendesk/fields", "title": "Creates a new Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZendesk_Fields", "group": "Zendesk_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "delete", "url": "/api/integrations/zendesk/fields/{id}", "title": "Deletes a Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields", "title": "Gets a list of Zendesk Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zendesk/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zendesk/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zendesk/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zendesk/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zendesk/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "get", "url": "/api/integrations/zendesk/fields/{id}", "title": "Gets a single Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "put", "url": "/api/integrations/zendesk/fields/{id}", "title": "Update an existing Zendesk Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zendesk/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZendesk_Fields", "group": "Zendesk_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZendeskField/index.js", "groupTitle": "Zendesk_Fields" }, { "type": "post", "url": "/api/integrations/zoho/accounts", "title": "Creates a new Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Accounts", "group": "Zoho_Accounts", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "host", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "zone", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientId", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clientSecret", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "serverUrl", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "code", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "refreshToken", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "delete", "url": "/api/integrations/zoho/accounts/{id}", "title": "Deletes a Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts", "title": "Gets a list of Zoho Accounts", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/accounts?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/accounts?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/accounts?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/accounts?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/accounts?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}", "title": "Gets a single Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Creates new configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -d '{\"name\": \"conf1\"}' \\ \n -H 'Content-Type: application/json' -v -u {name}:{password} -X POST", "type": "json" } ], "name": "addConfiguration", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/configurations", "title": "Gets account configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/configurations -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getConfigurations", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "get", "url": "/api/integrations/zoho/accounts/{id}/fields", "title": "Gets account fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "put", "url": "/api/integrations/zoho/accounts/{id}", "title": "Update an existing Zoho Account", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/accounts/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Accounts", "group": "Zoho_Accounts", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoAccount/index.js", "groupTitle": "Zoho_Accounts" }, { "type": "post", "url": "/api/integrations/zoho/configurations", "title": "Creates a new Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Configurations", "group": "Zoho_Configurations", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "name", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"lead\"", "\"contact\"", "\"nothing\"" ], "optional": true, "field": "moduleCreate", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"contact_lead\"", "\"contact\"", "\"lead\"" ], "optional": true, "field": "moduleSearch", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "description", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "delete", "url": "/api/integrations/zoho/configurations/{id}", "title": "Deletes a Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations", "title": "Gets a list of Zoho Configurations", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/configurations?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/configurations?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/configurations?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/configurations?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/configurations?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}", "title": "Gets a single Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/descriptions", "title": "Gets configurations descriptions", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/descriptions -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getDescriptions", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/fields", "title": "Gets configurations fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/fields -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getFields", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "get", "url": "/api/integrations/zoho/configurations/{id}/subjects", "title": "Gets configurations subjects", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id}/subjects -v -u {name}:{password} -X GET", "type": "json" } ], "name": "getSubjects", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "put", "url": "/api/integrations/zoho/configurations/{id}", "title": "Update an existing Zoho Configuration", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/configurations/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Configurations", "group": "Zoho_Configurations", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoConfiguration/index.js", "groupTitle": "Zoho_Configurations" }, { "type": "post", "url": "/api/integrations/zoho/fields", "title": "Creates a new Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateZoho_Fields", "group": "Zoho_Fields", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"", "\"keyValue\"" ], "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "content", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "key", "description": "" }, { "group": "Body", "type": "String", "allowedValues": [ "\"string\"", "\"variable\"", "\"customVariable\"" ], "optional": true, "field": "keyType", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "keyContent", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "idField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "nameField", "description": "" }, { "group": "Body", "type": "Boolean", "optional": true, "field": "customField", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "variableName", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "delete", "url": "/api/integrations/zoho/fields/{id}", "title": "Deletes a Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields", "title": "Gets a list of Zoho Fields", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields -v -u {name}:{password}", "type": "json" } ], "name": "GetZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/integrations/zoho/fields?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/integrations/zoho/fields?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/integrations/zoho/fields?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/integrations/zoho/fields?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/integrations/zoho/fields?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "get", "url": "/api/integrations/zoho/fields/{id}", "title": "Gets a single Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "put", "url": "/api/integrations/zoho/fields/{id}", "title": "Update an existing Zoho Field", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/integrations/zoho/fields/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateZoho_Fields", "group": "Zoho_Fields", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/intZohoField/index.js", "groupTitle": "Zoho_Fields" }, { "type": "post", "url": "/api/cdr", "title": "Creates a new Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateCdrs", "group": "cdr", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": false, "field": "calldate", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "clid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "src", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dst", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dcontext", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "channel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "dstchannel", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastapp", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "lastdata", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "duration", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "billsec", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "disposition", "description": "" }, { "group": "Body", "type": "Integer", "optional": false, "field": "amaflags", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "accountcode", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "userfield", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "uniqueid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "linkedid", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "sequence", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "peeraccount", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "type", "description": "" }, { "group": "Body", "type": "String", "optional": true, "field": "tag", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "delete", "url": "/api/cdr/{id}", "title": "Deletes a Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/describe", "title": "Gets table info about Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/describe -v -u {name}:{password}", "type": "json" } ], "name": "DescribeCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr", "title": "Gets a list of Cdrs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr -v -u {name}:{password}", "type": "json" } ], "name": "GetCdrs", "group": "cdr", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/cdr?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/cdr?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/cdr?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/cdr?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/cdr?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "get", "url": "/api/cdr/{id}", "title": "Gets a single Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "put", "url": "/api/cdr/{id}", "title": "Update an existing Cdr", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/cdr/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateCdrs", "group": "cdr", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/cdr/index.js", "groupTitle": "cdr" }, { "type": "post", "url": "/api/voiceQueuesLog", "title": "Creates a new VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -d '{\"key1\": \"valu1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X POST", "type": "json" } ], "name": "CreateVoiceQueuesLogs", "group": "voiceQueuesLog", "parameter": { "fields": { "Body": [ { "group": "Body", "type": "String", "optional": true, "field": "time", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "callid", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "queuename", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "agent", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "event", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data1", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data2", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data3", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data4", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "data5", "description": "" }, { "group": "Body", "type": "String", "optional": false, "field": "dtm", "description": "" } ] } }, "description": "

Motion will return a HTTP status code 201 upon success.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "delete", "url": "/api/voiceQueuesLog/{id}", "title": "Deletes a VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password} -X DELETE", "type": "json" } ], "name": "DeleteVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 204 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog", "title": "Gets a list of VoiceQueuesLogs", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog -v -u {name}:{password}", "type": "json" } ], "name": "GetVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will always return paged results. Motion returns paging data in the Content-Range header in the form start - end / total.

Upon success Motion will return a HTTP status code 200 OK if the entire collection was returned otherwise it will return a HTTP status code 206 Partial Content.

Motion renders the resulting JSON representation in the response body.

Retrieving Specific Fields

To return only specific fields for a result set you can utilize the fields parameter. This parameter accepts a comma-separated list.

A call returning only id and name for a result set would look like this.

GET /api/voiceQueuesLog?fields=id,name

Filtering

You can perform exact-match filtering on any of a model's fields by using the field name as the key and supplying it with a value. These parameters accept a comma-separated list.

A call returning a result set for records with name of john.doe or jane.miller.

GET /api/voiceQueuesLog?name=john.doe,jane.miller

If you use the key filter the result will be filtered by the value you specify.

GET /api/voiceQueuesLog?filter=john

Sorting

To sort a result set based on one or several fields you can utilize the sort parameter. This parameters accepts a comma-separated list.

Results will be sorted in the order of the fields provided. The default sorting order for fields is ascending. Fields can be sorted in descending order by prefixing them with a dash (-).

A call sorting a result by id ascending and then name descending would look like this.

GET /api/voiceQueuesLog?sort=id,-name

Offset and Limit

Query results are always paged. Motion leverages the offset and limit parameters to facilitate this.

When the neither of these parameters are explicitly supplied the handler will assume the a default limit of 100.

offset is a number indicating the start position in the result set you want to return.

limit is a number indicating how many records past the start position you want returned.

A call with a result set starting at 5 and returning no more than 25 records would look like this.

GET /api/voiceQueuesLog?offset=5&limit=25

If there were 50 records in total, the returned Content-Range header would look like this.

Content-Range: 5-30/50

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "get", "url": "/api/voiceQueuesLog/{id}", "title": "Gets a single VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -v -u {name}:{password}", "type": "json" } ], "name": "ShowVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" }, { "type": "put", "url": "/api/voiceQueuesLog/{id}", "title": "Update an existing VoiceQueuesLog", "examples": [ { "title": "Example usage:", "content": "curl https://{domain}/api/voiceQueuesLog/{id} -d '{\"key1\": \"value1\", \"key2\": \"value2\", \"...\": \"...\"}' \\\n -H \"Content-Type: application/json\" -v -u {name}:{password} -X PUT", "type": "json" } ], "name": "updateVoiceQueuesLogs", "group": "voiceQueuesLog", "description": "

Motion will return a HTTP status code 200 upon success. Motion return a HTTP status code 404 if the corresponding record could not be located.

Motion renders the resulting JSON representation in the response body.

", "version": "0.0.0", "filename": "server/api/voiceQueuesLog/index.js", "groupTitle": "voiceQueuesLog" } ] diff --git a/apidoc/api_project.js b/apidoc/api_project.js index 137534e..11164e7 100644 --- a/apidoc/api_project.js +++ b/apidoc/api_project.js @@ -1 +1 @@ -define({ "name": "xCALLY Motion API", "version": "2.5.14", "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.", "title": "xCALLY MOTION API", "header": { "title": "Introduction", "content": "

The API

\n

This is the documentation for the xCALLY MOTION API.

\n

We make changes to the APIs from time to time. For more information, see Changelog.

\n

The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.

\n

The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].

\n

Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:

\n
GET /api/users\n
\n

Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:

\n
https://motion.xcally.com/api/users\n
\n

Curly braces, {}, indicate values you have to supply. Example:

\n
GET  /api/users/{id}\n
\n

The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].

\n

The examples use basic authentication requiring a xCALLY username and password.

\n

Security and Authentication

\n

This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token or API Key.

\n

Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or API Key.

\n

Basic authentication

\n

Use the following authentication format with your username and password:\n{username}:{password}

\n

Example:

\n
curl -u admin:password https://motion.xcally.com/api/users\n
\n

OAuth access token

\n

The xCALLY API supports OAuth authorization flows.

\n

OAuth access tokens also permit client-side API requests.

\n

In your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}

\n

Example:

\n
curl -H \"Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo\" https://motion.xcally.com/api/users\n
\n

API Key

\n

In your request, specify the API Key in apikey query parameter

\n

Example:

\n
curl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\n

Request Format

\n

The xCALLY API is a JSON API. You must supply a Content-Type: application/json header in PUT and POST requests. You must set an Accept: application/json header on all requests. You may get a text/plain response in case of an error like a bad request. You should treat this as an error you need to fix.

\n

Response Format

\n

The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.

\n

Responses may have the status codes described in the following sections.

\n

200 range

\n

The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.

\n

400 range

\n

The request was not successful. The content type of the response may be text/plain for API-level error messages, such as when trying to call the API without SSL. The content type is application/json for business-level error messages because the response includes a JSON object with information about the error.

\n

If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.

\n

500 range

\n

When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.

\n

If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.

\n

Data Types

\n

The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.

\n

ID integers

\n

Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.

\n

The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.

\n

Time stamps

\n

Time stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z

\n" }, "template": { "withGenerator": false, "withCompare": false, "forceLanguage": "en" }, "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2021-01-29T14:32:31.377Z", "url": "http://apidocjs.com", "version": "0.19.0" } }); +define({ "name": "xCALLY Motion API", "version": "2.5.21", "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.", "title": "xCALLY MOTION API", "header": { "title": "Introduction", "content": "

The API

\n

This is the documentation for the xCALLY MOTION API.

\n

We make changes to the APIs from time to time. For more information, see Changelog.

\n

The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.

\n

The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].

\n

Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:

\n
GET /api/users\n
\n

Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:

\n
https://motion.xcally.com/api/users\n
\n

Curly braces, {}, indicate values you have to supply. Example:

\n
GET  /api/users/{id}\n
\n

The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].

\n

The examples use basic authentication requiring a xCALLY username and password.

\n

Security and Authentication

\n

This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token or API Key.

\n

Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or API Key.

\n

Basic authentication

\n

Use the following authentication format with your username and password:\n{username}:{password}

\n

Example:

\n
curl -u admin:password https://motion.xcally.com/api/users\n
\n

OAuth access token

\n

The xCALLY API supports OAuth authorization flows.

\n

OAuth access tokens also permit client-side API requests.

\n

In your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}

\n

Example:

\n
curl -H \"Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo\" https://motion.xcally.com/api/users\n
\n

API Key

\n

In your request, specify the API Key in apikey query parameter

\n

Example:

\n
curl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\n

Request Format

\n

The xCALLY API is a JSON API. You must supply a Content-Type: application/json header in PUT and POST requests. You must set an Accept: application/json header on all requests. You may get a text/plain response in case of an error like a bad request. You should treat this as an error you need to fix.

\n

Response Format

\n

The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.

\n

Responses may have the status codes described in the following sections.

\n

200 range

\n

The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.

\n

400 range

\n

The request was not successful. The content type of the response may be text/plain for API-level error messages, such as when trying to call the API without SSL. The content type is application/json for business-level error messages because the response includes a JSON object with information about the error.

\n

If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.

\n

500 range

\n

When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.

\n

If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.

\n

Data Types

\n

The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.

\n

ID integers

\n

Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.

\n

The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.

\n

Time stamps

\n

Time stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z

\n" }, "template": { "withGenerator": false, "withCompare": false, "forceLanguage": "en" }, "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2021-03-12T13:10:48.914Z", "url": "http://apidocjs.com", "version": "0.19.0" } }); diff --git a/apidoc/api_project.json b/apidoc/api_project.json index 4d3159e..604071f 100644 --- a/apidoc/api_project.json +++ b/apidoc/api_project.json @@ -1 +1 @@ -{ "name": "xCALLY Motion API", "version": "2.5.14", "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.", "title": "xCALLY MOTION API", "header": { "title": "Introduction", "content": "

The API

\n

This is the documentation for the xCALLY MOTION API.

\n

We make changes to the APIs from time to time. For more information, see Changelog.

\n

The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.

\n

The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].

\n

Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:

\n
GET /api/users\n
\n

Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:

\n
https://motion.xcally.com/api/users\n
\n

Curly braces, {}, indicate values you have to supply. Example:

\n
GET  /api/users/{id}\n
\n

The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].

\n

The examples use basic authentication requiring a xCALLY username and password.

\n

Security and Authentication

\n

This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token or API Key.

\n

Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or API Key.

\n

Basic authentication

\n

Use the following authentication format with your username and password:\n{username}:{password}

\n

Example:

\n
curl -u admin:password https://motion.xcally.com/api/users\n
\n

OAuth access token

\n

The xCALLY API supports OAuth authorization flows.

\n

OAuth access tokens also permit client-side API requests.

\n

In your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}

\n

Example:

\n
curl -H \"Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo\" https://motion.xcally.com/api/users\n
\n

API Key

\n

In your request, specify the API Key in apikey query parameter

\n

Example:

\n
curl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\n

Request Format

\n

The xCALLY API is a JSON API. You must supply a Content-Type: application/json header in PUT and POST requests. You must set an Accept: application/json header on all requests. You may get a text/plain response in case of an error like a bad request. You should treat this as an error you need to fix.

\n

Response Format

\n

The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.

\n

Responses may have the status codes described in the following sections.

\n

200 range

\n

The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.

\n

400 range

\n

The request was not successful. The content type of the response may be text/plain for API-level error messages, such as when trying to call the API without SSL. The content type is application/json for business-level error messages because the response includes a JSON object with information about the error.

\n

If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.

\n

500 range

\n

When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.

\n

If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.

\n

Data Types

\n

The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.

\n

ID integers

\n

Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.

\n

The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.

\n

Time stamps

\n

Time stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z

\n" }, "template": { "withGenerator": false, "withCompare": false, "forceLanguage": "en" }, "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2021-01-29T14:32:31.377Z", "url": "http://apidocjs.com", "version": "0.19.0" } } +{ "name": "xCALLY Motion API", "version": "2.5.21", "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.", "title": "xCALLY MOTION API", "header": { "title": "Introduction", "content": "

The API

\n

This is the documentation for the xCALLY MOTION API.

\n

We make changes to the APIs from time to time. For more information, see Changelog.

\n

The xCALLY MOTION API consists of several different APIs. Use the left sidebar menu to select one.

\n

The API is a JSON API. XML is not supported. To learn more, see [Working with JSON].

\n

Endpoints are documented with the HTTP method for the request and a partial resource identifier.\nExample:

\n
GET /api/users\n
\n

Prepend your xCALLY URL to the resource identifier to get the full endpoint URL:

\n
https://motion.xcally.com/api/users\n
\n

Curly braces, {}, indicate values you have to supply. Example:

\n
GET  /api/users/{id}\n
\n

The examples in the docs are cURL statements. You can run the statements on a command line to try out different API requests. To learn more, see [Installing and using cURL]. In Windows, you'll need to modify some of the examples in the docs to make them work. See [Using cURL in Windows].

\n

The examples use basic authentication requiring a xCALLY username and password.

\n

Security and Authentication

\n

This is an SSL-only API, regardless of how your account is configured. You can authorize against the API using either basic authentication with your username and password or with an OAuth access token or API Key.

\n

Client-side CORS requests are supported if the request is authenticated with an OAuth access token. The requests are not supported if the request uses basic authentication or API Key.

\n

Basic authentication

\n

Use the following authentication format with your username and password:\n{username}:{password}

\n

Example:

\n
curl -u admin:password https://motion.xcally.com/api/users\n
\n

OAuth access token

\n

The xCALLY API supports OAuth authorization flows.

\n

OAuth access tokens also permit client-side API requests.

\n

In your requests, specify the access token in an Authorization header as follows:\nAuthorization: Bearer {token}

\n

Example:

\n
curl -H \"Authorization: Bearer gErypPlm4dOVgGRvA1ZzMH5MQ3nLo8bo\" https://motion.xcally.com/api/users\n
\n

API Key

\n

In your request, specify the API Key in apikey query parameter

\n

Example:

\n
curl https://motion.xcally.com/api/users?apikey=eyJhbGciOiJIUzUxMiIsInR5cC...\n
\n

Request Format

\n

The xCALLY API is a JSON API. You must supply a Content-Type: application/json header in PUT and POST requests. You must set an Accept: application/json header on all requests. You may get a text/plain response in case of an error like a bad request. You should treat this as an error you need to fix.

\n

Response Format

\n

The xCALLY API responds to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, the API renders the resulting JSON representation in the response body.

\n

Responses may have the status codes described in the following sections.

\n

200 range

\n

The request was successful. The status is 200 for successful GET and PUT requests, 201 for most POST requests, and 204 for DELETE requests.

\n

400 range

\n

The request was not successful. The content type of the response may be text/plain for API-level error messages, such as when trying to call the API without SSL. The content type is application/json for business-level error messages because the response includes a JSON object with information about the error.

\n

If you see a response from a known endpoint that looks like plain text, you probably made a syntax error in your request. This type of response commonly occurs when making a request to a nonexistent xCALLY Support instance.

\n

500 range

\n

When building an API client, we recommend treating any 500 status codes as a warning or temporary state. However, if the status persists and we don't have a publicly announced maintenance or service disruption, contact us at support@xcally.com.

\n

If submitting a ticket to Support, provide the complete HTTP response. This helps the Support team track down the request in the logs more quickly.

\n

Data Types

\n

The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false, or null. Most programming languages have tools to parse this data.

\n

ID integers

\n

Most xCALLY Support resources such as queues and users are identified by the integer specified by the id attribute of API responses.

\n

The default numeric type in JavaScript, Ruby, Python, and PHP is sufficient to represent xCALLY Support ID integers.

\n

Time stamps

\n

Time stamps use UTC time and are formatted as ISO 8601 strings. Example: 2017-04-16T09:14:57Z

\n" }, "template": { "withGenerator": false, "withCompare": false, "forceLanguage": "en" }, "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2021-03-12T13:10:48.914Z", "url": "http://apidocjs.com", "version": "0.19.0" } } diff --git a/package.json b/package.json index 9937b9c..7df86e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "motion", - "version": "2.5.14", + "version": "2.5.21", "description": "xCALLY Motion is the new Realtime asynchronous solution for your multichannel contact center over Asterisk.", "main": "server/app.js", "engines": { @@ -73,6 +73,7 @@ "json2xls": "github:xmdevelop/json2xls", "jsonwebtoken": "7.4.3", "jstz": "1.0.11", + "juice": "6.0.0", "kue": "0.11.6", "lodash": "4.17.20", "lusca": "1.6.1", diff --git a/public/app/main/apps/analytics/i18n/es.json b/public/app/main/apps/analytics/i18n/es.json index 385eb68..1c3eb2b 100644 --- a/public/app/main/apps/analytics/i18n/es.json +++ b/public/app/main/apps/analytics/i18n/es.json @@ -67,7 +67,7 @@ "QUERY_ERROR": "Error de consulta", "REMOVE": "Eliminar carpeta", "RENAME": "Renombrar carpeta", - "REPORTNAME": "Reportar nombre", + "REPORTNAME": "Nombre informe", "REPORTS": "Informes", "ROWSPERPAGE": "Filas por página", "RUN_REPORT": "Ejecutar un Reporte", diff --git a/public/app/main/apps/callysquare/i18n/ar.json b/public/app/main/apps/callysquare/i18n/ar.json index dbb2c12..fd64890 100644 --- a/public/app/main/apps/callysquare/i18n/ar.json +++ b/public/app/main/apps/callysquare/i18n/ar.json @@ -108,7 +108,7 @@ "CC": " (john.doe@xcally.com ، jane.miller@xcally.com)يمكنك إضافة عناوين متعددة مفصولة بفواصل على سبيل المثال", "DSN": " DRIVER = MySQL ؛ الخادم = 127.0.0.1 ؛ UID = xcall ؛ PWD = كلمة المرور ؛ DATABASE = مثال قاعدة البيانات", "MAILBOX": "صندوق البريد ", - "MAX_TEXT_TTS": "الحد الأقصى المسموح به لعدد الأحرف هو 250", + "MAX_TEXT_TTS": "الحد الأقصى المسموح به لعدد الأحرف هو 200", "TO": " (john.doe@xcally.com ، jane.miller@xcally.com)يمكنك إضافة عناوين متعددة مفصولة بفواصل على سبيل المثال" }, "HIDDENDIGITSNUM": "رقم الخانات المخفية", diff --git a/public/app/main/apps/callysquare/i18n/cs.json b/public/app/main/apps/callysquare/i18n/cs.json index e3c22f3..a00b4f9 100644 --- a/public/app/main/apps/callysquare/i18n/cs.json +++ b/public/app/main/apps/callysquare/i18n/cs.json @@ -108,7 +108,7 @@ "CC": "You can add multiple addresses separated by commas (e.g. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Example: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "mailbox@context", - "MAX_TEXT_TTS": "Maximální počet podporovaných znaků je 250", + "MAX_TEXT_TTS": "Maximální počet podporovaných znaků je 200", "TO": "You can add multiple addresses separated by commas (e.g. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/da.json b/public/app/main/apps/callysquare/i18n/da.json index 95b2959..0db43dd 100644 --- a/public/app/main/apps/callysquare/i18n/da.json +++ b/public/app/main/apps/callysquare/i18n/da.json @@ -108,7 +108,7 @@ "CC": "Du kan tilføje flere adresser med komma (f.eks. john.doe@xcally.com, Jane.miller@xcally.com)", "DSN": "Eksempel: DRIVER=MySQL Server=127,0.;0,1;UID=installation;PWD=password; DATABASE=motion", "MAILBOX": "Postkasse@sammenhæng", - "MAX_TEXT_TTS": "Det maksimale antal understøttede tegn er 250", + "MAX_TEXT_TTS": "Det maksimale antal understøttede tegn er 200", "TO": "Du kan tilføje flere adresser med komma (f.eks. john.doe@xcally.com, Jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/de.json b/public/app/main/apps/callysquare/i18n/de.json index 7186b18..bc9e08b 100644 --- a/public/app/main/apps/callysquare/i18n/de.json +++ b/public/app/main/apps/callysquare/i18n/de.json @@ -108,7 +108,7 @@ "CC": "Sie können mehrere Adressen durch Kommas hinzufügen(z. b. John.doe@xcally.com, jane.miller@xcally.com)", "DSN": "\"Beispiel: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion\",", "MAILBOX": "\"mailbox@context\"", - "MAX_TEXT_TTS": "Die maximal unterstützte Anzahl von Zeichen beträgt 250", + "MAX_TEXT_TTS": "Die maximal unterstützte Anzahl von Zeichen beträgt 200", "TO": "Sie können mehrere Adressen durch Kommas hinzufügen (z. b. John.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/en.json b/public/app/main/apps/callysquare/i18n/en.json index 68d6920..c52ce89 100644 --- a/public/app/main/apps/callysquare/i18n/en.json +++ b/public/app/main/apps/callysquare/i18n/en.json @@ -112,7 +112,7 @@ "CC": "You can add multiple addresses separated by commas (e.g. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Example: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "mailbox@context", - "MAX_TEXT_TTS": "The maximum number of characters supported is 250", + "MAX_TEXT_TTS": "The maximum number of characters supported is 200", "TO": "You can add multiple addresses separated by commas (e.g. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/es.json b/public/app/main/apps/callysquare/i18n/es.json index da3368b..8161bc3 100644 --- a/public/app/main/apps/callysquare/i18n/es.json +++ b/public/app/main/apps/callysquare/i18n/es.json @@ -71,11 +71,11 @@ "EDIT_XML": "Editar XML", "END": "Fin", "ERRORS": { - "DSN_REQUIRED": "Campo obligatorio", + "DSN_REQUIRED": "Campo DSN obligatorio", "FIELD_REQUIRED": "Campo obligatorio", - "NAME_REQUIRED": "Campo obligatorio", - "PROJECT_REQUIRED": "Campo obligatorio", - "URL_REQUIRED": "Campo obligatorio" + "NAME_REQUIRED": "Campo Nombre obligatorio", + "PROJECT_REQUIRED": "Campo Proyecto obligatorio", + "URL_REQUIRED": "Campo URL obligatorio" }, "ESCAPE_DIGITS": "Dígitos de escape", "EXTEN": "Exten", @@ -108,7 +108,7 @@ "CC": "Puede agregar varias direcciones separadas por comas (por ejemplo, john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Ejemplo: DRIVER = MySQL; SERVER = 127.0.0.1; UID = xcall; PWD = contraseña; DATABASE = Motion", "MAILBOX": "buzón@contexto", - "MAX_TEXT_TTS": "El número máximo de caracteres admitidos es 250", + "MAX_TEXT_TTS": "El número máximo de caracteres admitidos es 200", "TO": "Puede agregar varias direcciones separadas por comas (por ejemplo, john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Número de dígitos escondidos", diff --git a/public/app/main/apps/callysquare/i18n/et.json b/public/app/main/apps/callysquare/i18n/et.json index f222c13..cf76291 100644 --- a/public/app/main/apps/callysquare/i18n/et.json +++ b/public/app/main/apps/callysquare/i18n/et.json @@ -108,7 +108,7 @@ "CC": "You can add multiple addresses separated by commas (e.g. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Example: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "mailbox@context", - "MAX_TEXT_TTS": "Toetatavate tähemärkide maksimaalne arv on 250", + "MAX_TEXT_TTS": "Toetatavate tähemärkide maksimaalne arv on 200", "TO": "You can add multiple addresses separated by commas (e.g. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/fa.json b/public/app/main/apps/callysquare/i18n/fa.json index 0c9d62c..187f76e 100644 --- a/public/app/main/apps/callysquare/i18n/fa.json +++ b/public/app/main/apps/callysquare/i18n/fa.json @@ -108,7 +108,7 @@ "CC": "شما می توانید با استفاده از آدرس های چندگانه (مثلاً Commas John.doe@xcally.com، Jane.miller@xcally.com)", "DSN": "مثال: 31 دسامبر 2012 راننده=MySQL SERVER=127.0.0.1 31 دسامبر 2012 31 دسامبر 2012 xcall UID=PWD=رمز عبور پایگاه داده، حركت=31 دسامبر 2012", "MAILBOX": "Mailbox@متن", - "MAX_TEXT_TTS": "حداکثر تعداد نویسه های پشتیبانی شده 250 است", + "MAX_TEXT_TTS": "حداکثر تعداد نویسه های پشتیبانی شده 200 است", "TO": "شما می توانید با استفاده از آدرس های چندگانه (مثلاً Commas John.doe@xcally.com، Jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/fi.json b/public/app/main/apps/callysquare/i18n/fi.json index 4522460..42db6c3 100644 --- a/public/app/main/apps/callysquare/i18n/fi.json +++ b/public/app/main/apps/callysquare/i18n/fi.json @@ -108,7 +108,7 @@ "CC": "Voit lisätä useita osoitteisiin pilkkuja (esim. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Esimerkki: kuljettajan=MySQL;SERVER=127,0.0.1;UID=xcall;PWD=salasana;DATABASE=liike", "MAILBOX": "Postilaatikko@yhteydessä", - "MAX_TEXT_TTS": "Tuettujen merkkien enimmäismäärä on 250", + "MAX_TEXT_TTS": "Tuettujen merkkien enimmäismäärä on 200", "TO": "Voit lisätä useita osoitteisiin pilkkuja (esim. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/fr.json b/public/app/main/apps/callysquare/i18n/fr.json index 62da1e3..366a5c9 100644 --- a/public/app/main/apps/callysquare/i18n/fr.json +++ b/public/app/main/apps/callysquare/i18n/fr.json @@ -108,7 +108,7 @@ "CC": "Vous pouvez ajouter plusieurs adresses par des virgules (p. ex., jane.miller@xcally.com) john.doe@xcally.com", "DSN": "Exemple : DRIVER =MySQL;Server =127.0.0.1;UID =xcall;pwd =mot de passe;Database =motion", "MAILBOX": "Contexte@boîte aux lettres", - "MAX_TEXT_TTS": "Le nombre maximum de caractères pris en charge est de 250", + "MAX_TEXT_TTS": "Le nombre maximum de caractères pris en charge est de 200", "TO": "Vous pouvez ajouter plusieurs adresses par des virgules (p. ex., jane.miller@xcally.com) john.doe@xcally.com" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/he.json b/public/app/main/apps/callysquare/i18n/he.json index 7009e9b..d8c7b55 100644 --- a/public/app/main/apps/callysquare/i18n/he.json +++ b/public/app/main/apps/callysquare/i18n/he.json @@ -108,7 +108,7 @@ "CC": "ניתן להוסיף מספר כתובות ולהפריד ביניהן בפסיקים (לדוגמה, john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "דוגמה: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "mailbox@context", - "MAX_TEXT_TTS": "המספר המרבי של תווים הנתמכים הוא 250", + "MAX_TEXT_TTS": "המספר המרבי של תווים הנתמכים הוא 200", "TO": "ניתן להוסיף מספר כתובות ולהפריד ביניהן בפסיקים (לדוגמה, john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "מספר ספרות מוסתרות", diff --git a/public/app/main/apps/callysquare/i18n/hi.json b/public/app/main/apps/callysquare/i18n/hi.json index 1fd2483..3d02969 100644 --- a/public/app/main/apps/callysquare/i18n/hi.json +++ b/public/app/main/apps/callysquare/i18n/hi.json @@ -108,7 +108,7 @@ "CC": "आप एकाधिक पते का उपयोग करते हुए जोड़ सकते हैं (उदाहरण के लिए, अल्पविराम john.doe@xcally.com jane.miller@xcally.com)", "DSN": "उदाहरण के लिए: चालक=MySQL वंशवृक्ष सर्वर 0.1.127.0 UID=xcall वंशवृक्ष वंशवृक्ष=लोकनिर्माण=पासवर्ड वंशवृक्ष डाटाबेस=प्रस्ताव", "MAILBOX": "मेलबॉक्स@वर्ल्ड कप के संदर्भ", - "MAX_TEXT_TTS": "समर्थित वर्णों की अधिकतम संख्या 250 है", + "MAX_TEXT_TTS": "समर्थित वर्णों की अधिकतम संख्या 200 है", "TO": "आप एकाधिक पते का उपयोग करते हुए जोड़ सकते हैं (उदाहरण के लिए, अल्पविराम john.doe@xcally.com jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/id.json b/public/app/main/apps/callysquare/i18n/id.json index 7e0a39c..6fe68db 100644 --- a/public/app/main/apps/callysquare/i18n/id.json +++ b/public/app/main/apps/callysquare/i18n/id.json @@ -108,7 +108,7 @@ "CC": "Anda dapat menambahkan beberapa alamat yang dipisahkan oleh koma (mis. John.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Contoh: DRIVER = MySQL; SERVER = 127.0.0.1; UID = xcall; PWD = kata sandi; DATABASE = gerak", "MAILBOX": "kotak surat @ konteks", - "MAX_TEXT_TTS": "Jumlah karakter maksimum yang didukung adalah 250", + "MAX_TEXT_TTS": "Jumlah karakter maksimum yang didukung adalah 200", "TO": "Anda dapat menambahkan beberapa alamat yang dipisahkan oleh koma (mis. John.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Nomor Hiddden Digits", diff --git a/public/app/main/apps/callysquare/i18n/it.json b/public/app/main/apps/callysquare/i18n/it.json index ac5e70b..d1dc96e 100644 --- a/public/app/main/apps/callysquare/i18n/it.json +++ b/public/app/main/apps/callysquare/i18n/it.json @@ -108,7 +108,7 @@ "CC": "E' possibile aggiungere indirizzi multipli usando le virgole (es. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Esempio:DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "Mailbox@context", - "MAX_TEXT_TTS": "Numero massimo di caratteri supportati è 250", + "MAX_TEXT_TTS": "Numero massimo di caratteri supportati è 200", "TO": "E' possibile aggiungere indirizzi multipli usando le virgole (es. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Numero Digits nascosti", diff --git a/public/app/main/apps/callysquare/i18n/ja.json b/public/app/main/apps/callysquare/i18n/ja.json index 045e0ea..e246813 100644 --- a/public/app/main/apps/callysquare/i18n/ja.json +++ b/public/app/main/apps/callysquare/i18n/ja.json @@ -108,7 +108,7 @@ "CC": "コンマで区切って複数の住所を追加することができます(例:john.doe@xcally.com、jane.miller@xcally.com)", "DSN": "例:DRIVER = MySQL; SERVER = 127.0.0.1; UID = xcall; PWD =パスワード; DATABASE =モーション", "MAILBOX": "メールボックス@コンテキスト", - "MAX_TEXT_TTS": "サポートされる最大文字数は250です", + "MAX_TEXT_TTS": "サポートされる最大文字数は200です", "TO": "コンマで区切って複数の住所を追加することができます(例:john.doe@xcally.com、jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "隠し桁数", diff --git a/public/app/main/apps/callysquare/i18n/ko.json b/public/app/main/apps/callysquare/i18n/ko.json index 6027806..a5f3d06 100644 --- a/public/app/main/apps/callysquare/i18n/ko.json +++ b/public/app/main/apps/callysquare/i18n/ko.json @@ -108,7 +108,7 @@ "CC": "CC", "DSN": "DSN", "MAILBOX": "사서함", - "MAX_TEXT_TTS": "지원되는 최대 문자 수는 250 자입니다.", + "MAX_TEXT_TTS": "지원되는 최대 문자 수는 200 자입니다.", "TO": "TO" }, "HIDDENDIGITSNUM": "숨겨진 번호", diff --git a/public/app/main/apps/callysquare/i18n/lt.json b/public/app/main/apps/callysquare/i18n/lt.json index 8a48cd0..94e308f 100644 --- a/public/app/main/apps/callysquare/i18n/lt.json +++ b/public/app/main/apps/callysquare/i18n/lt.json @@ -108,7 +108,7 @@ "CC": "Galite pridėti kelis adresus, atskirtus kableliais (e.g. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Pavyzdys: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "paÅ¡to dėžutė@kontekstas", - "MAX_TEXT_TTS": "Didžiausias palaikomų simbolių skaičius yra 250", + "MAX_TEXT_TTS": "Didžiausias palaikomų simbolių skaičius yra 200", "TO": "Galite pridėti kelis adresus, atskirtus kableliais (e.g. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Paslėptų skaitmenų skaičius", diff --git a/public/app/main/apps/callysquare/i18n/lv.json b/public/app/main/apps/callysquare/i18n/lv.json index 3aef57c..c609903 100644 --- a/public/app/main/apps/callysquare/i18n/lv.json +++ b/public/app/main/apps/callysquare/i18n/lv.json @@ -108,7 +108,7 @@ "CC": "Varat pievienot vairākas adreses, kas ir atdalÄ«tas ar komatiem (piemēram, john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Piemērs: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "mailbox@context", - "MAX_TEXT_TTS": "Maksimālais atbalstÄ«to rakstzÄ«mju skaits ir 250", + "MAX_TEXT_TTS": "Maksimālais atbalstÄ«to rakstzÄ«mju skaits ir 200", "TO": "Varat pievienot vairākas adreses, kas ir atdalÄ«tas ar komatiem (piemēram, john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Slēpto ciparu skaitlis", diff --git a/public/app/main/apps/callysquare/i18n/nl.json b/public/app/main/apps/callysquare/i18n/nl.json index 2cb63b4..5eb16f7 100644 --- a/public/app/main/apps/callysquare/i18n/nl.json +++ b/public/app/main/apps/callysquare/i18n/nl.json @@ -108,7 +108,7 @@ "CC": "U kunt meerdere adressen met een komma (bijvoorbeeld John.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Voorbeeld: DRIVER=MySQL;SERVER=127.0.0.1;uid=xcall;pwd=wachtwoord;DATABASE=motion", "MAILBOX": "Mailbox@context", - "MAX_TEXT_TTS": "Het maximale aantal ondersteunde tekens is 250", + "MAX_TEXT_TTS": "Het maximale aantal ondersteunde tekens is 200", "TO": "U kunt meerdere adressen met een komma (bijvoorbeeld John.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/no.json b/public/app/main/apps/callysquare/i18n/no.json index 581e8be..4047c20 100644 --- a/public/app/main/apps/callysquare/i18n/no.json +++ b/public/app/main/apps/callysquare/i18n/no.json @@ -108,7 +108,7 @@ "CC": "Du kan legge til flere adresser med komma (f.eks. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Eksempel: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=passord;DATABASE=bevegelse", "MAILBOX": "Postboksen@kontekst", - "MAX_TEXT_TTS": "Maksimalt antall tegn som støttes er 250", + "MAX_TEXT_TTS": "Maksimalt antall tegn som støttes er 200", "TO": "Du kan legge til flere adresser med komma (f.eks. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/pl.json b/public/app/main/apps/callysquare/i18n/pl.json index cd9199d..3807bc8 100644 --- a/public/app/main/apps/callysquare/i18n/pl.json +++ b/public/app/main/apps/callysquare/i18n/pl.json @@ -108,7 +108,7 @@ "CC": "Można dodać kilka adresów oddzielonych przecinkiem (np. john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Przykład: Kierowca=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=hasło;DATABASE=motion", "MAILBOX": "Skrzynka pocztowa@kontekst", - "MAX_TEXT_TTS": "Maksymalna liczba obsługiwanych znaków to 250", + "MAX_TEXT_TTS": "Maksymalna liczba obsługiwanych znaków to 200", "TO": "Można dodać kilka adresów oddzielonych przecinkiem (np. john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden cyfry numeru", diff --git a/public/app/main/apps/callysquare/i18n/pt-BR.json b/public/app/main/apps/callysquare/i18n/pt-BR.json index 79b0c56..5ba438e 100644 --- a/public/app/main/apps/callysquare/i18n/pt-BR.json +++ b/public/app/main/apps/callysquare/i18n/pt-BR.json @@ -108,7 +108,7 @@ "CC": "Você pode adicionar vários endereços separados por vírgulas (por exemplo, john.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Example: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "mailbox@context", - "MAX_TEXT_TTS": "O número máximo de caracteres suportados é 250", + "MAX_TEXT_TTS": "O número máximo de caracteres suportados é 200", "TO": "Você pode adicionar vários endereços separados por vírgulas (por exemplo, john.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Número de dígitos ocultos", diff --git a/public/app/main/apps/callysquare/i18n/pt-PT.json b/public/app/main/apps/callysquare/i18n/pt-PT.json index d99914b..c279e3d 100644 --- a/public/app/main/apps/callysquare/i18n/pt-PT.json +++ b/public/app/main/apps/callysquare/i18n/pt-PT.json @@ -108,7 +108,7 @@ "CC": "Você pode adicionar vários endereços com vírgulas (por exemplo, Jane.miller@xcally.com) john.doe@xcally.com", "DSN": "Exemplo: DRIVER=MySQL;servidor=127.0.0.1;UID=xcall;PWD=senha;DATABASE=motion", "MAILBOX": "Caixa de correio@contexto", - "MAX_TEXT_TTS": "O número máximo de caracteres suportados é 250", + "MAX_TEXT_TTS": "O número máximo de caracteres suportados é 200", "TO": "Você pode adicionar vários endereços com vírgulas (por exemplo, Jane.miller@xcally.com) john.doe@xcally.com" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/ru.json b/public/app/main/apps/callysquare/i18n/ru.json index a37babc..4a06a5a 100644 --- a/public/app/main/apps/callysquare/i18n/ru.json +++ b/public/app/main/apps/callysquare/i18n/ru.json @@ -108,7 +108,7 @@ "CC": "Вы можете добавить несколько адресов с помощью запятыми (например, John.doe@xcally.com, jane.miller@xcally.com)", "DSN": "Пример: DRIVER=MySQL;сервер = 127.0.0.1;uid=xcall;PWD=Пароль;БАЗЫ ДАННЫХ=motion", "MAILBOX": "Фотогалерея@контексте", - "MAX_TEXT_TTS": "Максимальное поддерживаемое количество символов - 250.", + "MAX_TEXT_TTS": "Максимальное поддерживаемое количество символов - 200.", "TO": "Вы можете добавить несколько адресов с помощью запятыми (например, John.doe@xcally.com, jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/sv.json b/public/app/main/apps/callysquare/i18n/sv.json index 703f93a..bbc08eb 100644 --- a/public/app/main/apps/callysquare/i18n/sv.json +++ b/public/app/main/apps/callysquare/i18n/sv.json @@ -108,7 +108,7 @@ "CC": "Du kan lägga till flera adresser separerade med kommatecken (t.ex. john.doe@xcally.com jane.miller@xcally.com)", "DSN": "Exempel: DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=password;DATABASE=motion", "MAILBOX": "epost@sammanhang", - "MAX_TEXT_TTS": "Det maximala antalet tecken som stöds är 250", + "MAX_TEXT_TTS": "Det maximala antalet tecken som stöds är 200", "TO": "Du kan lägga till flera adresser separerade med kommatecken (t.ex. john.doe@xcally.com jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Antal dolda siffror", diff --git a/public/app/main/apps/callysquare/i18n/tr.json b/public/app/main/apps/callysquare/i18n/tr.json index 5a2e3f1..47c9aa3 100644 --- a/public/app/main/apps/callysquare/i18n/tr.json +++ b/public/app/main/apps/callysquare/i18n/tr.json @@ -108,7 +108,7 @@ "CC": "Eklemek birden fazla adreslerini virgülle (örneğin john.doe@xcally.com, Jane.miller@xcally.com)", "DSN": "Örnek: SÜRÜCÜ=MySQL;SERVER=127,0.0,1;UID=xcall;PWD=parola;DATABASE=hareket", "MAILBOX": "Posta kutusu@içerik", - "MAX_TEXT_TTS": "Desteklenen maksimum karakter sayısı 250'dir", + "MAX_TEXT_TTS": "Desteklenen maksimum karakter sayısı 200'dir", "TO": "Eklemek birden fazla adreslerini virgülle (örneğin john.doe@xcally.com, Jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/zh-CN.json b/public/app/main/apps/callysquare/i18n/zh-CN.json index 3ee462c..b3165fe 100644 --- a/public/app/main/apps/callysquare/i18n/zh-CN.json +++ b/public/app/main/apps/callysquare/i18n/zh-CN.json @@ -108,7 +108,7 @@ "CC": "您可以添加多个地址时使用逗号分隔(例如, john.doe@xcally.com jane.miller@xcally.com)", "DSN": "例如: 驱动程序= MySQL; SERVER = 127.0 0.1 文件; UID = xcall; PWD =密码; DATABASE = motion", "MAILBOX": "邮箱@上下文", - "MAX_TEXT_TTS": "支持的最大字符数为250", + "MAX_TEXT_TTS": "支持的最大字符数为200", "TO": "您可以添加多个地址时使用逗号分隔(例如, john.doe@xcally.com jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/callysquare/i18n/zh-TW.json b/public/app/main/apps/callysquare/i18n/zh-TW.json index 51b287b..40f4a3c 100644 --- a/public/app/main/apps/callysquare/i18n/zh-TW.json +++ b/public/app/main/apps/callysquare/i18n/zh-TW.json @@ -108,7 +108,7 @@ "CC": "您可以將多個地址使用逗號 ( 例如 john.doe@xcally.com 、 jane.miller@xcally.com)", "DSN": "例如 : 驅動程式 = MySQL ; 伺服器 = 127.0.0.1 ; UID = xcall ; 密碼 = 密碼 ; 資料庫 = 動作", "MAILBOX": "信箱與內容", - "MAX_TEXT_TTS": "支持的最大字符數為250", + "MAX_TEXT_TTS": "支持的最大字符數為200", "TO": "您可以將多個地址使用逗號 ( 例如 john.doe@xcally.com 、 jane.miller@xcally.com)" }, "HIDDENDIGITSNUM": "Hiddden Digits Number", diff --git a/public/app/main/apps/chat/i18n/de.json b/public/app/main/apps/chat/i18n/de.json index 1300ec3..a505404 100644 --- a/public/app/main/apps/chat/i18n/de.json +++ b/public/app/main/apps/chat/i18n/de.json @@ -2,12 +2,12 @@ "CHAT": { "AMAZONLEX": "Amazon Lex", "TEXT": "Text", - "TIMES": "Anzahl der Male pro Interaktion", + "TIMES": "Anzahl von Malen pro Interaktion", "EDIT_AUTOREPLY": "Automatische Antwort bearbeiten", "AUTOREPLY": "Automatische Antwort", "NEW_CHATDISPOSITION": "Neue Chat-Disposition", "ENABLECUSTOMERATTACHMENT": "Kundenanhänge aktivieren", - "OFFLINE_CHAT_BUTTON": "'Offline Chat'-Taste", + "OFFLINE_CHAT_BUTTON": "Offline-Chat-Taste", "OFFLINESTATUS": "Offline Status", "NAME": "Name", "CHATQUEUES": "Chat-Warteschlangen", @@ -19,13 +19,13 @@ "ALIAS": "Alias-Name", "VARIABLE": "Variable", "INTERVAL": "Intervall", - "EDIT_CLOSE": "Bearbeiten Beenden", + "EDIT_CLOSE": "Bearbeiten Schließen", "TIMEZONE": "Zeitzone", "MESSAGE": "Nachricht", "ADVANCED": "Erweitert", "FORWARDTRANSCRIPT": "Transkript weiterleiten", "FORWARDTRANSCRIPTMESSAGE": "Transkript-Nachricht weiterleiten", - "SKIPMESSAGEBUTTON": "Taste \"Nachricht\" überspringen", + "SKIPMESSAGEBUTTON": "Nachrichtentaste überspringen", "EDIT_MESSAGE": "Nachricht bearbeiten", "CONDITION_AGREEMENT": "Bedingungsvereinbarung", "NONE": "Keine", @@ -41,17 +41,17 @@ "DELETE_OFFLINEMESSAGE": "Löschen", "OFFLINEMESSAGES": "Offline Nachrichten", "FORWARD_OFFLINE": "Offline weiterleiten", - "SHOW_OFFLINEMESSAGE": "Zeigen", + "SHOW_OFFLINEMESSAGE": "Anzeigen", "FORWARD_OFFLINE_ADDRESS": "Offline-Adresse weiterleiten", "CLOSINGFORM": "Formular schließen", "ENABLERATING": "Bewertung aktivieren", "ENABLECUSTOMERWRITING": "Dem Kunden \"schreiben\" erlauben, bevor der Agent akzeptiert", "ENABLEFEEDBACK": "Feedback aktivieren", - "RATINGTYPE": "Rating-Typ", + "RATINGTYPE": "Bewertungstyp", "CLOSINGMESSAGE": "Nachricht schließen", "CLOSINGMESSAGEBUTTON": "Nachrichtentaste schließen", "RATINGSTARSNUMBER": "Anzahl der Bewertungssterne", - "EDIT_GOTOIF": "Bearbeiten GotoIf", + "EDIT_GOTOIF": "GotoIf bearbeiten", "CONDITION": "Bedingung", "TRUEPRIORITY": "Echte Priorität", "FALSEPRIORITY": "Falsche Priorität", @@ -151,11 +151,11 @@ "DELETE_CHATPROACTIVEACTION": "Proaktive Aktion löschen", "ADD_CHATPROACTIVEACTION": "Proaktive Aktion hinzufügen", "NO_CHATPROACTIVEACTION_AVAILABLE": "Keine proaktiven Aktionen verfügbar", - "NO_OFFLINEMESSAGE_AVAILABLE": "Keine Offline Nachrichten verfügbar", + "NO_OFFLINEMESSAGE_AVAILABLE": "Keine Offline-Nachrichten verfügbar", "MOUSEOVER": "Maus über", "TIMEOUT": "Timeout", "TYPE": "Typ", - "SELECTOR": "Wähler", + "SELECTOR": "Wählschalter", "AGENT": "Agent", "GOTO": "Goto", "GOTOIF": "GotoIf", @@ -165,16 +165,16 @@ "PREVIEW": "Vorschau", "EDIT_AGENT": "Agent bearbeiten", "EDIT_QUEUE": "Warteschlange bearbeiten", - "EDIT_GOTO": "Bearbeiten Goto", - "EDIT_GOTOIf": "Bearbeiten GotoIf", - "EDIT_NOOP": "Bearbeiten Noop", + "EDIT_GOTO": "Goto bearbeiten", + "EDIT_GOTOIf": "GotoIf bearbeiten", + "EDIT_NOOP": "Noop bearbeiten", "ADD_CHATQUEUE": "Chat-Warteschlange hinzufügen", "EDIT_CHATQUEUE": "Chat-Warteschlange bearbeiten", "DELETE_CHATQUEUE": "Chat-Warteschlange löschen", "SETTINGS": "Einstellungen", "SAVE": "Speichern", "SCRIPT": "Skript", - "TOKEN": "Tooken", + "TOKEN": "Token", "CREATED_AT": "Erstellt am", "CHATWEBSITES": "Chat-Webseiten", "MOTIONADDRESS": "Website Domain", @@ -183,58 +183,58 @@ "EDIT_CHATWEBSITE": "Chat-Webseite bearbeiten", "DELETE_CHATWEBSITE": "Chat-Webseite löschen", "LIST": "Liste", - "SNIPPET": "Schnipsel", - "FORMS": "Formen", + "SNIPPET": "Snippet", + "FORMS": "Formulare", "UP": "Bis", - "DOWN": "Nach unten", - "COLLAPSE": "Zusammenbruch", + "DOWN": "Unten", + "COLLAPSE": "Zusammenklappen", "PROACTIVEACTIONS": "Proaktive Aktionen", - "DISPOSITIONS": "Bestimmungen", + "DISPOSITIONS": "Dispositionen", "WEBHOOKS": "WebHooks", "ACTIONS": "Aktionen", "FIDELITY": "Treue", "APPEARANCE": "Aussehen", "MAINCOLOR": "Hauptfarbe", - "FOCUSCOLOR": "Schwerpunkt Farbe", - "BUTTONCOLOR": "Schaltfläche Farbe", - "HEADERSHAPE": "Form des Erntevorsatzes", + "FOCUSCOLOR": "Fokusfarbe", + "BUTTONCOLOR": "Tastenfarbe", + "HEADERSHAPE": "Kopfzeilenform", "ANIMATION": "Animation", "DEFAULT": "Standard", "WHITELABEL": "White Label", "LOGO": "Logo", - "DOWNLOADTRANSCRIPT": "Transkript herunterladen.", + "DOWNLOADTRANSCRIPT": "Transkript herunterladen", "ENQUIRY_ENABLE": "Anfrage aktivieren", - "ENQUIRY_FORWARDING": "Anfrage weiterleiten", - "ENQUIRY_FORWARDING_ADDRESS": "Anfrage Adresse weiterleiten", + "ENQUIRY_FORWARDING": "Weiterleitung von Anfragen", + "ENQUIRY_FORWARDING_ADDRESS": "Anfrage-Weiterleitungsadresse", "LABELS": "Labels", - "HEADER_ONLINE": "Online Header", - "ONLINE_MESSAGE": "Online Message", - "NAME_TITLE": "Name Input Label", - "USERNAME_PLACEHOLDER": "Benutzername Eingang Platzhalter", - "EMAIL_TITLE": "E-Mail Eingang Label", - "EMAIL_PLACEHOLDER": "E-Mail Eingang Platzhalter", - "START_CHAT_BUTTON": "'Start' Button Chat", - "AGENTS_BUSY": "Nachricht Agenten besetzt", - "HEADER_OFFLINE": "Offline Header", + "HEADER_ONLINE": "Online-Kopfzeile", + "ONLINE_MESSAGE": "Online Nachricht", + "NAME_TITLE": "Name Eingabebezeichnung", + "USERNAME_PLACEHOLDER": "Benutzername Eingabe Platzhalter", + "EMAIL_TITLE": "E-Mail-Eingabe Label", + "EMAIL_PLACEHOLDER": "Platzhalter für E-Mail-Eingabe", + "START_CHAT_BUTTON": "'Chat starten' Taste", + "AGENTS_BUSY": "Meldung für besetzte Agenten", + "HEADER_OFFLINE": "Offline-Kopfzeile", "OFFLINE_MESSAGE": "Offline Nachricht", - "MESSAGE_TITLE": "Nachricht Label", - "ENQUIRY_MESSAGE_PLACEHOLDER": "Anfrage Nachricht ein Platzhalter", - "ENQUIRY_BUTTON": "Anfrage Text auf der Schaltfläche", - "RATING_MESSAGE": "Bewertung Nachricht", - "RATING_SEND": "Bewertung Senden Text", - "RATING_SKIP": "Bewertung Skip Taste Text", + "MESSAGE_TITLE": "Nachrichtenbezeichnung", + "ENQUIRY_MESSAGE_PLACEHOLDER": "Platzhalter für die Eingabe von Anfragenachrichten", + "ENQUIRY_BUTTON": "Anfrage-Taste Text", + "RATING_MESSAGE": "Bewertungsnachricht", + "RATING_SEND": "Bewertung Senden Tasten-Text", + "RATING_SKIP": "Bewertung Überspringen Tasten-Text", "ONLINE": "Online", "OFFLINE": "Offline", "PROACTIVE": "Proaktive", "ACCEPT": "Akzeptieren", - "ACCEPTMETHOD": "Die Methode", + "ACCEPTMETHOD": "Methode", "ACCEPTURL": "URL akzeptieren", "REJECT": "Ablehnen", "REJECTMETHOD": "Methode ablehnen", "REJECTURL": "URL ablehnen", - "CLOSE": "In der Nähe", - "CLOSEMETHOD": "In der Nähe Methode", - "CLOSEURL": "Der URL", + "CLOSE": "Schliessen", + "CLOSEMETHOD": "Methode schließen", + "CLOSEURL": "URL schließen", "EMBEDDING": "Einbettung", "GENERAL": "Allgemein", "SELECTED": "Ausgewählte", @@ -242,53 +242,53 @@ "SELECT_NONE": "Wählen Sie \"Keine\"", "BACK": "Zurück", "HELP": { - "MAPKEY": "Folgende Motion Contact Manager Feld:", - "FROMKEY": "Wird in Ihrer Motion Chat Snippet wie abgebildet werden:", - "TOKEN": "Website Motion Token", - "COPYSCRIPTTOCLIPBOARD": "Kopieren Sie das Script in Ihre Webseite", - "FORWARD_OFFLINE": "Sie können mehrere Adressen mit Kommata (z. b. John.doe@xcally.com, jane.miller@xcally.com)", - "MOTIONADDRESS": "Bitte geben Sie im folgenden Format ein: ≪protocol>://[:]. Beispiel: https://X.Y.Z.W", - "MOTIONPROXY": "Bitte geben Sie im folgenden Format ein: ≪Protocol>:// ≪IP-Adresse>: ≪port>]. Beispiel: https://X.Y.Z.W", + "MAPKEY": "Das folgende Motion Contact Manager-Feld:", + "FROMKEY": "Wird in Ihrem Motion Chat-Snippet wie folgt zugeordnet:", + "TOKEN": "Automatisch generiertes Token, das im Skript verwendet wird", + "COPYSCRIPTTOCLIPBOARD": "Kopieren Sie den Skripttext und fügen Sie ihn in Ihre Website ein", + "FORWARD_OFFLINE": "Sie können mehrere durch Kommas getrennte Adressen hinzufügen (z. B. john.doe@xcally.com, jane.miller@xcally.com)", + "MOTIONADDRESS": "Das Feld muss das folgende Format haben: ≪protocol>://[:]. Beispiel: https://X.Y.Z.W", + "MOTIONPROXY": "Das Feld muss das folgende Format haben: ≪Protocol>:// ≪IP-Adresse>: ≪port>]. Beispiel: https://X.Y.Z.W", "NAME": "Nur Zahlen, Buchstaben und Sonderzeichen (._) werden unterstützt.", - "LIST": "Contact Manager Liste zu verknüpfen von Kontakten", - "KEY": "Website kurze Name (5 Zeichen) auf der Registerkarte Agentenstatus dargestellt", - "INTEVAL": "Aus der Liste der verfügbaren Intervalle ausgewählt werden", + "LIST": "Contact Manager-Liste, die zum Zuordnen von Kontakten verwendet wird", + "KEY": "Website-Kurzname (5 Zeichen), der auf der Registerkarte \"Agent\" angezeigt wird", + "INTEVAL": "Wird aus der Liste der verfügbaren Intervalle ausgewählt", "TIMEZONE": "Wählen Sie eine aus der Liste aus (Standard = lokale Zeitzone)", - "ENABLERATING": "Es aktivieren, wenn Sie die web Besucher kann die Interaktion am Ende bewerten möchten.", - "ENABLEFEEDBACK": "Aktivieren, wenn Sie möchten, dass die Besucher können ein Feedback (bis zu 150 Zeichen senden) am Ende", - "FORWARDTRANSCRIPT": "Aktivieren, wenn Sie möchten, dass die Besucher aufgefordert, ein Chatprotokoll per e-mail", - "AUTOCLOSE": "Es aktivieren, wenn Sie Chat-sitzungen als Unmanaged geschlossen werden soll, wenn kein Agent verfügbar ist. Erfahren Sie mehr unter: https://wiki.xcallymotion.com/display/XMV/Chat Websites # Chat Websites-Snippet", - "ENABLEUNMANAGEDNOTE": "Aktivieren, wenn Sie möchten, dass die Besucher eine Nachricht wird angezeigt, wenn alle Agenten besetzt sind und der Chat wird nicht verwalteten", - "ENABLECUSTOMERWRITING": "Aktivieren Sie es wenn Sie wollen, dass der Chat startet ohne Warten auf einen verfügbaren Agenten (Achtung: Wenn sie es ermöglichen, ihre Chats nie unmanaged erhalten). Erfahren Sie mehr unter: https://wiki.xcallymotion.com/display/XMV/Chat Websites # Chat Websites-Snippet", - "INTERVAL": "Wählen Sie eine aus der Liste aus", - "HIDEWHENOFFLINE": "Versteckt das Snippet, wenn es offline ist", - "AGENTIDENTIFIER": "Stellt die Agenten-ID in der Chat-Sitzung im Snippet dar", - "WEBSITEALIAS": "Ein Präfix verwendet, um den Namen des Agenten (Präfix Agenten-ID) an die Besucher während der Chat-sitzung angezeigt zu verfassen", - "VERTICALPOSITION": "Stellt die Entfernung in Prozent von oben dar", + "ENABLERATING": "Aktivieren Sie es, wenn Sie möchten, dass der Webbesucher die Interaktion am Ende bewerten kann", + "ENABLEFEEDBACK": "Aktivieren Sie es, wenn Sie möchten, dass der Webbesucher am Ende ein Feedback (bis zu 150 Zeichen) senden kann", + "FORWARDTRANSCRIPT": "Aktivieren Sie diese Option, wenn der Webbesucher aufgefordert wird, ein Chat-Protokoll per E-Mail zu erhalten", + "AUTOCLOSE": "Aktivieren Sie diese Option, wenn Chat-Sitzungen als nicht verwaltet geschlossen werden sollen, wenn kein Agent verfügbar ist. Weitere Informationen finden Sie unter: https://wiki.xcallymotion.com/display/XMV/Chat+Websites#ChatWebsites-Snippet", + "ENABLEUNMANAGEDNOTE": "Aktivieren Sie diese Option, wenn dem Besucher eine Nachricht angezeigt werden soll, wenn alle Agenten besetzt sind und der Chat nicht mehr verwaltet wird", + "ENABLECUSTOMERWRITING": "Aktivieren Sie es, wenn der Chat gestartet werden soll, ohne auf einen verfügbaren Agenten zu warten (Achtung: Wenn Sie ihn aktivieren, werden Ihre Chats niemals nicht verwaltet). Weitere Informationen finden Sie unter: https://wiki.xcallymotion.com/display/XMV/ Chat + Websites # ChatWebsites-Snippet ", + "INTERVAL": "Wählen Sie eins aus der Liste aus", + "HIDEWHENOFFLINE": "Snippet ausblenden, wenn offline", + "AGENTIDENTIFIER": "Repräsentiert die Agentenkennung innerhalb der Chat-Sitzung im Snippet", + "WEBSITEALIAS": "Ein Präfix, mit dem der Agentenname (Präfix + Agenten-ID) erstellt wird, der dem Webbesucher während der Chat-Sitzung angezeigt wird", + "VERTICALPOSITION": "Stellt den Abstand in Prozent von oben dar", "WELCOMEMESSAGE": "Lassen Sie das Feld leer, wenn Sie keine Willkommensnachricht senden möchten", - "MANDATORYDISPOSITION": "Zwingende Disposition", - "MANDATORYDISPOSITIONPAUSEID": "Pause zur Verwendung, wenn die obligatorische Disposition aktiviert ist" + "MANDATORYDISPOSITION": "Obligatorische Disposition", + "MANDATORYDISPOSITIONPAUSEID": "Pausieren Sie die Verwendung, wenn die obligatorische Disposition aktiviert ist" }, "ADDRESS": "Adresse", "ONLINESTATE": "Online Status", "OFFLINESTATE": "Offline Status", - "RATINGSTATE": "Bewertung Zustand", + "RATINGSTATE": "Bewertungsstatus", "ENQUIRY": "Anfrage", "OFFLINETEMPLATE": "Offline Vorlage", - "CHATDISPOSITIONS": "Chat Verfügungen", - "NO_CHATDISPOSITION_AVAILABLE": "Kein Chat Dispositionen verfügbar", - "ADD_CHATDISPOSITION": "Chat hinzufügen Disposition", + "CHATDISPOSITIONS": "Chat-Dispositionen", + "NO_CHATDISPOSITION_AVAILABLE": "Keine Chat-Dispositionen verfügbar", + "ADD_CHATDISPOSITION": "Chat Disposition hinzufügen", "DELETE": "Löschen", - "EDIT_CHATDISPOSITION": "Bearbeiten von Chat Disposition", - "DELETE_CHATDISPOSITION": "Chat löschen Disposition", + "EDIT_CHATDISPOSITION": "Chat-Disposition bearbeiten", + "DELETE_CHATDISPOSITION": "Chat-Disposition löschen", "CHAT": "Chat", - "ID": "Id", - "NEW_CHATQUEUE": "Neuer Chat Queue", - "NEW_CHATWEBSITE": "Neuer Chat Website", - "ROUNDED": "Gerundet", - "SQUARED": "Quadrat", + "ID": "ID", + "NEW_CHATQUEUE": "Neue Chat-Warteschlange", + "NEW_CHATWEBSITE": "Neue Chat-Website", + "ROUNDED": "Abgerundet", + "SQUARED": "Quadratisch", "NO_AVAILABLE_INFO": "Keine verfügbaren Info", - "ALL_TEAMS": "Alle Mannschaften", + "ALL_TEAMS": "Alle Teams", "SELECTED_TEAMS": "Ausgewählte Teams", "PAGE": "Seite", "ROWSPERPAGE": "Zeilen pro Seite", @@ -301,35 +301,35 @@ "OPEN": "Öffnen", "ACCOUNT": "Konto", "INTERACTION": "Interaktion", - "INTERACTIONS": "Wechselwirkungen", + "INTERACTIONS": "Interaktionen", "WEBSITE": "Website", "ALL": "Alle", "SELECT_STATUS": "Wählen Sie einen Status", "FILTER": "Filter", "FILTERS": "Filter", - "TEAMADD_CHATQUEUE": "Team Chat Warteschlange hinzufügen", - "AGENTADD_CHATQUEUE": "Agent zu Chatten Warteschlange hinzufügen", + "TEAMADD_CHATQUEUE": "Team zur Chat-Warteschlange hinzufügen", + "AGENTADD_CHATQUEUE": "Agent zur Chat-Warteschlange hinzufügen", "ALL_AGENTS": "Alle Agenten", "SELECTED_AGENTS": "Ausgewählte Agenten", - "CLOSEDAT": "Geschlossen", + "CLOSEDAT": "Geschlossen am", "DISPOSITION": "Disposition", "CREATEDAT": "Erstellt am", - "NOTES": "Hinweise", - "NO_INTERACTION_AVAILABLE": "Es sind keine Wechselwirkungen zur Verfügung", + "NOTES": "Notizen", + "NO_INTERACTION_AVAILABLE": "Keine Interaktionen verfügbar", "SELECTED_WEBSITE": "Wählen Sie eine Website", "GOTOP": "Gotop", "EDIT_GOTOP": "Gotop bearbeiten", "SELECT_WEBSITE": "Wählen Sie eine Website", "INFO": "Info", - "OFFLINEMESSAGES_CHATWEBSITE": "Offline Nachrichten gehen", - "WAITINGTITLE": "Warten Titel", + "OFFLINEMESSAGES_CHATWEBSITE": "Zu Offline-Nachrichten gehen", + "WAITINGTITLE": "Wartetitel", "WAITINGMESSAGE": "Wartende Nachricht", "RATING": "Bewertung", "NO_RATINGVALUE": "Keine Bewertung", - "AGENTSADD_QUEUE": "Agent zu Chatten Warteschlange hinzufügen", + "AGENTSADD_QUEUE": "Agent zur Chat-Warteschlange hinzufügen", "QUEUES": "Warteschlangen", "LOGGED_IN": "Angemeldet", - "PAUSED": "Angehalten", + "PAUSED": "Pausiert", "READY": "Bereit", "WAITING": "Warten", "WRITING": "Schreiben", @@ -340,47 +340,47 @@ "PAUSE": "Pause", "REALTIME": "Echtzeit", "AGENTS": "Agenten", - "FULLNAME": "Voller Name", + "FULLNAME": "Vollständiger Name", "INTERNAL": "Interne", "PHONE_STATE": "Telefonstatus", "PHONE_STATUS": "Telefonstatus", - "LOGOUT": "An-/Abmelden", + "LOGOUT": "Abmelden", "UNPAUSE": "Pause beenden", - "AGENTADD_QUEUE": "Agent zu Chatten Warteschlange hinzufügen", + "AGENTADD_QUEUE": "Agent zur Chat-Warteschlange hinzufügen", "DEFAULT_PAUSE": "Standard Pause", "UNKNOWN": "Unbekannt", "UNREGISTERED": "Unregistrierte", "UNAVAILABLE": "Nicht verfügbar", - "NOT_INUSE": "Nicht in Gebrauch", + "NOT_INUSE": "Nicht in Verwendung", "REACHABLE": "Erreichbar", "IN_USE": "Im Einsatz", - "VOICE": "Voice", + "VOICE": "Sprache", "NO_AGENT_ONLINE": "Kein Agent Online", - "GOTOREALTIME_CHATQUEUE": "In Echtzeit Chat Warteschlange", - "PARTIALPAUSE": "Teilweise Pause", + "GOTOREALTIME_CHATQUEUE": "Go to Echtzeit-Chat-Warteschlange", + "PARTIALPAUSE": "Teilpause", "BUSY": "Besetzt", "TIMER": "Timer", - "IDLE": "Leerlauf", + "IDLE": "Inaktiv", "CAPACITY": "Kapazität", "TAGS": "Tags", - "SHOWAGENTAVATAR": "Anzeigen persönlicher Agent avatar", + "SHOWAGENTAVATAR": "Persönlichen Agenten-Avatar anzeigen", "AGENTAVATAR": "Agent Avatar", - "SPYINTERACTION": "Spy", - "INTERACTIONS_CHATWEBSITE": "Zu Wechselwirkungen gehen", - "REFRESH_INTERACTIONS": "Aktualisieren Interaktionen", - "CLOSINGQUESTION": "Schließen Frage", + "SPYINTERACTION": "Spion", + "INTERACTIONS_CHATWEBSITE": "Zu den Interaktionen gehen", + "REFRESH_INTERACTIONS": "Interaktionen aktualisieren", + "CLOSINGQUESTION": "Frage schließen", "WEBSCRIPT": "Webskript", "NO_CHATCANNEDANSWER_AVAILABLE": "Keine vordefinierten Antworten verfügbar", - "NEW_CHATCANNEDANSWER": "Neue Antwort in Dosen", - "ADD_CHATCANNEDANSWER": "Addierte Antwort hinzufügen", + "NEW_CHATCANNEDANSWER": "Neue vordefinierte Antwort", + "ADD_CHATCANNEDANSWER": "Vordefinierte Antwort hinzufügen", "EDIT_CHATCANNEDANSWER": "Bearbeiten", "DELETE_CHATCANNEDANSWER": "Löschen", "OFFLINEMESSAGESUBJECT": "Betreff der Nachricht", "OFFLINEMESSAGEBODY": "Nachrichtentext", - "FORMSUBMITSUCCESSMESSAGE": "Formular senden Erfolgsmeldung", - "FORMSUBMITFAILUREMESSAGE": "Fehler beim Senden des Formulars", - "PLACEHOLDERMESSAGE": "Nachrichtenplatzhalter", - "NOTETITLE": "Hinweis Titel", + "FORMSUBMITSUCCESSMESSAGE": "Erfolgsmeldung beim Absenden des Formulars", + "FORMSUBMITFAILUREMESSAGE": "Fehlermeldung beim Absenden des Formulars", + "PLACEHOLDERMESSAGE": "Platzhalter für Nachrichten", + "NOTETITLE": "Titel der Notiz", "DELETE_INTERACTION": "Interaktion löschen", "FONTSIZE": "Schriftgröße", "TEXTCOLOR": "Textfarbe", @@ -388,65 +388,65 @@ "EDIT_SYSTEM": "System bearbeiten", "SYSTEM": "System", "NOTIFICATION": "Benachrichtigung", - "NOTIFICATIONSHAKE": "Shake", - "NOTIFICATIONSOUND": "Klingen", + "NOTIFICATIONSHAKE": "Schütteln", + "NOTIFICATIONSOUND": "Ton", "NOTIFICATIONTEMPLATE": "Vorlage", - "HIDEWHENOFFLINE": "verbergen", + "HIDEWHENOFFLINE": "Ausblenden", "INSERT_MESSAGE_HERE": "Fügen Sie hier Ihre Textnachricht ein", "AGENTALIAS": "Agent Alias", - "AGENTFULLNAME": "Voller Name des Agenten", + "AGENTFULLNAME": "Vollständiger Name des Agenten", "AGENTIDENTIFIER": "Identifikator", - "WAITFORTHEASSIGNEDAGENT": "Warte auf den zugewiesenen Agenten", + "WAITFORTHEASSIGNEDAGENT": "Warten auf den zugewiesenen Agenten", "ALIGNMENT": "Ausrichtung", "BOTTOM_RIGHT": "Unten rechts", "LEFT": "Links", - "RIGHT": "Recht", + "RIGHT": "Richtig", "VERTICALALIGNMENT": "Vertikale Ausrichtung", "POSITION": "Position", "VERTICALPOSITION": "Vertikale Position", - "SNIPPETSWIPEOUT": "Snippet wischen", + "SNIPPETSWIPEOUT": "Snippet ausschieben", "ALTERNATE": "Wechseln", "CENTERED": "Zentriert", - "CUSTOMERAVATAR": "Kundenavatar", + "CUSTOMERAVATAR": "Kunden-Avatar", "DEFAULTTITLE": "Standardtitel", "MESSAGESALIGNMENT": "Nachrichtenausrichtung", - "SHOWCUSTOMERAVATAR": "Kundenavatar zeigen", + "SHOWCUSTOMERAVATAR": "Kunden-Avatar anzeigen", "CUSTOMERALIAS": "Kunden-Alias", "EDIT_TAG": "Tag bearbeiten", - "TAG": "Etikett", - "AGENTADD_CHATWEBSITE": "Fügen Sie Agent zur Chat-Website hinzu", + "TAG": "Tag", + "AGENTADD_CHATWEBSITE": "Agent zur Chat-Website hinzufügen", "BACKGROUNDCOLOR": "Hintergrundfarbe", - "MESSAGEFONTSIZE": "Größe der Nachricht", - "AGENTTRANSFER": "Agent Transfer", - "AGENTTRANSFERTIMEOUT": "Zeitüberschreitung für Agententransfer", + "MESSAGEFONTSIZE": "Schriftgröße der Nachricht", + "AGENTTRANSFER": "Agententransfer", + "AGENTTRANSFERTIMEOUT": "Agententransfer-Timeout", "DIALOGFLOW": "Dialogflow", - "EDIT_DIALOGFLOW": "Dialogfluss bearbeiten", + "EDIT_DIALOGFLOW": "Dialogflow bearbeiten", "LANGUAGE": "Sprache", "QUEUETRANSFER": "Warteschlangenübertragung", - "QUEUETRANSFERTIMEOUT": "Warteschlangenübertragungs-Timeout", + "QUEUETRANSFERTIMEOUT": "Timeout bei der Warteschlangenübertragung", "SYSTEMALIAS": "Systemalias", "SYSTEMAVATAR": "System-Avatar", "TRANSFER": "Transfer", "WELCOMEMESSAGE": "Willkommensnachricht", - "ENABLECUSTOMERCHECKMARKS": "Aktivieren Sie die vom Kunden gelieferten / gelesenen Benachrichtigungen", - "CANNEDANSWERS": "Antworten in Dosen", - "CHATCANNEDANSWERS": "Antworten in Dosen", + "ENABLECUSTOMERCHECKMARKS": "Aktivieren vom Kunden gelieferten / gelesenen Benachrichtigungen", + "CANNEDANSWERS": "Vordefinierte Antworten", + "CHATCANNEDANSWERS": "Vordefinierte Antworten", "DOWNLOAD_INTERACTION": "Herunterladen", "LOGIN_TIME": "Login-Zeit", "PAUSE_TIME": "Pausenzeit", "ACCESSKEYID": "Zugangsschlüssel-ID", "BOTNAME": "Bot-Name", - "EDIT_AMAZONLEX": "Bearbeiten Sie Amazon Lex", + "EDIT_AMAZONLEX": "Amazon Lex bearbeiten", "LEXREGION": "Region", "SECRETACCESSKEY": "Geheimer Zugangsschlüssel", - "TEAMS_ASSOCIATION": "Vereinigung der Mannschaften", - "MANDATORYDISPOSITION": "Zwingende Disposition", - "MANDATORYDISPOSITIONPAUSEID": "Pause zur Verwendung, wenn die obligatorische Disposition aktiviert ist", - "ENABLESENDBUTTON": "Schaltfläche \"Senden\" aktivieren", + "TEAMS_ASSOCIATION": "Teams Verband", + "MANDATORYDISPOSITION": "Obligatorische Disposition", + "MANDATORYDISPOSITIONPAUSEID": "Pausieren Sie die Verwendung, wenn die obligatorische Disposition aktiviert ist", + "ENABLESENDBUTTON": "Sendetaste aktivieren", "FEEDBACKTITLE": "Feedback-Titel", "TOOLTIP_SCREENRECORDING_OFF": "Bildschirmaufnahme verfügbar", "TOOLTIP_SCREENRECORDING_ON": "Bildschirmaufnahme läuft", - "DOWNLOAD_WITHOUT_ATTACHMENTS": "Download ohne Anhänge", + "DOWNLOAD_WITHOUT_ATTACHMENTS": "Herunterladen ohne Anhänge", "DOWNLOAD_WITH_ATTACHMENTS": "Mit Anhängen herunterladen", "LASTMESSAGE": "Letzte Nachricht", "VIDAOO": "Vidaoo", @@ -457,7 +457,7 @@ "CLIENTEMAIL": "Kunden-E-Mail", "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Dialogflow V2 bearbeiten", - "PRIVATEKEY": "Privat Schlüssel", + "PRIVATEKEY": "Privat Key", "PROJECTID": "Projekt-ID" } } \ No newline at end of file diff --git a/public/app/main/apps/chat/i18n/en.json b/public/app/main/apps/chat/i18n/en.json index fb401e4..1902565 100644 --- a/public/app/main/apps/chat/i18n/en.json +++ b/public/app/main/apps/chat/i18n/en.json @@ -173,6 +173,12 @@ "VALUE": "Value", "MANDATORYDISPOSITION": "Mandatory disposition", "MANDATORYDISPOSITIONPAUSEID": "Pause to use if mandatory disposition is enabled", + "TVOX": "TVox", + "EDIT_TVOX": "Edit TVox", + "SERVICENAME": "Service name", + "TVOXIP": "TVox IP Address", + "TVOXUSERNAME": "TVox Username", + "TVOXPASSWD": "TVox Password", "ERRORS": { "PROJECTID_REQUIRED": "Mandatory Field", "CLIENTEMAIL_REQUIRED": "Mandatory Field", diff --git a/public/app/main/apps/chat/i18n/es.json b/public/app/main/apps/chat/i18n/es.json index 532fa55..470fa88 100644 --- a/public/app/main/apps/chat/i18n/es.json +++ b/public/app/main/apps/chat/i18n/es.json @@ -12,7 +12,7 @@ "CLOSINGQUESTION_MAX_LENGTH": "El valor debe tener una longitud máxima igual a {{max}}", "COMMAND_REQUIRED": "Campo obligatorio", "CONDITION_REQUIRED": "Campo obligatorio", - "DISPOSITION_REQUIRED": "Campo obligatorio", + "DISPOSITION_REQUIRED": "Campo tipificación obligatorio", "EMAIL_MUST_BE_VALID": "Formato erróneo", "ENQUIRY_FORWARDING_ADDRESS_REQUIRED": "Campo obligatorio", "FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "El valor debe ser mayor o igual que", @@ -113,7 +113,7 @@ "WEBSITEALIAS": "Un prefijo utilizado para componer el nombre del agente (prefijo ID del agente) que se muestra al visitante web durante la sesión de chat", "VERTICALPOSITION": "Representa la distancia en porcentaje desde arriba", "WELCOMEMESSAGE": "Deje en blanco si no desea enviar ningún mensaje de bienvenida.", - "MANDATORYDISPOSITION": "Cierre obligatorio", + "MANDATORYDISPOSITION": "Tipificación obligatorio", "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si el cierre obligatorio está habilitado" }, "ACCEPT": "Aceptar", @@ -123,7 +123,7 @@ "ACTIONS": "Acciones", "ADDRESS": "Dirección", "ADD_CHATCANNEDANSWER": "Agregar respuesta enlatada", - "ADD_CHATDISPOSITION": "Agregar cierre de chat", + "ADD_CHATDISPOSITION": "Agregar tipificación de chat", "ADD_CHATPROACTIVEACTION": "Agregar acción proactiva", "ADD_CHATQUEUE": "Agregar cola de chat", "ADD_CHATWEBSITE": "Añadir sitio web de chat", @@ -150,7 +150,7 @@ "BUTTONCOLOR": "Color del Botón", "CAPACITY": "Capacidad", "CHAT": "Chat", - "CHATDISPOSITIONS": "Cierres de chat", + "CHATDISPOSITIONS": "tipificación de chat", "CHATPROACTIVEACTIONS": "Acciones proactivas", "CHATQUEUES": "Colas de chat", "CHATWEBSITES": "Sitios web de chat", @@ -175,21 +175,21 @@ "DEFAULT_PAUSE": "Pausa por defecto", "DELETE": "Borrar", "DELETE_CHATCANNEDANSWER": "Borrar", - "DELETE_CHATDISPOSITION": "Eliminar Cierre de Chat", + "DELETE_CHATDISPOSITION": "Eliminar tipificación de Chat", "DELETE_CHATPROACTIVEACTION": "Eliminar acción proactiva", "DELETE_CHATQUEUE": "Eliminar cola de chat", "DELETE_CHATWEBSITE": "Eliminar el sitio web de chat", "DELETE_INTERACTION": "Eliminar interacción", "DELETE_OFFLINEMESSAGE": "Borrar", "DESCRIPTION": "Descripción", - "DISPOSITION": "Cierre", - "DISPOSITIONS": "Cierres", + "DISPOSITION": "Tipificación", + "DISPOSITIONS": "Tipificaciones", "DOWN": "Abajo", "DOWNLOADTRANSCRIPT": "Descargar la transcripción", "EDIT_AGENT": "Editar agente", "EDIT_AUTOREPLY": "Editar respuesta automática", "EDIT_CHATCANNEDANSWER": "Editar", - "EDIT_CHATDISPOSITION": "Editar Cierre de Chat", + "EDIT_CHATDISPOSITION": "Editar Tipificación de Chat", "EDIT_CHATPROACTIVEACTION": "Editar acción proactiva", "EDIT_CHATQUEUE": "Editar cola de chat", "EDIT_CHATWEBSITE": "Editar sitio web de chat", @@ -266,7 +266,7 @@ "NAME": "Nombre", "NAME_TITLE": "Etiqueta de entrada de nombre", "NEW_CHATCANNEDANSWER": "Nueva respuesta enlatada", - "NEW_CHATDISPOSITION": "Nuevo cierre de chat", + "NEW_CHATDISPOSITION": "Nueva tipificación de chat", "NEW_CHATPROACTIVEACTION": "Nueva acción proactiva", "NEW_CHATQUEUE": "Nueva cola de chat", "NEW_CHATWEBSITE": "Nuevo sitio web de chat", @@ -282,7 +282,7 @@ "NO_AGENT_ONLINE": "Sin agente en línea", "NO_AVAILABLE_INFO": "No hay información disponible", "NO_CHATCANNEDANSWER_AVAILABLE": "No hay respuestas enlatadas disponibles", - "NO_CHATDISPOSITION_AVAILABLE": "No hay Cierres de Chat disponibles", + "NO_CHATDISPOSITION_AVAILABLE": "No hay tipificaciones de Chat disponibles", "NO_CHATPROACTIVEACTION_AVAILABLE": "No hay acciones proactivas disponibles", "NO_INTERACTION_AVAILABLE": "No hay interacciones disponibles", "NO_OFFLINEMESSAGE_AVAILABLE": "No hay mensajes sin conexión disponibles", @@ -440,8 +440,8 @@ "LEXREGION": "Región", "SECRETACCESSKEY": "Clave de acceso secreto", "TEAMS_ASSOCIATION": "Asociación de equipos", - "MANDATORYDISPOSITION": "Cierre obligatorio", - "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si el cierre obligatorio está habilitado", + "MANDATORYDISPOSITION": "Tipificación obligatoria", + "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si la Tipificación obligatoria está habilitada", "ENABLESENDBUTTON": "Habilitar botón Enviar", "FEEDBACKTITLE": "Título de comentarios", "TOOLTIP_SCREENRECORDING_OFF": "Grabación de pantalla disponible", diff --git a/public/app/main/apps/contactmanager/i18n/en.json b/public/app/main/apps/contactmanager/i18n/en.json index 53b6c05..bbf6356 100644 --- a/public/app/main/apps/contactmanager/i18n/en.json +++ b/public/app/main/apps/contactmanager/i18n/en.json @@ -183,6 +183,12 @@ "RELATIONSHIP": "Relationship ...", "RELATIONSHIPCOMPANY": " ... with", "CREATE": "Create", - "RECALLME": "Recall Me" + "RECALLME": "Recall Me", + "NOTIFICATIONS": { + "NO_DATA_ERROR": "Unable to retrieve any data", + "INTERACTION_OPEN_ERROR": "Unable to open the interaction", + "ACCOUNTS_GET_ERROR": "Unable to retrieve any {{channel}} account", + "JSCRIPTY_GET_ERROR": "Unable to retrieve any Jscripty project" + } } } \ No newline at end of file diff --git a/public/app/main/apps/contactmanager/i18n/es.json b/public/app/main/apps/contactmanager/i18n/es.json index c664a85..d3ef502 100644 --- a/public/app/main/apps/contactmanager/i18n/es.json +++ b/public/app/main/apps/contactmanager/i18n/es.json @@ -24,7 +24,7 @@ "ADD_GLOBALCUSTOMFIELD": "Agregar campo personalizado", "ADD_LIST": "Añadir lista", "ADD_TAG": "Añadir etiqueta", - "ADD_VOICEDISPOSITION": "Agregar Cierre de voz", + "ADD_VOICEDISPOSITION": "Agregar Tipificación de voz", "AGENT": "Agente", "AGENTADD_LIST": "Agregar agentes a la lista", "ALIAS": "Alias", @@ -54,11 +54,11 @@ "DELETE_GLOBALCUSTOMFIELD": "Eliminar campo personalizado", "DELETE_HOPPER": "Eliminar Contenedor", "DELETE_LIST": "Eliminar lista", - "DELETE_VOICEDISPOSITION": "Eliminar cierre de voz", + "DELETE_VOICEDISPOSITION": "Eliminar tipificación de voz", "DESCRIPTION": "Descripción", "DETAIL": "Detalle", - "DISPOSITION": "Cierre", - "DISPOSITIONS": "Plan", + "DISPOSITION": "Tipificación", + "DISPOSITIONS": "Tipificaciones", "DUPLICATES": "Duplicados", "DUPLICATE_CONTACT": "Contacto duplicado", "EDIT_COMPANY": "Editar empresa", @@ -67,7 +67,7 @@ "EDIT_GLOBALCUSTOMFIELD": "Editar campo personalizado", "EDIT_HOPPER": "Editar Contenador", "EDIT_LIST": "Lista de edición", - "EDIT_VOICEDISPOSITION": "Editar Cierre de Voz", + "EDIT_VOICEDISPOSITION": "Editar Tipificación de Voz", "EMAIL": "Email", "EMAIL_DOMAIN": "Dominio de correo electrónico", "ENDTIME": "Hora de finalización", @@ -105,7 +105,7 @@ "NEW_GLOBALCUSTOMFIELD": "Nuevos campos personalizados", "NEW_LIST": "Lista nueva", "NEW_TAG": "Nueva etiqueta", - "NEW_VOICEDISPOSITION": "Nuevo cierre de voz", + "NEW_VOICEDISPOSITION": "Nueva tipificación de voz", "NONE": "Ninguna", "NOTES": "Notas", "NO_AVAILABLE_INFO": "No hay información disponible", @@ -113,7 +113,7 @@ "NO_COMPANIES": "Sin empresas", "NO_CUSTOMFIELD_AVAILABLE": "No hay campos personalizados disponibles", "NO_TAG": "Sin etiquetas", - "NO_VOICEDISPOSITION_AVAILABLE": "No hay Cierres de voz disponibles", + "NO_VOICEDISPOSITION_AVAILABLE": "No hay tipificaciones de voz disponibles", "OF": "de", "PAGE": "Página", "PERSONAL_INFO": "Información personal", @@ -160,7 +160,7 @@ "USERID": "Llamar a la identificación del agente", "VALUE": "Valor", "VAT": "IVA", - "VOICEDISPOSITIONS": "Cierres de voz", + "VOICEDISPOSITIONS": "Tipificaciones de voz", "VOICEQUEUEID": "ID de Cola de Voz", "WEBSITE": "Sitio web", "CUSTOMER_JOURNEY": "Seguimiento Cliente", diff --git a/public/app/main/apps/contactmanager/i18n/it.json b/public/app/main/apps/contactmanager/i18n/it.json index d4e9954..2a70302 100644 --- a/public/app/main/apps/contactmanager/i18n/it.json +++ b/public/app/main/apps/contactmanager/i18n/it.json @@ -183,6 +183,12 @@ "RELATIONSHIP": "Tipo relazione ...", "RELATIONSHIPCOMPANY": " ... con", "CREATE": "Crea", - "RECALLME": "Recall Me" + "RECALLME": "Recall Me", + "NOTIFICATIONS": { + "NO_DATA_ERROR": "Impossibile recuperare le informazioni", + "INTERACTION_OPEN_ERROR": "Impossibile aprire l'interazione", + "ACCOUNTS_GET_ERROR": "Impossibile recuperare gli account {{channel}}", + "JSCRIPTY_GET_ERROR": "Impossibile recuperare i progetti Jscripty" + } } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/ar.json b/public/app/main/apps/dashboards/i18n/ar.json index 2cbe2d0..84a9253 100644 --- a/public/app/main/apps/dashboards/i18n/ar.json +++ b/public/app/main/apps/dashboards/i18n/ar.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "الوقت المنقضي منذ بدء المكالمة", "ELAPSED_DISPOSED": "الوقت المنقضي منذ انتهاء المكالمة", "LOST_CONNECTION": "مواجهة مشكلات اتصال الشبكة. الرجاء التحقق من اتصال الانترنت الخاص بك.", - "NO_RESULTS_AVAILABLE": "لا توجد نتائج متاحة" + "NO_RESULTS_AVAILABLE": "لا توجد نتائج متاحة", + "AUTOCLOSE": "إغلاق علامة تبويب الاتصال تلقائيًا بعد التخلص منها" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/cs.json b/public/app/main/apps/dashboards/i18n/cs.json index fa8384c..8779c51 100644 --- a/public/app/main/apps/dashboards/i18n/cs.json +++ b/public/app/main/apps/dashboards/i18n/cs.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Uplynulý čas od zahájení hovoru", "ELAPSED_DISPOSED": "Uplynulý čas od ukončení hovoru", "LOST_CONNECTION": "Problémy s připojením k síti. Zkontrolujte prosím své připojení k internetu.", - "NO_RESULTS_AVAILABLE": "Žádné výsledky nejsou k dispozici" + "NO_RESULTS_AVAILABLE": "Žádné výsledky nejsou k dispozici", + "AUTOCLOSE": "Po likvidaci automaticky zavřete kartu kontaktů" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/da.json b/public/app/main/apps/dashboards/i18n/da.json index 163b278..28282d5 100644 --- a/public/app/main/apps/dashboards/i18n/da.json +++ b/public/app/main/apps/dashboards/i18n/da.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Forløbet tid siden opkaldet startede", "ELAPSED_DISPOSED": "Forløbet tid siden opkaldet sluttede", "LOST_CONNECTION": "Oplever problemer med netværksforbindelsen. Kontroller din internetforbindelse.", - "NO_RESULTS_AVAILABLE": "Ingen resultater tilgængelige" + "NO_RESULTS_AVAILABLE": "Ingen resultater tilgængelige", + "AUTOCLOSE": "Luk kontaktfanen automatisk efter bortskaffelse" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/de.json b/public/app/main/apps/dashboards/i18n/de.json index afd7c65..2185889 100644 --- a/public/app/main/apps/dashboards/i18n/de.json +++ b/public/app/main/apps/dashboards/i18n/de.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Verstrichene Zeit seit dem Start des Anrufs", "ELAPSED_DISPOSED": "Verstrichene Zeit seit Beendigung des Anrufs", "LOST_CONNECTION": "Probleme mit der Netzwerkkonnektivität. Bitte überprüfe deine Internetverbindung.", - "NO_RESULTS_AVAILABLE": "Keine Ergebnisse verfügbar" + "NO_RESULTS_AVAILABLE": "Keine Ergebnisse verfügbar", + "AUTOCLOSE": "Schließen Sie die Kontaktlasche nach der Entsorgung automatisch" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/en.json b/public/app/main/apps/dashboards/i18n/en.json index 4b44a45..208fa01 100644 --- a/public/app/main/apps/dashboards/i18n/en.json +++ b/public/app/main/apps/dashboards/i18n/en.json @@ -174,6 +174,7 @@ "MERGE": "Merge", "DUPLICATE": "Duplicate", "UNIQUEID": "Uniqueid", + "AUTOCLOSE": "Automatically close contact tab after disposal", "CAMPAIGN": "Campaign", "NONE": "None", "NAME": "Name", diff --git a/public/app/main/apps/dashboards/i18n/es.json b/public/app/main/apps/dashboards/i18n/es.json index 0e902b3..786fc9e 100644 --- a/public/app/main/apps/dashboards/i18n/es.json +++ b/public/app/main/apps/dashboards/i18n/es.json @@ -15,7 +15,7 @@ "AGENT": "Agente", "CREATED_AT": "Creado en", "CLOSED_AT": "Cerrado a", - "DISPOSITION": "Cierre", + "DISPOSITION": "Tipificación", "CONTACT": "Contacto", "INTERACTION": "Interacción", "BROWSER_NAME": "Nombre del Navegador", @@ -25,7 +25,7 @@ "DEVICE_MODEL": "Modelo de dispositivo", "DEVICE_VENDOR": "Proveedor del dispositivo", "DEVICE_TYPE": "Tipo de dispositivo", - "RECALLME": "Recordar", + "RECALLME": "Reagendar individual", "DROP_RATE": "Tasa de Llamadas Asignadas a Colas", "DROPPED": "Asignado", "DROPPED_TEXT": "Llamadas Asignadas a Colas", @@ -41,7 +41,7 @@ "UPDATE": "Actualizar", "MORE": "Más", "MOTIONDIALER": "Motion Bull", - "DISPOSE": "Disponer", + "DISPOSE": "Tipificar", "QUEUES": "Colas", "DIALER_CALL": "Numero Marcado", "ELAPSED_TIME": "Tiempo transcurrido", @@ -59,7 +59,7 @@ "SOLD": "Vendido", "SPECIAL": "Especial", "BLACKLIST": "Lista negra", - "RESCHEDULE": "Reprogramar", + "RESCHEDULE": "Reagendar Cola", "FIRSTNAME": "Primer Nombre", "LASTNAME": "Apellido", "MOBILE": "Celular", @@ -121,17 +121,17 @@ "VOICE_TOTAL_OFFERED": "El número total de llamadas de cola (completado + abandonado). Tenga en cuenta que las llamadas que entran en un IVR y no en una cola, no serán consideradas", "VOICE_UNMANAGED": "El número total de llamadas de cola no administradas, para todas las colas existentes. Incluye las llamadas que se abandonan por tiempo de espera, joinempty, leavewhenempty y exitwithkey (cfr. Asterisk doc para más información)", "VOICE_WAITING": "El número total de llamadas de cola de espera, para todas las colas existentes", - "MANDATORY_DISPOSITION_ENABLED": "Cierre obligatorio habilitado para esta cuenta", + "MANDATORY_DISPOSITION_ENABLED": "Tipificación obligatoria habilitada para esta cuenta", "EXACT_MATCH_FILTER": "Busca una coincidencia exacta", "LIKE_FILTER": "Busca el patrón especificado" }, "ERRORS": { "FIRSTNAME_REQUIRED": "El Nombre es obligatorio", "PHONE_REQUIRED": "El teléfono es necesario", - "DISPOSITION_REQUIRED": "Campo obligatorio", - "AGENT_REQUIRED": "Campo obligatorio", - "QUEUE_REQUIRED": "Campo obligatorio", - "CAMPAIGN_REQUIRED": "Campo obligatorio" + "DISPOSITION_REQUIRED": "Campo Tipificación obligatorio", + "AGENT_REQUIRED": "Campo Agente obligatorio", + "QUEUE_REQUIRED": "Campo de Cola obligatorio", + "CAMPAIGN_REQUIRED": "Campo Campaña obligatorio" }, "NO_AVAILABLE_INFO": "No hay información disponible", "WELCOME_TO_MOTION": "Bienvenido a Motion", @@ -171,9 +171,9 @@ "OF": "De", "REPLY_PLACEHOLDER": "Escriba y pulse entre para enviar un mensaje", "CONTACT_INFO": "Información de contacto", - "CLOSE_AND_DISPOSE": "Cerrar y Disponer", - "DISPOSITIONS": "Cierres", - "CLOSE_WITHOUT_DISPOSE": "Cerrar sin Disponer", + "CLOSE_AND_DISPOSE": "Cerrar y Tipificar", + "DISPOSITIONS": "Tipificaciones", + "CLOSE_WITHOUT_DISPOSE": "Cerrar sin Tipificar", "ACCEPT": "Aceptar", "REJECT": "Rechazar", "CLOSED": "Cerrado", @@ -255,7 +255,7 @@ "CALL_NUMBER": "Llamada", "TRANSFER_NUMBER": "Transferir", "CALL_SAVED": "Llamada guardada correctamente", - "CALL_DISPOSED": "Llamada correctamente dispuesta", + "CALL_DISPOSED": "Llamada correctamente tipificada", "CHANNEL_WAITING_TEXT": "Esperando interacciones en cola", "CHANNEL_QUEUE": "Cola", "CHANNEL_FROM": "De", @@ -282,7 +282,7 @@ "NO_DATA_AVAILABLE": "Datos no disponibles", "AGENTS": "Agentes", "TRANSFER": "Transferir", - "NO_DISPOSITION_SET": "No hay cierre establecido", + "NO_DISPOSITION_SET": "No hay tipificación establecida", "ABANDONED_RATE": "Tasa de Abandono", "ABANDONED_RATE_TEXT": "Interacciones Tasa de Abandono", "AVG_MANAGED_TIME": "Tiempo de gestión de AVG", @@ -295,11 +295,11 @@ "TODAY_INTERACTIONS_STATS": "Estadísticas Diarias Interacciones", "UNMANAGED_RATE": "Tasa No Administrada", "UNMANAGED_RATE_TEXT": "Tasa Interacciones No Gestionadas", - "VOICE_ABANDONED": "ABANDONADO", + "VOICE_ABANDONED": "ABANDONADA", "VOICE_ABANDONED_TEXT": "LLAMADAS DE COLA ABANDONADAS", "VOICE_ABANDON_RATE": "TASA DE ABANDONO", "VOICE_ABANDON_RATE_TEXT": "TASA DE LLAMADA ABANDONADAS", - "VOICE_ANSWERED": "CONTESTADO", + "VOICE_ANSWERED": "CONTESTADA", "VOICE_ANSWERED_TEXT": "LLAMADAS CONTESTADAS COLA", "VOICE_ANSWER_RATE": "TASA DE LLAMADAS RESPONDIDAS", "VOICE_ANSWER_RATE_TEXT": "COLA TASA DE LLAMADAS RESPONDIDAS", @@ -322,8 +322,8 @@ "PUBLIC_INTERACTION": "La interacción es pública.", "VISIBILITY": "Visibilidad", "INTERACTION_CLOSED": "Interacción correctamente cerrada", - "INTERACTION_CLOSED_DISPOSED": "Interacción debidamente cerrada y disponibles", - "INTERACTION_DISPOSED": "Interacción adecuadamente eliminada", + "INTERACTION_CLOSED_DISPOSED": "Interacción debidamente cerrada y tipificada", + "INTERACTION_DISPOSED": "Interacción adecuadamente tipificada", "ASSIGNED_TO_OTHERS": "Asignado a otros", "SELECT_ALL": "Seleccionar todo", "CHAT_INTERACTIONS": "Interacciones de chat", @@ -392,7 +392,7 @@ "INVOICEDETAILS": "DETALLES DE FACTURA", "INVOICEDISCOUNT": "Descuento", "INVOICEEMITED": "Emitido", - "INVOICEID": "Factura", + "INVOICEID": "IDFactura", "INVOICENAME": "Nombre de factura", "INVOICENOPRODUCTAMOUNT": "Cantidad", "INVOICENOPRODUCTDESCRIPTION": "Descripción en la factura", @@ -555,13 +555,14 @@ "SELECT_CONTACT": "Seleccione un contacto", "WHICH_ONE_TO_USE": "Cual quieres usar?", "NO_WHATSAPP_ACCOUNTS_AVAILABLE": "No hay cuenta de Whatsapp disponible", - "SECOND_LEVEL_DISPOSITION": "Disposición de segundo nivel", - "THIRD_LEVEL_DISPOSITION": "Disposición de tercer nivel", + "SECOND_LEVEL_DISPOSITION": "Tipificación de segundo nivel", + "THIRD_LEVEL_DISPOSITION": "Tipificación de tercer nivel", "LICENSE_EXPIRE_REMAINING_DAYS": "¡Su licencia está a punto de caducar! Comuníquese con su administrador", "CREATEDAT": "Creado en", "ELAPSED_ANSWERED": "Tiempo transcurrido desde que comenzó la llamada", "ELAPSED_DISPOSED": "Tiempo transcurrido desde que finalizó la llamada", "LOST_CONNECTION": "Experimentar problemas de conectividad de red. Por favor revise su conexion a internet.", - "NO_RESULTS_AVAILABLE": "No hay resultados disponibles" + "NO_RESULTS_AVAILABLE": "No hay resultados disponibles", + "AUTOCLOSE": "Cerrar automáticamente la pestaña de contacto después de su eliminación" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/et.json b/public/app/main/apps/dashboards/i18n/et.json index 069ed7d..f5ecee3 100644 --- a/public/app/main/apps/dashboards/i18n/et.json +++ b/public/app/main/apps/dashboards/i18n/et.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Kulunud aeg kõne alustamisest", "ELAPSED_DISPOSED": "Kulunud aeg kõne lõppemisest", "LOST_CONNECTION": "Võrguühendusprobleemide kogemine. Palun kontrollige oma Interneti-ühendust.", - "NO_RESULTS_AVAILABLE": "Tulemusi pole saadaval" + "NO_RESULTS_AVAILABLE": "Tulemusi pole saadaval", + "AUTOCLOSE": "Pärast utiliseerimist sulgege kontaktikaart automaatselt" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/fa.json b/public/app/main/apps/dashboards/i18n/fa.json index f4aa3ff..e0f647b 100644 --- a/public/app/main/apps/dashboards/i18n/fa.json +++ b/public/app/main/apps/dashboards/i18n/fa.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "زمان سپری شده از زمان شروع تماس", "ELAPSED_DISPOSED": "زمان سپری شده از زمان پایان تماس", "LOST_CONNECTION": "مشکلات اتصال به شبکه را تجربه می کنید. لطفاً اتصال اینترنت خود را بررسی کنید.", - "NO_RESULTS_AVAILABLE": "هیچ نتیجه ای در دسترس نیست" + "NO_RESULTS_AVAILABLE": "هیچ نتیجه ای در دسترس نیست", + "AUTOCLOSE": "پس از دفع ، به طور خودکار برگه تماس را ببندید" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/fi.json b/public/app/main/apps/dashboards/i18n/fi.json index c487500..8011f45 100644 --- a/public/app/main/apps/dashboards/i18n/fi.json +++ b/public/app/main/apps/dashboards/i18n/fi.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Kulunut aika puhelun aloittamisesta", "ELAPSED_DISPOSED": "Kulunut aika puhelun lopettamisesta", "LOST_CONNECTION": "Verkkoyhteysongelmia. Tarkista internetyhteytesi.", - "NO_RESULTS_AVAILABLE": "Ei tuloksia" + "NO_RESULTS_AVAILABLE": "Ei tuloksia", + "AUTOCLOSE": "Sulje kosketusvälilehti automaattisesti hävittämisen jälkeen" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/fr.json b/public/app/main/apps/dashboards/i18n/fr.json index 521c4db..66b62f1 100644 --- a/public/app/main/apps/dashboards/i18n/fr.json +++ b/public/app/main/apps/dashboards/i18n/fr.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Temps écoulé depuis le début de l'appel", "ELAPSED_DISPOSED": "Temps écoulé depuis la fin de l'appel", "LOST_CONNECTION": "Vous rencontrez des problèmes de connectivité réseau. S'il vous plait, vérifiez votre connexion internet.", - "NO_RESULTS_AVAILABLE": "Aucun résultat disponible" + "NO_RESULTS_AVAILABLE": "Aucun résultat disponible", + "AUTOCLOSE": "Fermer automatiquement l'onglet de contact après l'élimination" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/he.json b/public/app/main/apps/dashboards/i18n/he.json index b183ffa..1160f20 100644 --- a/public/app/main/apps/dashboards/i18n/he.json +++ b/public/app/main/apps/dashboards/i18n/he.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "הזמן שחלף מאז תחילת השיחה", "ELAPSED_DISPOSED": "הזמן שחלף מאז סיום השיחה", "LOST_CONNECTION": "חווה בעיות קישוריות רשת. אנא בדוק את חיבור האינטרנט שלך.", - "NO_RESULTS_AVAILABLE": "אין תוצאות זמינות" + "NO_RESULTS_AVAILABLE": "אין תוצאות זמינות", + "AUTOCLOSE": "סגור אוטומטית את לשונית אנשי הקשר לאחר סילוק" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/hi.json b/public/app/main/apps/dashboards/i18n/hi.json index 4097949..6555f04 100644 --- a/public/app/main/apps/dashboards/i18n/hi.json +++ b/public/app/main/apps/dashboards/i18n/hi.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "कॉल शुरू होने के बाद का समय समाप्त हो गया", "ELAPSED_DISPOSED": "कॉल समाप्त होने के बाद का समय समाप्त हो गया", "LOST_CONNECTION": "नेटवर्क कनेक्टिविटी मुद्दों का अनुभव। कृपया अपने इंटरनेट कनेक्शन की जाँच करें।", - "NO_RESULTS_AVAILABLE": "कोई परिणाम उपलब्ध नहीं है" + "NO_RESULTS_AVAILABLE": "कोई परिणाम उपलब्ध नहीं है", + "AUTOCLOSE": "निपटान के बाद संपर्क टैब को स्वचालित रूप से बंद करें" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/id.json b/public/app/main/apps/dashboards/i18n/id.json index 658517a..3aedd9a 100644 --- a/public/app/main/apps/dashboards/i18n/id.json +++ b/public/app/main/apps/dashboards/i18n/id.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Waktu yang berlalu sejak panggilan dimulai", "ELAPSED_DISPOSED": "Waktu yang berlalu sejak panggilan berakhir", "LOST_CONNECTION": "Mengalami masalah konektivitas jaringan. Silakan periksa koneksi internet Anda.", - "NO_RESULTS_AVAILABLE": "Tidak ada hasil yang tersedia" + "NO_RESULTS_AVAILABLE": "Tidak ada hasil yang tersedia", + "AUTOCLOSE": "Tutup tab kontak secara otomatis setelah dibuang" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/it.json b/public/app/main/apps/dashboards/i18n/it.json index 72aba4b..9a3e376 100644 --- a/public/app/main/apps/dashboards/i18n/it.json +++ b/public/app/main/apps/dashboards/i18n/it.json @@ -116,6 +116,7 @@ "CHAT": "Chat", "MAIL": "Email", "SMS": "Sms", + "AUTOCLOSE": "Chiudi automaticamente la scheda contatto dopo la disposition", "OPENCHANNEL": "Open Channel", "FAX": "Fax", "NOT_ASSIGNED": "Non assegnata", diff --git a/public/app/main/apps/dashboards/i18n/ja.json b/public/app/main/apps/dashboards/i18n/ja.json index a3794e4..83dcec0 100644 --- a/public/app/main/apps/dashboards/i18n/ja.json +++ b/public/app/main/apps/dashboards/i18n/ja.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "通話開始からの経過時間", "ELAPSED_DISPOSED": "通話終了からの経過時間", "LOST_CONNECTION": "ネットワーク接続の問題が発生しています。インターネット接続を確認してください。", - "NO_RESULTS_AVAILABLE": "利用可能な結果はありません" + "NO_RESULTS_AVAILABLE": "利用可能な結果はありません", + "AUTOCLOSE": "廃棄後、コンタクトタブを自動的に閉じる" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/ko.json b/public/app/main/apps/dashboards/i18n/ko.json index 3da979d..d55356e 100644 --- a/public/app/main/apps/dashboards/i18n/ko.json +++ b/public/app/main/apps/dashboards/i18n/ko.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "통화가 시작된 이후 경과 된 시간", "ELAPSED_DISPOSED": "통화가 종료 된 이후 경과 된 시간", "LOST_CONNECTION": "네트워크 연결 문제가 있습니다. 인터넷 연결을 확인하십시오.", - "NO_RESULTS_AVAILABLE": "사용 가능한 ê²°ê³¼ 없음" + "NO_RESULTS_AVAILABLE": "사용 가능한 ê²°ê³¼ 없음", + "AUTOCLOSE": "폐기 후 자동으로 접촉 탭 닫기" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/lt.json b/public/app/main/apps/dashboards/i18n/lt.json index 88ef008..fe18996 100644 --- a/public/app/main/apps/dashboards/i18n/lt.json +++ b/public/app/main/apps/dashboards/i18n/lt.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Praėjo laikas nuo skambučio pradžios", "ELAPSED_DISPOSED": "Praėjo laikas nuo skambučio pabaigos", "LOST_CONNECTION": "IÅ¡kyla tinklo ryÅ¡io problemų. Patikrinkite interneto ryšį.", - "NO_RESULTS_AVAILABLE": "Rezultatų nėra" + "NO_RESULTS_AVAILABLE": "Rezultatų nėra", + "AUTOCLOSE": "Po Å¡alinimo automatiÅ¡kai uždarykite kontaktų skirtuką" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/lv.json b/public/app/main/apps/dashboards/i18n/lv.json index 21e3c28..ca79c5b 100644 --- a/public/app/main/apps/dashboards/i18n/lv.json +++ b/public/app/main/apps/dashboards/i18n/lv.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Pagājis laiks kopÅ¡ zvana sākuma", "ELAPSED_DISPOSED": "Pagājis laiks kopÅ¡ zvana beigām", "LOST_CONNECTION": "TÄ«kla savienojamÄ«bas problēmas. LÅ«dzu, pārbaudiet interneta savienojumu.", - "NO_RESULTS_AVAILABLE": "Rezultāti nav pieejami" + "NO_RESULTS_AVAILABLE": "Rezultāti nav pieejami", + "AUTOCLOSE": "Pēc iznÄ«cināšanas automātiski aizveriet kontaktu cilni" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/nl.json b/public/app/main/apps/dashboards/i18n/nl.json index e10811e..18fd28c 100644 --- a/public/app/main/apps/dashboards/i18n/nl.json +++ b/public/app/main/apps/dashboards/i18n/nl.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Verstreken tijd sinds het gesprek is gestart", "ELAPSED_DISPOSED": "Verstreken tijd sinds het gesprek is beëindigd", "LOST_CONNECTION": "Problemen met netwerkconnectiviteit ervaren. Controleer uw internetverbinding.", - "NO_RESULTS_AVAILABLE": "Geen resultaten beschikbaar" + "NO_RESULTS_AVAILABLE": "Geen resultaten beschikbaar", + "AUTOCLOSE": "Sluit het contacttabblad automatisch na verwijdering" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/no.json b/public/app/main/apps/dashboards/i18n/no.json index d1448ba..1b886a6 100644 --- a/public/app/main/apps/dashboards/i18n/no.json +++ b/public/app/main/apps/dashboards/i18n/no.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Forløpt tid siden samtalen startet", "ELAPSED_DISPOSED": "Forløpt tid siden samtalen ble avsluttet", "LOST_CONNECTION": "Opplever problemer med nettverkstilkobling. Kontroller internettforbindelsen din.", - "NO_RESULTS_AVAILABLE": "Ingen resultater tilgjengelig" + "NO_RESULTS_AVAILABLE": "Ingen resultater tilgjengelig", + "AUTOCLOSE": "Lukk kontaktfanen automatisk etter avhending" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/pl.json b/public/app/main/apps/dashboards/i18n/pl.json index fe5e108..212d605 100644 --- a/public/app/main/apps/dashboards/i18n/pl.json +++ b/public/app/main/apps/dashboards/i18n/pl.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Czas, który upłynął od rozpoczęcia rozmowy", "ELAPSED_DISPOSED": "Czas, który upłynął od zakończenia połączenia", "LOST_CONNECTION": "Występują problemy z łącznością sieciową. Proszę sprawdzić swoje połączenie z internetem.", - "NO_RESULTS_AVAILABLE": "Brak dostępnych wyników" + "NO_RESULTS_AVAILABLE": "Brak dostępnych wyników", + "AUTOCLOSE": "Automatycznie zamykaj zakładkę kontaktową po utylizacji" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/pt-BR.json b/public/app/main/apps/dashboards/i18n/pt-BR.json index 8604dec..c499e15 100644 --- a/public/app/main/apps/dashboards/i18n/pt-BR.json +++ b/public/app/main/apps/dashboards/i18n/pt-BR.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Tempo decorrido desde o início da chamada", "ELAPSED_DISPOSED": "Tempo decorrido desde o final da chamada", "LOST_CONNECTION": "Enfrentando problemas de conectividade de rede. Por favor, verifique sua conexão à internet.", - "NO_RESULTS_AVAILABLE": "Nenhum resultado disponível" + "NO_RESULTS_AVAILABLE": "Nenhum resultado disponível", + "AUTOCLOSE": "Fechar automaticamente a guia de contato após o descarte" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/pt-PT.json b/public/app/main/apps/dashboards/i18n/pt-PT.json index 0b6640c..73e3d51 100644 --- a/public/app/main/apps/dashboards/i18n/pt-PT.json +++ b/public/app/main/apps/dashboards/i18n/pt-PT.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Tempo decorrido desde o início da chamada", "ELAPSED_DISPOSED": "Tempo decorrido desde o final da chamada", "LOST_CONNECTION": "Enfrentando problemas de conectividade de rede. Por favor, verifique sua conexão à internet.", - "NO_RESULTS_AVAILABLE": "Nenhum resultado disponível" + "NO_RESULTS_AVAILABLE": "Nenhum resultado disponível", + "AUTOCLOSE": "Fechar automaticamente a guia de contato após o descarte" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/ru.json b/public/app/main/apps/dashboards/i18n/ru.json index f76bf12..bb889b4 100644 --- a/public/app/main/apps/dashboards/i18n/ru.json +++ b/public/app/main/apps/dashboards/i18n/ru.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Время, прошедшее с начала звонка", "ELAPSED_DISPOSED": "Время, прошедшее с момента завершения вызова", "LOST_CONNECTION": "Возникли проблемы с подключением к сети. Пожалуйста, проверьте ваше интернет-соединение.", - "NO_RESULTS_AVAILABLE": "Нет результатов" + "NO_RESULTS_AVAILABLE": "Нет результатов", + "AUTOCLOSE": "Автоматически закрывать вкладку контактов после удаления" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/sv.json b/public/app/main/apps/dashboards/i18n/sv.json index eac9be3..dda3460 100644 --- a/public/app/main/apps/dashboards/i18n/sv.json +++ b/public/app/main/apps/dashboards/i18n/sv.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Förfluten tid sedan samtalet startade", "ELAPSED_DISPOSED": "Förfluten tid sedan samtalet avslutades", "LOST_CONNECTION": "Upplever problem med nätverksanslutning. Kontrollera din internetanslutning.", - "NO_RESULTS_AVAILABLE": "Inga resultat tillgängliga" + "NO_RESULTS_AVAILABLE": "Inga resultat tillgängliga", + "AUTOCLOSE": "Stäng kontaktfliken automatiskt efter bortskaffande" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/tr.json b/public/app/main/apps/dashboards/i18n/tr.json index a39e7a3..9dea83a 100644 --- a/public/app/main/apps/dashboards/i18n/tr.json +++ b/public/app/main/apps/dashboards/i18n/tr.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "Aramanın başlamasından bu yana geçen süre", "ELAPSED_DISPOSED": "Aramanın sona ermesinden bu yana geçen süre", "LOST_CONNECTION": "Ağ bağlantısı sorunları yaşanıyor. Lütfen internet bağlantınızı kontrol edin.", - "NO_RESULTS_AVAILABLE": "Kullanılabilir sonuç yok" + "NO_RESULTS_AVAILABLE": "Kullanılabilir sonuç yok", + "AUTOCLOSE": "Atıldıktan sonra temas sekmesini otomatik olarak kapatın" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/zh-CN.json b/public/app/main/apps/dashboards/i18n/zh-CN.json index fbda2e5..221eb76 100644 --- a/public/app/main/apps/dashboards/i18n/zh-CN.json +++ b/public/app/main/apps/dashboards/i18n/zh-CN.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "自通话开始以来经过的时间", "ELAPSED_DISPOSED": "通话结束后经过的时间", "LOST_CONNECTION": "遇到网络连接问题。请检查您的互联网连接。", - "NO_RESULTS_AVAILABLE": "无可用结果" + "NO_RESULTS_AVAILABLE": "无可用结果", + "AUTOCLOSE": "处置后自动关闭接触片" } } \ No newline at end of file diff --git a/public/app/main/apps/dashboards/i18n/zh-TW.json b/public/app/main/apps/dashboards/i18n/zh-TW.json index 7740326..cdbd018 100644 --- a/public/app/main/apps/dashboards/i18n/zh-TW.json +++ b/public/app/main/apps/dashboards/i18n/zh-TW.json @@ -562,6 +562,7 @@ "ELAPSED_ANSWERED": "自通話開始以來經過的時間", "ELAPSED_DISPOSED": "通話結束後經過的時間", "LOST_CONNECTION": "遇到網絡連接問題。請檢查您的互聯網連接。", - "NO_RESULTS_AVAILABLE": "無可用結果" + "NO_RESULTS_AVAILABLE": "無可用結果", + "AUTOCLOSE": "處置後自動關閉接觸片" } } \ No newline at end of file diff --git a/public/app/main/apps/integrations/i18n/ar.json b/public/app/main/apps/integrations/i18n/ar.json index 7336398..c3a871c 100644 --- a/public/app/main/apps/integrations/i18n/ar.json +++ b/public/app/main/apps/integrations/i18n/ar.json @@ -28,7 +28,8 @@ "VTIGER_USER_NAME_REQUIRED": "حقل الزامي", "TENANTID_REQUIRED": "حقل الزامي", "EMAIL_REQUIRED": "حقل الزامي", - "CODE_REQUIRED": "حقل الزامي" + "CODE_REQUIRED": "حقل الزامي", + "MOTIONPROXYADDRESS_REQUIRED": "حقل الزامي" }, "HELP": { "MOTIONPROXYADDRESS": "ادخل رابط العنوان اذا كنت ترغب في تعبئة التذكرة", diff --git a/public/app/main/apps/integrations/i18n/cs.json b/public/app/main/apps/integrations/i18n/cs.json index 1e40704..a8752bd 100644 --- a/public/app/main/apps/integrations/i18n/cs.json +++ b/public/app/main/apps/integrations/i18n/cs.json @@ -51,7 +51,8 @@ "ACCESS_KEY_REQUIRED": "Mandatory field", "CODE_REQUIRED": "Povinné pole", "EMAIL_REQUIRED": "Povinné pole", - "TENANTID_REQUIRED": "Povinné pole" + "TENANTID_REQUIRED": "Povinné pole", + "MOTIONPROXYADDRESS_REQUIRED": "Povinné pole" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Address: it is reqired if you want to fill the ticket body with Recording URL. Enter the address in the following format: : //[:]. Example: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/da.json b/public/app/main/apps/integrations/i18n/da.json index 35176e5..34dbd18 100644 --- a/public/app/main/apps/integrations/i18n/da.json +++ b/public/app/main/apps/integrations/i18n/da.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Obligatorisk felt", "TENANTID_REQUIRED": "Obligatorisk felt", "EMAIL_REQUIRED": "Obligatorisk felt", - "CODE_REQUIRED": "Obligatorisk felt" + "CODE_REQUIRED": "Obligatorisk felt", + "MOTIONPROXYADDRESS_REQUIRED": "Obligatorisk felt" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Adresse: det er obligatorisk, hvis du vil udfylde sedlen med optagelsen URL. Indtast i følgende format: : //[:]. Eksempel: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/de.json b/public/app/main/apps/integrations/i18n/de.json index 1386368..3d7a2c5 100644 --- a/public/app/main/apps/integrations/i18n/de.json +++ b/public/app/main/apps/integrations/i18n/de.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Pflichtfeld", "TENANTID_REQUIRED": "Pflichtfeld", "EMAIL_REQUIRED": "Pflichtfeld", - "CODE_REQUIRED": "Pflichtfeld" + "CODE_REQUIRED": "Pflichtfeld", + "MOTIONPROXYADDRESS_REQUIRED": "Pflichtfeld" }, "HELP": { "MOTIONPROXYADDRESS": "Bewegung (Proxy) Adresse: Es ist obligatorisch, wenn Sie wollen, füllen Sie das Ticket mit Neucodierungen URL. Bitte geben Sie im folgenden Format ein: ≪protocol> : //[:]. Beispiel: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/es.json b/public/app/main/apps/integrations/i18n/es.json index 956710e..231f1a9 100644 --- a/public/app/main/apps/integrations/i18n/es.json +++ b/public/app/main/apps/integrations/i18n/es.json @@ -37,7 +37,8 @@ "VTIGER_USER_NAME_REQUIRED": "Campo obligatorio", "TENANTID_REQUIRED": "Campo obligatorio", "EMAIL_REQUIRED": "Campo obligatorio", - "CODE_REQUIRED": "Campo obligatorio" + "CODE_REQUIRED": "Campo obligatorio", + "MOTIONPROXYADDRESS_REQUIRED": "Campo obligatorio" }, "ACCOUNT": "Cuenta", "ADD": "Añadir", diff --git a/public/app/main/apps/integrations/i18n/et.json b/public/app/main/apps/integrations/i18n/et.json index 5f9b90b..64e1961 100644 --- a/public/app/main/apps/integrations/i18n/et.json +++ b/public/app/main/apps/integrations/i18n/et.json @@ -51,7 +51,8 @@ "ACCESS_KEY_REQUIRED": "Mandatory field", "CODE_REQUIRED": "Kohustuslik väli", "EMAIL_REQUIRED": "Kohustuslik väli", - "TENANTID_REQUIRED": "Kohustuslik väli" + "TENANTID_REQUIRED": "Kohustuslik väli", + "MOTIONPROXYADDRESS_REQUIRED": "Kohustuslik väli" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Address: it is reqired if you want to fill the ticket body with Recording URL. Enter the address in the following format: : //[:]. Example: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/fa.json b/public/app/main/apps/integrations/i18n/fa.json index 82163d6..c054d38 100644 --- a/public/app/main/apps/integrations/i18n/fa.json +++ b/public/app/main/apps/integrations/i18n/fa.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "زمینه اجباری", "TENANTID_REQUIRED": "زمینه اجباری", "EMAIL_REQUIRED": "زمینه اجباری", - "CODE_REQUIRED": "زمینه اجباری" + "CODE_REQUIRED": "زمینه اجباری", + "MOTIONPROXYADDRESS_REQUIRED": "زمینه اجباری" }, "HELP": { "MOTIONPROXYADDRESS": "حركت (ظاهرا) آدرس: الزامی است اگر شما می خواهید یک کارت پر از بدن به خاطر ثبت زندگی روزمره مردم اسکاتلند دارای URL. لطفاً موارد زیر را در آن وارد کنید: &القا فرمت پروتكل&31 دسامبر 2012 جی تی; : //&القا ipaddress&31 دسامبر 2012 جی تی;[:&القا درگاه&31 دسامبر 2012 جی تی;] است. مثال: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/fi.json b/public/app/main/apps/integrations/i18n/fi.json index 8b8da71..13ee2c2 100644 --- a/public/app/main/apps/integrations/i18n/fi.json +++ b/public/app/main/apps/integrations/i18n/fi.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Pakollinen kenttä", "TENANTID_REQUIRED": "Pakollinen kenttä", "EMAIL_REQUIRED": "Pakollinen kenttä", - "CODE_REQUIRED": "Pakollinen kenttä" + "CODE_REQUIRED": "Pakollinen kenttä", + "MOTIONPROXYADDRESS_REQUIRED": "Pakollinen kenttä" }, "HELP": { "MOTIONPROXYADDRESS": "Liikkeen (proxy) Osoite: se on pakollinen, jos haluat täyttää tulostuspyynnön elimelle -tallennusta URL. Anna seuraavassa muodossa: [:]. Esimerkki: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/fr.json b/public/app/main/apps/integrations/i18n/fr.json index 20119b4..33a223f 100644 --- a/public/app/main/apps/integrations/i18n/fr.json +++ b/public/app/main/apps/integrations/i18n/fr.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Champ obligatoire", "TENANTID_REQUIRED": "Champ obligatoire", "EMAIL_REQUIRED": "Champ obligatoire", - "CODE_REQUIRED": "Champ obligatoire" + "CODE_REQUIRED": "Champ obligatoire", + "MOTIONPROXYADDRESS_REQUIRED": "Champ obligatoire" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Adresse : il est obligatoire si vous souhaitez le corps avec de la réécriture URL. S'il vous plaît, entrez dans le format suivant : : //[:]. דוגמה: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/hi.json b/public/app/main/apps/integrations/i18n/hi.json index c0cfde2..03a4e3a 100644 --- a/public/app/main/apps/integrations/i18n/hi.json +++ b/public/app/main/apps/integrations/i18n/hi.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "आवश्यक स्थान", "TENANTID_REQUIRED": "आवश्यक स्थान", "EMAIL_REQUIRED": "आवश्यक स्थान", - "CODE_REQUIRED": "आवश्यक स्थान" + "CODE_REQUIRED": "आवश्यक स्थान", + "MOTIONPROXYADDRESS_REQUIRED": "आवश्यक स्थान" }, "HELP": { "MOTIONPROXYADDRESS": "प्रस्ताव (प्राक्सी) पते: यह अनिवार्य है कि अगर आप को भरने के लिए टिकट Recording URL के साथ शरीर कृपया, निम्नलिखित आरूप में दर्ज करें: < वंशवृक्ष प्रोटोकॉल एंड अधम; : // एंड lt सिखाता है; अधम एवं ipaddress[: एंड lt वंशवृक्ष पत्तन एवं अधम;]। उदाहरण के लिए: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/id.json b/public/app/main/apps/integrations/i18n/id.json index dc86e1c..dde3ec7 100644 --- a/public/app/main/apps/integrations/i18n/id.json +++ b/public/app/main/apps/integrations/i18n/id.json @@ -28,7 +28,8 @@ "VTIGER_USER_NAME_REQUIRED": "Bidang wajib", "TENANTID_REQUIRED": "Bidang wajib", "EMAIL_REQUIRED": "Bidang wajib", - "CODE_REQUIRED": "Bidang wajib" + "CODE_REQUIRED": "Bidang wajib", + "MOTIONPROXYADDRESS_REQUIRED": "Bidang wajib" }, "HELP": { "MOTIONPROXYADDRESS": "Alamat Motion (Proxy): diperlukan jika Anda ingin mengisi badan tiket dengan Recording URL. Masukkan alamat dalam format berikut: : // [: ]. Contoh: https: //X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/ja.json b/public/app/main/apps/integrations/i18n/ja.json index f4d442f..7796e87 100644 --- a/public/app/main/apps/integrations/i18n/ja.json +++ b/public/app/main/apps/integrations/i18n/ja.json @@ -28,7 +28,8 @@ "VTIGER_USER_NAME_REQUIRED": "必須フィールド", "TENANTID_REQUIRED": "必須フィールド", "EMAIL_REQUIRED": "必須フィールド", - "CODE_REQUIRED": "必須フィールド" + "CODE_REQUIRED": "必須フィールド", + "MOTIONPROXYADDRESS_REQUIRED": "必須フィールド" }, "HELP": { "MOTIONPROXYADDRESS": "チケットの本文でレコーディングURLを記入する場合は、Motion(プロキシ)アドレスが必要です。次の形式でアドレスを入力します、:// [:]。例:https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/ko.json b/public/app/main/apps/integrations/i18n/ko.json index 2de5d58..a3bd700 100644 --- a/public/app/main/apps/integrations/i18n/ko.json +++ b/public/app/main/apps/integrations/i18n/ko.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "필수 필드", "TENANTID_REQUIRED": "필수 필드", "EMAIL_REQUIRED": "필수 필드", - "CODE_REQUIRED": "필수 필드" + "CODE_REQUIRED": "필수 필드", + "MOTIONPROXYADDRESS_REQUIRED": "필수 필드" }, "HELP": { "MOTIONPROXYADDRESS": "모션 프록시 주소", diff --git a/public/app/main/apps/integrations/i18n/lt.json b/public/app/main/apps/integrations/i18n/lt.json index 966c8a2..56d0fd0 100644 --- a/public/app/main/apps/integrations/i18n/lt.json +++ b/public/app/main/apps/integrations/i18n/lt.json @@ -55,7 +55,8 @@ "ACCESS_KEY_REQUIRED": "Privalomas laukas", "EMAIL_REQUIRED": "Privalomas laukas", "TENANTID_REQUIRED": "Privalomas laukas", - "CODE_REQUIRED": "Privalomas laukas" + "CODE_REQUIRED": "Privalomas laukas", + "MOTIONPROXYADDRESS_REQUIRED": "Privalomas laukas" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) adresas: jis reikalingas, jei norite užpildyti bilieto dalį įraÅ¡omuoju URL. Ä®veskite adresą tokiu formatu: : //[:]. Pavyzdys: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/lv.json b/public/app/main/apps/integrations/i18n/lv.json index 34aacd0..e786125 100644 --- a/public/app/main/apps/integrations/i18n/lv.json +++ b/public/app/main/apps/integrations/i18n/lv.json @@ -28,7 +28,8 @@ "VTIGER_USER_NAME_REQUIRED": "Obligāts lauks", "TENANTID_REQUIRED": "Obligāts lauks", "EMAIL_REQUIRED": "Obligāts lauks", - "CODE_REQUIRED": "Obligāts lauks" + "CODE_REQUIRED": "Obligāts lauks", + "MOTIONPROXYADDRESS_REQUIRED": "Obligāts lauks" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (starpnieka) adrese: tā ir nepiecieÅ¡ama, ja vēlaties aizpildÄ«t ticket saturu ar ieraksta tÄ«mekļa adresi. Ievadiet adresi šādā formātā: : //[:]. Piemērs: https://XYZW", diff --git a/public/app/main/apps/integrations/i18n/nl.json b/public/app/main/apps/integrations/i18n/nl.json index 0aa56a9..46b0f9a 100644 --- a/public/app/main/apps/integrations/i18n/nl.json +++ b/public/app/main/apps/integrations/i18n/nl.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Verplicht veld", "TENANTID_REQUIRED": "Verplicht veld", "EMAIL_REQUIRED": "Verplicht veld", - "CODE_REQUIRED": "Verplicht veld" + "CODE_REQUIRED": "Verplicht veld", + "MOTIONPROXYADDRESS_REQUIRED": "Verplicht veld" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Adres: het is verplicht als je wilt vul het ticket body met gereist en URL. Voer in de volgende notatie: : //[:]. Voorbeeld: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/no.json b/public/app/main/apps/integrations/i18n/no.json index dfd7ec3..7810f54 100644 --- a/public/app/main/apps/integrations/i18n/no.json +++ b/public/app/main/apps/integrations/i18n/no.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Obligatoriske felt", "TENANTID_REQUIRED": "Obligatoriske felt", "EMAIL_REQUIRED": "Obligatoriske felt", - "CODE_REQUIRED": "Obligatoriske felt" + "CODE_REQUIRED": "Obligatoriske felt", + "MOTIONPROXYADDRESS_REQUIRED": "Obligatoriske felt" }, "HELP": { "MOTIONPROXYADDRESS": "Bevegelse (Proxy) Adresse: Det er obligatorisk hvis du ønsker Ã¥ fylle/kropp med opptaket URL. Skriv inn i følgende format: : //[:]. Eksempel: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/pl.json b/public/app/main/apps/integrations/i18n/pl.json index 93ef840..880ab23 100644 --- a/public/app/main/apps/integrations/i18n/pl.json +++ b/public/app/main/apps/integrations/i18n/pl.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Pole obowiązkowe", "TENANTID_REQUIRED": "Pole obowiązkowe", "EMAIL_REQUIRED": "Pole obowiązkowe", - "CODE_REQUIRED": "Pole obowiązkowe" + "CODE_REQUIRED": "Pole obowiązkowe", + "MOTIONPROXYADDRESS_REQUIRED": "Pole obowiązkowe" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Adres: jest wymagane jeśli chcesz wypełnić bilet korpus z zapisu adresu URL. Wprowadź adres w następującym formacie: : //[:]. Przykład: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/pt-BR.json b/public/app/main/apps/integrations/i18n/pt-BR.json index 1d96e8c..5c0aa7d 100644 --- a/public/app/main/apps/integrations/i18n/pt-BR.json +++ b/public/app/main/apps/integrations/i18n/pt-BR.json @@ -51,7 +51,8 @@ "ACCESS_KEY_REQUIRED": "Campo obrigatório", "TENANTID_REQUIRED": "Campo obrigatório", "EMAIL_REQUIRED": "Campo obrigatório", - "CODE_REQUIRED": "Campo obrigatório" + "CODE_REQUIRED": "Campo obrigatório", + "MOTIONPROXYADDRESS_REQUIRED": "Campo obrigatório" }, "HELP": { "MOTIONPROXYADDRESS": "Endereço de movimento (proxy): é necessário se você quiser preencher o corpo do ticket com o URL de gravação. Digite o endereço no seguinte formato: : // [: ]. Exemplo: https: //X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/pt-PT.json b/public/app/main/apps/integrations/i18n/pt-PT.json index 6738ed4..a4bb842 100644 --- a/public/app/main/apps/integrations/i18n/pt-PT.json +++ b/public/app/main/apps/integrations/i18n/pt-PT.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Campo obrigatório", "TENANTID_REQUIRED": "Campo obrigatório", "EMAIL_REQUIRED": "Campo obrigatório", - "CODE_REQUIRED": "Campo obrigatório" + "CODE_REQUIRED": "Campo obrigatório", + "MOTIONPROXYADDRESS_REQUIRED": "Campo obrigatório" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (Proxy) Endereço: é obrigatório se você deseja preencher a folha de corpo com recodificação URL. Por favor, digite no seguinte formato: : //[:]. Exemplo: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/ru.json b/public/app/main/apps/integrations/i18n/ru.json index 9000552..85ead2d 100644 --- a/public/app/main/apps/integrations/i18n/ru.json +++ b/public/app/main/apps/integrations/i18n/ru.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Обязательное поле", "TENANTID_REQUIRED": "Обязательное поле", "EMAIL_REQUIRED": "Обязательное поле", - "CODE_REQUIRED": "Обязательное поле" + "CODE_REQUIRED": "Обязательное поле", + "MOTIONPROXYADDRESS_REQUIRED": "Обязательное поле" }, "HELP": { "MOTIONPROXYADDRESS": "Motion (прокси) Адрес: она является обязательным, если вы хотите заполнить билет тела с модификации URL. Пожалуйста, введите в следующем формате: <протокола> : // : //[:]. Exempel: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/tr.json b/public/app/main/apps/integrations/i18n/tr.json index 7f0e48c..f5a2a49 100644 --- a/public/app/main/apps/integrations/i18n/tr.json +++ b/public/app/main/apps/integrations/i18n/tr.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "Zorunlu alan", "TENANTID_REQUIRED": "Zorunlu alan", "EMAIL_REQUIRED": "Zorunlu alan", - "CODE_REQUIRED": "Zorunlu alan" + "CODE_REQUIRED": "Zorunlu alan", + "MOTIONPROXYADDRESS_REQUIRED": "Zorunlu alan" }, "HELP": { "MOTIONPROXYADDRESS": "Hareket (Proxy) Adres: zorunludur. eğer isterseniz, bilet, Diğerine URL. Lütfen aşağıdaki biçimi: : //[:]. Örneğin: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/zh-CN.json b/public/app/main/apps/integrations/i18n/zh-CN.json index defae8f..85cf741 100644 --- a/public/app/main/apps/integrations/i18n/zh-CN.json +++ b/public/app/main/apps/integrations/i18n/zh-CN.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "必填项", "TENANTID_REQUIRED": "必填项", "EMAIL_REQUIRED": "必填项", - "CODE_REQUIRED": "必填项" + "CODE_REQUIRED": "必填项", + "MOTIONPROXYADDRESS_REQUIRED": "必填项" }, "HELP": { "MOTIONPROXYADDRESS": "议案(代理)地址: 它是强制的如果您想要填充的票务机构的重新编码的 URL。 请以下列格式输入: & lt; 协议发 gt;: // 发 lt; ipaddress 发 gt; [: & lt; 端口& gt; ]。 例如: https://X.Y.Z.W", diff --git a/public/app/main/apps/integrations/i18n/zh-TW.json b/public/app/main/apps/integrations/i18n/zh-TW.json index 41eb4b5..d7dfaa5 100644 --- a/public/app/main/apps/integrations/i18n/zh-TW.json +++ b/public/app/main/apps/integrations/i18n/zh-TW.json @@ -48,7 +48,8 @@ "VTIGER_USER_NAME_REQUIRED": "必填項", "TENANTID_REQUIRED": "必填項", "EMAIL_REQUIRED": "必填項", - "CODE_REQUIRED": "必填項" + "CODE_REQUIRED": "必填項", + "MOTIONPROXYADDRESS_REQUIRED": "必填項" }, "HELP": { "MOTIONPROXYADDRESS": "動作 ( 代理伺服器 ) 位址 : 這是強制性如果您想要填寫問題單本文 URL 重新編寫程式碼。 請輸入下列格式 : & lt ; 通訊協定與 gt ; : / / 史坦普 lt ; IP 位址坦 gt ; [ : 坦 lt ; 連接埠坦 gt ; ] 。 例如 : https://X.Y.Z.W", diff --git a/public/app/main/apps/mail/i18n/ar.json b/public/app/main/apps/mail/i18n/ar.json index 75ecef9..e4761b1 100644 --- a/public/app/main/apps/mail/i18n/ar.json +++ b/public/app/main/apps/mail/i18n/ar.json @@ -56,7 +56,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "يجب أن تكون القيمة أكبر من أو تساوي", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "يجب أن تكون القيمة أقل من أو تساوي", "QUEUETRANSFERTIMEOUT_REQUIRED": "حقل الزامي", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "حقل الزامي" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "حقل الزامي", + "REPLY_TYPE_REQUIRED": "حقل الزامي" }, "HELP": { "FONT_FAMILY": " مجموعة الخطوط", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "تسجيل الشاشة في التقدم", "DOWNLOAD_WITHOUT_ATTACHMENT": "تحميل بدون مرفق", "DOWNLOAD_WITH_ATTACHMENT": "تنزيل بالمرفق", - "LASTMESSAGE": "اخر رسالة" + "LASTMESSAGE": "اخر رسالة", + "REPLY_TYPE": "نوع الرد" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/cs.json b/public/app/main/apps/mail/i18n/cs.json index e56e270..c062aa4 100644 --- a/public/app/main/apps/mail/i18n/cs.json +++ b/public/app/main/apps/mail/i18n/cs.json @@ -173,7 +173,8 @@ "CONFIRM_NOT_MATCH": "The passwords inserted don't match", "KEY_MAX_LENGTH": "Key must have a maximum length equal to {{max}}", "KEY_REQUIRED": "Mandatory Field", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Povinné pole" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Povinné pole", + "REPLY_TYPE_REQUIRED": "Povinné pole" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Description", @@ -319,6 +320,7 @@ "MANDATORYDISPOSITIONPAUSEID": "Pokud je povolena povinná dispozice, pozastavte jej", "TEAMS_ASSOCIATION": "Asociace týmů", "TOOLTIP_SCREENRECORDING_OFF": "K dispozici je nahrávání obrazovky", - "TOOLTIP_SCREENRECORDING_ON": "Probíhá nahrávání obrazovky" + "TOOLTIP_SCREENRECORDING_ON": "Probíhá nahrávání obrazovky", + "REPLY_TYPE": "Typ odpovědi" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/da.json b/public/app/main/apps/mail/i18n/da.json index b2cea3c..8338e30 100644 --- a/public/app/main/apps/mail/i18n/da.json +++ b/public/app/main/apps/mail/i18n/da.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Værdien skal være større end eller lig med", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Værdien skal være mindre end eller lig med", "QUEUETRANSFERTIMEOUT_REQUIRED": "Obligatorisk felt", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligatorisk felt" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligatorisk felt", + "REPLY_TYPE_REQUIRED": "Obligatorisk felt" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Beskrivelse", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Skærmoptagelse pÃ¥gÃ¥r", "DOWNLOAD_WITHOUT_ATTACHMENT": "Download uden vedhæftet fil", "DOWNLOAD_WITH_ATTACHMENT": "Download med vedhæftet fil", - "LASTMESSAGE": "Sidste besked" + "LASTMESSAGE": "Sidste besked", + "REPLY_TYPE": "Svar Type" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/de.json b/public/app/main/apps/mail/i18n/de.json index cfb4897..8553fb2 100644 --- a/public/app/main/apps/mail/i18n/de.json +++ b/public/app/main/apps/mail/i18n/de.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Der Wert muss größer oder gleich sein", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Der Wert muss kleiner oder gleich sein", "QUEUETRANSFERTIMEOUT_REQUIRED": "Pflichtfeld", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Pflichtfeld" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Pflichtfeld", + "REPLY_TYPE_REQUIRED": "Pflichtfeld" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Beschreibung", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Bildschirmaufnahme läuft", "DOWNLOAD_WITHOUT_ATTACHMENT": "Ohne Anhang herunterladen", "DOWNLOAD_WITH_ATTACHMENT": "Download mit Anhang", - "LASTMESSAGE": "Letzte Nachricht" + "LASTMESSAGE": "Letzte Nachricht", + "REPLY_TYPE": "Antworttyp" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/en.json b/public/app/main/apps/mail/i18n/en.json index 417df2f..98ae77b 100644 --- a/public/app/main/apps/mail/i18n/en.json +++ b/public/app/main/apps/mail/i18n/en.json @@ -97,6 +97,7 @@ "GOTO_MAILACCOUNT": "Go to Realtime Email Account", "TEXT": "Text", "TIMES": "Number of times per interaction", + "REPLY_TYPE": "Reply Type", "EDIT_AUTOREPLY": "Edit Auto Reply", "AUTOREPLY": "Auto Reply", "SHOW_AUTOREPLY": "Show Auto Reply", @@ -142,6 +143,7 @@ "TEXT_MAX_LENGTH": "The value must have a maximum length equal to {{max}}", "VALUE_REQUIRED": "Mandatory Field", "TEXT_REQUIRED": "Mandatory Field", + "REPLY_TYPE_REQUIRED": "Mandatory Field", "NAME_REQUIRED": "Mandatory Field", "AGENT_TIMEOUT_REQUIRED": "Mandatory Field", "EMAIL_ADDRESS_REQUIRED": "Mandatory Field", diff --git a/public/app/main/apps/mail/i18n/es.json b/public/app/main/apps/mail/i18n/es.json index 85d667a..cece97c 100644 --- a/public/app/main/apps/mail/i18n/es.json +++ b/public/app/main/apps/mail/i18n/es.json @@ -8,8 +8,8 @@ "PASSWORD": "Contraseña utilizada para autenticación", "SECURE": "Si es verdadero, la conexión usará TLS cuando se conecte al servidor", "USERNAME": "Nombre de usuario utilizado para autenticación", - "MANDATORYDISPOSITION": "Cierre obligatorio", - "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si el cierre obligatorio está habilitado" + "MANDATORYDISPOSITION": "Tipificación obligatoria", + "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si la tipificación obligatoria está habilitada" }, "ERRORS": { "ACCEPTURL_MUST_VALID_URL": "Formato erróneo", @@ -67,7 +67,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "El valor debe ser mayor o igual que", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "El valor debe ser menor o igual que", "QUEUETRANSFERTIMEOUT_REQUIRED": "Campo obligatorio", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Campo obligatorio" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Campo obligatorio", + "REPLY_TYPE_REQUIRED": "Campo obligatorio" }, "ACCEPT": "Aceptar", "ACCEPTED": "Aceptado", @@ -79,7 +80,7 @@ "ACTIVE": "Activo", "ADD_MAILACCOUNT": "Agregar cuenta de correo electrónico", "ADD_MAILCANNEDANSWER": "Agregar respuesta enlatada", - "ADD_MAILDISPOSITION": "Agregar cierre de correo electrónico", + "ADD_MAILDISPOSITION": "Agregar tipificación de correo electrónico", "ADD_MAILQUEUE": "Agregar cola de correo electrónico", "ADD_MAILSUBSTATUS": "Agregar sub estado", "ADD_NOTE": "Añadir Nota", @@ -123,13 +124,13 @@ "DELETE_INTERACTION": "Eliminar interacción", "DELETE_MAILACCOUNT": "Eliminar cuentas de correo electrónico", "DELETE_MAILCANNEDANSWER": "Eliminar la respuesta almacenada", - "DELETE_MAILDISPOSITION": "Eliminar el cierre del correo electrónico", + "DELETE_MAILDISPOSITION": "Eliminar la tipificación del correo electrónico", "DELETE_MAILQUEUE": "Eliminar cola de correo electrónico", "DELETE_MAILSUBSTATUS": "Borrar", "DESCRIPTION": "Descripción", "DISABLED": "Deshabilitado", - "DISPOSITION": "Cierre", - "DISPOSITIONS": "Cierres", + "DISPOSITION": "Tipificación ", + "DISPOSITIONS": "Tipificaciones ", "EDIT_ACCOUNT": "Editar cuenta", "EDIT_AGENT": "Editar agente", "EDIT_AUTOREPLY": "Editar respuesta automática", @@ -138,7 +139,7 @@ "EDIT_GOTOP": "Edit GotoP", "EDIT_MAILACCOUNT": "Editar cuenta de correo electrónico", "EDIT_MAILCANNEDANSWER": "Editar respuesta enlatada", - "EDIT_MAILDISPOSITION": "Editar el cierre del correo electrónico", + "EDIT_MAILDISPOSITION": "Editar el tipificación del correo electrónico", "EDIT_MAILQUEUE": "Editar cola de correo electrónico", "EDIT_MAILSUBSTATUS": "Editar", "EDIT_NOOP": "Editar Noop", @@ -183,7 +184,7 @@ "MAIL": "Email", "MAILACCOUNTS": "Cuentas de correo electrónico", "MAILBOX": "Buzón", - "MAILDISPOSITIONS": "Cierres de correo electrónico", + "MAILDISPOSITIONS": "Tipificaciones de correo electrónico", "MAILQUEUES": "Colas de correo electrónico", "MAILSUBSTATUSES": "Subestaciones de correo electrónico", "MARK_AS_UNREAD": "marcar como no leído", @@ -191,7 +192,7 @@ "NEVER_VERIFIED": "Nunca Verificar", "NEW_MAILACCOUNT": "Nueva cuenta de correo electrónico", "NEW_MAILCANNEDANSWER": "Nueva respuesta enlatada", - "NEW_MAILDISPOSITION": "Nuevo cierre de correo electrónico", + "NEW_MAILDISPOSITION": "Nueva tipificación de correo electrónico", "NEW_MAILQUEUE": "Nueva cola de correo electrónico", "NEW_MAILSUBSTATUS": "Nuevo Sub Estado", "NOOP": "Noop", @@ -206,7 +207,7 @@ "NO_AVAILABLE_INFO": "No hay información disponible", "NO_INTERACTION_AVAILABLE": "No hay interacciones disponibles", "NO_MAILCANNEDANSWER_AVAILABLE": "No hay respuestas enlatadas disponibles", - "NO_MAILDISPOSITION_AVAILABLE": "No hay cierres de correo electrónico disponibles", + "NO_MAILDISPOSITION_AVAILABLE": "No hay tipificaciones de correo electrónico disponibles", "OF": "de", "OPEN": "Abierto", "OPENCHANNEL": "Canal abierto", @@ -312,13 +313,14 @@ "DOWNLOAD_WITHOUT_ATTACHMENTS": "Descargar sin archivos adjuntos", "DOWNLOAD_WITH_ATTACHMENTS": "Descargar con archivos adjuntos", "TEAMS_ASSOCIATION": "Asociación de equipos", - "MANDATORYDISPOSITION": "Cierre obligatorio", - "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si el cierre obligatorio está habilitado", + "MANDATORYDISPOSITION": "Tipificación obligatorio", + "MANDATORYDISPOSITIONPAUSEID": "Pausa a usar si la tipificación obligatoria está habilitada", "ADVANCED": "Avanzado", "TOOLTIP_SCREENRECORDING_OFF": "Grabación de pantalla disponible", "TOOLTIP_SCREENRECORDING_ON": "Grabación de pantalla en progreso", "DOWNLOAD_WITHOUT_ATTACHMENT": "Descargar sin adjuntar", "DOWNLOAD_WITH_ATTACHMENT": "Descargar con archivo adjunto", - "LASTMESSAGE": "Ultimo mensaje" + "LASTMESSAGE": "Ultimo mensaje", + "REPLY_TYPE": "Tipo de respuesta" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/et.json b/public/app/main/apps/mail/i18n/et.json index 76d5a04..b800cb0 100644 --- a/public/app/main/apps/mail/i18n/et.json +++ b/public/app/main/apps/mail/i18n/et.json @@ -173,7 +173,8 @@ "CONFIRM_NOT_MATCH": "The passwords inserted don't match", "KEY_MAX_LENGTH": "Key must have a maximum length equal to {{max}}", "KEY_REQUIRED": "Mandatory Field", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Kohustuslik väli" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Kohustuslik väli", + "REPLY_TYPE_REQUIRED": "Kohustuslik väli" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Description", @@ -319,6 +320,7 @@ "MANDATORYDISPOSITIONPAUSEID": "Kasutamise peatamine, kui kohustuslik käsutamine on lubatud", "TEAMS_ASSOCIATION": "Võistkondade liit", "TOOLTIP_SCREENRECORDING_OFF": "Ekraanisalvestus on saadaval", - "TOOLTIP_SCREENRECORDING_ON": "Ekraanisalvestus pooleli" + "TOOLTIP_SCREENRECORDING_ON": "Ekraanisalvestus pooleli", + "REPLY_TYPE": "Vasta tüüp" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/fa.json b/public/app/main/apps/mail/i18n/fa.json index 82c6b42..89b332a 100644 --- a/public/app/main/apps/mail/i18n/fa.json +++ b/public/app/main/apps/mail/i18n/fa.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "مقدار باید بیشتر یا برابر باشد", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "ارزش باید کمتر یا برابر باشد", "QUEUETRANSFERTIMEOUT_REQUIRED": "زمینه اجباری", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "زمینه اجباری" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "زمینه اجباری", + "REPLY_TYPE_REQUIRED": "زمینه اجباری" }, "AGENT_TIMEOUT": "عامل زمان مجاز", "DESCRIPTION": "شرح", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "ضبط صفحه در حال انجام است", "DOWNLOAD_WITHOUT_ATTACHMENT": "بارگیری بدون پیوست", "DOWNLOAD_WITH_ATTACHMENT": "با پیوست بارگیری کنید", - "LASTMESSAGE": "آخرین پیام" + "LASTMESSAGE": "آخرین پیام", + "REPLY_TYPE": "نوع پاسخ" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/fi.json b/public/app/main/apps/mail/i18n/fi.json index 5194993..a223cd6 100644 --- a/public/app/main/apps/mail/i18n/fi.json +++ b/public/app/main/apps/mail/i18n/fi.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Arvon on oltava suurempi tai yhtä suuri kuin", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Arvon on oltava pienempi tai yhtä suuri kuin", "QUEUETRANSFERTIMEOUT_REQUIRED": "Pakollinen kenttä", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Pakollinen kenttä" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Pakollinen kenttä", + "REPLY_TYPE_REQUIRED": "Pakollinen kenttä" }, "AGENT_TIMEOUT": "Agentti aikakatkaisu", "DESCRIPTION": "Kuvaus", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Näytön nauhoitus käynnissä", "DOWNLOAD_WITHOUT_ATTACHMENT": "Lataa ilman liitetiedostoja", "DOWNLOAD_WITH_ATTACHMENT": "Lataa liitteenä", - "LASTMESSAGE": "Viimeinen viesti" + "LASTMESSAGE": "Viimeinen viesti", + "REPLY_TYPE": "Vastaustyyppi" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/fr.json b/public/app/main/apps/mail/i18n/fr.json index 8253d31..d2e8191 100644 --- a/public/app/main/apps/mail/i18n/fr.json +++ b/public/app/main/apps/mail/i18n/fr.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "La valeur doit être supérieure ou égale à", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "La valeur doit être inférieure ou égale à", "QUEUETRANSFERTIMEOUT_REQUIRED": "Champ obligatoire", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Champ obligatoire" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Champ obligatoire", + "REPLY_TYPE_REQUIRED": "Champ obligatoire" }, "AGENT_TIMEOUT": "Temps dépassé", "DESCRIPTION": "Description", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Enregistrement d'écran en cours", "DOWNLOAD_WITHOUT_ATTACHMENT": "Télécharger sans pièce jointe", "DOWNLOAD_WITH_ATTACHMENT": "Télécharger avec pièce jointe", - "LASTMESSAGE": "Dernier message" + "LASTMESSAGE": "Dernier message", + "REPLY_TYPE": "Type de réponse" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/he.json b/public/app/main/apps/mail/i18n/he.json index af943ff..410fc18 100644 --- a/public/app/main/apps/mail/i18n/he.json +++ b/public/app/main/apps/mail/i18n/he.json @@ -173,7 +173,8 @@ "CONFIRM_NOT_MATCH": "אין התאמה בין הסיסמאות שהוזנו", "KEY_MAX_LENGTH": "האורך המרבי המותר של מפתח הוא {{max}}", "KEY_REQUIRED": "שדה חובה", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "שדה חובה" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "שדה חובה", + "REPLY_TYPE_REQUIRED": "שדה חובה" }, "AGENT_TIMEOUT": "סוף זמן קצוב לנציג", "DESCRIPTION": "תיאור", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "הקלטת מסך מתבצעת", "DOWNLOAD_WITHOUT_ATTACHMENT": "הורד ללא קובץ מצורף", "DOWNLOAD_WITH_ATTACHMENT": "הורד עם קובץ מצורף", - "LASTMESSAGE": "הודעה אחרונה" + "LASTMESSAGE": "הודעה אחרונה", + "REPLY_TYPE": "השב סוג" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/hi.json b/public/app/main/apps/mail/i18n/hi.json index fac3da6..46b2171 100644 --- a/public/app/main/apps/mail/i18n/hi.json +++ b/public/app/main/apps/mail/i18n/hi.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "मान से अधिक या बराबर होना चाहिए", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "मान कम या बराबर होना चाहिए", "QUEUETRANSFERTIMEOUT_REQUIRED": "आवश्यक स्थान", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "आवश्यक स्थान" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "आवश्यक स्थान", + "REPLY_TYPE_REQUIRED": "आवश्यक स्थान" }, "AGENT_TIMEOUT": "एजेंट समयबाह्य", "DESCRIPTION": "वर्णन", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "स्क्रीन रिकॉर्डिंग प्रगति पर है", "DOWNLOAD_WITHOUT_ATTACHMENT": "अनुलग्नक के बिना डाउनलोड करें", "DOWNLOAD_WITH_ATTACHMENT": "अनुलग्नक के साथ डाउनलोड करें", - "LASTMESSAGE": "अंतिम संदेश" + "LASTMESSAGE": "अंतिम संदेश", + "REPLY_TYPE": "उत्तर प्रकार" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/id.json b/public/app/main/apps/mail/i18n/id.json index 052853d..0689022 100644 --- a/public/app/main/apps/mail/i18n/id.json +++ b/public/app/main/apps/mail/i18n/id.json @@ -56,7 +56,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Nilai harus lebih besar dari atau sama dengan", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Nilai harus kurang dari atau sama dengan", "QUEUETRANSFERTIMEOUT_REQUIRED": "Bidang wajib", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Bidang wajib" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Bidang wajib", + "REPLY_TYPE_REQUIRED": "Bidang wajib" }, "HELP": { "FONT_FAMILY": "Keluarga Font Default", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Perekaman Layar sedang berlangsung", "DOWNLOAD_WITHOUT_ATTACHMENT": "Unduh tanpa lampiran", "DOWNLOAD_WITH_ATTACHMENT": "Unduh dengan lampiran", - "LASTMESSAGE": "Pesan Terakhir" + "LASTMESSAGE": "Pesan Terakhir", + "REPLY_TYPE": "Jenis Balasan" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/it.json b/public/app/main/apps/mail/i18n/it.json index 4184e59..ba4d26a 100644 --- a/public/app/main/apps/mail/i18n/it.json +++ b/public/app/main/apps/mail/i18n/it.json @@ -89,6 +89,7 @@ "GOTO_MAILACCOUNT": "Vai al Realtime Email", "TEXT": "Testo", "TIMES": "Numero di volte per interazione", + "REPLY_TYPE": "Tipo di Risposta", "EDIT_AUTOREPLY": "Modifica Risposta Automatica", "AUTOREPLY": "Risposta Automatica", "SHOW_AUTOREPLY": "Mostra Risposta Automatica", @@ -128,6 +129,7 @@ "PORT_REQUIRED": "Campo obbligatorio", "CONNTIMEOUT_REQUIRED": "Campo obbligatorio", "AUTHTIMEOUT_REQUIRED": "Campo obbligatorio", + "REPLY_TYPE_REQUIRED": "Campo obbligatorio", "ACCEPTURL_MUST_VALID_URL": "Il campo deve avere un formato valido", "TIMEOUT_REQUIRED": "Il Timeout è richiesto", "REJECTURL_MUST_VALID_URL": "L'URL Rifiuta deve essere in un formato valido", diff --git a/public/app/main/apps/mail/i18n/ja.json b/public/app/main/apps/mail/i18n/ja.json index 4ac5dc9..4d704fe 100644 --- a/public/app/main/apps/mail/i18n/ja.json +++ b/public/app/main/apps/mail/i18n/ja.json @@ -56,7 +56,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "値は、より大きいか等しい必要があります", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "値は以下にする必要があります", "QUEUETRANSFERTIMEOUT_REQUIRED": "必須フィールド", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "必須フィールド" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "必須フィールド", + "REPLY_TYPE_REQUIRED": "必須フィールド" }, "HELP": { "FONT_FAMILY": "デフォルトフォントファミリ", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "スクリーン録画中", "DOWNLOAD_WITHOUT_ATTACHMENT": "添付せずにダウンロード", "DOWNLOAD_WITH_ATTACHMENT": "添付してダウンロード", - "LASTMESSAGE": "最後のメッセージ" + "LASTMESSAGE": "最後のメッセージ", + "REPLY_TYPE": "返信タイプ" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/ko.json b/public/app/main/apps/mail/i18n/ko.json index 583a0fe..daea7c2 100644 --- a/public/app/main/apps/mail/i18n/ko.json +++ b/public/app/main/apps/mail/i18n/ko.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "값은 다음보다 크거나 같아야합니다.", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "값은 다음보다 작거나 같아야합니다.", "QUEUETRANSFERTIMEOUT_REQUIRED": "필수 필드", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "필수 필드" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "필수 필드", + "REPLY_TYPE_REQUIRED": "필수 필드" }, "AGENT_TIMEOUT": "상담원 시간초과", "DESCRIPTION": "설명", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "화면 녹화 중", "DOWNLOAD_WITHOUT_ATTACHMENT": "첨부 파일없이 다운로드", "DOWNLOAD_WITH_ATTACHMENT": "첨부 파일로 다운로드", - "LASTMESSAGE": "마지막 메시지" + "LASTMESSAGE": "마지막 메시지", + "REPLY_TYPE": "응답 유형" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/lt.json b/public/app/main/apps/mail/i18n/lt.json index ab9ed43..1608353 100644 --- a/public/app/main/apps/mail/i18n/lt.json +++ b/public/app/main/apps/mail/i18n/lt.json @@ -176,7 +176,8 @@ "CONFIRM_NOT_MATCH": "Ä®vesti slaptažodžiai nesutampa", "KEY_MAX_LENGTH": "Raktas turi bÅ«ti ne ilgesnė kaip {{maks}}", "KEY_REQUIRED": "Privalomas laukas", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Privalomas laukas" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Privalomas laukas", + "REPLY_TYPE_REQUIRED": "Privalomas laukas" }, "AGENT_TIMEOUT": "Agento laikas", "DESCRIPTION": "ApraÅ¡ymas", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Vyksta ekrano įraÅ¡ymas", "TOOLTIP_SCREENRECORDING_OFF": "Ekrano įraÅ¡as galimas", "DOWNLOAD_WITH_ATTACHMENT": "Atsisiųsti su priedu", - "DOWNLOAD_WITHOUT_ATTACHMENT": "Atsisiųsti be priedo" + "DOWNLOAD_WITHOUT_ATTACHMENT": "Atsisiųsti be priedo", + "REPLY_TYPE": "Atsakymo tipas" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/lv.json b/public/app/main/apps/mail/i18n/lv.json index 4ec8ea4..62759e2 100644 --- a/public/app/main/apps/mail/i18n/lv.json +++ b/public/app/main/apps/mail/i18n/lv.json @@ -56,7 +56,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "VērtÄ«bai jābÅ«t lielākai vai vienādai ar", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "VērtÄ«bai jābÅ«t mazākai vai vienādai ar", "QUEUETRANSFERTIMEOUT_REQUIRED": "Obligāts lauks", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligāts lauks" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligāts lauks", + "REPLY_TYPE_REQUIRED": "Obligāts lauks" }, "HELP": { "NAME": "Tiek atbalstÄ«ti tikai numuri, burti un atseviÅ¡Ä·as rakstzÄ«mes (._)", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Notiek ekrāna ierakstÄ«Å¡ana", "DOWNLOAD_WITHOUT_ATTACHMENT": "Lejupielādējiet bez pielikuma", "DOWNLOAD_WITH_ATTACHMENT": "Lejupielādējiet ar pielikumu", - "LASTMESSAGE": "Pēdējā ziņa" + "LASTMESSAGE": "Pēdējā ziņa", + "REPLY_TYPE": "Atbildes veids" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/nl.json b/public/app/main/apps/mail/i18n/nl.json index 1500dd5..61ddfaa 100644 --- a/public/app/main/apps/mail/i18n/nl.json +++ b/public/app/main/apps/mail/i18n/nl.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "De waarde moet groter zijn dan of gelijk aan", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "De waarde moet kleiner zijn dan of gelijk aan", "QUEUETRANSFERTIMEOUT_REQUIRED": "Verplicht veld", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Verplicht veld" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Verplicht veld", + "REPLY_TYPE_REQUIRED": "Verplicht veld" }, "AGENT_TIMEOUT": "Time-out agent", "DESCRIPTION": "Beschrijving", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Schermopname bezig", "DOWNLOAD_WITHOUT_ATTACHMENT": "Download zonder bijlage", "DOWNLOAD_WITH_ATTACHMENT": "Download met bijlage", - "LASTMESSAGE": "Laatste bericht" + "LASTMESSAGE": "Laatste bericht", + "REPLY_TYPE": "Type antwoord" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/no.json b/public/app/main/apps/mail/i18n/no.json index 67bcd72..526e28c 100644 --- a/public/app/main/apps/mail/i18n/no.json +++ b/public/app/main/apps/mail/i18n/no.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Verdien mÃ¥ være større enn eller lik", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Verdien mÃ¥ være mindre enn eller lik", "QUEUETRANSFERTIMEOUT_REQUIRED": "Obligatoriske felt", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligatoriske felt" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligatoriske felt", + "REPLY_TYPE_REQUIRED": "Obligatoriske felt" }, "AGENT_TIMEOUT": "Agent tidsavbrudd", "DESCRIPTION": "Beskrivelse", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Skjermopptak pÃ¥gÃ¥r", "DOWNLOAD_WITHOUT_ATTACHMENT": "Last ned uten vedlegg", "DOWNLOAD_WITH_ATTACHMENT": "Last ned med vedlegg", - "LASTMESSAGE": "Siste melding" + "LASTMESSAGE": "Siste melding", + "REPLY_TYPE": "Svar Type" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/pl.json b/public/app/main/apps/mail/i18n/pl.json index aca2ad1..e3f81f3 100644 --- a/public/app/main/apps/mail/i18n/pl.json +++ b/public/app/main/apps/mail/i18n/pl.json @@ -116,7 +116,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Wartość musi być większa lub równa", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Wartość musi być mniejsza lub równa", "QUEUETRANSFERTIMEOUT_REQUIRED": "Pole obowiązkowe", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Pole obowiązkowe" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Pole obowiązkowe", + "REPLY_TYPE_REQUIRED": "Pole obowiązkowe" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Opis", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Trwa nagrywanie ekranu", "DOWNLOAD_WITHOUT_ATTACHMENT": "Pobierz bez załącznika", "DOWNLOAD_WITH_ATTACHMENT": "Pobierz z załącznikiem", - "LASTMESSAGE": "Ostatnia wiadomość" + "LASTMESSAGE": "Ostatnia wiadomość", + "REPLY_TYPE": "Typ odpowiedzi" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/pt-BR.json b/public/app/main/apps/mail/i18n/pt-BR.json index 63d5079..da323a1 100644 --- a/public/app/main/apps/mail/i18n/pt-BR.json +++ b/public/app/main/apps/mail/i18n/pt-BR.json @@ -173,7 +173,8 @@ "CONFIRM_NOT_MATCH": "The passwords inserted don't match", "KEY_MAX_LENGTH": "Key must have a maximum length equal to {{max}}", "KEY_REQUIRED": "Mandatory Field", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Campo obrigatório" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Campo obrigatório", + "REPLY_TYPE_REQUIRED": "Campo Obrigatório" }, "AGENT_TIMEOUT": "Tempo limite do agente", "DESCRIPTION": "Descrição", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Gravação de tela em andamento", "DOWNLOAD_WITHOUT_ATTACHMENT": "Download sem anexo", "DOWNLOAD_WITH_ATTACHMENT": "Download com anexo", - "LASTMESSAGE": "Última mensagem" + "LASTMESSAGE": "Última mensagem", + "REPLY_TYPE": "Tipo de Resposta" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/pt-PT.json b/public/app/main/apps/mail/i18n/pt-PT.json index 60c8805..e7fd40b 100644 --- a/public/app/main/apps/mail/i18n/pt-PT.json +++ b/public/app/main/apps/mail/i18n/pt-PT.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "O valor deve ser maior ou igual a", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "O valor deve ser menor ou igual a", "QUEUETRANSFERTIMEOUT_REQUIRED": "Campo Obrigatório", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Campo obrigatório" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Campo obrigatório", + "REPLY_TYPE_REQUIRED": "Campo Obrigatório" }, "AGENT_TIMEOUT": "Tempo Limite do Agente", "DESCRIPTION": "Descrição", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Gravação de tela em andamento", "DOWNLOAD_WITHOUT_ATTACHMENT": "Download sem anexo", "DOWNLOAD_WITH_ATTACHMENT": "Download com anexo", - "LASTMESSAGE": "Última mensagem" + "LASTMESSAGE": "Última mensagem", + "REPLY_TYPE": "Tipo de Resposta" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/ru.json b/public/app/main/apps/mail/i18n/ru.json index fecdb27..c37f4cf 100644 --- a/public/app/main/apps/mail/i18n/ru.json +++ b/public/app/main/apps/mail/i18n/ru.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Значение должно быть больше или равно", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Значение должно быть меньше или равно", "QUEUETRANSFERTIMEOUT_REQUIRED": "Обязательное поле", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Обязательное поле" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Обязательное поле", + "REPLY_TYPE_REQUIRED": "Обязательное поле" }, "AGENT_TIMEOUT": "Время ожидания оператора", "DESCRIPTION": "Описание", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Идет запись экрана", "DOWNLOAD_WITHOUT_ATTACHMENT": "Скачать без вложения", "DOWNLOAD_WITH_ATTACHMENT": "Скачать с приложением", - "LASTMESSAGE": "Последнее сообщение" + "LASTMESSAGE": "Последнее сообщение", + "REPLY_TYPE": "Тип ответа" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/sv.json b/public/app/main/apps/mail/i18n/sv.json index a8b08ce..e01f946 100644 --- a/public/app/main/apps/mail/i18n/sv.json +++ b/public/app/main/apps/mail/i18n/sv.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Värdet mÃ¥ste vara större än eller lika med", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Värdet mÃ¥ste vara mindre än eller lika med", "QUEUETRANSFERTIMEOUT_REQUIRED": "Obligatoriskt fält", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligatoriskt fält" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Obligatoriskt fält", + "REPLY_TYPE_REQUIRED": "Obligatoriskt fält" }, "AGENT_TIMEOUT": "Tidsgräns för agent", "DESCRIPTION": "Beskrivning", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Skärminspelning pÃ¥gÃ¥r", "DOWNLOAD_WITHOUT_ATTACHMENT": "Ladda ner utan bilaga", "DOWNLOAD_WITH_ATTACHMENT": "Ladda ner med bilaga", - "LASTMESSAGE": "Senaste meddelandet" + "LASTMESSAGE": "Senaste meddelandet", + "REPLY_TYPE": "Svarstyp" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/tr.json b/public/app/main/apps/mail/i18n/tr.json index 986da43..c10099a 100644 --- a/public/app/main/apps/mail/i18n/tr.json +++ b/public/app/main/apps/mail/i18n/tr.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "Değer, büyük veya eşit olmalıdır", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "Değer, daha küçük veya eşit olmalıdır", "QUEUETRANSFERTIMEOUT_REQUIRED": "Zorunlu alan", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Zorunlu alan" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Zorunlu alan", + "REPLY_TYPE_REQUIRED": "Zorunlu alan" }, "AGENT_TIMEOUT": "Ajan Zaman Aşımı", "DESCRIPTION": "Açıklama", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "Ekran Kaydı devam ediyor", "DOWNLOAD_WITHOUT_ATTACHMENT": "Ek olmadan indir", "DOWNLOAD_WITH_ATTACHMENT": "Ekli olarak indir", - "LASTMESSAGE": "Son Mesaj" + "LASTMESSAGE": "Son Mesaj", + "REPLY_TYPE": "Yanıt Türü" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/zh-CN.json b/public/app/main/apps/mail/i18n/zh-CN.json index 777dddf..cfd59f9 100644 --- a/public/app/main/apps/mail/i18n/zh-CN.json +++ b/public/app/main/apps/mail/i18n/zh-CN.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "该值必须大于或等于", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "该值必须小于或等于", "QUEUETRANSFERTIMEOUT_REQUIRED": "必填项", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "必填项" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "必填项", + "REPLY_TYPE_REQUIRED": "必填项" }, "AGENT_TIMEOUT": "代理超时", "DESCRIPTION": "描述", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "屏幕录制正在进行中", "DOWNLOAD_WITHOUT_ATTACHMENT": "不带附件下载", "DOWNLOAD_WITH_ATTACHMENT": "附件下载", - "LASTMESSAGE": "最后留言" + "LASTMESSAGE": "最后留言", + "REPLY_TYPE": "回复类型" } } \ No newline at end of file diff --git a/public/app/main/apps/mail/i18n/zh-TW.json b/public/app/main/apps/mail/i18n/zh-TW.json index 8c09f92..24be763 100644 --- a/public/app/main/apps/mail/i18n/zh-TW.json +++ b/public/app/main/apps/mail/i18n/zh-TW.json @@ -79,7 +79,8 @@ "QUEUETRANSFERTIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO": "該值必須大於或等於", "QUEUETRANSFERTIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO": "該值必須小於或等於", "QUEUETRANSFERTIMEOUT_REQUIRED": "必填項", - "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "必填項" + "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "必填項", + "REPLY_TYPE_REQUIRED": "必填項" }, "AGENT_TIMEOUT": "值機人員等候逾時", "DESCRIPTION": "說明", @@ -319,6 +320,7 @@ "TOOLTIP_SCREENRECORDING_ON": "屏幕錄製正在進行中", "DOWNLOAD_WITHOUT_ATTACHMENT": "不帶附件下載", "DOWNLOAD_WITH_ATTACHMENT": "附件下載", - "LASTMESSAGE": "最後留言" + "LASTMESSAGE": "最後留言", + "REPLY_TYPE": "回复類型" } } \ No newline at end of file diff --git a/public/app/main/apps/motiondialer/i18n/es.json b/public/app/main/apps/motiondialer/i18n/es.json index 64ab305..43b3a12 100644 --- a/public/app/main/apps/motiondialer/i18n/es.json +++ b/public/app/main/apps/motiondialer/i18n/es.json @@ -87,7 +87,7 @@ "RANDOMLASTDIGITCALLERIDNUMBER": "Si es mayor que 0, genera los últimos números al azar del número de identificación del llamante saliente.", "BUSYMAXRETRY": "Número máximo de veces que se llama a un contacto antes de considerarlo cerrado, cuando la llamada falló por estar ocupado", "BUSYRETRYTIME": "Tiempo en minutos antes de intentar volver a llamar a un contacto fallido debido a ocupado", - "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa para establecer durante el cierre obligatorio", + "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa para establecer durante la tipifiación obligatoria", "PREDICTIVEMAXTHRESHOLD": "Si el porcentaje de agentes disponibles en la ventana de tiempo, en comparación con los agentes disponibles en el momento de la predicción, excede el límite máximo configurado, el predictivo vuelve a calcular la predicción.", "PREDICTIVEMINTHRESHOLD": "Si el porcentaje de agentes disponibles en la ventana de tiempo, en comparación con los agentes disponibles en el momento de la predicción, excede el límite mínimo configurado, el predictivo vuelve a calcular la predicción.", "ABANDONEDMAXRETRY": "Número máximo de veces que se llama a un contacto antes de considerarlo cerrado, cuando la llamada no se pudo abandonar", @@ -326,7 +326,7 @@ "DELETE_MUSICONHOLD": "Eliminar Música de Espera", "DELETE_OUTBOUNDROUTE": "Eliminar ruta de salida", "DELETE_QUEUECAMPAIGN": "Eliminar Campaña", - "DELETE_VOICEDISPOSITION": "Eliminar cierre de voz", + "DELETE_VOICEDISPOSITION": "Eliminar tpificación de voz", "DELETE_VOICEMAIL": "Eliminar correo de voz", "DELETE_VOICEQUEUE": "Eliminar cola de voz", "DELETE_VOICERECORDING": "Eliminar grabación de voz", @@ -340,7 +340,7 @@ "DIALRECALLMETIMEOUT": "Recordar Timeout [min]", "DID": "HECHO", "DIRECTORY": "Directorio", - "DISPOSITION": "Cierre", + "DISPOSITION": "Tipificación", "DOWNLOAD_MOHSOUND": "Descargar Sonido Música en Espera", "DOWNLOAD_VOICERECORDING": "Descargar grabación de voz", "DROPPED": "Asignado", @@ -369,7 +369,7 @@ "EDIT_QUEUECAMPAIGN": "Editar Campaña", "EDIT_RINGGROUP": "Editar grupo de timbre", "EDIT_SET": "Editar conjunto", - "EDIT_VOICEDISPOSITION": "Editar Cierre de Voz", + "EDIT_VOICEDISPOSITION": "Editar Tipificación de Voz", "EDIT_VOICEMAIL": "Editar correo de voz", "EDIT_VOICEQUEUE": "Editar cola de voz", "EDIT_VOICERECORDING": "Editar grabación de voz", @@ -655,8 +655,8 @@ "SELECT_TYPE": "Seleccione tipo", "TEAMS_ASSOCIATION": "Asociación de equipos", "ANSWERING_MACHINE": "Contestador automático", - "MANDATORYDISPOSITION": "Cierre obligatorio", - "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa de cierre obligatorio", + "MANDATORYDISPOSITION": "Tipificación obligatoria", + "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa de tipificación obligatoria", "ANSWERED_CALLS": "Llamadas contestadas", "AVG_TALK_TIME": "Tiempo promedio de conversación", "CURRENT_INTERVAL": "Intervalo actual", @@ -686,7 +686,7 @@ "NOSUCHNUMBERRETRYTIME": "Tiempo de reintento [min]", "TOOLTIP_SCREENRECORDING_OFF": "Grabación de pantalla disponible", "TOOLTIP_SCREENRECORDING_ON": "Grabación de pantalla en progreso", - "SECOND_LEVEL_DISPOSITION": "Disposición de segundo nivel", - "THIRD_LEVEL_DISPOSITION": "Disposición de tercer nivel" + "SECOND_LEVEL_DISPOSITION": "Tipficación de segundo nivel", + "THIRD_LEVEL_DISPOSITION": "Tipificación de tercer nivel" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/ar.json b/public/app/main/apps/settings/i18n/ar.json index 243d900..c3f70c9 100644 --- a/public/app/main/apps/settings/i18n/ar.json +++ b/public/app/main/apps/settings/i18n/ar.json @@ -60,7 +60,8 @@ "USERNAME": "اسم المستخدم", "ENFORCE_PASSWORD_HISTORY": "لتمكين التحقق من صحة كلمات المرور المستخدمة سابقًا", "PASSWORD_HISTORY_LIMIT": "عدد كلمات المرور الفريدة المستخدمة لآخر مرة للتحقق منها", - "SEARCH_ON_ENTER_KEY": "ابدأ البحث فقط بعد أن يضرب الوكيل مفتاح Enter" + "SEARCH_ON_ENTER_KEY": "ابدأ البحث فقط بعد أن يضرب الوكيل مفتاح Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "الفاصل الزمني بالثواني الذي يتم بعده إعادة تحميل التفاعلات (0 = تحديث في الوقت الفعلي)" }, "AGENTS": "عملاء", "AVG_LOAD": "متوسط التحميل", @@ -250,6 +251,11 @@ "WHATSAPP": "رابط WhatsApp", "ENFORCE_PASSWORD_HISTORY": "فرض محفوظات كلمة المرور", "PASSWORD_HISTORY_LIMIT": "حد محفوظات كلمة المرور", - "SEARCH_ON_ENTER_KEY": "ابحث في مفتاح الإدخال" + "SEARCH_ON_ENTER_KEY": "ابحث في مفتاح الإدخال", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "انتهت مهلة إعادة تحميل تفاعلات الدردشة", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "انتهت مهلة إعادة تحميل تفاعلات البريد الإلكتروني", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "انتهت مهلة إعادة تحميل تفاعلات القناة", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "انتهت مهلة إعادة تحميل تفاعلات الرسائل القصيرة", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "انتهت مهلة إعادة تحميل تفاعلات رابط WhatsApp" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/cs.json b/public/app/main/apps/settings/i18n/cs.json index 12f4218..c24cb2d 100644 --- a/public/app/main/apps/settings/i18n/cs.json +++ b/public/app/main/apps/settings/i18n/cs.json @@ -108,7 +108,8 @@ "USERNAME": "Uživatelské jméno", "ENFORCE_PASSWORD_HISTORY": "Umožňuje ověření proti dříve použitým heslům", "PASSWORD_HISTORY_LIMIT": "Počet naposledy použitých jedinečných hesel ke kontrole", - "SEARCH_ON_ENTER_KEY": "Vyhledávání začněte až poté, co agent stiskne klávesu Enter" + "SEARCH_ON_ENTER_KEY": "Vyhledávání začněte až poté, co agent stiskne klávesu Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "Časový interval v sekundách, po kterém se znovu načtou interakce (0 = aktualizace v reálném čase)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Mandatory field", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp Connector", "ENFORCE_PASSWORD_HISTORY": "Vynutit historii hesel", "PASSWORD_HISTORY_LIMIT": "Limit historie hesel", - "SEARCH_ON_ENTER_KEY": "Vyhledejte klávesu Enter" + "SEARCH_ON_ENTER_KEY": "Vyhledejte klávesu Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Interakce chatu znovu vyprÅ¡ela", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Časový limit pro opětovné načtení e-mailových interakcí", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Časový limit opětovného otevření interakcí kanálu", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Interakce se SMS znovu načtou", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Interakce konektoru WhatsApp znovu vyprÅ¡ely" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/da.json b/public/app/main/apps/settings/i18n/da.json index 3f5266b..2b86ef2 100644 --- a/public/app/main/apps/settings/i18n/da.json +++ b/public/app/main/apps/settings/i18n/da.json @@ -84,7 +84,8 @@ "USERNAME": "Brugernavn", "ENFORCE_PASSWORD_HISTORY": "Aktiverer validering mod tidligere anvendte adgangskoder", "PASSWORD_HISTORY_LIMIT": "Antal sidst anvendte unikke adgangskoder, der skal kontrolleres", - "SEARCH_ON_ENTER_KEY": "Start kun med at søge, nÃ¥r agenten rammer Enter-tasten" + "SEARCH_ON_ENTER_KEY": "Start kun med at søge, nÃ¥r agenten rammer Enter-tasten", + "INTERACTIONS_RELOAD_TIMEOUT": "Tidsinterval i sekunder, hvorefter interaktioner genindlæses (0 = opdatering i realtid)" }, "ERRORS": { "ADDRESS_REQUIRED": "Adressen er pÃ¥krævet", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp-stik", "ENFORCE_PASSWORD_HISTORY": "HÃ¥ndhæve adgangskodeshistorik", "PASSWORD_HISTORY_LIMIT": "Begrænsning af adgangskodshistorik", - "SEARCH_ON_ENTER_KEY": "Søg pÃ¥ Enter-tasten" + "SEARCH_ON_ENTER_KEY": "Søg pÃ¥ Enter-tasten", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Chatinteraktioner genindlæser timeout", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "E-mail-interaktioner genindlæser timeout", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Åbn kanalinteraktioner genindlæs timeout", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS-interaktioner genindlæser timeout", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connector-interaktioner genindlæser timeout" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/de.json b/public/app/main/apps/settings/i18n/de.json index b0e5776..20833bf 100644 --- a/public/app/main/apps/settings/i18n/de.json +++ b/public/app/main/apps/settings/i18n/de.json @@ -84,7 +84,8 @@ "USERNAME": "Nutzername", "ENFORCE_PASSWORD_HISTORY": "Aktiviert die Validierung anhand zuvor verwendeter Kennwörter", "PASSWORD_HISTORY_LIMIT": "Anzahl der zuletzt zu überprüfenden eindeutigen Kennwörter", - "SEARCH_ON_ENTER_KEY": "Beginnen Sie erst mit der Suche, nachdem der Agent die Eingabetaste gedrückt hat" + "SEARCH_ON_ENTER_KEY": "Beginnen Sie erst mit der Suche, nachdem der Agent die Eingabetaste gedrückt hat", + "INTERACTIONS_RELOAD_TIMEOUT": "Zeitintervall in Sekunden, nach dem Interaktionen neu geladen werden (0 = Echtzeitaktualisierung)" }, "ERRORS": { "ADDRESS_REQUIRED": "Die Adresse ist erforderlich", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp Connector", "ENFORCE_PASSWORD_HISTORY": "Kennwortverlauf erzwingen", "PASSWORD_HISTORY_LIMIT": "Kennwortverlaufslimit", - "SEARCH_ON_ENTER_KEY": "Suchen Sie mit der Eingabetaste" + "SEARCH_ON_ENTER_KEY": "Suchen Sie mit der Eingabetaste", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Zeitüberschreitung beim erneuten Laden von Chat-Interaktionen", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Zeitlimit für das erneute Laden von E-Mail-Interaktionen", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Zeitüberschreitung beim erneuten Laden von Open Channel-Interaktionen", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Zeitüberschreitung beim erneuten Laden von SMS-Interaktionen", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connector-Interaktionen laden das Zeitlimit neu" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/en.json b/public/app/main/apps/settings/i18n/en.json index f8dd996..ec41751 100644 --- a/public/app/main/apps/settings/i18n/en.json +++ b/public/app/main/apps/settings/i18n/en.json @@ -191,6 +191,11 @@ "ENFORCE_PASSWORD_HISTORY": "Enforce Password History", "PASSWORD_HISTORY_LIMIT": "Password History Limit", "SEARCH_ON_ENTER_KEY": "Search on Enter key", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Chat interactions reload timeout", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Email interactions reload timeout", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Open Channel interactions reload timeout", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS interactions reload timeout", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connector interactions reload timeout", "HELP": { "DEFAULTSCREENRECORDINGPATH": "Enter the path where to store screen recording files on the Agent computer (leave empty for default Video Folder path)", "RTLSUPPORT": "Enables the RTL Support for Arabic, Persian and Hebrew languages", @@ -207,7 +212,8 @@ "PASSWORD": "Password", "ENFORCE_PASSWORD_HISTORY": "Enables the validation against previously used passwords", "PASSWORD_HISTORY_LIMIT": "Number of last used unique passwords to check", - "SEARCH_ON_ENTER_KEY": "Start searching only after the agent hits the Enter key" + "SEARCH_ON_ENTER_KEY": "Start searching only after the agent hits the Enter key", + "INTERACTIONS_RELOAD_TIMEOUT": "Time interval in seconds after which interactions are reloaded (0 = real-time update)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Mandatory field", diff --git a/public/app/main/apps/settings/i18n/es.json b/public/app/main/apps/settings/i18n/es.json index 208e6ab..6835dd5 100644 --- a/public/app/main/apps/settings/i18n/es.json +++ b/public/app/main/apps/settings/i18n/es.json @@ -18,7 +18,8 @@ "USERNAME": "Nombre de usuario", "ENFORCE_PASSWORD_HISTORY": "Habilita la validación frente a contraseñas utilizadas anteriormente", "PASSWORD_HISTORY_LIMIT": "Número de contraseñas únicas utilizadas por última vez para verificar", - "SEARCH_ON_ENTER_KEY": "Empiece a buscar solo después de que el agente presione la tecla Intro" + "SEARCH_ON_ENTER_KEY": "Empiece a buscar solo después de que el agente presione la tecla Intro", + "INTERACTIONS_RELOAD_TIMEOUT": "Intervalo de tiempo en segundos después del cual se recargan las interacciones (0 = actualización en tiempo real)" }, "ERRORS": { "ACCOUNTNAME_REQUIRED": "Campo obligatorio", @@ -250,6 +251,11 @@ "WHATSAPP": "Conector de WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Hacer cumplir el historial de contraseñas", "PASSWORD_HISTORY_LIMIT": "Límite del historial de contraseñas", - "SEARCH_ON_ENTER_KEY": "Buscar en la tecla Enter" + "SEARCH_ON_ENTER_KEY": "Buscar en la tecla Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Las interacciones de chat recargan el tiempo de espera", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Tiempo de espera de recarga de interacciones de correo electrónico", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Tiempo de espera de recarga de interacciones de canal abierto", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Tiempo de espera de recarga de interacciones SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Interacciones de WhatsApp Connector recargar tiempo de espera" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/et.json b/public/app/main/apps/settings/i18n/et.json index 640f304..36d9cd1 100644 --- a/public/app/main/apps/settings/i18n/et.json +++ b/public/app/main/apps/settings/i18n/et.json @@ -108,7 +108,8 @@ "USERNAME": "Kasutajanimi", "ENFORCE_PASSWORD_HISTORY": "Lubab valideerimise varem kasutatud paroolidega", "PASSWORD_HISTORY_LIMIT": "Viimati kontrollimiseks kasutatud unikaalsete paroolide arv", - "SEARCH_ON_ENTER_KEY": "Alustage otsimist alles pärast seda, kui agent vajutab sisestusklahvi" + "SEARCH_ON_ENTER_KEY": "Alustage otsimist alles pärast seda, kui agent vajutab sisestusklahvi", + "INTERACTIONS_RELOAD_TIMEOUT": "Ajavahemik sekundites, mille järel interaktsioonid laaditakse uuesti (0 = reaalajas värskendus)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Mandatory field", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp-pistik", "ENFORCE_PASSWORD_HISTORY": "Jõusta parooliajalugu", "PASSWORD_HISTORY_LIMIT": "Parooliajaloo limiit", - "SEARCH_ON_ENTER_KEY": "Otsige sisestusklahvi" + "SEARCH_ON_ENTER_KEY": "Otsige sisestusklahvi", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Vestluse interaktsioonide uuesti laadimise ajalõpp", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "E-posti interaktsioonide uuesti laadimise ajalõpp", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Avatud kanali interaktsioonide uuesti laadimise ajalõpp", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS-interaktsioonide uuesti laadimise ajalõpp", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connectori interaktsioonide uuesti laadimise ajalõpp" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/fa.json b/public/app/main/apps/settings/i18n/fa.json index 1366e16..77ded5d 100644 --- a/public/app/main/apps/settings/i18n/fa.json +++ b/public/app/main/apps/settings/i18n/fa.json @@ -84,7 +84,8 @@ "USERNAME": "نام کاربری", "ENFORCE_PASSWORD_HISTORY": "تأیید اعتبار را در برابر رمزهای عبور قبلاً استفاده شده فعال می کند", "PASSWORD_HISTORY_LIMIT": "تعداد آخرین رمزهای عبور منحصر به فرد مورد استفاده برای بررسی", - "SEARCH_ON_ENTER_KEY": "فقط پس از زدن عامل ورود کلید به جستجو ، شروع به جستجو می کنید" + "SEARCH_ON_ENTER_KEY": "فقط پس از زدن عامل ورود کلید به جستجو ، شروع به جستجو می کنید", + "INTERACTIONS_RELOAD_TIMEOUT": "فاصله زمانی در ثانیه بعد از آن دوباره تعاملات بارگیری می شود (0 = به روزرسانی در زمان واقعی)" }, "ERRORS": { "ADDRESS_REQUIRED": "آدرس مورد نیاز است.", @@ -250,6 +251,11 @@ "WHATSAPP": "اتصال واتساپ", "ENFORCE_PASSWORD_HISTORY": "تاریخچه رمز عبور را اجرا کنید", "PASSWORD_HISTORY_LIMIT": "محدودیت تاریخچه رمز عبور", - "SEARCH_ON_ENTER_KEY": "در کلید Enter جستجو کنید" + "SEARCH_ON_ENTER_KEY": "در کلید Enter جستجو کنید", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "تعاملات Ú¯Ù¾ مهلت بارگیری مجدد را انجام می دهند", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "تعاملات الکترونیکی مهلت بارگیری مجدد را بارگیری می کنند", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "تعاملات کانال باز مهلت بارگیری مجدد را بارگیری کنید", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "تعاملات پیام کوتاه زمان بارگیری مجدد را بارگیری می کنند", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "تعاملات WhatsApp Connection زمان بارگذاری مجدد را بارگیری می کند" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/fi.json b/public/app/main/apps/settings/i18n/fi.json index a59d6f2..8e70e05 100644 --- a/public/app/main/apps/settings/i18n/fi.json +++ b/public/app/main/apps/settings/i18n/fi.json @@ -83,7 +83,8 @@ "USERNAME": "Käyttäjätunnus", "ENFORCE_PASSWORD_HISTORY": "Mahdollistaa vahvistuksen aiemmin käytettyihin salasanoihin", "PASSWORD_HISTORY_LIMIT": "Viimeksi käytettyjen tarkistettavien yksilöllisten salasanojen määrä", - "SEARCH_ON_ENTER_KEY": "Aloita haku vasta sen jälkeen, kun agentti napsauttaa Enter-näppäintä" + "SEARCH_ON_ENTER_KEY": "Aloita haku vasta sen jälkeen, kun agentti napsauttaa Enter-näppäintä", + "INTERACTIONS_RELOAD_TIMEOUT": "Aikaväli sekunteina, jonka jälkeen vuorovaikutukset ladataan uudelleen (0 = reaaliaikainen päivitys)" }, "ERRORS": { "ADDRESS_REQUIRED": "Osoite on pakollinen", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp-liitin", "ENFORCE_PASSWORD_HISTORY": "Pakota salasanahistoria", "PASSWORD_HISTORY_LIMIT": "Salasanahistorian raja", - "SEARCH_ON_ENTER_KEY": "Hae Enter-näppäimellä" + "SEARCH_ON_ENTER_KEY": "Hae Enter-näppäimellä", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Keskustelujen vuorovaikutukset latautuvat uudelleen", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Sähköpostiviestien uudelleenlatauksen aikakatkaisu", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Avoimen kanavan vuorovaikutusten latauksen aikakatkaisu", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Tekstiviestien vuorovaikutukset latautuvat uudelleen", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp-liittimen vuorovaikutusten latauksen aikakatkaisu" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/fr.json b/public/app/main/apps/settings/i18n/fr.json index 6ecd26a..dc49c60 100644 --- a/public/app/main/apps/settings/i18n/fr.json +++ b/public/app/main/apps/settings/i18n/fr.json @@ -84,7 +84,8 @@ "USERNAME": "Nom d'utilisateur", "ENFORCE_PASSWORD_HISTORY": "Permet la validation par rapport aux mots de passe précédemment utilisés", "PASSWORD_HISTORY_LIMIT": "Nombre de derniers mots de passe uniques utilisés à vérifier", - "SEARCH_ON_ENTER_KEY": "Commencez la recherche uniquement après que l'agent a appuyé sur la touche Entrée" + "SEARCH_ON_ENTER_KEY": "Commencez la recherche uniquement après que l'agent a appuyé sur la touche Entrée", + "INTERACTIONS_RELOAD_TIMEOUT": "Intervalle de temps en secondes après lequel les interactions sont rechargées (0 = mise à jour en temps réel)" }, "ERRORS": { "ADDRESS_REQUIRED": "Adresse nécessaire", @@ -250,6 +251,11 @@ "WHATSAPP": "Connecteur WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Appliquer l'historique des mots de passe", "PASSWORD_HISTORY_LIMIT": "Limite d'historique de mot de passe", - "SEARCH_ON_ENTER_KEY": "Rechercher sur la touche Entrée" + "SEARCH_ON_ENTER_KEY": "Rechercher sur la touche Entrée", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Délai de rechargement des interactions de chat", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Délai de rechargement des interactions par e-mail", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Délai de rechargement des interactions Open Channel", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Délai de rechargement des interactions SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Délai de rechargement des interactions du connecteur WhatsApp" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/he.json b/public/app/main/apps/settings/i18n/he.json index 641dacf..237f6f4 100644 --- a/public/app/main/apps/settings/i18n/he.json +++ b/public/app/main/apps/settings/i18n/he.json @@ -108,7 +108,8 @@ "USERNAME": "שם משתמש", "ENFORCE_PASSWORD_HISTORY": "מאפשר אימות מול סיסמאות ששימשו בעבר", "PASSWORD_HISTORY_LIMIT": "מספר הסיסמאות הייחודיות ששימשו לאחרונה לבדיקה", - "SEARCH_ON_ENTER_KEY": "התחל לחפש רק לאחר שהסוכן לוחץ על מקש Enter" + "SEARCH_ON_ENTER_KEY": "התחל לחפש רק לאחר שהסוכן לוחץ על מקש Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "מרווח זמן בשניות שלאחריו טוענים אינטראקציות מחדש (0 = עדכון בזמן אמת)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "שדה חובה", @@ -250,6 +251,11 @@ "WHATSAPP": "מחבר WhatsApp", "ENFORCE_PASSWORD_HISTORY": "אכוף את היסטוריית הסיסמאות", "PASSWORD_HISTORY_LIMIT": "מגבלת היסטוריית סיסמאות", - "SEARCH_ON_ENTER_KEY": "חפש על מקש Enter" + "SEARCH_ON_ENTER_KEY": "חפש על מקש Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "זמן קצוב לטעינת אינטראקציות צ'אט", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "פסק זמן לטעינה מחדש של אינטראקציות באימייל", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "פסק זמן לטעינה מחדש של אינטראקציות בערוץ פתוח", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "פסק זמן לטעינה של אינטראקציות SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "פסק זמן לטעינה של אינטראקציות מחבר WhatsApp" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/hi.json b/public/app/main/apps/settings/i18n/hi.json index deeb959..62530a3 100644 --- a/public/app/main/apps/settings/i18n/hi.json +++ b/public/app/main/apps/settings/i18n/hi.json @@ -84,7 +84,8 @@ "USERNAME": "उपयोगकर्ता नाम", "ENFORCE_PASSWORD_HISTORY": "पहले उपयोग किए गए पासवर्ड के विरुद्ध सत्यापन को सक्षम करता है", "PASSWORD_HISTORY_LIMIT": "जाँच करने के लिए अंतिम उपयोग किए गए अद्वितीय पासवर्ड की संख्या", - "SEARCH_ON_ENTER_KEY": "एजेंट द्वारा एंटर की जाने के बाद ही सर्च शुरू करें" + "SEARCH_ON_ENTER_KEY": "एजेंट द्वारा एंटर की जाने के बाद ही सर्च शुरू करें", + "INTERACTIONS_RELOAD_TIMEOUT": "समय अंतराल सेकंड में जिसके बाद बातचीत पुनः लोड की जाती है (0 = वास्तविक समय अद्यतन)" }, "ERRORS": { "ADDRESS_REQUIRED": "इस अभिभाषण की आवश्यकता है।", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp कनेक्टर", "ENFORCE_PASSWORD_HISTORY": "पासवर्ड इतिहास को लागू करे", "PASSWORD_HISTORY_LIMIT": "पासवर्ड इतिहास की सीमा", - "SEARCH_ON_ENTER_KEY": "Enter कुंजी पर खोजें" + "SEARCH_ON_ENTER_KEY": "Enter कुंजी पर खोजें", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "चैट इंटरैक्शन टाइमआउट पुनः लोड करें", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "ईमेल इंटरैक्शन टाइमआउट पुनः लोड करें", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "ओपन चैनल इंटरैक्शन टाइमआउट पुनः लोड करें", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "एसएमएस इंटरैक्शन टाइमआउट पुनः लोड करें", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "व्हाट्सएप कनेक्टर इंटरैक्शन टाइमआउट पुनः लोड करें" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/id.json b/public/app/main/apps/settings/i18n/id.json index b696783..9364a28 100644 --- a/public/app/main/apps/settings/i18n/id.json +++ b/public/app/main/apps/settings/i18n/id.json @@ -60,7 +60,8 @@ "USERNAME": "Nama pengguna", "ENFORCE_PASSWORD_HISTORY": "Mengaktifkan validasi terhadap sandi yang digunakan sebelumnya", "PASSWORD_HISTORY_LIMIT": "Jumlah sandi unik yang terakhir digunakan untuk diperiksa", - "SEARCH_ON_ENTER_KEY": "Mulailah mencari hanya setelah agen menekan tombol Enter" + "SEARCH_ON_ENTER_KEY": "Mulailah mencari hanya setelah agen menekan tombol Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "Interval waktu dalam detik setelah interaksi dimuat ulang (0 = pembaruan waktu nyata)" }, "ACCOUNTNAME": "Nama akun", "ADDRESS": "Alamat", @@ -250,6 +251,11 @@ "WHATSAPP": "Konektor WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Terapkan Riwayat Kata Sandi", "PASSWORD_HISTORY_LIMIT": "Batas Riwayat Kata Sandi", - "SEARCH_ON_ENTER_KEY": "Cari di tombol Enter" + "SEARCH_ON_ENTER_KEY": "Cari di tombol Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Interaksi obrolan memuat ulang waktu tunggu", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Interaksi email memuat ulang waktu tunggu", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Interaksi Saluran Terbuka memuat ulang waktu tunggu", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Interaksi SMS memuat ulang waktu tunggu", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Interaksi WhatsApp Connector memuat ulang waktu tunggu" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/it.json b/public/app/main/apps/settings/i18n/it.json index e78c8b9..1a69d5d 100644 --- a/public/app/main/apps/settings/i18n/it.json +++ b/public/app/main/apps/settings/i18n/it.json @@ -191,6 +191,11 @@ "PASSWORD_HISTORY_LIMIT": "Limite controllo passwords precedenti", "APPZONE": "Zona app", "SEARCH_ON_ENTER_KEY": "Cerca premendo il tasto Invio", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Timeout di aggiornamento delle interazioni Chat", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Timeout di aggiornamento delle interazioni Email", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Timeout di aggiornamento delle interazioni Open Channel", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Timeout di aggiornamento delle interazioni SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Timeout di aggiornamento delle interazioni WhatsApp Connector", "HELP": { "ADDRESS": "Indirizzo della rete", "LOCALNETADDRESS": "Indirizzo IP/Subnet mask", @@ -207,7 +212,8 @@ "USERNAME": "Nome utente", "ENFORCE_PASSWORD_HISTORY": "Abilita la validazione rispetto alle password utilizzate in precedenza", "PASSWORD_HISTORY_LIMIT": "Numero delle ultime password univoche utilizzate per la validazione", - "SEARCH_ON_ENTER_KEY": "Avvia la ricerca soltanto quando l'agente preme il tasto Invio" + "SEARCH_ON_ENTER_KEY": "Avvia la ricerca soltanto quando l'agente preme il tasto Invio", + "INTERACTIONS_RELOAD_TIMEOUT": "Intervallo di tempo espresso in secondi dopo cui vengono ricaricate le interazioni (0 = aggiornamento real-time)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Campo obbligatorio", diff --git a/public/app/main/apps/settings/i18n/ja.json b/public/app/main/apps/settings/i18n/ja.json index b74b3ea..9053f68 100644 --- a/public/app/main/apps/settings/i18n/ja.json +++ b/public/app/main/apps/settings/i18n/ja.json @@ -60,7 +60,8 @@ "USERNAME": "ユーザー名", "ENFORCE_PASSWORD_HISTORY": "以前に使用したパスワードに対する検証を有効にします", "PASSWORD_HISTORY_LIMIT": "チェックするために最後に使用された一意のパスワードの数", - "SEARCH_ON_ENTER_KEY": "エージェントがEnterキーを押した後でのみ検索を開始します" + "SEARCH_ON_ENTER_KEY": "エージェントがEnterキーを押した後でのみ検索を開始します", + "INTERACTIONS_RELOAD_TIMEOUT": "インタラクションがリロードされるまでの秒単位の時間間隔(0 =リアルタイム更新)" }, "ACCOUNTNAME": "アカウント名", "ADDRESS": "アドレス", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsAppコネクタ", "ENFORCE_PASSWORD_HISTORY": "パスワード履歴を適用する", "PASSWORD_HISTORY_LIMIT": "パスワード履歴の制限", - "SEARCH_ON_ENTER_KEY": "Enterキーで検索" + "SEARCH_ON_ENTER_KEY": "Enterキーで検索", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "チャットインタラクションのリロードタイムアウト", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "電子メールの相互作用のリロードタイムアウト", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "オープンチャネルインタラクションのリロードタイムアウト", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMSインタラクションのリロードタイムアウト", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsAppコネクタの相互作用のリロードタイムアウト" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/ko.json b/public/app/main/apps/settings/i18n/ko.json index 9771026..9fe2f24 100644 --- a/public/app/main/apps/settings/i18n/ko.json +++ b/public/app/main/apps/settings/i18n/ko.json @@ -84,7 +84,8 @@ "USERNAME": "사용자 이름", "ENFORCE_PASSWORD_HISTORY": "이전에 사용한 암호에 대한 유효성 검사를 활성화합니다.", "PASSWORD_HISTORY_LIMIT": "확인하기 위해 마지막으로 사용한 고유 암호 수", - "SEARCH_ON_ENTER_KEY": "에이전트가 Enter 키를 누른 후에 만 검색 시작" + "SEARCH_ON_ENTER_KEY": "에이전트가 Enter 키를 누른 후에 만 검색 시작", + "INTERACTIONS_RELOAD_TIMEOUT": "상호 작용이 다시로드되는 시간 간격 (초) (0 = 실시간 업데이트)" }, "ERRORS": { "ADDRESS_REQUIRED": "주소는 필수입니다.", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp 커넥터", "ENFORCE_PASSWORD_HISTORY": "비밀번호 기록 적용", "PASSWORD_HISTORY_LIMIT": "비밀번호 기록 제한", - "SEARCH_ON_ENTER_KEY": "Enter 키로 검색" + "SEARCH_ON_ENTER_KEY": "Enter 키로 검색", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "채팅 상호 작용 다시로드 시간 초과", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "이메일 상호 작용 다시로드 시간 초과", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "오픈 채널 상호 작용 다시로드 시간 초과", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS 상호 작용 다시로드 시간 초과", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connector 상호 작용 다시로드 시간 초과" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/lt.json b/public/app/main/apps/settings/i18n/lt.json index 0796ea4..86552ef 100644 --- a/public/app/main/apps/settings/i18n/lt.json +++ b/public/app/main/apps/settings/i18n/lt.json @@ -121,7 +121,8 @@ "LOGINMAILFREQUENCY": "NepamirÅ¡kite iÅ¡ naujo paleisti el. paÅ¡to paslaugos kiekvieną kartą, kai Å¡is parametras buvo pakeistas", "ENFORCE_PASSWORD_HISTORY": "Ä®galina patvirtinimą pagal anksčiau naudotus slaptažodžius", "PASSWORD_HISTORY_LIMIT": "Paskutinių patikrintiems unikalių slaptažodžių skaičius", - "SEARCH_ON_ENTER_KEY": "Pradėkite paieÅ¡ką tik agentui paspaudus Enter klavišą" + "SEARCH_ON_ENTER_KEY": "Pradėkite paieÅ¡ką tik agentui paspaudus Enter klavišą", + "INTERACTIONS_RELOAD_TIMEOUT": "Laiko intervalas sekundėmis, po kurio sąveika perkraunama (0 = atnaujinimas realiuoju laiku)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Privalomas laukas", @@ -250,6 +251,11 @@ "WHATSAPP": "„WhatsApp“ jungtis", "ENFORCE_PASSWORD_HISTORY": "Priversti slaptažodžių istoriją", "PASSWORD_HISTORY_LIMIT": "Slaptažodžių istorijos limitas", - "SEARCH_ON_ENTER_KEY": "IeÅ¡kokite klaviÅ¡o Enter" + "SEARCH_ON_ENTER_KEY": "IeÅ¡kokite klaviÅ¡o Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Pokalbių sąveikos laikas vėl įkeliamas", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "El. PaÅ¡to sąveikos iÅ¡ naujo įkeliamas skirtasis laikas", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Atviro kanalo sąveikų įkrovimo skirtasis laikas", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS sąveikos perkėlimo skirtasis laikas", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "„WhatsApp Connector“ sąveikos perkėlimo skirtasis laikas" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/lv.json b/public/app/main/apps/settings/i18n/lv.json index e310c67..00ab0e3 100644 --- a/public/app/main/apps/settings/i18n/lv.json +++ b/public/app/main/apps/settings/i18n/lv.json @@ -61,7 +61,8 @@ "USERNAME": "Lietotājvārds", "ENFORCE_PASSWORD_HISTORY": "Ä»auj pārbaudÄ«t iepriekÅ¡ izmantotās paroles", "PASSWORD_HISTORY_LIMIT": "Pēdējo reizi izmantoto unikālo paroļu skaits pārbaudei", - "SEARCH_ON_ENTER_KEY": "Sāciet meklēšanu tikai pēc tam, kad aÄ£ents nospiež taustiņu Enter" + "SEARCH_ON_ENTER_KEY": "Sāciet meklēšanu tikai pēc tam, kad aÄ£ents nospiež taustiņu Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "Laika intervāls sekundēs, pēc kura mijiedarbÄ«ba tiek pārlādēta (0 = reāllaika atjauninājums)" }, "SMTP_SSL": "Protokola SMTP standarts SSL", "CALL_RECORDING_ENCRYPTION": "Balss ierakstu Å¡ifrēšana", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp savienotājs", "ENFORCE_PASSWORD_HISTORY": "Piespiest paroles vēsturi", "PASSWORD_HISTORY_LIMIT": "Paroļu vēstures ierobežojums", - "SEARCH_ON_ENTER_KEY": "Meklēt uz taustiņa Enter" + "SEARCH_ON_ENTER_KEY": "Meklēt uz taustiņa Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Tērzēšanas mijiedarbÄ«bas laikā tiek ielādēts noildze", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "E-pasta mijiedarbÄ«bas atkārtota noildze", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Atvērtā kanāla mijiedarbÄ«bas noildzes taimauts", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Īsziņu mijiedarbÄ«bas atkārtota noildze", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp savienotāja mijiedarbÄ«bas noildzes taimauts" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/nl.json b/public/app/main/apps/settings/i18n/nl.json index 4949af8..1dc9c78 100644 --- a/public/app/main/apps/settings/i18n/nl.json +++ b/public/app/main/apps/settings/i18n/nl.json @@ -83,7 +83,8 @@ "USERNAME": "Gebruikersnaam", "ENFORCE_PASSWORD_HISTORY": "Maakt validatie van eerder gebruikte wachtwoorden mogelijk", "PASSWORD_HISTORY_LIMIT": "Aantal laatst gebruikte unieke wachtwoorden om te controleren", - "SEARCH_ON_ENTER_KEY": "Begin pas met zoeken nadat de agent op Enter heeft gedrukt" + "SEARCH_ON_ENTER_KEY": "Begin pas met zoeken nadat de agent op Enter heeft gedrukt", + "INTERACTIONS_RELOAD_TIMEOUT": "Tijdsinterval in seconden waarna interacties opnieuw worden geladen (0 = real-time update)" }, "ERRORS": { "ADDRESS_REQUIRED": "Het adres is vereist.", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp-aansluiting", "ENFORCE_PASSWORD_HISTORY": "Wachtwoordgeschiedenis afdwingen", "PASSWORD_HISTORY_LIMIT": "Limiet voor wachtwoordgeschiedenis", - "SEARCH_ON_ENTER_KEY": "Zoeken op Enter-toets" + "SEARCH_ON_ENTER_KEY": "Zoeken op Enter-toets", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Time-out voor herladen van chatinteracties", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Time-out voor herladen van e-mailinteracties", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Time-out voor opnieuw laden van interacties bij Open Kanaal", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Time-out voor herladen van sms-interacties", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Time-out voor herladen van WhatsApp Connector-interacties" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/no.json b/public/app/main/apps/settings/i18n/no.json index 97b70cf..9eadcc3 100644 --- a/public/app/main/apps/settings/i18n/no.json +++ b/public/app/main/apps/settings/i18n/no.json @@ -84,7 +84,8 @@ "USERNAME": "Brukernavn", "ENFORCE_PASSWORD_HISTORY": "Aktiverer validering mot tidligere brukte passord", "PASSWORD_HISTORY_LIMIT": "Antall sist brukte unike passord Ã¥ sjekke", - "SEARCH_ON_ENTER_KEY": "Begynn Ã¥ søke bare etter at agenten trykker Enter-tasten" + "SEARCH_ON_ENTER_KEY": "Begynn Ã¥ søke bare etter at agenten trykker Enter-tasten", + "INTERACTIONS_RELOAD_TIMEOUT": "Tidsintervall i sekunder hvoretter interaksjoner lastes pÃ¥ nytt (0 = sanntidsoppdatering)" }, "ERRORS": { "ADDRESS_REQUIRED": "Adressen er nødvendig", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp-kontakt", "ENFORCE_PASSWORD_HISTORY": "HÃ¥ndheve passordloggen", "PASSWORD_HISTORY_LIMIT": "Passordhistorikkgrense", - "SEARCH_ON_ENTER_KEY": "Søk pÃ¥ Enter-tasten" + "SEARCH_ON_ENTER_KEY": "Søk pÃ¥ Enter-tasten", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Chatinteraksjoner laster tidsavbrudd pÃ¥ nytt", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Tidsavbrudd for e-postinteraksjoner lastes inn pÃ¥ nytt", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Åpne kanalinteraksjoner pÃ¥ nytt tidsavbrudd", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS-interaksjoner laster tidsavbrudd pÃ¥ nytt", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connector-interaksjoner laster tidsavbrudd pÃ¥ nytt" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/pl.json b/public/app/main/apps/settings/i18n/pl.json index 1cb7582..034dc0a 100644 --- a/public/app/main/apps/settings/i18n/pl.json +++ b/public/app/main/apps/settings/i18n/pl.json @@ -84,7 +84,8 @@ "USERNAME": "Nazwa Użytkownika", "ENFORCE_PASSWORD_HISTORY": "Włącza sprawdzanie poprawności względem wcześniej używanych haseł", "PASSWORD_HISTORY_LIMIT": "Liczba ostatnio używanych unikalnych haseł do sprawdzenia", - "SEARCH_ON_ENTER_KEY": "Rozpocznij wyszukiwanie dopiero po naciśnięciu klawisza Enter przez agenta" + "SEARCH_ON_ENTER_KEY": "Rozpocznij wyszukiwanie dopiero po naciśnięciu klawisza Enter przez agenta", + "INTERACTIONS_RELOAD_TIMEOUT": "Przedział czasu w sekundach, po którym interakcje są ponownie ładowane (0 = aktualizacja w czasie rzeczywistym)" }, "ERRORS": { "ADDRESS_REQUIRED": "Pole obowiązkowe", @@ -250,6 +251,11 @@ "WHATSAPP": "Złącze WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Wymuszaj historię haseł", "PASSWORD_HISTORY_LIMIT": "Limit historii haseł", - "SEARCH_ON_ENTER_KEY": "Wyszukaj klawiszem Enter" + "SEARCH_ON_ENTER_KEY": "Wyszukaj klawiszem Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Limit czasu ponownego ładowania interakcji czatu", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Limit czasu ponownego ładowania interakcji e-mail", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Limit czasu przeładowania interakcji otwartego kanału", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Limit czasu przeładowania interakcji SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Limit czasu przeładowania interakcji WhatsApp Connector" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/pt-BR.json b/public/app/main/apps/settings/i18n/pt-BR.json index 890a0cb..5d84f37 100644 --- a/public/app/main/apps/settings/i18n/pt-BR.json +++ b/public/app/main/apps/settings/i18n/pt-BR.json @@ -110,7 +110,8 @@ "USERNAME": "Nome do usuário", "ENFORCE_PASSWORD_HISTORY": "Habilita a validação contra senhas usadas anteriormente", "PASSWORD_HISTORY_LIMIT": "Número das últimas senhas exclusivas usadas para verificar", - "SEARCH_ON_ENTER_KEY": "Comece a pesquisar somente depois que o agente pressionar a tecla Enter" + "SEARCH_ON_ENTER_KEY": "Comece a pesquisar somente depois que o agente pressionar a tecla Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "Intervalo de tempo em segundos após o qual as interações são recarregadas (0 = atualização em tempo real)" }, "ERRORS": { "CHATTIMEOUT_REQUIRED": "Campo obrigatório", @@ -250,6 +251,11 @@ "WHATSAPP": "Conector WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Aplicar histórico de senha", "PASSWORD_HISTORY_LIMIT": "Limite de histórico de senha", - "SEARCH_ON_ENTER_KEY": "Pesquisa na tecla Enter" + "SEARCH_ON_ENTER_KEY": "Pesquisa na tecla Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações de bate-papo", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações por email", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações de canal aberto", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações de SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga das interações do Conector WhatsApp" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/pt-PT.json b/public/app/main/apps/settings/i18n/pt-PT.json index 7cb2302..1554f83 100644 --- a/public/app/main/apps/settings/i18n/pt-PT.json +++ b/public/app/main/apps/settings/i18n/pt-PT.json @@ -84,7 +84,8 @@ "USERNAME": "Nome do usuário", "ENFORCE_PASSWORD_HISTORY": "Habilita a validação contra senhas usadas anteriormente", "PASSWORD_HISTORY_LIMIT": "Número das últimas senhas exclusivas usadas para verificar", - "SEARCH_ON_ENTER_KEY": "Comece a pesquisar somente depois que o agente pressionar a tecla Enter" + "SEARCH_ON_ENTER_KEY": "Comece a pesquisar somente depois que o agente pressionar a tecla Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "Intervalo de tempo em segundos após o qual as interações são recarregadas (0 = atualização em tempo real)" }, "ERRORS": { "ADDRESS_REQUIRED": "O endereço é obrigatório", @@ -250,6 +251,11 @@ "WHATSAPP": "Conector WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Aplicar histórico de senha", "PASSWORD_HISTORY_LIMIT": "Limite de histórico de senha", - "SEARCH_ON_ENTER_KEY": "Pesquisa na tecla Enter" + "SEARCH_ON_ENTER_KEY": "Pesquisa na tecla Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações de bate-papo", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações por email", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações de canal aberto", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga de interações de SMS", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Tempo limite de recarga das interações do Conector WhatsApp" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/ru.json b/public/app/main/apps/settings/i18n/ru.json index 50c3a75..b8807fd 100644 --- a/public/app/main/apps/settings/i18n/ru.json +++ b/public/app/main/apps/settings/i18n/ru.json @@ -84,7 +84,8 @@ "USERNAME": "имя пользователя", "ENFORCE_PASSWORD_HISTORY": "Включает проверку на соответствие ранее использованным паролям", "PASSWORD_HISTORY_LIMIT": "Количество последних использованных уникальных паролей для проверки", - "SEARCH_ON_ENTER_KEY": "Начать поиск только после того, как агент нажмет клавишу Enter" + "SEARCH_ON_ENTER_KEY": "Начать поиск только после того, как агент нажмет клавишу Enter", + "INTERACTIONS_RELOAD_TIMEOUT": "Интервал времени в секундах, по истечении которого взаимодействия перезагружаются (0 = обновление в реальном времени)" }, "ERRORS": { "ADDRESS_REQUIRED": "Адрес не требуется", @@ -250,6 +251,11 @@ "WHATSAPP": "Коннектор WhatsApp", "ENFORCE_PASSWORD_HISTORY": "Включить историю паролей", "PASSWORD_HISTORY_LIMIT": "Ограничение истории паролей", - "SEARCH_ON_ENTER_KEY": "Искать по клавише Enter" + "SEARCH_ON_ENTER_KEY": "Искать по клавише Enter", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Тайм-аут перезагрузки взаимодействий в чате", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "Таймаут перезагрузки взаимодействия с электронной почтой", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Таймаут перезагрузки взаимодействий с открытым каналом", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "Время ожидания перезагрузки SMS-взаимодействий", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "Таймаут перезагрузки взаимодействий с WhatsApp Connector" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/sv.json b/public/app/main/apps/settings/i18n/sv.json index 3580d4d..6c0db79 100644 --- a/public/app/main/apps/settings/i18n/sv.json +++ b/public/app/main/apps/settings/i18n/sv.json @@ -84,7 +84,8 @@ "USERNAME": "Användarnamn", "ENFORCE_PASSWORD_HISTORY": "Aktiverar validering mot tidigare använda lösenord", "PASSWORD_HISTORY_LIMIT": "Antal senast använda unika lösenord att kontrollera", - "SEARCH_ON_ENTER_KEY": "Börja söka först när agenten trycker pÃ¥ Enter-tangenten" + "SEARCH_ON_ENTER_KEY": "Börja söka först när agenten trycker pÃ¥ Enter-tangenten", + "INTERACTIONS_RELOAD_TIMEOUT": "Tidsintervall i sekunder efter vilket interaktioner laddas om (0 = realtidsuppdatering)" }, "ERRORS": { "ADDRESS_REQUIRED": "Adressen är obligatoriskt", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp-anslutning", "ENFORCE_PASSWORD_HISTORY": "Tillämpa lösenordshistorik", "PASSWORD_HISTORY_LIMIT": "Gräns för lösenordshistorik", - "SEARCH_ON_ENTER_KEY": "Sök pÃ¥ Enter-tangenten" + "SEARCH_ON_ENTER_KEY": "Sök pÃ¥ Enter-tangenten", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Chattinteraktioner laddar om timeout", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "E-postinteraktioner laddar om timeout", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Öppna timeout för interaktion med öppen kanal", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS-interaktioner laddar om timeout", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Connector-interaktioner laddar om timeout" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/tr.json b/public/app/main/apps/settings/i18n/tr.json index 3ee88ac..ec1e7cf 100644 --- a/public/app/main/apps/settings/i18n/tr.json +++ b/public/app/main/apps/settings/i18n/tr.json @@ -84,7 +84,8 @@ "USERNAME": "Kullanıcı adı", "ENFORCE_PASSWORD_HISTORY": "Daha önce kullanılan şifrelere göre doğrulamayı etkinleştirir", "PASSWORD_HISTORY_LIMIT": "Kontrol edilecek son kullanılan benzersiz şifrelerin sayısı", - "SEARCH_ON_ENTER_KEY": "Aramaya yalnızca temsilci Enter tuşuna bastıktan sonra başlayın" + "SEARCH_ON_ENTER_KEY": "Aramaya yalnızca temsilci Enter tuşuna bastıktan sonra başlayın", + "INTERACTIONS_RELOAD_TIMEOUT": "Etkileşimlerin yeniden yüklendiği saniye cinsinden zaman aralığı (0 = gerçek zamanlı güncelleme)" }, "ERRORS": { "ADDRESS_REQUIRED": "Bu Adresi gerekli", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp Bağlayıcısı", "ENFORCE_PASSWORD_HISTORY": "Şifre geçmişini zorla", "PASSWORD_HISTORY_LIMIT": "Şifre Geçmişi Sınırı", - "SEARCH_ON_ENTER_KEY": "Enter tuşu ile ara" + "SEARCH_ON_ENTER_KEY": "Enter tuşu ile ara", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "Sohbet etkileşimleri yeniden yükleme zaman aşımı", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "E-posta etkileşimleri yeniden yükleme zaman aşımı", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "Açık Kanal etkileşimleri yeniden yükleme zaman aşımı", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS etkileşimleri yeniden yükleme zaman aşımı", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp Bağlayıcısı etkileşimleri yeniden yükleme zaman aşımı" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/zh-CN.json b/public/app/main/apps/settings/i18n/zh-CN.json index dd24e89..257f3e3 100644 --- a/public/app/main/apps/settings/i18n/zh-CN.json +++ b/public/app/main/apps/settings/i18n/zh-CN.json @@ -84,7 +84,8 @@ "USERNAME": "用户名", "ENFORCE_PASSWORD_HISTORY": "针对先前使用的密码启用验证", "PASSWORD_HISTORY_LIMIT": "上次要检查的唯一密码的数量", - "SEARCH_ON_ENTER_KEY": "仅在业务代表按下Enter键后才开始搜索" + "SEARCH_ON_ENTER_KEY": "仅在业务代表按下Enter键后才开始搜索", + "INTERACTIONS_RELOAD_TIMEOUT": "重新加载互动之后的时间间隔(以秒为单位)(0 =实时更新)" }, "ERRORS": { "ADDRESS_REQUIRED": "该地址是必填项", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp连接器", "ENFORCE_PASSWORD_HISTORY": "实施密码记录", "PASSWORD_HISTORY_LIMIT": "密码历史记录限制", - "SEARCH_ON_ENTER_KEY": "在Enter键上搜索" + "SEARCH_ON_ENTER_KEY": "在Enter键上搜索", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "聊天互动重新加载超时", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "电子邮件互动重新加载超时", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "公开频道互动重载超时", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS交互重新加载超时", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp连接器交互重新加载超时" } } \ No newline at end of file diff --git a/public/app/main/apps/settings/i18n/zh-TW.json b/public/app/main/apps/settings/i18n/zh-TW.json index 3f48ded..969b614 100644 --- a/public/app/main/apps/settings/i18n/zh-TW.json +++ b/public/app/main/apps/settings/i18n/zh-TW.json @@ -84,7 +84,8 @@ "USERNAME": "用戶名", "ENFORCE_PASSWORD_HISTORY": "針對先前使用的密碼啟用驗證", "PASSWORD_HISTORY_LIMIT": "上次要檢查的唯一密碼的數量", - "SEARCH_ON_ENTER_KEY": "僅在業務代表按下Enter鍵後才開始搜索" + "SEARCH_ON_ENTER_KEY": "僅在業務代表按下Enter鍵後才開始搜索", + "INTERACTIONS_RELOAD_TIMEOUT": "重新加載互動之後的時間間隔(以秒為單位)(0 =實時更新)" }, "ERRORS": { "ADDRESS_REQUIRED": "地址為必填欄位", @@ -250,6 +251,11 @@ "WHATSAPP": "WhatsApp連接器", "ENFORCE_PASSWORD_HISTORY": "實施密碼記錄", "PASSWORD_HISTORY_LIMIT": "密碼歷史記錄限制", - "SEARCH_ON_ENTER_KEY": "在Enter鍵上搜索" + "SEARCH_ON_ENTER_KEY": "在Enter鍵上搜索", + "CHAT_INTERACTIONS_RELOAD_TIMEOUT": "聊天互動重新加載超時", + "MAIL_INTERACTIONS_RELOAD_TIMEOUT": "電子郵件互動重新加載超時", + "OPENCHANNEL_INTERACTIONS_RELOAD_TIMEOUT": "公開頻道互動重載超時", + "SMS_INTERACTIONS_RELOAD_TIMEOUT": "SMS交互重新加載超時", + "WHATSAPP_INTERACTIONS_RELOAD_TIMEOUT": "WhatsApp連接器交互重新加載超時" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/ar.json b/public/app/main/apps/sms/i18n/ar.json index 004bded..d230afc 100644 --- a/public/app/main/apps/sms/i18n/ar.json +++ b/public/app/main/apps/sms/i18n/ar.json @@ -59,7 +59,9 @@ "SECRETACCESSKEY_REQUIRED": "مطلوب سر مفتاح الوصول", "CLIENTEMAIL_REQUIRED": "حقل الزامي", "PRIVATEKEY_REQUIRED": "حقل الزامي", - "PROJECTID_REQUIRED": "حقل الزامي" + "PROJECTID_REQUIRED": "حقل الزامي", + "ACCOUNTID_REQUIRED": "حقل الزامي", + "APPLICATIONID_REQUIRED": "حقل الزامي" }, "HELP": { "DELIVERYREPORTURL": "هذه هي سلسلة واجهة برمجة التطبيقات التي تم إنشاؤها تلقائيًا والتي تحتاج إلى استخدامها لتلقي تقرير التسليم للرسائل المرسلة من موفر SMS (يجب استخدام طريقة POST): انقر فوق زر الحافظة لنسخه.", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "تحرير Dialogflow V2", "PRIVATEKEY": "مفتاح سري", - "PROJECTID": "معرف المشروع" + "PROJECTID": "معرف المشروع", + "ACCOUNTID": "معرف الحساب", + "APPLICATIONID": "رقم الاستمارة" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/cs.json b/public/app/main/apps/sms/i18n/cs.json index 3f7992c..250f827 100644 --- a/public/app/main/apps/sms/i18n/cs.json +++ b/public/app/main/apps/sms/i18n/cs.json @@ -122,7 +122,9 @@ "SECRETACCESSKEY_REQUIRED": "Je vyžadováno tajemství přístupu", "CLIENTEMAIL_REQUIRED": "Povinné pole", "PRIVATEKEY_REQUIRED": "Povinné pole", - "PROJECTID_REQUIRED": "Povinné pole" + "PROJECTID_REQUIRED": "Povinné pole", + "ACCOUNTID_REQUIRED": "Povinné pole", + "APPLICATIONID_REQUIRED": "Povinné pole" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Description", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Upravit Dialogflow V2", "PRIVATEKEY": "Soukromý klíč", - "PROJECTID": "ID projektu" + "PROJECTID": "ID projektu", + "ACCOUNTID": "Číslo účtu", + "APPLICATIONID": "ID aplikace" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/da.json b/public/app/main/apps/sms/i18n/da.json index 77f3c12..063e67d 100644 --- a/public/app/main/apps/sms/i18n/da.json +++ b/public/app/main/apps/sms/i18n/da.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Adgangsnøglehemmelighed kræves", "CLIENTEMAIL_REQUIRED": "Obligatorisk felt", "PRIVATEKEY_REQUIRED": "Obligatorisk felt", - "PROJECTID_REQUIRED": "Obligatorisk felt" + "PROJECTID_REQUIRED": "Obligatorisk felt", + "ACCOUNTID_REQUIRED": "Obligatorisk felt", + "APPLICATIONID_REQUIRED": "Obligatorisk felt" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Beskrivelse", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Rediger Dialogflow V2", "PRIVATEKEY": "Privat nøgle", - "PROJECTID": "Projekt-id" + "PROJECTID": "Projekt-id", + "ACCOUNTID": "Konto-id", + "APPLICATIONID": "Ansøgnings-id" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/de.json b/public/app/main/apps/sms/i18n/de.json index e842c91..f99b0fa 100644 --- a/public/app/main/apps/sms/i18n/de.json +++ b/public/app/main/apps/sms/i18n/de.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Zugriffsschlüsselgeheimnis ist erforderlich", "CLIENTEMAIL_REQUIRED": "Pflichtfeld", "PRIVATEKEY_REQUIRED": "Pflichtfeld", - "PROJECTID_REQUIRED": "Pflichtfeld" + "PROJECTID_REQUIRED": "Pflichtfeld", + "ACCOUNTID_REQUIRED": "Pflichtfeld", + "APPLICATIONID_REQUIRED": "Pflichtfeld" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Beschreibung", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Dialogflow V2 bearbeiten", "PRIVATEKEY": "Privat Schlüssel", - "PROJECTID": "Projekt-ID" + "PROJECTID": "Projekt-ID", + "ACCOUNTID": "Konto-ID", + "APPLICATIONID": "Anwendungs-ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/en.json b/public/app/main/apps/sms/i18n/en.json index 4e8c372..c93d198 100644 --- a/public/app/main/apps/sms/i18n/en.json +++ b/public/app/main/apps/sms/i18n/en.json @@ -137,6 +137,8 @@ "AUTHTOKEN_REQUIRED": "Mandatory Field", "BASEURL_REQUIRED": "Mandatory Field", "APIKEY_REQUIRED": "Mandatory Field", + "APPLICATIONID_REQUIRED": "Mandatory Field", + "ACCOUNTID_REQUIRED": "Mandatory Field", "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Mandatory field" }, "AGENT_TIMEOUT": "Agent Timeout", @@ -182,6 +184,8 @@ "SMS": "SMS", "ID": "Id", "APIKEY": "ApiKey", + "APPLICATIONID": "Application ID", + "ACCOUNTID": "Account ID", "CONFIRM_PASSWORD": "Confirm Password", "SMSDISPOSITIONS": "SMS Dispositions", "NO_SMSDISPOSITION_AVAILABLE": "No SMS Dispositions available", diff --git a/public/app/main/apps/sms/i18n/es.json b/public/app/main/apps/sms/i18n/es.json index bd704af..681f3b3 100644 --- a/public/app/main/apps/sms/i18n/es.json +++ b/public/app/main/apps/sms/i18n/es.json @@ -69,7 +69,9 @@ "SECRETACCESSKEY_REQUIRED": "Se requiere clave de acceso secreta", "CLIENTEMAIL_REQUIRED": "Campo obligatorio", "PRIVATEKEY_REQUIRED": "Campo obligatorio", - "PROJECTID_REQUIRED": "Campo obligatorio" + "PROJECTID_REQUIRED": "Campo obligatorio", + "ACCOUNTID_REQUIRED": "Campo obligatorio", + "APPLICATIONID_REQUIRED": "Campo obligatorio" }, "ACCEPT": "Aceptar", "ACCEPTMETHOD": "Aceptar Método", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Editar Dialogflow V2", "PRIVATEKEY": "Llave privada", - "PROJECTID": "Projecto ID" + "PROJECTID": "Projecto ID", + "ACCOUNTID": "ID de la cuenta", + "APPLICATIONID": "ID de aplicación" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/et.json b/public/app/main/apps/sms/i18n/et.json index 328cf17..1ca1755 100644 --- a/public/app/main/apps/sms/i18n/et.json +++ b/public/app/main/apps/sms/i18n/et.json @@ -122,7 +122,9 @@ "SECRETACCESSKEY_REQUIRED": "Juurdepääsu võtme saladus on vajalik", "CLIENTEMAIL_REQUIRED": "Kohustuslik väli", "PRIVATEKEY_REQUIRED": "Kohustuslik väli", - "PROJECTID_REQUIRED": "Kohustuslik väli" + "PROJECTID_REQUIRED": "Kohustuslik väli", + "ACCOUNTID_REQUIRED": "Kohustuslik väli", + "APPLICATIONID_REQUIRED": "Kohustuslik väli" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Description", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialoogivoog V2", "EDIT_DIALOGFLOWV2": "Redigeerimise dialoogivoog V2", "PRIVATEKEY": "Privaatne võti", - "PROJECTID": "Projekti ID" + "PROJECTID": "Projekti ID", + "ACCOUNTID": "Konto ID", + "APPLICATIONID": "Rakenduse ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/fa.json b/public/app/main/apps/sms/i18n/fa.json index a846e88..76db4b1 100644 --- a/public/app/main/apps/sms/i18n/fa.json +++ b/public/app/main/apps/sms/i18n/fa.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "راز کلید دسترسی مورد نیاز است", "CLIENTEMAIL_REQUIRED": "زمینه اجباری", "PRIVATEKEY_REQUIRED": "زمینه اجباری", - "PROJECTID_REQUIRED": "زمینه اجباری" + "PROJECTID_REQUIRED": "زمینه اجباری", + "ACCOUNTID_REQUIRED": "زمینه اجباری", + "APPLICATIONID_REQUIRED": "زمینه اجباری" }, "AGENT_TIMEOUT": "عامل زمان مجاز", "DESCRIPTION": "شرح", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "ویرایش Dialogflow V2", "PRIVATEKEY": "کلید خصوصی", - "PROJECTID": "شناسه پروژه" + "PROJECTID": "شناسه پروژه", + "ACCOUNTID": "شناسه حساب", + "APPLICATIONID": "شناسه برنامه" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/fi.json b/public/app/main/apps/sms/i18n/fi.json index 2e4f968..a64ce27 100644 --- a/public/app/main/apps/sms/i18n/fi.json +++ b/public/app/main/apps/sms/i18n/fi.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Käyttöavaimen salaisuus vaaditaan", "CLIENTEMAIL_REQUIRED": "Pakollinen kenttä", "PRIVATEKEY_REQUIRED": "Pakollinen kenttä", - "PROJECTID_REQUIRED": "Pakollinen kenttä" + "PROJECTID_REQUIRED": "Pakollinen kenttä", + "ACCOUNTID_REQUIRED": "Pakollinen kenttä", + "APPLICATIONID_REQUIRED": "Pakollinen kenttä" }, "AGENT_TIMEOUT": "Agentti aikakatkaisu", "DESCRIPTION": "Kuvaus", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Muokkaa valintaikkunaa V2", "PRIVATEKEY": "Yksityinen avain", - "PROJECTID": "Projektin tunnus" + "PROJECTID": "Projektin tunnus", + "ACCOUNTID": "Tilin tunnus", + "APPLICATIONID": "Sovelluksen tunnus" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/fr.json b/public/app/main/apps/sms/i18n/fr.json index f82b7fc..b03c495 100644 --- a/public/app/main/apps/sms/i18n/fr.json +++ b/public/app/main/apps/sms/i18n/fr.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Le secret de la clé d'accès est requis", "CLIENTEMAIL_REQUIRED": "Champ obligatoire", "PRIVATEKEY_REQUIRED": "Champ obligatoire", - "PROJECTID_REQUIRED": "Champ obligatoire" + "PROJECTID_REQUIRED": "Champ obligatoire", + "ACCOUNTID_REQUIRED": "Champ obligatoire", + "APPLICATIONID_REQUIRED": "Champ obligatoire" }, "AGENT_TIMEOUT": "Délai d'agent", "DESCRIPTION": "Description", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Modifier Dialogflow V2", "PRIVATEKEY": "Clé privée", - "PROJECTID": "ID du projet" + "PROJECTID": "ID du projet", + "ACCOUNTID": "identifiant de compte", + "APPLICATIONID": "ID d'application" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/he.json b/public/app/main/apps/sms/i18n/he.json index 5c0fa45..15e1e77 100644 --- a/public/app/main/apps/sms/i18n/he.json +++ b/public/app/main/apps/sms/i18n/he.json @@ -122,7 +122,9 @@ "SECRETACCESSKEY_REQUIRED": "סוד מפתח הגישה נדרש", "CLIENTEMAIL_REQUIRED": "שדה חובה", "PRIVATEKEY_REQUIRED": "שדה חובה", - "PROJECTID_REQUIRED": "שדה חובה" + "PROJECTID_REQUIRED": "שדה חובה", + "ACCOUNTID_REQUIRED": "שדה חובה", + "APPLICATIONID_REQUIRED": "שדה חובה" }, "AGENT_TIMEOUT": "סוף זמן קצוב לנציג", "DESCRIPTION": "תיאור", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "ערוך את Dialogflow V2", "PRIVATEKEY": "מפתח פרטי", - "PROJECTID": "מזהה פרויקט" + "PROJECTID": "מזהה פרויקט", + "ACCOUNTID": "מזהה חשבון", + "APPLICATIONID": "מזהה יישום" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/hi.json b/public/app/main/apps/sms/i18n/hi.json index 55f2572..6efc1dd 100644 --- a/public/app/main/apps/sms/i18n/hi.json +++ b/public/app/main/apps/sms/i18n/hi.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "प्रवेश कुंजी रहस्य की आवश्यकता है", "CLIENTEMAIL_REQUIRED": "आवश्यक स्थान", "PRIVATEKEY_REQUIRED": "आवश्यक स्थान", - "PROJECTID_REQUIRED": "आवश्यक स्थान" + "PROJECTID_REQUIRED": "आवश्यक स्थान", + "ACCOUNTID_REQUIRED": "अनिवार्य क्षेत्र", + "APPLICATIONID_REQUIRED": "अनिवार्य क्षेत्र" }, "AGENT_TIMEOUT": "एजेंट समयबाह्य", "DESCRIPTION": "वर्णन", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "संवाद प्रवाह V2", "EDIT_DIALOGFLOWV2": "डायलॉगफ़्लो V2 संपादित करें", "PRIVATEKEY": "निजी चाबी", - "PROJECTID": "प्रोजेक्ट आईडी" + "PROJECTID": "प्रोजेक्ट आईडी", + "ACCOUNTID": "खाता आईडी", + "APPLICATIONID": "आवेदन पहचान पत्र" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/id.json b/public/app/main/apps/sms/i18n/id.json index 6901757..c7a18f5 100644 --- a/public/app/main/apps/sms/i18n/id.json +++ b/public/app/main/apps/sms/i18n/id.json @@ -59,7 +59,9 @@ "SECRETACCESSKEY_REQUIRED": "Rahasia kunci akses diperlukan", "CLIENTEMAIL_REQUIRED": "Bidang wajib", "PRIVATEKEY_REQUIRED": "Bidang wajib", - "PROJECTID_REQUIRED": "Bidang wajib" + "PROJECTID_REQUIRED": "Bidang wajib", + "ACCOUNTID_REQUIRED": "Bidang wajib", + "APPLICATIONID_REQUIRED": "Bidang wajib" }, "HELP": { "DELIVERYREPORTURL": "Ini adalah string API yang dihasilkan secara otomatis yang perlu Anda gunakan untuk menerima laporan pengiriman pesan terkirim dari penyedia SMS Anda (metode POST harus digunakan): klik tombol clipboard untuk menyalinnya", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Edit Dialogflow V2", "PRIVATEKEY": "Kunci Pribadi", - "PROJECTID": "ID Proyek" + "PROJECTID": "ID Proyek", + "ACCOUNTID": "ID Akun", + "APPLICATIONID": "ID Aplikasi" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/it.json b/public/app/main/apps/sms/i18n/it.json index acf3b3a..befa048 100644 --- a/public/app/main/apps/sms/i18n/it.json +++ b/public/app/main/apps/sms/i18n/it.json @@ -128,7 +128,9 @@ "SECRETACCESSKEY_REQUIRED": "È richiesto il segreto della chiave di accesso", "CLIENTEMAIL_REQUIRED": "Campo obbligatorio", "PRIVATEKEY_REQUIRED": "Campo obbligatorio", - "PROJECTID_REQUIRED": "Campo obbligatorio" + "PROJECTID_REQUIRED": "Campo obbligatorio", + "ACCOUNTID_REQUIRED": "Campo obbligatorio", + "APPLICATIONID_REQUIRED": "Campo obbligatorio" }, "AGENT_TIMEOUT": "Timeout Agente", "DESCRIPTION": "Descrizione", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Modifica Dialogflow V2", "PRIVATEKEY": "Chiave privata", - "PROJECTID": "ID progetto" + "PROJECTID": "ID progetto", + "ACCOUNTID": "Account ID", + "APPLICATIONID": "ID applicazione" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/ja.json b/public/app/main/apps/sms/i18n/ja.json index daff94e..082cfe6 100644 --- a/public/app/main/apps/sms/i18n/ja.json +++ b/public/app/main/apps/sms/i18n/ja.json @@ -59,7 +59,9 @@ "SECRETACCESSKEY_REQUIRED": "アクセスキーシークレットが必要です", "CLIENTEMAIL_REQUIRED": "必須フィールド", "PRIVATEKEY_REQUIRED": "必須フィールド", - "PROJECTID_REQUIRED": "必須フィールド" + "PROJECTID_REQUIRED": "必須フィールド", + "ACCOUNTID_REQUIRED": "必須フィールド", + "APPLICATIONID_REQUIRED": "必須フィールド" }, "HELP": { "DELIVERYREPORTURL": "これは、SMSプロバイダから送信されたメッセージの配信レポートを受信するために必要な自動生成されたAPI文字列です(POSTメソッドを使用する必要があります)。クリップボードボタンをクリックしてコピーします", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "DialogflowV2を編集する", "PRIVATEKEY": "秘密鍵", - "PROJECTID": "プロジェクトID" + "PROJECTID": "プロジェクトID", + "ACCOUNTID": "アカウントID", + "APPLICATIONID": "アプリケーションID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/ko.json b/public/app/main/apps/sms/i18n/ko.json index 6cb9993..c23c4fe 100644 --- a/public/app/main/apps/sms/i18n/ko.json +++ b/public/app/main/apps/sms/i18n/ko.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "액세스 키 비밀이 필요합니다", "CLIENTEMAIL_REQUIRED": "필수 필드", "PRIVATEKEY_REQUIRED": "필수 필드", - "PROJECTID_REQUIRED": "필수 필드" + "PROJECTID_REQUIRED": "필수 필드", + "ACCOUNTID_REQUIRED": "필수 필드", + "APPLICATIONID_REQUIRED": "필수 필드" }, "AGENT_TIMEOUT": "상담원 시간 초과", "DESCRIPTION": "설명", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Dialogflow V2 수정", "PRIVATEKEY": "개인 키", - "PROJECTID": "프로젝트 ID" + "PROJECTID": "프로젝트 ID", + "ACCOUNTID": "계정 ID", + "APPLICATIONID": "애플리케이션 ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/lt.json b/public/app/main/apps/sms/i18n/lt.json index 7ebba4b..fcd6325 100644 --- a/public/app/main/apps/sms/i18n/lt.json +++ b/public/app/main/apps/sms/i18n/lt.json @@ -132,7 +132,9 @@ "MANDATORYDISPOSITIONPAUSEID_REQUIRED": "Privalomas laukas", "CLIENTEMAIL_REQUIRED": "Privalomas laukas", "PRIVATEKEY_REQUIRED": "Privalomas laukas", - "PROJECTID_REQUIRED": "Privalomas laukas" + "PROJECTID_REQUIRED": "Privalomas laukas", + "ACCOUNTID_REQUIRED": "Privalomas laukas", + "APPLICATIONID_REQUIRED": "Privalomas laukas" }, "AGENT_TIMEOUT": "Agento skirtasis laikas", "DESCRIPTION": "ApraÅ¡ymas", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Redaguoti „Dialogflow V2“", "PRIVATEKEY": "Privatus raktas", - "PROJECTID": "Projekto ID" + "PROJECTID": "Projekto ID", + "ACCOUNTID": "Sąskaitos identifikavimo kodas", + "APPLICATIONID": "Programos ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/lv.json b/public/app/main/apps/sms/i18n/lv.json index b3741ee..92b24b2 100644 --- a/public/app/main/apps/sms/i18n/lv.json +++ b/public/app/main/apps/sms/i18n/lv.json @@ -59,7 +59,9 @@ "SECRETACCESSKEY_REQUIRED": "NepiecieÅ¡ams piekļuves atslēgas noslēpums", "CLIENTEMAIL_REQUIRED": "Obligāts lauks", "PRIVATEKEY_REQUIRED": "Obligāts lauks", - "PROJECTID_REQUIRED": "Obligāts lauks" + "PROJECTID_REQUIRED": "Obligāts lauks", + "ACCOUNTID_REQUIRED": "Obligāts lauks", + "APPLICATIONID_REQUIRED": "Obligāts lauks" }, "HELP": { "MOTIONPROXY": "Laukam ir jābÅ«t formatētam šādi: : //[:]. Piemērs: https://XYZW", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Rediģēt Dialogflow V2", "PRIVATEKEY": "Privātā atslēga", - "PROJECTID": "Projekta ID" + "PROJECTID": "Projekta ID", + "ACCOUNTID": "Konta ID", + "APPLICATIONID": "Lietojumprogrammas ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/nl.json b/public/app/main/apps/sms/i18n/nl.json index 7f53487..f16b87a 100644 --- a/public/app/main/apps/sms/i18n/nl.json +++ b/public/app/main/apps/sms/i18n/nl.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Toegangssleutel geheim is vereist", "CLIENTEMAIL_REQUIRED": "Verplicht veld", "PRIVATEKEY_REQUIRED": "Verplicht veld", - "PROJECTID_REQUIRED": "Verplicht veld" + "PROJECTID_REQUIRED": "Verplicht veld", + "ACCOUNTID_REQUIRED": "Verplicht veld", + "APPLICATIONID_REQUIRED": "Verplicht veld" }, "AGENT_TIMEOUT": "Time-out agent", "DESCRIPTION": "Beschrijving", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Bewerk Dialogflow V2", "PRIVATEKEY": "Prive sleutel", - "PROJECTID": "Project-ID" + "PROJECTID": "Project-ID", + "ACCOUNTID": "Account ID", + "APPLICATIONID": "Applicatie ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/no.json b/public/app/main/apps/sms/i18n/no.json index 00e2af5..634f7ce 100644 --- a/public/app/main/apps/sms/i18n/no.json +++ b/public/app/main/apps/sms/i18n/no.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Tilgangsnøkkelhemmelighet er pÃ¥krevd", "CLIENTEMAIL_REQUIRED": "Obligatoriske felt", "PRIVATEKEY_REQUIRED": "Obligatoriske felt", - "PROJECTID_REQUIRED": "Obligatoriske felt" + "PROJECTID_REQUIRED": "Obligatoriske felt", + "ACCOUNTID_REQUIRED": "Obligatoriske felt", + "APPLICATIONID_REQUIRED": "Obligatoriske felt" }, "AGENT_TIMEOUT": "Agent tidsavbrudd", "DESCRIPTION": "Beskrivelse", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Rediger Dialogflow V2", "PRIVATEKEY": "Privat nøkkel", - "PROJECTID": "Prosjekt-ID" + "PROJECTID": "Prosjekt-ID", + "ACCOUNTID": "Konto-ID", + "APPLICATIONID": "Søknads-ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/pl.json b/public/app/main/apps/sms/i18n/pl.json index ae00448..9b1dffd 100644 --- a/public/app/main/apps/sms/i18n/pl.json +++ b/public/app/main/apps/sms/i18n/pl.json @@ -68,7 +68,9 @@ "SECRETACCESSKEY_REQUIRED": "Wymagany jest klucz tajny", "CLIENTEMAIL_REQUIRED": "Pole obowiązkowe", "PRIVATEKEY_REQUIRED": "Pole obowiązkowe", - "PROJECTID_REQUIRED": "Pole obowiązkowe" + "PROJECTID_REQUIRED": "Pole obowiązkowe", + "ACCOUNTID_REQUIRED": "Pole obowiązkowe", + "APPLICATIONID_REQUIRED": "Pole obowiązkowe" }, "AGENT_TIMEOUT": "Agent Timeout", "DESCRIPTION": "Opis", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Edytuj Dialogflow V2", "PRIVATEKEY": "Prywatny klucz", - "PROJECTID": "Identyfikator projektu" + "PROJECTID": "Identyfikator projektu", + "ACCOUNTID": "ID konta", + "APPLICATIONID": "Identyfikator aplikacji" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/pt-BR.json b/public/app/main/apps/sms/i18n/pt-BR.json index ecaab91..a6867bd 100644 --- a/public/app/main/apps/sms/i18n/pt-BR.json +++ b/public/app/main/apps/sms/i18n/pt-BR.json @@ -122,7 +122,9 @@ "SECRETACCESSKEY_REQUIRED": "É necessário segredo da chave de acesso", "CLIENTEMAIL_REQUIRED": "Campo Obrigatório", "PRIVATEKEY_REQUIRED": "Campo Obrigatório", - "PROJECTID_REQUIRED": "Campo Obrigatório" + "PROJECTID_REQUIRED": "Campo Obrigatório", + "ACCOUNTID_REQUIRED": "Campo Obrigatório", + "APPLICATIONID_REQUIRED": "Campo Obrigatório" }, "AGENT_TIMEOUT": "Tempo limite do agente", "DESCRIPTION": "Descrição", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Editar Dialogflow V2", "PRIVATEKEY": "Chave privada", - "PROJECTID": "ID do projeto" + "PROJECTID": "ID do projeto", + "ACCOUNTID": "ID da conta", + "APPLICATIONID": "ID do aplicativo" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/pt-PT.json b/public/app/main/apps/sms/i18n/pt-PT.json index b922200..bdca47b 100644 --- a/public/app/main/apps/sms/i18n/pt-PT.json +++ b/public/app/main/apps/sms/i18n/pt-PT.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "É necessário segredo da chave de acesso", "CLIENTEMAIL_REQUIRED": "Campo Obrigatório", "PRIVATEKEY_REQUIRED": "Campo Obrigatório", - "PROJECTID_REQUIRED": "Campo Obrigatório" + "PROJECTID_REQUIRED": "Campo Obrigatório", + "ACCOUNTID_REQUIRED": "Campo Obrigatório", + "APPLICATIONID_REQUIRED": "Campo Obrigatório" }, "AGENT_TIMEOUT": "Tempo Limite do Agente", "DESCRIPTION": "Descrição", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Editar Dialogflow V2", "PRIVATEKEY": "Chave privada", - "PROJECTID": "ID do projeto" + "PROJECTID": "ID do projeto", + "ACCOUNTID": "ID da conta", + "APPLICATIONID": "ID do aplicativo" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/ru.json b/public/app/main/apps/sms/i18n/ru.json index 2bc00de..1a73764 100644 --- a/public/app/main/apps/sms/i18n/ru.json +++ b/public/app/main/apps/sms/i18n/ru.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Требуется секретный ключ доступа", "CLIENTEMAIL_REQUIRED": "Обязательное поле", "PRIVATEKEY_REQUIRED": "Обязательное поле", - "PROJECTID_REQUIRED": "Обязательное поле" + "PROJECTID_REQUIRED": "Обязательное поле", + "ACCOUNTID_REQUIRED": "Обязательное поле", + "APPLICATIONID_REQUIRED": "Обязательное поле" }, "AGENT_TIMEOUT": "Время ожидания оператора", "DESCRIPTION": "Описание", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Редактировать Dialogflow V2", "PRIVATEKEY": "Закрытый ключ", - "PROJECTID": "ID проекта" + "PROJECTID": "ID проекта", + "ACCOUNTID": "ID аккаунта", + "APPLICATIONID": "ID приложения" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/sv.json b/public/app/main/apps/sms/i18n/sv.json index e395309..145fbb0 100644 --- a/public/app/main/apps/sms/i18n/sv.json +++ b/public/app/main/apps/sms/i18n/sv.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Åtkomstnyckelhemlighet krävs", "CLIENTEMAIL_REQUIRED": "Obligatoriskt fält", "PRIVATEKEY_REQUIRED": "Obligatoriskt fält", - "PROJECTID_REQUIRED": "Obligatoriskt fält" + "PROJECTID_REQUIRED": "Obligatoriskt fält", + "ACCOUNTID_REQUIRED": "Obligatoriskt fält", + "APPLICATIONID_REQUIRED": "Obligatoriskt fält" }, "AGENT_TIMEOUT": "Tidsgräns för agent", "DESCRIPTION": "Beskrivning", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Redigera Dialogflow V2", "PRIVATEKEY": "Privat nyckel", - "PROJECTID": "Projekt-ID" + "PROJECTID": "Projekt-ID", + "ACCOUNTID": "konto-id", + "APPLICATIONID": "ansöknings-ID" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/tr.json b/public/app/main/apps/sms/i18n/tr.json index 1288db5..ff0f83a 100644 --- a/public/app/main/apps/sms/i18n/tr.json +++ b/public/app/main/apps/sms/i18n/tr.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "Erişim anahtarı sırrı gerekli", "CLIENTEMAIL_REQUIRED": "Zorunlu alan", "PRIVATEKEY_REQUIRED": "Zorunlu alan", - "PROJECTID_REQUIRED": "Zorunlu alan" + "PROJECTID_REQUIRED": "Zorunlu alan", + "ACCOUNTID_REQUIRED": "Zorunlu alan", + "APPLICATIONID_REQUIRED": "Zorunlu alan" }, "AGENT_TIMEOUT": "Ajan Zaman Aşımı", "DESCRIPTION": "Açıklama", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "Dialogflow V2'yi düzenle", "PRIVATEKEY": "Özel anahtar", - "PROJECTID": "Proje kimliği" + "PROJECTID": "Proje kimliği", + "ACCOUNTID": "Hesap kimliği", + "APPLICATIONID": "Uygulama Kimliği" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/zh-CN.json b/public/app/main/apps/sms/i18n/zh-CN.json index f7ee99d..7c79905 100644 --- a/public/app/main/apps/sms/i18n/zh-CN.json +++ b/public/app/main/apps/sms/i18n/zh-CN.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "需要访问密钥机密", "CLIENTEMAIL_REQUIRED": "必填项", "PRIVATEKEY_REQUIRED": "必填项", - "PROJECTID_REQUIRED": "必填项" + "PROJECTID_REQUIRED": "必填项", + "ACCOUNTID_REQUIRED": "必填项", + "APPLICATIONID_REQUIRED": "必填项" }, "AGENT_TIMEOUT": "代理超时", "DESCRIPTION": "描述", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "编辑Dialogflow V2", "PRIVATEKEY": "私钥", - "PROJECTID": "专案编号" + "PROJECTID": "专案编号", + "ACCOUNTID": "帐户ID", + "APPLICATIONID": "申请编号" } } \ No newline at end of file diff --git a/public/app/main/apps/sms/i18n/zh-TW.json b/public/app/main/apps/sms/i18n/zh-TW.json index 31f25dd..a833d64 100644 --- a/public/app/main/apps/sms/i18n/zh-TW.json +++ b/public/app/main/apps/sms/i18n/zh-TW.json @@ -64,7 +64,9 @@ "SECRETACCESSKEY_REQUIRED": "需要訪問密鑰機密", "CLIENTEMAIL_REQUIRED": "必填項", "PRIVATEKEY_REQUIRED": "必填項", - "PROJECTID_REQUIRED": "必填項" + "PROJECTID_REQUIRED": "必填項", + "ACCOUNTID_REQUIRED": "必填項", + "APPLICATIONID_REQUIRED": "必填項" }, "AGENT_TIMEOUT": "值機人員等候逾時", "DESCRIPTION": "說明", @@ -288,6 +290,8 @@ "DIALOGFLOWV2": "Dialogflow V2", "EDIT_DIALOGFLOWV2": "編輯Dialogflow V2", "PRIVATEKEY": "私鑰", - "PROJECTID": "專案編號" + "PROJECTID": "專案編號", + "ACCOUNTID": "帳戶ID", + "APPLICATIONID": "申請編號" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/ar.json b/public/app/main/apps/tools/i18n/ar.json index 085ca5d..fbc5c59 100644 --- a/public/app/main/apps/tools/i18n/ar.json +++ b/public/app/main/apps/tools/i18n/ar.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "ترتيب المستوى الأول", "LEVEL": "مستوى", "SECOND_LEVEL_DISPOSITION": "ترتيب المستوى الثاني", - "SELECT_LEVEL": "حدد مستوى" + "SELECT_LEVEL": "حدد مستوى", + "TITLEFONTSIZE": "حجم عنوان الخط" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/cs.json b/public/app/main/apps/tools/i18n/cs.json index ddc4637..bad54d8 100644 --- a/public/app/main/apps/tools/i18n/cs.json +++ b/public/app/main/apps/tools/i18n/cs.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Dispozice první úrovně", "LEVEL": "Úroveň", "SECOND_LEVEL_DISPOSITION": "Dispozice druhé úrovně", - "SELECT_LEVEL": "Vyberte úroveň" + "SELECT_LEVEL": "Vyberte úroveň", + "TITLEFONTSIZE": "Velikost názvu písma" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/da.json b/public/app/main/apps/tools/i18n/da.json index 4a52ed5..4a0e40d 100644 --- a/public/app/main/apps/tools/i18n/da.json +++ b/public/app/main/apps/tools/i18n/da.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Første niveau disposition", "LEVEL": "Niveau", "SECOND_LEVEL_DISPOSITION": "Andet niveau disposition", - "SELECT_LEVEL": "Vælg et niveau" + "SELECT_LEVEL": "Vælg et niveau", + "TITLEFONTSIZE": "Skrifttitelstørrelse" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/de.json b/public/app/main/apps/tools/i18n/de.json index 175a84c..4cddc60 100644 --- a/public/app/main/apps/tools/i18n/de.json +++ b/public/app/main/apps/tools/i18n/de.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "First Level Disposition", "LEVEL": "Niveau", "SECOND_LEVEL_DISPOSITION": "Disposition der zweiten Ebene", - "SELECT_LEVEL": "Wählen Sie eine Ebene" + "SELECT_LEVEL": "Wählen Sie eine Ebene", + "TITLEFONTSIZE": "Schrifttitelgröße" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/en.json b/public/app/main/apps/tools/i18n/en.json index 99a1e3b..83c733b 100644 --- a/public/app/main/apps/tools/i18n/en.json +++ b/public/app/main/apps/tools/i18n/en.json @@ -15,6 +15,7 @@ "OUTBOUND_ROUTE": "Outbound Route", "EDIT_DASHBOARDITEM": "Edit Dashboard Widget", "FONTSIZE": "Font Size", + "TITLEFONTSIZE": "Font Title Size", "CLONE_CUSTOMDASHBOARD": "Clone Custom Dashboard", "LINK": "Link [https://]", "BACKGROUND": "Background", diff --git a/public/app/main/apps/tools/i18n/es.json b/public/app/main/apps/tools/i18n/es.json index c20a3cb..14827f9 100644 --- a/public/app/main/apps/tools/i18n/es.json +++ b/public/app/main/apps/tools/i18n/es.json @@ -435,11 +435,11 @@ "EMAILBCCADDRESS": "Bcc", "EMAILCCADDRESS": "CC", "RUN_SCHEDULE": "Ejecutar horario", - "ADD_DISPOSITION": "Agregar cierre", - "DELETE_DISPOSITION": "Eliminar cierre", - "DISPOSITIONS": "Cierre", - "EDIT_DISPOSITION": "Editar cierre", - "NEW_DISPOSITION": "Nuevo cierre", + "ADD_DISPOSITION": "Agregar Tipificación", + "DELETE_DISPOSITION": "Eliminar tipificaciòn", + "DISPOSITIONS": "Tipificaciones", + "EDIT_DISPOSITION": "Editar Tipificación", + "NEW_DISPOSITION": "Nueva tipificación", "CLONE_TRUNK": "Clonar Troncal", "BODY": "Cuerpo", "CANNEDANSWERS": "Respuestas enlatadas", @@ -460,10 +460,11 @@ "STANDARD": "Estándar", "MOTION_BAR": "Motion Bar", "ALL": "Todos", - "ALL_DISPOSITIONS": "Todas las disposiciones", - "FIRST_LEVEL_DISPOSITION": "Disposición de primer nivel", + "ALL_DISPOSITIONS": "Todas las tipificaciones", + "FIRST_LEVEL_DISPOSITION": "Tipificación de primer nivel", "LEVEL": "Nivel", - "SECOND_LEVEL_DISPOSITION": "Disposición de segundo nivel", - "SELECT_LEVEL": "Seleccionar un nivel" + "SECOND_LEVEL_DISPOSITION": "Tipificación de segundo nivel", + "SELECT_LEVEL": "Seleccionar un nivel", + "TITLEFONTSIZE": "Tamaño del título de fuente" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/et.json b/public/app/main/apps/tools/i18n/et.json index b24e448..530622b 100644 --- a/public/app/main/apps/tools/i18n/et.json +++ b/public/app/main/apps/tools/i18n/et.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Esimese taseme käsutus", "LEVEL": "Tase", "SECOND_LEVEL_DISPOSITION": "Teise taseme korraldus", - "SELECT_LEVEL": "Valige tase" + "SELECT_LEVEL": "Valige tase", + "TITLEFONTSIZE": "Fondi pealkirja suurus" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/fa.json b/public/app/main/apps/tools/i18n/fa.json index e799d80..604f50f 100644 --- a/public/app/main/apps/tools/i18n/fa.json +++ b/public/app/main/apps/tools/i18n/fa.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "دفع سطح اول", "LEVEL": "مرحله", "SECOND_LEVEL_DISPOSITION": "دفع سطح دوم", - "SELECT_LEVEL": "یک سطح را انتخاب کنید" + "SELECT_LEVEL": "یک سطح را انتخاب کنید", + "TITLEFONTSIZE": "اندازه عنوان قلم" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/fi.json b/public/app/main/apps/tools/i18n/fi.json index c762b31..41d6c38 100644 --- a/public/app/main/apps/tools/i18n/fi.json +++ b/public/app/main/apps/tools/i18n/fi.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Ensimmäisen tason sijoitus", "LEVEL": "Taso", "SECOND_LEVEL_DISPOSITION": "Toisen tason sijoitus", - "SELECT_LEVEL": "Valitse taso" + "SELECT_LEVEL": "Valitse taso", + "TITLEFONTSIZE": "Kirjasimen otsikon koko" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/fr.json b/public/app/main/apps/tools/i18n/fr.json index 22c0027..6141b39 100644 --- a/public/app/main/apps/tools/i18n/fr.json +++ b/public/app/main/apps/tools/i18n/fr.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Disposition de premier niveau", "LEVEL": "Niveau", "SECOND_LEVEL_DISPOSITION": "Disposition de deuxième niveau", - "SELECT_LEVEL": "Sélectionnez un niveau" + "SELECT_LEVEL": "Sélectionnez un niveau", + "TITLEFONTSIZE": "Taille du titre de la police" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/he.json b/public/app/main/apps/tools/i18n/he.json index 5179670..f487c4b 100644 --- a/public/app/main/apps/tools/i18n/he.json +++ b/public/app/main/apps/tools/i18n/he.json @@ -19,10 +19,10 @@ "FOREGROUND": "קדמה", "NONE": "ללא", "TOTAL": "סה\"כ", - "ABANDONED": "ננטש", - "WAITING": "בהמתנה", - "TALKING": "משוחח", - "ANSWERED": "נענה", + "ABANDONED": "ננטשו", + "WAITING": "ממתינות", + "TALKING": "בשיחה", + "ANSWERED": "נענו", "UNMANAGED": "לא מנוהלות", "CUSTOMTYPE": "מותאם [נתיב]", "WEBREPORT": "דוח אינטרנט", @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "נטייה בדרגה ראשונה", "LEVEL": "רָמָה", "SECOND_LEVEL_DISPOSITION": "נטייה בדרגה שנייה", - "SELECT_LEVEL": "בחר רמה" + "SELECT_LEVEL": "בחר רמה", + "TITLEFONTSIZE": "גודל כותרת הגופן" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/hi.json b/public/app/main/apps/tools/i18n/hi.json index 0e7e1c0..9bca30a 100644 --- a/public/app/main/apps/tools/i18n/hi.json +++ b/public/app/main/apps/tools/i18n/hi.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "पहले स्तर का विवाद", "LEVEL": "स्तर", "SECOND_LEVEL_DISPOSITION": "दूसरा स्तर विवाद", - "SELECT_LEVEL": "एक स्तर चुनें" + "SELECT_LEVEL": "एक स्तर चुनें", + "TITLEFONTSIZE": "फ़ॉन्ट शीर्षक आकार" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/id.json b/public/app/main/apps/tools/i18n/id.json index 99ecbfa..8075141 100644 --- a/public/app/main/apps/tools/i18n/id.json +++ b/public/app/main/apps/tools/i18n/id.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Disposisi Tingkat Pertama", "LEVEL": "Tingkat", "SECOND_LEVEL_DISPOSITION": "Disposisi Tingkat Kedua", - "SELECT_LEVEL": "Pilih level" + "SELECT_LEVEL": "Pilih level", + "TITLEFONTSIZE": "Ukuran Judul Font" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/it.json b/public/app/main/apps/tools/i18n/it.json index e4561c7..6e6d61f 100644 --- a/public/app/main/apps/tools/i18n/it.json +++ b/public/app/main/apps/tools/i18n/it.json @@ -14,6 +14,7 @@ "NEXTCONTACT": "Successivo", "EDIT_DASHBOARDITEM": "Modifica Widget Dashboard", "FONTSIZE": "Dimensione Font", + "TITLEFONTSIZE": "Dimensione Font Titolo", "CLONE_CUSTOMDASHBOARD": "Clona Dashboard Personalizzata", "LINK": "Link [https://]", "BACKGROUND": "Background", diff --git a/public/app/main/apps/tools/i18n/ja.json b/public/app/main/apps/tools/i18n/ja.json index 3f85f1d..272e522 100644 --- a/public/app/main/apps/tools/i18n/ja.json +++ b/public/app/main/apps/tools/i18n/ja.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "第一レベルの気質", "LEVEL": "レベル", "SECOND_LEVEL_DISPOSITION": "第2レベルの気質", - "SELECT_LEVEL": "レベルを選択してください" + "SELECT_LEVEL": "レベルを選択してください", + "TITLEFONTSIZE": "フォントタイトルサイズ" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/ko.json b/public/app/main/apps/tools/i18n/ko.json index a46987e..728f917 100644 --- a/public/app/main/apps/tools/i18n/ko.json +++ b/public/app/main/apps/tools/i18n/ko.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "첫 번째 수준 처리", "LEVEL": "수평", "SECOND_LEVEL_DISPOSITION": "두 번째 수준 처리", - "SELECT_LEVEL": "레벨 선택" + "SELECT_LEVEL": "레벨 선택", + "TITLEFONTSIZE": "글꼴 제목 크기" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/lt.json b/public/app/main/apps/tools/i18n/lt.json index 916f347..d22c9af 100644 --- a/public/app/main/apps/tools/i18n/lt.json +++ b/public/app/main/apps/tools/i18n/lt.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Pirmojo lygio disponavimas", "LEVEL": "Lygis", "SECOND_LEVEL_DISPOSITION": "Antro lygio disponavimas", - "SELECT_LEVEL": "Pasirinkite lygį" + "SELECT_LEVEL": "Pasirinkite lygį", + "TITLEFONTSIZE": "Å rifto pavadinimo dydis" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/lv.json b/public/app/main/apps/tools/i18n/lv.json index ff9496a..19829e9 100644 --- a/public/app/main/apps/tools/i18n/lv.json +++ b/public/app/main/apps/tools/i18n/lv.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Pirmā lÄ«meņa izvietojums", "LEVEL": "LÄ«menis", "SECOND_LEVEL_DISPOSITION": "Otrā lÄ«meņa izvietojums", - "SELECT_LEVEL": "Atlasiet lÄ«meni" + "SELECT_LEVEL": "Atlasiet lÄ«meni", + "TITLEFONTSIZE": "Fonta nosaukuma lielums" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/nl.json b/public/app/main/apps/tools/i18n/nl.json index ae28905..77022e9 100644 --- a/public/app/main/apps/tools/i18n/nl.json +++ b/public/app/main/apps/tools/i18n/nl.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Plaatsing op het eerste niveau", "LEVEL": "Niveau", "SECOND_LEVEL_DISPOSITION": "Tweede niveau dispositie", - "SELECT_LEVEL": "Kies een niveau" + "SELECT_LEVEL": "Kies een niveau", + "TITLEFONTSIZE": "Lettertype titelgrootte" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/no.json b/public/app/main/apps/tools/i18n/no.json index 49dd603..b1486b8 100644 --- a/public/app/main/apps/tools/i18n/no.json +++ b/public/app/main/apps/tools/i18n/no.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Første nivÃ¥ disposisjon", "LEVEL": "NivÃ¥", "SECOND_LEVEL_DISPOSITION": "Andre nivÃ¥ disposisjon", - "SELECT_LEVEL": "Velg et nivÃ¥" + "SELECT_LEVEL": "Velg et nivÃ¥", + "TITLEFONTSIZE": "Skriftens tittelstørrelse" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/pl.json b/public/app/main/apps/tools/i18n/pl.json index 4804437..9b6521a 100644 --- a/public/app/main/apps/tools/i18n/pl.json +++ b/public/app/main/apps/tools/i18n/pl.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Dyspozycja pierwszego poziomu", "LEVEL": "Poziom", "SECOND_LEVEL_DISPOSITION": "Dyspozycja drugiego poziomu", - "SELECT_LEVEL": "Wybierz poziom" + "SELECT_LEVEL": "Wybierz poziom", + "TITLEFONTSIZE": "Rozmiar tytułu czcionki" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/pt-BR.json b/public/app/main/apps/tools/i18n/pt-BR.json index c2456fe..9255787 100644 --- a/public/app/main/apps/tools/i18n/pt-BR.json +++ b/public/app/main/apps/tools/i18n/pt-BR.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Disposição de primeiro nível", "LEVEL": "Nível", "SECOND_LEVEL_DISPOSITION": "Disposição de Segundo Nível", - "SELECT_LEVEL": "Selecione um nível" + "SELECT_LEVEL": "Selecione um nível", + "TITLEFONTSIZE": "Tamanho do título da fonte" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/pt-PT.json b/public/app/main/apps/tools/i18n/pt-PT.json index 0ceeef9..dca7e3e 100644 --- a/public/app/main/apps/tools/i18n/pt-PT.json +++ b/public/app/main/apps/tools/i18n/pt-PT.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Disposição de primeiro nível", "LEVEL": "Nível", "SECOND_LEVEL_DISPOSITION": "Disposição de Segundo Nível", - "SELECT_LEVEL": "Selecione um nível" + "SELECT_LEVEL": "Selecione um nível", + "TITLEFONTSIZE": "Tamanho do título da fonte" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/ru.json b/public/app/main/apps/tools/i18n/ru.json index 61f3a66..314751c 100644 --- a/public/app/main/apps/tools/i18n/ru.json +++ b/public/app/main/apps/tools/i18n/ru.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Диспозиция первого уровня", "LEVEL": "Уровень", "SECOND_LEVEL_DISPOSITION": "Расположение второго уровня", - "SELECT_LEVEL": "Выберите уровень" + "SELECT_LEVEL": "Выберите уровень", + "TITLEFONTSIZE": "Размер заголовка шрифта" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/sv.json b/public/app/main/apps/tools/i18n/sv.json index fbfc75c..55a4147 100644 --- a/public/app/main/apps/tools/i18n/sv.json +++ b/public/app/main/apps/tools/i18n/sv.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Första nivÃ¥ disposition", "LEVEL": "NivÃ¥", "SECOND_LEVEL_DISPOSITION": "Andra nivÃ¥n disposition", - "SELECT_LEVEL": "Välj en nivÃ¥" + "SELECT_LEVEL": "Välj en nivÃ¥", + "TITLEFONTSIZE": "Teckensnittsstorlek" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/tr.json b/public/app/main/apps/tools/i18n/tr.json index 2a6656e..d41a7ff 100644 --- a/public/app/main/apps/tools/i18n/tr.json +++ b/public/app/main/apps/tools/i18n/tr.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "Birinci Düzey Değerlendirme", "LEVEL": "Seviye", "SECOND_LEVEL_DISPOSITION": "Ä°kinci Düzey Tasarruf", - "SELECT_LEVEL": "Bir seviye seçin" + "SELECT_LEVEL": "Bir seviye seçin", + "TITLEFONTSIZE": "Yazı Tipi Başlık Boyutu" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/zh-CN.json b/public/app/main/apps/tools/i18n/zh-CN.json index e1e8bad..15f4e3e 100644 --- a/public/app/main/apps/tools/i18n/zh-CN.json +++ b/public/app/main/apps/tools/i18n/zh-CN.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "一级处置", "LEVEL": "æ°´å¹³", "SECOND_LEVEL_DISPOSITION": "二级处置", - "SELECT_LEVEL": "选择一个级别" + "SELECT_LEVEL": "选择一个级别", + "TITLEFONTSIZE": "字体标题大小" } } \ No newline at end of file diff --git a/public/app/main/apps/tools/i18n/zh-TW.json b/public/app/main/apps/tools/i18n/zh-TW.json index 56939e7..7e4e210 100644 --- a/public/app/main/apps/tools/i18n/zh-TW.json +++ b/public/app/main/apps/tools/i18n/zh-TW.json @@ -464,6 +464,7 @@ "FIRST_LEVEL_DISPOSITION": "一級處置", "LEVEL": "æ°´å¹³", "SECOND_LEVEL_DISPOSITION": "二級處置", - "SELECT_LEVEL": "選擇一個級別" + "SELECT_LEVEL": "選擇一個級別", + "TITLEFONTSIZE": "字體標題大小" } } \ No newline at end of file diff --git a/public/app/main/apps/voice/i18n/es.json b/public/app/main/apps/voice/i18n/es.json index 87d4878..3123035 100644 --- a/public/app/main/apps/voice/i18n/es.json +++ b/public/app/main/apps/voice/i18n/es.json @@ -47,7 +47,7 @@ "YOUARENEXTANNOUNCE": "Elija un sonido definido en Herramientas. Predeterminado = \"Ahora eres el primero en la fila\". Indefinido = sin anuncio", "CALLERIDALL": "Formato admitido: \"CallerId\" & lt; número & gt;", "CALLER_ID": "Formato admitido: \"CallerId\" & lt; número & gt;", - "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa para establecer durante el cierre obligatorio", + "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa para establecer durante el cierre obligatoriola tipificación obligatoria", "SERVICELEVEL": "Segundos ajustes para el nivel de servicio (predeterminado = 0, sin SL). Se utiliza para estadísticas de nivel de servicio (llamadas respondidas dentro del marco de tiempo del nivel de servicio)" }, "ERRORS": { @@ -185,7 +185,7 @@ "DELETE_MOHSOUND": "Eliminar Sonido de Música en Espera", "DELETE_MUSICONHOLD": "Eliminar música en espera", "DELETE_OUTBOUNDROUTE": "Eliminar ruta de salida", - "DELETE_VOICEDISPOSITION": "Eliminar Cierre de Voz", + "DELETE_VOICEDISPOSITION": "Eliminar Tipificación de Voz", "DELETE_VOICEMAIL": "Eliminar correo de voz", "DELETE_VOICEQUEUE": "Eliminar cola de voz", "DELETE_VOICERECORDING": "Eliminar grabación de voz", @@ -196,7 +196,7 @@ "DIAL": "Marcar", "DID": "DID", "DIRECTORY": "Directorio", - "DISPOSITION": "Cierre", + "DISPOSITION": "Tipifiicación", "DOWNLOAD_MESSAGE": "Descargar", "DOWNLOAD_MOHSOUND": "Descargar Sonido de Música en Espera", "DOWNLOAD_VOICERECORDING": "Descargar grabación de voz", @@ -222,7 +222,7 @@ "EDIT_RINGGROUP": "Editar grupo de timbre", "EDIT_SET": "Editar conjunto", "EDIT_TRUNK": "Editar troncal", - "EDIT_VOICEDISPOSITION": "Editar Cierre de Voz", + "EDIT_VOICEDISPOSITION": "Editar Tipificación de Voz", "EDIT_VOICEMAIL": "Editar correo de voz", "EDIT_VOICEQUEUE": "Editar cola de voz", "EDIT_VOICERECORDING": "Editar grabación de voz", @@ -441,8 +441,8 @@ "DIALER": "Marcador", "INBOUND": "Entrante", "OUTBOUND": "Saliente", - "MANDATORYDISPOSITION": "Cierre obligatorio", - "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa de cierre obligatorio", + "MANDATORYDISPOSITION": "Tipificación opbligatoria", + "MANDATORYDISPOSITIONPAUSEID": "Estado de pausa de cierre tipificación obligatoria", "TEAMS_ASSOCIATION": "Asociación de equipos", "CANT_DOWNLOAD_THIS_FILE": "No puedo descargar este archivo", "FILE_NOT_FOUND": "Archivo no encontrado", @@ -472,7 +472,7 @@ "TRANSCRIPT": "Transcripción", "TRANSCRIPTANALYSIS": "Transcripción y análisis", "SERVICELEVEL": "Nivel de servicio", - "SECOND_LEVEL_DISPOSITION": "Disposición de segundo nivel", - "THIRD_LEVEL_DISPOSITION": "Disposición de tercer nivel" + "SECOND_LEVEL_DISPOSITION": "Tipificación de segundo nivel", + "THIRD_LEVEL_DISPOSITION": "Tipificación de tercer nivel" } } \ No newline at end of file diff --git a/public/app/main/apps/voice/i18n/he.json b/public/app/main/apps/voice/i18n/he.json index 812271f..9ebbc9d 100644 --- a/public/app/main/apps/voice/i18n/he.json +++ b/public/app/main/apps/voice/i18n/he.json @@ -277,7 +277,7 @@ "NO_SOUND_AVAILABLE": "אין צלילים זמינים", "VOICERECORDINGS": "הקלטות שיחות", "CHANSPIES": "האזנה לשיחות", - "VOICE": "שיחה", + "VOICE": "שיחות", "REALTIME": "זמן אמת", "ID": "מזהה", "VOICEMAIL_CONTEXT": "הקשר", @@ -339,8 +339,8 @@ "REGISTERED": "רשום", "UNREGISTERED": "לא רשום", "LAGGED": "בפיגור", - "REACHABLE": "נגיש", - "UNREACHABLE": "לא נגיש", + "REACHABLE": "זמין", + "UNREACHABLE": "לא זמין", "UNKNOWN": "לא מזוהה", "NOT_INUSE": "לא בשימוש", "INUSE": "בשימוש", @@ -348,7 +348,7 @@ "INVALID": "לא תקף", "UNAVAILABLE": "לא זמין", "RINGING": "מצלצל", - "ONHOLD": "בהמתנה", + "ONHOLD": "ממתינות", "RING": "צלצול", "UP": "מעלה", "INFO": "מידע", @@ -357,16 +357,16 @@ "NO_REGISTRY": "אין רישום", "LOGGED_IN": "מחובר (יש חיבור SIP)", "PAUSED": "בהפסקה", - "WAITING": "ממתינות", - "TALKING": "משוחח", + "WAITING": "בהמתנה", + "TALKING": "בשיחה", "DID": "DID", "CALLER": "מתקשר", "TOTAL": "סה\"כ", - "ANSWERED": "נענה", + "ANSWERED": "נענו", "ABANDONED": "ננטשו", "UNMANAGED": "לא מנוהלות", "AVG_HOLD_TIME": "ממוצע זמן המתנה", - "AVG_DURATION": "משך ממוצע", + "AVG_DURATION": "משך זמן ממוצע", "AVG_BILLABLE": "ממוצע חיוב", "SOURCE": "מקור", "DESTINATION": "יעד", diff --git a/public/app/main/apps/whatsapp/i18n/es.json b/public/app/main/apps/whatsapp/i18n/es.json index 0bdc98d..5b4a276 100644 --- a/public/app/main/apps/whatsapp/i18n/es.json +++ b/public/app/main/apps/whatsapp/i18n/es.json @@ -54,8 +54,8 @@ }, "HELP": { "LIST": "Lista de administrador de contactos utilizada para asociar contactos", - "MANDATORYDISPOSITION": "Disposición obligatoria", - "MANDATORYDISPOSITIONPAUSEID": "Pausar para usar cuando la disposición obligatoria está habilitada", + "MANDATORYDISPOSITION": "Tipificación obligatoria", + "MANDATORYDISPOSITIONPAUSEID": "Pausar para usar cuando la tipificación obligatoria está habilitada", "MOTIONPROXY": "El campo debe tener el siguiente formato: : // [: ]. Ejemplo: https: //X.Y.Z.W", "NAME": "Solo se admiten números, letras y caracteres específicos (._)", "RECEIVEURL": "Esta es la cadena de API generada automáticamente que debe usar para recibir los mensajes dentro de su cuenta de su proveedor de conector de WhatsApp (se debe usar el método POST): haga clic en el botón del portapapeles para copiarlo", @@ -67,7 +67,7 @@ "ADD_NOTE": "Añadir la nota", "ADD_WHATSAPPACCOUNT": "Añadir", "ADD_WHATSAPPCANNEDANSWER": "Agregar respuesta predefinida", - "ADD_WHATSAPPDISPOSITION": "Agregar disposición de WhatsApp", + "ADD_WHATSAPPDISPOSITION": "Agregar Tipificación de WhatsApp", "ADD_WHATSAPPQUEUE": "Agregar cola de WhatsApp", "ADVANCED": "Avanzado", "AGENT": "Agente", @@ -106,12 +106,12 @@ "DELETE_SELECTED": "Eliminar seleccionado", "DELETE_WHATSAPPACCOUNT": "Eliminar cuenta de WhatsApp", "DELETE_WHATSAPPCANNEDANSWER": "Eliminado", - "DELETE_WHATSAPPDISPOSITION": "Eliminar la disposición de WhatsApp", + "DELETE_WHATSAPPDISPOSITION": "Eliminar la tipificación de WhatsApp", "DELETE_WHATSAPPQUEUE": "Eliminar la cola de WhatsApp", "DESCRIPTION": "Descripción", "DIALOGFLOW": "DialogFlow", - "DISPOSITION": "Disposición", - "DISPOSITIONS": "Plan", + "DISPOSITION": "Tipificación", + "DISPOSITIONS": "Tipificaciones", "DOWNLOAD_INTERACTION": "Descargar", "DOWNLOAD_WITHOUT_ATTACHMENTS": "Descargar sin archivos adjuntos", "DOWNLOAD_WITH_ATTACHMENTS": "Descargar con archivos adjuntos", @@ -128,7 +128,7 @@ "EDIT_TAG": "Editar etiqueta", "EDIT_WHATSAPPACCOUNT": "Editar cuenta de WhatsApp", "EDIT_WHATSAPPCANNEDANSWER": "Editar", - "EDIT_WHATSAPPDISPOSITION": "Editar la disposición de WhatsApp", + "EDIT_WHATSAPPDISPOSITION": "Editar la tipificación de WhatsApp", "EDIT_WHATSAPPQUEUE": "Editar la cola de WhatsApp", "FALSEPRIORITY": "Prioridad falsa", "GENERAL": "General", @@ -149,15 +149,15 @@ "LOGGED_IN": "Conectado (SIP conectado)", "LOGIN_TIME": "Hora de inicio de sesión", "LOGOUT": "Cerrar sesión", - "MANDATORYDISPOSITION": "Disposición obligatoria", - "MANDATORYDISPOSITIONPAUSEID": "Pausar para usar cuando la disposición obligatoria está habilitada", + "MANDATORYDISPOSITION": "Tipificación obligatoria", + "MANDATORYDISPOSITIONPAUSEID": "Pausar para usar cuando la tipificación obligatoria está habilitada", "MORE": "Más", "MOTIONPROXY": "Proxy o dominio de movimiento", "MULTI_SELECT_TOGGLE": "Alternar selección múltiple", "NAME": "Nombre", "NEW_WHATSAPPACCOUNT": "Nueva cuenta de WhatsApp", "NEW_WHATSAPPCANNEDANSWER": "Nueva respuesta enlatada de WhatsApp", - "NEW_WHATSAPPDISPOSITION": "Nueva disposición de WhatsApp", + "NEW_WHATSAPPDISPOSITION": "Nueva tipificación de WhatsApp", "NEW_WHATSAPPQUEUE": "Nueva cola de WhatsApp", "NOOP": "Noop", "NOTE": "Nota", @@ -169,7 +169,7 @@ "NO_AVAILABLE_INFO": "No hay información disponible", "NO_INTERACTION_AVAILABLE": "No hay interacciones disponibles", "NO_WHATSAPPCANNEDANSWER_AVAILABLE": "No hay respuestas enlatadas de WhatsApp disponibles", - "NO_WHATSAPPDISPOSITION_AVAILABLE": "No hay disposiciones de WhatsApp disponibles", + "NO_WHATSAPPDISPOSITION_AVAILABLE": "No hay tipificaciones de WhatsApp disponibles", "NO_WHATSAPP_ACCOUNTS_AVAILABLE": "No hay cuentas de WhatsApp disponibles", "OF": "de", "OPENED": "Abrió", @@ -233,7 +233,7 @@ "WHATSAPP": "Conector de WhatsApp", "WHATSAPPACCOUNTS": "Cuentas de WhatsApp", "WHATSAPPCANNEDANSWERS": "Respuestas enlatadas de WhatsApp", - "WHATSAPPDISPOSITIONS": "Disposiciones de WhatsApp", + "WHATSAPPDISPOSITIONS": "Tipificaciones de WhatsApp", "WHATSAPPQUEUES": "Colas de WhatsApp", "CLIENTEMAIL": "Correo electrónico del cliente", "DIALOGFLOWV2": "Dialogflow V2", diff --git a/public/app/toolbar/i18n/ar.json b/public/app/toolbar/i18n/ar.json index dbb766d..f379f84 100644 --- a/public/app/toolbar/i18n/ar.json +++ b/public/app/toolbar/i18n/ar.json @@ -102,6 +102,8 @@ "LITHUANIAN": "الليتوانية", "NOTIFICATION_TITLE": "إشعار جديد من {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "إلى {{المستلم}}", - "USER_FORCE_LOGOUT": "قام {{ip}} بتسجيل الدخول باستخدام بيانات الاعتماد الخاصة بك.\nغير مسموح بتسجيل الدخول المتعدد" + "USER_FORCE_LOGOUT": "قام {{ip}} بتسجيل الدخول باستخدام بيانات الاعتماد الخاصة بك.\nغير مسموح بتسجيل الدخول المتعدد", + "LOGOUT": "تسجيل خروج", + "SESSION_TIMEOUT": "سيتم إغلاق الجلسة تلقائيًا بعد 60 ثانية" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/cs.json b/public/app/toolbar/i18n/cs.json index 2ce0a99..414dd89 100644 --- a/public/app/toolbar/i18n/cs.json +++ b/public/app/toolbar/i18n/cs.json @@ -102,6 +102,8 @@ "USER_FORCE_LOGOUT": "{{ip}} se přihlásil pomocí vaÅ¡ich přihlaÅ¡ovacích údajů.\nVíce přihlášení není povoleno", "WEBRTC_AUDIO_DEVICES_NOT_AVAILABLE": "Nejsou k dispozici žádná zvuková zařízení", "WEBRTC_MICROPHONE_NOT_AVAILABLE": "Není k dispozici žádný mikrofon", - "WEBRTC_SPEAKER_NOT_AVAILABLE": "Není k dispozici žádný reproduktor" + "WEBRTC_SPEAKER_NOT_AVAILABLE": "Není k dispozici žádný reproduktor", + "LOGOUT": "Odhlásit se", + "SESSION_TIMEOUT": "Relace bude automaticky ukončena po 60 sekundách" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/da.json b/public/app/toolbar/i18n/da.json index ce6eee5..e14a5f2 100644 --- a/public/app/toolbar/i18n/da.json +++ b/public/app/toolbar/i18n/da.json @@ -102,6 +102,8 @@ "LITHUANIAN": "litauisk", "NOTIFICATION_TITLE": "Ny anmeldelse fra {{afsender}}", "NOTIFICATION_TITLE_RECIPIENT": "til {{modtager}}", - "USER_FORCE_LOGOUT": "{{ip}} er logget ind med dine legitimationsoplysninger.\nFlere login er ikke tilladt" + "USER_FORCE_LOGOUT": "{{ip}} er logget ind med dine legitimationsoplysninger.\nFlere login er ikke tilladt", + "LOGOUT": "Log ud", + "SESSION_TIMEOUT": "Sessionen lukkes automatisk efter 60 sekunder" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/de.json b/public/app/toolbar/i18n/de.json index 29672a0..a1dbc83 100644 --- a/public/app/toolbar/i18n/de.json +++ b/public/app/toolbar/i18n/de.json @@ -102,6 +102,8 @@ "LITHUANIAN": "litauisch", "NOTIFICATION_TITLE": "Neue Benachrichtigung von {{Absender}}", "NOTIFICATION_TITLE_RECIPIENT": "an {{Empfänger}}", - "USER_FORCE_LOGOUT": "{{ip}} hat sich mit Ihren Anmeldeinformationen angemeldet.\nMehrfachanmeldungen sind nicht zulässig" + "USER_FORCE_LOGOUT": "{{ip}} hat sich mit Ihren Anmeldeinformationen angemeldet.\nMehrfachanmeldungen sind nicht zulässig", + "LOGOUT": "Ausloggen", + "SESSION_TIMEOUT": "Die Sitzung wird nach 60 Sekunden automatisch geschlossen" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/en.json b/public/app/toolbar/i18n/en.json index 2ca00bd..fa9a8f4 100644 --- a/public/app/toolbar/i18n/en.json +++ b/public/app/toolbar/i18n/en.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Lithuanian", "NOTIFICATION_TITLE": "New notification from {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "to {{recipient}}", - "USER_FORCE_LOGOUT": "{{ip}} has logged in with your credentials. \nMultiple logins are not allowed" + "USER_FORCE_LOGOUT": "{{ip}} has logged in with your credentials. \nMultiple logins are not allowed", + "LOGOUT": "Logout", + "SESSION_TIMEOUT": "The session will be automatically closed after 60 seconds" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/es.json b/public/app/toolbar/i18n/es.json index 4a557ee..7c30a2e 100644 --- a/public/app/toolbar/i18n/es.json +++ b/public/app/toolbar/i18n/es.json @@ -102,6 +102,8 @@ "LITHUANIAN": "lituano", "NOTIFICATION_TITLE": "Nueva notificación de {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "a {{destinatario}}", - "USER_FORCE_LOGOUT": "{{ip}} ha iniciado sesión con sus credenciales.\nNo se permiten múltiples inicios de sesión" + "USER_FORCE_LOGOUT": "{{ip}} ha iniciado sesión con sus credenciales.\nNo se permiten múltiples inicios de sesión", + "LOGOUT": "Cerrar sesión", + "SESSION_TIMEOUT": "La sesión se cerrará automáticamente después de 60 segundos." } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/et.json b/public/app/toolbar/i18n/et.json index 2a34815..de36203 100644 --- a/public/app/toolbar/i18n/et.json +++ b/public/app/toolbar/i18n/et.json @@ -102,6 +102,8 @@ "USER_FORCE_LOGOUT": "{{ip}} on teie mandaatidega sisse loginud.\nMitu sisselogimist pole lubatud", "WEBRTC_AUDIO_DEVICES_NOT_AVAILABLE": "Heliseadmeid pole saadaval", "WEBRTC_MICROPHONE_NOT_AVAILABLE": "Mikrofoni pole saadaval", - "WEBRTC_SPEAKER_NOT_AVAILABLE": "Kõlarit pole saadaval" + "WEBRTC_SPEAKER_NOT_AVAILABLE": "Kõlarit pole saadaval", + "LOGOUT": "Logi välja", + "SESSION_TIMEOUT": "Seanss suletakse 60 sekundi pärast automaatselt" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/fa.json b/public/app/toolbar/i18n/fa.json index 72262c9..5eb9a76 100644 --- a/public/app/toolbar/i18n/fa.json +++ b/public/app/toolbar/i18n/fa.json @@ -102,6 +102,8 @@ "LITHUANIAN": "لیتوانیایی", "NOTIFICATION_TITLE": "اعلان جدید از {{فرستنده}", "NOTIFICATION_TITLE_RECIPIENT": "به {{گیرنده", - "USER_FORCE_LOGOUT": "{{ip} with با اعتبار خود وارد شوید.\nورود چندگانه مجاز نیست" + "USER_FORCE_LOGOUT": "{{ip} with با اعتبار خود وارد شوید.\nورود چندگانه مجاز نیست", + "LOGOUT": "خروج", + "SESSION_TIMEOUT": "جلسه پس از 60 ثانیه به طور خودکار بسته می شود" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/fi.json b/public/app/toolbar/i18n/fi.json index 5a73aa4..fe61d85 100644 --- a/public/app/toolbar/i18n/fi.json +++ b/public/app/toolbar/i18n/fi.json @@ -102,6 +102,8 @@ "LITHUANIAN": "liettualainen", "NOTIFICATION_TITLE": "Uusi ilmoitus lähettäjältä {{lähettäjä}}", "NOTIFICATION_TITLE_RECIPIENT": "vastaanottajalle {{vastaanottaja}}", - "USER_FORCE_LOGOUT": "{{ip}} on kirjautunut sisään käyttöoikeustietosi.\nUseita kirjautumisia ei sallita" + "USER_FORCE_LOGOUT": "{{ip}} on kirjautunut sisään käyttöoikeustietosi.\nUseita kirjautumisia ei sallita", + "LOGOUT": "Kirjautua ulos", + "SESSION_TIMEOUT": "Istunto suljetaan automaattisesti 60 sekunnin kuluttua" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/fr.json b/public/app/toolbar/i18n/fr.json index 0220ca6..5f35565 100644 --- a/public/app/toolbar/i18n/fr.json +++ b/public/app/toolbar/i18n/fr.json @@ -102,6 +102,8 @@ "LITHUANIAN": "lituanien", "NOTIFICATION_TITLE": "Nouvelle notification de {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "à {{destinataire}}", - "USER_FORCE_LOGOUT": "{{ip}} s'est connecté avec vos identifiants.\nLes connexions multiples ne sont pas autorisées" + "USER_FORCE_LOGOUT": "{{ip}} s'est connecté avec vos identifiants.\nLes connexions multiples ne sont pas autorisées", + "LOGOUT": "Se déconnecter", + "SESSION_TIMEOUT": "La session sera automatiquement fermée après 60 secondes" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/he.json b/public/app/toolbar/i18n/he.json index 4b6db4e..00f896f 100644 --- a/public/app/toolbar/i18n/he.json +++ b/public/app/toolbar/i18n/he.json @@ -102,6 +102,8 @@ "LITHUANIAN": "ליטאי", "NOTIFICATION_TITLE": "הודעה חדשה מאת {{שולח}}", "NOTIFICATION_TITLE_RECIPIENT": "אל {{מקבל}}", - "USER_FORCE_LOGOUT": "{{ip}} התחבר עם האישורים שלך.\nאין להכניס כניסות מרובות" + "USER_FORCE_LOGOUT": "{{ip}} התחבר עם האישורים שלך.\nאין להכניס כניסות מרובות", + "LOGOUT": "להתנתק", + "SESSION_TIMEOUT": "ההפעלה תיסגר אוטומטית לאחר 60 שניות" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/hi.json b/public/app/toolbar/i18n/hi.json index 8043b85..bf50c5d 100644 --- a/public/app/toolbar/i18n/hi.json +++ b/public/app/toolbar/i18n/hi.json @@ -102,6 +102,8 @@ "LITHUANIAN": "लिथुआनियाई", "NOTIFICATION_TITLE": "{{प्रेषक}} से नई अधिसूचना", "NOTIFICATION_TITLE_RECIPIENT": "से {{प्राप्तकर्ता}}", - "USER_FORCE_LOGOUT": "{{ip}} ने आपकी साख के साथ लॉग इन किया है।\nएकाधिक लॉगिन की अनुमति नहीं है" + "USER_FORCE_LOGOUT": "{{ip}} ने आपकी साख के साथ लॉग इन किया है।\nएकाधिक लॉगिन की अनुमति नहीं है", + "LOGOUT": "लॉग आउट", + "SESSION_TIMEOUT": "60 सेकंड के बाद सत्र स्वचालित रूप से बंद हो जाएगा" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/id.json b/public/app/toolbar/i18n/id.json index 0099798..4296759 100644 --- a/public/app/toolbar/i18n/id.json +++ b/public/app/toolbar/i18n/id.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Lithuania", "NOTIFICATION_TITLE": "Pemberitahuan baru dari {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "kepada {{penerima}}", - "USER_FORCE_LOGOUT": "{{ip}} telah masuk dengan kredensial Anda.\nBanyak login tidak diperbolehkan" + "USER_FORCE_LOGOUT": "{{ip}} telah masuk dengan kredensial Anda.\nBanyak login tidak diperbolehkan", + "LOGOUT": "Keluar", + "SESSION_TIMEOUT": "Sesi akan ditutup secara otomatis setelah 60 detik" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/it.json b/public/app/toolbar/i18n/it.json index 812895c..7d8ae6c 100644 --- a/public/app/toolbar/i18n/it.json +++ b/public/app/toolbar/i18n/it.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Lituano", "NOTIFICATION_TITLE": "Nuova notifica da {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "a {{recipient}}", - "USER_FORCE_LOGOUT": "{{ip}} si è connesso con le tue credenziali. \nNon sono consentite connessioni multiple" + "USER_FORCE_LOGOUT": "{{ip}} si è connesso con le tue credenziali. \nNon sono consentite connessioni multiple", + "LOGOUT": "Disconnettersi", + "SESSION_TIMEOUT": "La sessione verrà chiusa automaticamente dopo 60 secondi" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/ja.json b/public/app/toolbar/i18n/ja.json index c76a7ae..ab54d93 100644 --- a/public/app/toolbar/i18n/ja.json +++ b/public/app/toolbar/i18n/ja.json @@ -102,6 +102,8 @@ "LITHUANIAN": "リトアニア語", "NOTIFICATION_TITLE": "{{sender}}からの新しい通知", "NOTIFICATION_TITLE_RECIPIENT": "{{recipient}}へ", - "USER_FORCE_LOGOUT": "{{ip}}はあなたの認証情報でログインしています。\n複数のログインは許可されていません" + "USER_FORCE_LOGOUT": "{{ip}}はあなたの認証情報でログインしています。\n複数のログインは許可されていません", + "LOGOUT": "ログアウト", + "SESSION_TIMEOUT": "セッションは60秒後に自動的に閉じられます" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/ko.json b/public/app/toolbar/i18n/ko.json index 1498d32..7895d46 100644 --- a/public/app/toolbar/i18n/ko.json +++ b/public/app/toolbar/i18n/ko.json @@ -102,6 +102,8 @@ "LITHUANIAN": "리투아니아 사람", "NOTIFICATION_TITLE": "{{sender}}의 새 알림", "NOTIFICATION_TITLE_RECIPIENT": "{{recipient}}에게", - "USER_FORCE_LOGOUT": "{{ip}}이 (가) 귀하의 자격 증명으로 로그인했습니다.\n다중 로그인은 허용되지 않습니다." + "USER_FORCE_LOGOUT": "{{ip}}이 (가) 귀하의 자격 증명으로 로그인했습니다.\n다중 로그인은 허용되지 않습니다.", + "LOGOUT": "로그 아웃", + "SESSION_TIMEOUT": "세션은 60 초 후에 자동으로 닫힙니다." } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/lt.json b/public/app/toolbar/i18n/lt.json index 1dd2b20..b05f14c 100644 --- a/public/app/toolbar/i18n/lt.json +++ b/public/app/toolbar/i18n/lt.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Lietuvių", "NOTIFICATION_TITLE": "Naujas praneÅ¡imas nuo {{siuntėjas}}", "NOTIFICATION_TITLE_RECIPIENT": "Naujas praneÅ¡imas kam {{gavėjas}}", - "USER_FORCE_LOGOUT": "{{ip}} prisijungė naudodamas savo įgaliojimus. Keli prisijungimai neleidžiami" + "USER_FORCE_LOGOUT": "{{ip}} prisijungė naudodamas savo įgaliojimus. Keli prisijungimai neleidžiami", + "LOGOUT": "Atsijungti", + "SESSION_TIMEOUT": "Po 60 sekundžių sesija bus automatiÅ¡kai uždaryta" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/lv.json b/public/app/toolbar/i18n/lv.json index cc03504..d9a30bf 100644 --- a/public/app/toolbar/i18n/lv.json +++ b/public/app/toolbar/i18n/lv.json @@ -102,6 +102,8 @@ "LITHUANIAN": "LietuvieÅ¡u", "NOTIFICATION_TITLE": "Jauns paziņojums no {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "adresātam {{saņēmējs}}", - "USER_FORCE_LOGOUT": "{{ip}} ir pieteicies ar jÅ«su akreditācijas datiem.\nVairāki pieteikumi nav atļauti" + "USER_FORCE_LOGOUT": "{{ip}} ir pieteicies ar jÅ«su akreditācijas datiem.\nVairāki pieteikumi nav atļauti", + "LOGOUT": "Izlogoties", + "SESSION_TIMEOUT": "Sesija tiks automātiski slēgta pēc 60 sekundēm" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/nl.json b/public/app/toolbar/i18n/nl.json index b0ed443..21d971a 100644 --- a/public/app/toolbar/i18n/nl.json +++ b/public/app/toolbar/i18n/nl.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Litouws", "NOTIFICATION_TITLE": "Nieuwe melding van {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "aan {{ontvanger}}", - "USER_FORCE_LOGOUT": "{{ip}} is ingelogd met uw inloggegevens.\nMeerdere aanmeldingen zijn niet toegestaan" + "USER_FORCE_LOGOUT": "{{ip}} is ingelogd met uw inloggegevens.\nMeerdere aanmeldingen zijn niet toegestaan", + "LOGOUT": "Uitloggen", + "SESSION_TIMEOUT": "De sessie wordt automatisch na 60 seconden afgesloten" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/no.json b/public/app/toolbar/i18n/no.json index deb942d..486213a 100644 --- a/public/app/toolbar/i18n/no.json +++ b/public/app/toolbar/i18n/no.json @@ -102,6 +102,8 @@ "LITHUANIAN": "litauisk", "NOTIFICATION_TITLE": "Ny varsel fra {{avsender}}", "NOTIFICATION_TITLE_RECIPIENT": "til {{mottaker}}", - "USER_FORCE_LOGOUT": "{{ip}} har logget pÃ¥ med legitimasjonsbeskrivelsen.\nFlere pÃ¥logginger er ikke tillatt" + "USER_FORCE_LOGOUT": "{{ip}} har logget pÃ¥ med legitimasjonsbeskrivelsen.\nFlere pÃ¥logginger er ikke tillatt", + "LOGOUT": "Logg ut", + "SESSION_TIMEOUT": "Økten lukkes automatisk etter 60 sekunder" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/pl.json b/public/app/toolbar/i18n/pl.json index ca375e7..601026e 100644 --- a/public/app/toolbar/i18n/pl.json +++ b/public/app/toolbar/i18n/pl.json @@ -102,6 +102,8 @@ "LITHUANIAN": "litewski", "NOTIFICATION_TITLE": "Nowe powiadomienie od {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "do {{recipient}}", - "USER_FORCE_LOGOUT": "{{ip}} zalogował się przy użyciu Twoich danych logowania.\nWielokrotne logowanie jest niedozwolone" + "USER_FORCE_LOGOUT": "{{ip}} zalogował się przy użyciu Twoich danych logowania.\nWielokrotne logowanie jest niedozwolone", + "LOGOUT": "Wyloguj", + "SESSION_TIMEOUT": "Sesja zostanie automatycznie zamknięta po 60 sekundach" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/pt-BR.json b/public/app/toolbar/i18n/pt-BR.json index 8e3c095..ab4a005 100644 --- a/public/app/toolbar/i18n/pt-BR.json +++ b/public/app/toolbar/i18n/pt-BR.json @@ -102,6 +102,8 @@ "LITHUANIAN": "lituano", "NOTIFICATION_TITLE": "Nova notificação de {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "para {{destinatário}}", - "USER_FORCE_LOGOUT": "{{ip}} fez login com suas credenciais.\nVários logins não são permitidos" + "USER_FORCE_LOGOUT": "{{ip}} fez login com suas credenciais.\nVários logins não são permitidos", + "LOGOUT": "Sair", + "SESSION_TIMEOUT": "A sessão será fechada automaticamente após 60 segundos" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/pt-PT.json b/public/app/toolbar/i18n/pt-PT.json index 824da6d..eb0516a 100644 --- a/public/app/toolbar/i18n/pt-PT.json +++ b/public/app/toolbar/i18n/pt-PT.json @@ -102,6 +102,8 @@ "LITHUANIAN": "lituano", "NOTIFICATION_TITLE": "Nova notificação de {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "para {{destinatário}}", - "USER_FORCE_LOGOUT": "{{ip}} fez login com suas credenciais.\nVários logins não são permitidos" + "USER_FORCE_LOGOUT": "{{ip}} fez login com suas credenciais.\nVários logins não são permitidos", + "LOGOUT": "Sair", + "SESSION_TIMEOUT": "A sessão será fechada automaticamente após 60 segundos" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/ru.json b/public/app/toolbar/i18n/ru.json index a0421b2..c7241ab 100644 --- a/public/app/toolbar/i18n/ru.json +++ b/public/app/toolbar/i18n/ru.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Литовский язык", "NOTIFICATION_TITLE": "Новое уведомление от {{sender}}", "NOTIFICATION_TITLE_RECIPIENT": "кому: {{recipient}}", - "USER_FORCE_LOGOUT": "{{ip}} вошел в систему с вашими учетными данными.\nМножественные входы не разрешены" + "USER_FORCE_LOGOUT": "{{ip}} вошел в систему с вашими учетными данными.\nМножественные входы не разрешены", + "LOGOUT": "Выйти", + "SESSION_TIMEOUT": "Сессия будет автоматически закрыта через 60 секунд." } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/sv.json b/public/app/toolbar/i18n/sv.json index 385c306..a09ba65 100644 --- a/public/app/toolbar/i18n/sv.json +++ b/public/app/toolbar/i18n/sv.json @@ -102,6 +102,8 @@ "LITHUANIAN": "litauiska", "NOTIFICATION_TITLE": "Ny meddelande frÃ¥n {{avsändare}}", "NOTIFICATION_TITLE_RECIPIENT": "till {{mottagare}}", - "USER_FORCE_LOGOUT": "{{ip}} har loggat in med dina referenser.\nFlera inloggningar är inte tillÃ¥tna" + "USER_FORCE_LOGOUT": "{{ip}} har loggat in med dina referenser.\nFlera inloggningar är inte tillÃ¥tna", + "LOGOUT": "Logga ut", + "SESSION_TIMEOUT": "Sessionen stängs automatiskt efter 60 sekunder" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/tr.json b/public/app/toolbar/i18n/tr.json index 025b302..a00338e 100644 --- a/public/app/toolbar/i18n/tr.json +++ b/public/app/toolbar/i18n/tr.json @@ -102,6 +102,8 @@ "LITHUANIAN": "Litvanyalı", "NOTIFICATION_TITLE": "{{Sender}} tarafından gönderilen yeni bildirim", "NOTIFICATION_TITLE_RECIPIENT": "{{alıcı}}", - "USER_FORCE_LOGOUT": "{{ip}} kimlik bilgilerinizle giriş yaptı.\nBirden çok girişe izin verilmez" + "USER_FORCE_LOGOUT": "{{ip}} kimlik bilgilerinizle giriş yaptı.\nBirden çok girişe izin verilmez", + "LOGOUT": "Çıkış Yap", + "SESSION_TIMEOUT": "60 saniye sonra oturum otomatik olarak kapatılacaktır" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/zh-CN.json b/public/app/toolbar/i18n/zh-CN.json index df51097..60436ba 100644 --- a/public/app/toolbar/i18n/zh-CN.json +++ b/public/app/toolbar/i18n/zh-CN.json @@ -102,6 +102,8 @@ "LITHUANIAN": "立陶宛语", "NOTIFICATION_TITLE": "来自{{sender}}的新通知", "NOTIFICATION_TITLE_RECIPIENT": "到{{recipient}}", - "USER_FORCE_LOGOUT": "{{ip}}已使用您的凭据登录。\n不允许多次登录" + "USER_FORCE_LOGOUT": "{{ip}}已使用您的凭据登录。\n不允许多次登录", + "LOGOUT": "登出", + "SESSION_TIMEOUT": "该会话将在60秒后自动关闭" } } \ No newline at end of file diff --git a/public/app/toolbar/i18n/zh-TW.json b/public/app/toolbar/i18n/zh-TW.json index 315f970..2781e79 100644 --- a/public/app/toolbar/i18n/zh-TW.json +++ b/public/app/toolbar/i18n/zh-TW.json @@ -102,6 +102,8 @@ "LITHUANIAN": "立陶宛語", "NOTIFICATION_TITLE": "來自{{sender}}的新通知", "NOTIFICATION_TITLE_RECIPIENT": "到{{recipient}}", - "USER_FORCE_LOGOUT": "{{ip}}已使用您的憑據登錄。\n不允許多次登錄" + "USER_FORCE_LOGOUT": "{{ip}}已使用您的憑據登錄。\n不允許多次登錄", + "LOGOUT": "登出", + "SESSION_TIMEOUT": "該會話將在60秒後自動關閉" } } \ No newline at end of file diff --git a/public/assets/plugins/square/stencils/tts/tts_128x128.png b/public/assets/plugins/square/stencils/tts/tts_128x128.png index 44d28ba877624fc7722809b8b6ef247fb64bcc7b..f0fcf4bf6641829d3eaa94eaf8ccb7a05bc6603b 100644 GIT binary patch delta 7128 zcma)hRa9I}w{17>P9R8V+=Dk7+})kvZjC#epaFtI2X_f1G_FBI5*&iNBm@XSg9L}$ z-#HKGzju7&-dhj*p=zx?=UO$ZYE-TKO7PixaHRAHSF& zznG99Cof-yKPvyf4|JhUa=@HCeLa1gJYiz`_JO|Y)1|1Nqq%9eTadc0z^ww-9&=tUraKrvB>{V*MH#tAFltHWQ1d~W>{il zFd-TI2e1Ex`5)pL02(usEuXNED8HQ$wk6Xk+P?+1sK>*4P6|@(E+S&?;T3cH; z4WZeh{(o6!XkiKdd-m2ahMFv~A9&GZi&1Mcti_%KR3H_38U4WJgMu(O+PQ*Dsok;F zkg&u3g)UKll6HEgK*fCX8IIlO;PCw{YPphs~=^CYJR~Uk8 zQ=cRx=;M5xgZ}n!OVNeaeq!N@fup@Rr|)M1XHbZ1D&K{NSvu_G@1}HI-t>%h_q1+N zvYsUZEUk_c`8ht}8yovUPaArCs=iiH!^=0&B|)L5;LQv|P*Eu8>L+R+D;-Gk8gw#@ z8KEVNk%QZd{X@(?=`Wa9XzM~~|J}8F8DT`eB=Mf4mpF_0$9(PjXT*Y)OC~>RevyY| zF`FzA#Q%{=|1$|nB0{NcA&lTMn=a7N>rL1J@}N31?Kq6a84f0jHu7LpZ)TND#}3#d zDS4yi?tJYipTuQ%b5(SrZ&LM7O46c&(#Heh^aeGb8tf^T_T(>9y z=gLREafqf1!+1?~^6JE;)dc#@Sx z(NYr%b}sacQwW@i%^BnP)Z*_m9-4U3hI?EwLTx@hQW*&9`bNSd;k?6N)W9 zMZYalK}63iK7i?~%%a-tv>LwxAM+;AGay&1tM=xKO zHe*N7)7Yqx>a;e=znU>}!%+vz&`adh5o6K6GC`(Y$UZhY_FM_%6Q z8{Ruh<4`sfkC6G+35ftwA4G&pv8ju30vTegK1~~wKsVgJkrAI0vafd+zY|`)Y$7*T zaWS0570bo{mP?39wyQ`(C5Mtm`jj^X5pf-46MhK~xynOec6{4Nu@&EQEAr0>FokhE zkxtsnr?>W0(xhP1(!;v>k&C&29%$o3o;-hdY{}A2Gc%jL3GxD{Gs*7i#=%F%wkI2d z?mZzxJEJX;?HM!HC||jp5|j%&H>~beQR(~qH?>&ZUj~jc?6qIGTR5H$y^Ru-U%jM$ zrg!jYoBnt=WTT>7JPjdID9c(Pz(4zqipAd8b-Q1;K8{f8c~zjArdp|7sau||qB~4x z$gjeY^;ySxO{@ZNg%01PlI3f-%nMN;bn(dZV$l`)wNuXMKSg2XMz@7Z1ic-mb;aYt zeF)TSTFhJwp4P`gYb7Zs3*A>^Ieh=-fKdbW$i(wh3YvSK?CfE}6nI`pgrBBTR9Rwp zx)^4#+Pb=_D{E`csC4Xu4N8OC)CyVLrmbgMBq$@G-qX zLF+ZPk{&gYgr8?>ZvEzI>JPdN)$eQz4;U4jzBETkRG}CCM)VIylh8*$)dmhMc&;xB zK09TLwN6WUt>|ONQvt7I(~KP#8NDbOjrPSX+&Hwnj~FH8y=MJp>(&-(Y8*w^}4*-G7QP9QeWa#@R1J+7R1DlK^$c*`+L> zu%)g=e6BiV^o7K=GHbH^7F!lR*pUV^F?4sw1_vl59yVG)2VJ#qd|!JRcathz(S82F z6w2;GVzJ}@#Zybfm`_HoUIYauIGf9x9W5M8Hu49)v`p0>5|%I%mRw~XhxdxH53x8q zNh>yXt$hpnC%dF;mV*sknTDb{nqhN=LJrQ*4^U?dt|_YU%d~N055lm~PgGF$`X2ag@6I09qay4aYv95QgU}J>d%>Wfwzk@Tr z%te0ji=5-eAfeQ7l1--msXxEG46t4#f5^5nA%C+R$?O*i%&D1!@ZPXtC_<_&A_U{63Gyd~?!M;>i;C! z4xNe!8lMecRtx^=dU<*^umYnoI;1Y0zWbQ{gocEG5-j5yHEPZX`Y0CZo8*E4Y~>24 zi09MIgnCuTXk?iMG@G1WuBekh^F`{e@7XoxknAM|mQILn9Vm`ROP z@Npm&eb5qwOXK`SEyljt+Qtg-MD5{7m|d5|u9Jen0JcE&Htn)D#!C9nF)LZEb-h8d zPp-d>o@ue$c+`95M5?v-fJ9ll&A<&uJq=|*agFJTbY33T5uJYikscTJ>rymQX3W<+ znxsRbMz?zb$LroaDN=V3|K*+0^n>}PCX}V0gxRJU^{11LE}mxgumuhvD&DK$a%lBc zRb312lNdBPc;ArMLJNl6r$8JA;;S8Z=RLY_UDxq82F9u0s{x&v(Y@x3CM~l`H;*3& zOL;1t@j66bU$cl-jZH4z)%l$u6JF0vtt495bo8a!X7kjZOxrzD(?zo5;HPu;syL%{ ze+BWlJcA{!{Z4^CCVC}+t&$~GpXX(A<364dK*i-uQqFaiVhd$tmsx}r#C|7RodvBN z<3X76kJ_%kc;)SI^q=npaMe%st%^LFnH_KaiEAsFhDuq^pFJ8Nz?IKQK{WJN_bPdT z<`hD{42TYqcfaTs?!N1Xx5J+<-a1JOkVGl4n8afDWy0vO3EKdbhtoul@i-}1;FjLF zhJh8kkyL)sJw4aLtLCb?GTd>r@~yi9pgYTAMO?8~4W(Wgrh^_fjzw6E+y#lolX#n<9pWm*niEzitk^W*?{JM#PKzoBsKvqYwt7IgI4~-k0vuzx*Ua zUiR#Fo=Wg@4tNZtqWQAEwFjzRq{qt3cyHNNouky|ZW9WaeRSK8lI%w?WXSzs&(Dbyj*4B z=BC7&8vt~C%%if1W{yM6`FduWLp>~RShQ6T*6*mJRj>@A?3X4Qmdcf{^4U7`ctU-p z*d}~DyLD_jRVuV5Rkw*DQ=G7vM5wMV9-7_63k$W0%*}(_iW7`@CD=IQJ5}I-Hgl6@ zS#@w;M8#~1nWfZP>kz@w))c4`#vqe+2}Y{MfZid8Lp*iSN{wI{**D5)=90)pu_Aln z7z=$f)yc>PTwX#*^jEy>+4*^X;zVncC;Z*HO6&>-BJxbS`<<(LPJ#61&Nvt7tNAF; zNfktsbYcAypBI+j%L$oc>z1B>($FF;v*1pz`h=71VxJ~X&Hl2u+NxHt(psCe+B!6p z23ToK(=DAsLk0id|84$gm2mwa8wt*?Oq==MgvR#F$FD_sa-a?k?Pa>T3!3&MYsxMU zF!}e> z7D~c%)J)g7SXcfhn@*T=RPqeOUk8zA1dymdVgqv;qGimMT~SSI9W{Iri)G(t&vtBJ z_`^D}Yj|ZTq^Z}1Flc@TYpv_4d7glYTYmPaU%;wLr3RFKNhA!YHpZ@BbvRm z6%`B8U46#aJ@na`k8SmsR$4EG7P@B6J7wB@F!W5w^}1^mHkemj@AJGJ_#r%@;aEK zuj814PGYNsodN>lPm|##DsP3#hFNgi+HM&e1}_j2k{1r6X2<3f7U;Pg6;qU{eV8jc zHQyGG$y(sGpU`L+(cp}+HYDyn;VUbvsw2ctojMSjo8vNT{hUOS>0lQKWXto%e{Z-@ zV<9BM%UL4+lAtRT%-qW3N_0wU3`bHEp<26GmGc#r29bqGT77+<>&iU#}*_@#eZ zqxRSZF0OyXXLoXPvkDAE zG4)OYmwQUYH2oWfQ0(}~Z(=G`zM3(nSZ#8J-5HHOC&5bkr&Q0j+kgkkL1MJ+pRv!f z#1loCo4=~QNqudJ{Fb)ZARI9#&whLhm0FpiVrQBYBDQJxqoPr)ri2NNEVs2$9$y|J z_ozLrdM=VcMvw&@pYVl|S2lkYL>)4g8VEZc$Isa5+W`3?{LV zCwZH99X-x&ndND*G7z$_{uobbX%(q__V*ak#14T}!$SHKuy&f!AsZ&AwU!>2P^ELD z?;nyI?nGm*SZgYu(sYGo@Of^e zzve63F_UUP>5RWxZEt;90)HDsft9&MgoWnh>|Da4tJk~(lgu#b!FabgJk2KLv*$$< zW33G2z7?9;0ABrx_lm5HKV4RY!7GbtGFs-5?9(w{&+5;7`<5zzAHrgaT5et6Rgu%= zIKe9-q7ETycX?t8dCf|~lpa4F6oGz(KVe2mi4*%S$-J9M(>+9-4wxR@+$4Gx5o93Q z#1iwl@x#6tUOpY2w0YQ^b1sYP{OYGtg(P6HRlo%J{$^j7)JuXa4bk`IEG*)w$`f@a zl2HF3-d(ehm$%#S6}h%ePyAT=>e||^kxin30mkfDzWr@VcoqjW{*`3kn@^m`8{JQD ziKD}YAm*5nf>FfwH_F)ZlAc%bf%#JneC70x*ND;&nYa!0LJ@%n4TFed^C~S|Mnd4< zpO_XRB}ioo3JO-kF4venfA8;a#ZbHiZSGYSRkpOWxIK;N>=f(l>}dF}w7G~ZPD!MXn?&9iN_VHt$(aRv_w==~+?=jV5@-ksOqFEbfXq>CCoU|l-JmXwrKxL{^x z7Oz-lzyI$2`>hys~l)oD2|h zE`TrzXoeWvw!S7EEH%YR-S262osMwMz_lZilL@G(r~>yY-im}?!CKe<{P6<)lhGsK zV$P@o_FZ;K%uzK@*t4>&P1r2J!h#mr6i7r2^17TZkJjYNbO@eFWG@)yLEV3>Y&<}< zB(Iq^?vDZzk6b-GcH&tJfz2hyq5`jvg}_4)GUUOs6v>gPGNq>6lCrWWQdUj7+pw3R z5x;-CfNUC!|E?m367~PK6xY<$boDAJDV@#ksUt<1^!Km7X1<6H6I&c1-Of-NqoA~#{aNp0mJnE=MN!Z*qiFQ&TcZ zN|@c<-Cb8d5&?TlkLSOtr0&`O;R&HinqFHQ->>UE+AGg;&3MbBo6LXMg;aSW;)@Mm zVaSna_(>F9eaNLp&t>=Vczamy)fb+{CPzYX{{!R+-2UO*(f}lJx$3jDA<){bjsHwC zG`qDG3iVu9M`DTx9Q{N}u%i-0NlUwpO#JvV@PHIPawT1DMiC~cPwTsnRE)mmdD~s+ z#jjN$Wt+w22Bx9I$gl%{caupcpq!<`i9V=W3r z=|e8_-JlJlp3^M$SKe1A*7J3iT1rZTA8vk*WN|7;E_AU(Lfw}?S8C)XWD5ui3hsAe zVqhpUktqBPz5RQL?D(l-juam`V)bhh^-`-l^}xV@ zo>)Fl*9i);ySc4x60l@&VrfR+RMS;5xXoILk`#k}mBfjJ-3Yd=`BUTLkpZs)kM}fE;rTET^^g$p zf1q{E5E?Jfe46_Gne}^D8ob(V)}vs(aHm587nCJ8*MDLxWpY&!4Z<%Iwt$L}hh#d`SuY zOXNA3DSNPB*9VelamIe}l6njEp?29Vp4+se+#_kpgv)6qA{$qu6zmzO?2 zK4V7${g6>OHzN_&$Oxk_D!?altErB)0S@Q*(tp4}Huq^^gxe(mp{ z9jw?6CU57&+VKw$XRszB>_;e$8qBX=BBx%SA+0pHd#H%SKPp3t@_(-x{C7EF247(( zM9v5(V|G@4_&eo!QUUZD$89a*hNIU~h^i9f#9Z~#g^%?tgeTdH8`-OL)`6cG@9ymv z<4camM*mkWf(%!|VV|zxUOVbJhyIny=W5B8Uk2ed_)=ZTT_L#Z1N+o+FE6z`TsJ+5 zzT=~O4-aO(?N_RuDR|%1PHNIz-urQD`0ud0F-~1#O8u?#WVE?d+sAR8 zGhk9SL6S@0T9qnVkzoz4+)+$#HGzNDPn2%O_S#kyH=F{W2PQs3Pl?4q(N4|F3WCv$ zdp^S6Txy0#x{EJV9L_qS#12>VTj!sL$KiVQLjEbKNYQO#RCZi|J%~()#A9;8tFEkz pwf;LJs{dMH`M(rj7Kra3!63wWMv}z|4<`uOR1`Gj5wcd1{|jnsOPK%w delta 6505 zcma)AWl)p>wB03_lm_W`rMnvhBqW!V7En?;mv4!srMpo;X^;jbmremm$puzILPS6i zo^Rg!_uiX%_vgKL?#!7p=gi!5UJWj&0H;V{$*?raK(VQWCHaMg_=Sayg+*jU#AJk| zc!fmL{jo*<_rWLZ>GWmXhn!N94x%DLPGbCa4&rwF5|U!#{8CavPW&%KoP;EuB%SOW zr0kn$@EoxJUz_QL1Y+s5kZ(=3gm*$X$FR2C^mCCcdxO&c)Ef@;&$YI;XNU7@e3I1OLO`oFNOUdl%ET)zfe73;*2S%4si)%nlFr?YEf%XGgbE=vU{MB=D0HVG_i@1D}!h)O3g2Ijg2o z>-pQEyo2%%X1SEe$&JPFl_L3HIVAp&?@R3h6nek!5PX_78~YfXoGO9$A|&mXa|h@B z2;yk*sHKHvplQ0?Dx|&4v<8Ox@aZoFZP+cWDzi-jMltex43C>c*zX9=2y7OkX#>dd zzk)kmTl>ld(fEgLy3v|9@a9G8W+K)Q#rBJsN&#J;y&GWSTPCffE`=M5pi-K8zT7P^ z_w6iQ4}Hz`)&lo6w%hWM=PKv&%01od!z-)c&qLBHKLP~KmmQ5Xnhl*^2BviZf7@HVePAUcx4zX)7vl zY8}=mqbHgxYO}4mtrdrL7W9{7=Go&sLmZ^lI*jefXQLq^X{TA(2=*b7PnS{xgs-s= zRrY7jS70IIJR3JwJ@ZkGjg5x3tAXGJnlo*O5|7@BbY^v+=$E3W z?v$CyzHOM?{W1u6aboS*j-p8UMLHF%;*OT|@2H0Sw6~6m*51TbBs>*vO zB{EHK9f!8Zx}DfQV7Tv@%S3iq+S}>BFT}|O<%=9aC6#XR#~awh(Yw$(%xDC@BTO|SeV|QbOVz-xMp|SO75QZ8kSNtZU6a58hGY@soon@+YwX5eaMtu`EpMpqzO!X)BpaYso?XTlx%fk;AV4+ zpanS%HkZ(8X@JG=H$=2`GIx9S6H!Pz7IysX>M^De z1jTA*>fJ3m3cxZ9SnQ+9$qLBtE(B=CRt;;=5~hN;E-=^Pa=qs$});H4z(r49)LU|E>xkjw*3j>zYOG=VA>_cd;Y15$}1E48UUQs^63poN= zC#>uSGTqcT&jcT{0D9peNjICD8-T2But_c-H)aBNEY&V>&lz4rz23fa6|j*&#|z=9 zEipnykVla5@cuZ-2u(_Y40H4C#``N+bpnT0Z4Zx9^ppC&XAvS89)KJu_7Wh|a%a%u zkl$!EWlhGeXk)WBmICQX+Q4eOfMf=RPymcDqGj)f%h=m%zJ?U_Uh~|3TVoDjdG;~E z=2lrppPV~hrN(^GFc!9iCYpm?jh&Oyia!+0wVl1nIbHKfGPO>&NcyVxI7o$)4B&B{ zaCP(H5E|dqgJ02JABpy8QQ=5oL`VWZDLfQgncU3vzh#^dS-LJCpFXaZCCi*mRfcP?U&rzrG% z(=nBuA+a|QA1QAVxZy>Fx1IO1zdVOXoa+N5CdO8Ps^T}{NuCzY7K3P#q*LiZR25|s zG1s4E$Ka}pXPTq^_hEf!yDZ!=Mc^kvam;aJMs@~~&)7QK*3XEaEZq-Z1AfbA=KwYT&Wo?zrIN8*SZF z33u=ygpoO1bi98A@=YQ46EMu1&6tVnI7_MS*5B`~E9KR@eU0_(`uIAQSNNL~+iTh9 zxbwM!>~c3>hOhpUoLUnOe}Rj0Swo&hemtZaRuuEmLl5hV@Kt%{cKN^e$^%CCpNHbX z>3of>Iq8gb!%O!KfKigc7zqqe<^Zl`gQN; zuFoINVO?w{D=BBXC?!za07W-?fpXsO9UBXlD<^$W{Tdq_jC2%rcoEJbXSllkpNPci zSR!q1Dt9(36O!r+fp}@*G!!9OV0D$8*Q__Dw5%Tf_Zs2j=xFnpK-5#*ogSp4j#0e% zVzVu(r}%`9)83|2$Yx;&`%-cEabobMNrqAOyNosqL3}q`w@|e}S9SB}Q<|lFGuZyr zxYIFJt`f$78L6gX#xTsSjNd#z;GQ~f#N|{Ha9G=mP0VkifU?u00bEo+FGlqa?Zc)K zonA1odD1-jF`Sz^wQ9^W^vLTUSR+*Bl;@AbT*a^AnuxE{k0EO8q1VWi@^Xndj)wM~ z!1F4!iuv_n_BKsGZC$Q)plWVy@10nyjWg17Q-!)HsP~jtG5tg0{lx=v;H(N=x20zF zLAwk^%ghhFUM+L%-o9$vfTVz;`K*HP7XrcgSO}CRMHnWX1%2LgNAR3+Ykn(;dBLJa zeALO!L6m#hc|wMzvi6M%Qgxs|!BggL($utF29qXcMcj0rr1(d@cifcmgpu}cd_z6- z2R^wS$?Hv(tGntX#XEnUKAvvawwN?O^sT)BJ9B^OI7RyGA zo!8o)fkEOQ#}h#ZSY&*ux@ zs7IOkWggUdcx*}h#4@IKCAmN1VA*LgwJEo->O22*9P3e?H|sX9vtU@U25-;gL1D$j zASG!sSgduA!W$#DPWAf}m-=Fl25RyP9GuTWO#;x9;f;6pvyb-kO zHQeyAI;Fr;@0|WA=b+7JdWS^s;S{n`_<_ZZ`Q54znQVT4F7EAQybIIwN17H?bUcjEeq-TAEGFH1OV0h4h2BxCI9my&60Pr@B$T?$KyT^} zC21Dx3`%`u=;qL1r%OF8ALm(pWaFw3DeK!S+~T#a;Ywp39OaprlPT%wm>4=17JQfq z!*3_fFV*EfNX`nSezkobNT-z!L19@-u&*YOvcaSIGFY0X-bK2Qz=9g4Ew(`d51(Yl zg(d8;%62^~oE1Yc;OXX;h(zK7{X(dJ{tKrjJX&jdpGtkiqJu?r)jcV8b>U3h{5cgS z0y=fKqCnhJOZxjS{3tU|Ui9d>$shJ9YkvX!E`Q36k zv*)!BmH#207m&%%U^f;>#6SK1bFsDwc(!#K7bP%cF@AL=MMOk|qpSqfnmGJ9fX&wy zQHrM>?Al`SmJdng-8xr#tZ$YZ(UWMJGC#z^v?27DV>?tudrH)=tkAJrgdkU6dB8qq%Vj2@-Gx*IiH1qojskjH>_*iqg`m9esuzQ z?mgF(6k~dh-?y|xx9bh$3K8ei^g!O`k?%a6eF766veVRR$D1vm#VFCLHky~pB92Y} zRI%;*9|gO~xo4HR%QBSELJp!!Pj22Euo{a_ejs6BTV|{EIjgC5{xV>(s8d$jJx%g5 zchUL!B{B6r)!!9Mt`XKh)=DU{sPR=xtmepGx`ESE$nH-pWxC(MC}~6mj}rb^p=6As zIFUd|T%bjhs(V(~@0Q0a57#{yUfSp>%k+ML|IHlSU(B2C3irWr8*K++7zb5S*U;#r zwXS^RHLi;?e;lRnE1#!mP!XoIt`3bK2l-vyYCbuV-WUARW}tpi!OBV;@*$z|PAGxa z#?Iq7vycr8D&PU$z3Y++4dgkaupge7ApYt??dm=)rL>=+k>SOGpUbFIww@odLnG$u z)`F$n8S#!U^jW6WexuSO@}^?M?F#=>tP5;OIe6K+1P&sWESfDLL7PN90fJN!CSZsGbBoe^%PHIHe~rVj=8RLz;FU^W zC6FsWA-Qt2L=wLKXw*31Z&@~r026{t?lzcDwNs7Oaz~RV&SIN5&C4p?vn5k{PY@_> zy1(Lodu0#I$*n~NVYT6a7U+30pN#DeW{Fjkv-x}3)8S1vGz!O&w}12|c1?iRaXod= zw-@KD9{xZg)!~{29~4ntCoGD)0oncq)4>KWiA|mNuC_ONRH(S#B^vu?R=+&C`9NXp zTq$5(VN&?yYvc0QK1(^NW^s9X*+II2@81InBT8NYbp981nUGTYo4_HjjU~tR&o^=* zT0UlR4@0AqTQv3xc)Cq{ji-Emd<&3_d758x?#Tmceh)u9IlQsvu&2Xev&a2XaV7rr zCBo&X6r!QA7xelvi1bHiqNdJHsC`>py$L44g65q(6+D@h*g$x(zEa%5?11zk?Tl4a zT73I6Af7#2E5d+=W(;M(|4^}Hbb=|BlBaPve4FC(qHE~ZM`uX)u!ebMtFD3QE|f5!9qr<0qjuyC!QBIt*3$a(2*3d{NFx@6Ge@!~^4 z0SX!IooFGGxtWSJr4oNVQ*Fy;P^)iI%nw`yAeEH6)RkRX8Tn#w^g9o?8u0y9yL~ePW-$45S z=&P1AXyG9~)Rd>D!0OfG)*lfU+wMH+5O;F?1l&wHoiE8{L5s*gMAo> z`H*&&=?7JKxhFR|Oas>Rw>#!v7aF$VeZCnPOgUSUyRN7CH zHo^*sXa)2I9J}22d)guv;ky2L~nxQcq|~TZhPL zYueTY;nsyd)nH)J?no*}fg%v@U9R)xGJRR@1zN4ShMl0bE4AIx3(@$+;GgDZ@#g&^ zAT=$Fvi?z`^@Vo9f9R3+b^~(QBu%Q`RTtmZ>0~)7q%+0=r^Uhp+pQfW z6umM=n4Oi?Y3a76g7x>eI6w%ep0?oT<~Dn7Veb*v?fPcR;s+uOL^jIR+sPn7uw$Jt))g_tDXR5OTb$x@9WC08d;*cAyYZEykszYM`?)rgC9pCrRd zR9)&;>viOUD~`WnMI~>Wr+3=o^yjIs)r(LX!braru?PA@5eveJvWcy3wj*_^cBCu{ zz5~b7;(iFD_tv{(nd4LmgW;Uv!qFYqK@qIqWd?Og5r;GRlARjY-P4~h*CU06IxM;ZK5HP>14-MlBzA>(S%t2Sj>WQ^}0dDjm=5 z{5_H)PA>U*$jRSA$L9JNm?0md2M3?8z0^C5V*~GQ&{1VUw%G$U&X-WZF7KkJ1XTqeqy5cdg3$mtae(Ks9cuQdxI?tG4<17hXpa9R)&aQY&l?EF^L3Ww3RlNl_ zJ5hkhnzo1#YMqM2&OI)m=VmSNw^(+)j?t++DhCj7rQfBnRfWdezlCbyo3C@yG(rMC zpX1n3mF+qX78%XC3}uai8u(Xi2qtTu5HwpaS|r=Q%7G^3 zcKBAl4@h|wSvQQ<)9!i)?cAqV^TT!JH!?Cpc};x#_D#tS%?LUK^-ZpPsEWq~y$O!E zZU#O=Z$5R9w=0vtMGgHeRvm_uxW;EH(pa-WZ6MGAxI`%N6kbm*F%`jjiB%^`DkLE> z);&5(@(asE5AWjM9TPM}S2sDKFJNk+WLrD=8FBaqJ0t$d(2%<4A3TeHn)3HAvM-&% z!b*SU(YW?zfJs#7#T;}}c-}qYoknsiCy?^f_cVALwBMW3wjRcS2@W~_`{_E2I-Hme zY}OJ$_q4xvL4^TQV3d_bb6&OSM*wp8P&@xY!1PAMs~XG-9a_q&Jj%bo(P;PHC3Ifz z&ce3+T(_|I0$bA9$S*>K#QrN+-#BJ{WkI2Ds^G@$UE)`TON$eCNLts zSkN!=4=wYs;Et!bG#o(CrJ^1(VNtd}{tS zEoQ+JvoIwcv1a}kw3FX>Em2j3JK-hkSsx*9J|35iW&4&Ty`rDQ8a1@#4v%kM-kh!Z zl$j-R?;CVA)S13gLsM7G4%A{JKeEf_FHz5RYUu3c`s3)@$FGQ}dEX8e{=YVzRldJ~<5#yp0t~T#74$;!a~~_gztqt}vfff{B3# z3f)cb2c}*fx*;r)tvBqhfP4ySy&7P%?4W=3 N^vN@|Iu+Z9{{S{6SM&e? diff --git a/public/index.html b/public/index.html index 08bae0f..6e2016f 100644 --- a/public/index.html +++ b/public/index.html @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/public/scripts/app.ba2d32d9.js b/public/scripts/app.ba2d32d9.js new file mode 100644 index 0000000..0f83d9e --- /dev/null +++ b/public/scripts/app.ba2d32d9.js @@ -0,0 +1 @@ +!function(){"use strict";angular.module("app.auth",[])}(),function(){"use strict";angular.module("app.core",["ngAnimate","ngAria","ngCookies","ngMessages","ngResource","ngSanitize","ngMaterial","pascalprecht.translate","ui.router","ui.router.state.events","gridster","ds.clock","angucomplete-alt"])}(),function(){"use strict";function e(e,n){e.state("app.errors_error-404",{url:"/errors/error-404",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-404":{templateUrl:"app/errors/404/error-404.html",controller:"Error404Controller as vm"}},params:{status:404,statusText:"",data:{},config:{}},bodyClass:"error-404"}),n.addPart("app/errors/404")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-404",[]).config(e)}(),function(){"use strict";function e(e,n){e.state("app.errors_error-500",{url:"/errors/error-500",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.errors_error-500":{templateUrl:"app/errors/500/error-500.html",controller:"Error500Controller as vm"}},params:{status:500,statusText:"",data:{},config:{}},bodyClass:"error-500"}),n.addPart("app/errors/500")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.errors.error-500",[]).config(e)}(),function(){"use strict";angular.module("app.errors",["app.errors.error-404","app.errors.error-500"])}(),function(){"use strict";function e(e){e.addPart("app/footer")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.footer",[]).config(e)}(),function(){"use strict";function e(e,n){e.state("app.forgot",{url:"/forgot",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.forgot":{templateUrl:"app/forgot/forgot.html",controller:"ForgotPasswordController as vm"}},bodyClass:"forgot"}),n.addPart("app/forgot")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.forgot",[]).config(e)}(),function(){"use strict";function e(e){e.addPart("app/header")}e.$inject=["$translatePartialLoaderProvider"],angular.module("app.header",[]).config(e)}(),function(){"use strict";angular.module("motion",["angular-toasty","app.core","app.auth","app.navigation","app.toolbar","app.quick-panel","app.header","app.footer","app.dashboards","app.staff","app.contactmanager","app.voice","app.chat","app.mail","app.sms","app.openchannel","app.fax","app.tools","app.callysquare","app.analytics","app.integrations","app.settings","app.motiondialer","app.help","app.jscripty","app.marketplace","app.plugins","app.video","app.whatsapp","app.login","app.forgot","app.reset","app.errors"])}(),function(){"use strict";function e(e,n){e.state("app.login",{url:"/login?token&userId",views:{"main@":{templateUrl:"app/core/layouts/content-only.html",controller:"MainController as vm"},"content@app.login":{templateUrl:"app/login/login.html",controller:"LoginController as vm"}},bodyClass:"login"}),n.addPart("app/login")}e.$inject=["$stateProvider","$translatePartialLoaderProvider"],angular.module("app.login",[]).config(e)}(),function(){"use strict";function e(e,n,t,a){e.state("app.analytics",{abstract:!0,url:"/analytics"}).state("app.analytics.metrics",{url:"/metrics",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/metrics/metrics.html",controller:"MetricsController as vm"}},resolve:{metrics:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?e.resolve("analyticMetric@get",{fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,offset:0}):e.resolve("userProfile@getResources",{id:n.getCurrentUser().userProfileId,section:"Metrics",fields:"createdAt,updatedAt,id,name,table,metric,description",sort:"-updatedAt",limit:10,offset:0})}],userProfile:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfile@get",{fields:"id,name,crudPermissions",id:n.getCurrentUser().userProfileId})}],userProfileSection:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfileSection@get",{fields:"id,name,enabled,includeAll,autoAssociation,crudPermissions",userProfileId:n.getCurrentUser().userProfileId,sectionId:1201})}]},authenticate:!0,permissionId:1201,bodyClass:"analytics"}).state("app.analytics.extractedReports",{url:"/extractedReports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/extractedReports/extractedReports.html",controller:"ExtractedReportsController as vm"}},resolve:{extractedReports:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?e.resolve("analyticExtractedReport@get",{fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,status,output,reportId,reportType",sort:"-updatedAt",limit:10,offset:0}):e.resolve("userProfile@getResources",{id:n.getCurrentUser().userProfileId,section:"ExtractedReports",fields:"createdAt,updatedAt,id,name,basename,savename,type,startDate,endDate,status,output,reportId,reportType",sort:"-updatedAt",limit:10,offset:0})}],userProfile:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfile@get",{fields:"id,name,crudPermissions",id:n.getCurrentUser().userProfileId})}],userProfileSection:["apiResolver","Auth",function(e,n){return n.hasRole("admin")?null:e.resolve("userProfileSection@get",{fields:"id,name,enabled,includeAll,autoAssociation,crudPermissions",userProfileId:n.getCurrentUser().userProfileId,sectionId:1202})}]},authenticate:!0,permissionId:1202,bodyClass:"analytics"}),n.addPart("app/main/apps/analytics")}e.$inject=["$stateProvider","$translatePartialLoaderProvider","msApiProvider","msNavigationServiceProvider"],angular.module("app.analytics",["ngCsv","ngPassword","md.data.table","flow","mdColorPicker","ckeditor","ng-sortable","ngAria","ngAnimate","mdPickers","mwFormBuilder","mwFormViewer","mwFormUtils","ngclipboard","angular-cron-jobs","ngEmbed","angularMaterialFormBuilder","material.components.expansionPanels","chart.js","angular.filter","app.analytics.reports"]).config(e)}(),function(){"use strict";function e(e){e.state("app.analytics.reports",{url:"/reports",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/reports.html",controller:"ReportsController as vm"}},resolve:{treeReports:["apiResolver",function(e){return e.resolve("analyticTreeReport@get",{fields:"id,tree",limit:10,offset:0})}],userProfile:["apiResolver","Auth",function(e,n){return e.resolve("userProfile@get",{fields:"id,name,crudPermissions",id:n.getCurrentUser().userProfileId})}],userProfileSection:["apiResolver","Auth",function(e,n){return e.resolve("userProfileSection@get",{fields:"id,name,enabled,includeAll,autoAssociation,crudPermissions",userProfileId:n.getCurrentUser().userProfileId,sectionId:1203})}]},authenticate:!0,permissionId:1203,bodyClass:"analytics"}).state("app.analytics.reports.edit",{url:"/:id?tab",views:{"content@app":{templateUrl:"app/main/apps/analytics/views/reports/edit/view.html",controller:"ReportController as vm"}},resolve:{report:["apiResolver","$stateParams","$q","describeTable",function(e,n,a,i){var s;return e.resolve("analyticCustomReport@get",{fields:"createdAt,updatedAt,id,name,description,table,conditions,joins",id:n.id}).then(function(e){var n=[];if((s=e).joins)try{s.joins=JSON.parse(s.joins);for(var t=0;t');a.append(n),o(function(){!function(e,n){var t=n.find("code"),a=e.split("\n"),i=(a=a.filter(function(e){return e.trim().length}))[0].match(/^\s*/)[0],s=new RegExp("^"+i);a=a.map(function(e){return e.replace(s,"").replace(/\s+$/,"")});var o=hljs.highlight(r.language||r.lang,a.join("\n"),!0);o.value=o.value.replace(/=""<\/span>/gi,"").replace("","").replace("",""),t.append(o.value).addClass("highlight")}(e,n)},34,!1)}})}}}}e.$inject=["$timeout","$q","$interpolate"],angular.module("app.core").directive("hljs",e)}(),function(){"use strict";function e(a,i,s,o){var r=this;function n(){var a=r.selectedField.options&&!_.isEmpty(r.selectedField.options.extraOperators),i=r.selectedField.options&&!_.isEmpty(r.selectedField.options.excludedOperators);r.availableOperators=_.filter(r.operators,function(n){var e=!n.applyTo||_.includes(n.applyTo,r.selectedField.type);n.isExtra=a&&_.some(r.selectedField.options.extraOperators,function(e){return e===n.type});var t=_.includes(n.excludeFrom,r.selectedField.type)||i&&_.includes(r.selectedField.options.excludedOperators,n.type);if((e||n.isExtra)&&!t)return n})}function t(){!r.value||_.isArray(r.value)&&_.isEmpty(r.value)?r.isValidCondition=!1:r.selectedOperator&&"$between"===r.selectedOperator.type?r.isValidCondition=!(!r.endRangeValue||!r.isValidRange):r.isValidCondition=!0}function e(){"number"===r.selectedField.type?_.isNumber(r.endRangeValue)?r.isValidRange=Number(r.endRangeValue)>Number(r.value):r.isValidRange=!0:"date"===r.selectedField.type&&(r.maxDateRange=moment(r.endRangeValue).subtract(1,"day"),r.isValidRange=!0),t()}function l(){var e=c();r.options.conditions.push(e),u()}function d(){var e=c(),n=_.findIndex(r.options.conditions,"style");r.options.conditions.splice(n,1,e),u(),r.pendingCondition.style=null,r.pendingCondition=void 0}function c(){return{name:r.selectedField.name,operator:a.instant("DASHBOARDS."+r.selectedOperator.translate),value:r.value,endValue:r.endRangeValue,displayValue:m(r.value),displayEndValue:m(r.endRangeValue),query:{column:r.selectedField.column,operator:r.selectedOperator.type,value:function(){var e,n=r.value,t=r.endRangeValue;switch(r.selectedField.type){case"date":var a=moment(n).utcOffset(0,!0).format("YYYY-MM-DD");if("$between"===r.selectedOperator.type){var i=moment(t).utcOffset(0,!0).format("YYYY-MM-DD");e=[a,i]}else e=a;break;case"number":e="$between"===r.selectedOperator.type?[n,t]:n;break;case"multiselect":var s=r.selectedField.options.field||"id";e=_.map(n,s);break;case"select":e=n.id;break;case"autocomplete":e=r.selectedOperator.isExtra?n:n.id;break;default:e=n}return e}()},disabled:!1}}function m(e){var n;if(e){switch(r.selectedField.type){case"date":n=moment(e).format("YYYY-MM-DD");break;case"multiselect":var t=_.map(e,function(e){return e.name});n="$eq"===r.selectedOperator.type?t.join(" or "):t.join(" and ");break;case"select":n=e.name;break;case"autocomplete":n=r.selectedOperator.isExtra?e:e.displayValue;break;default:n=e}return n}}function u(){r.value=null,r.endRangeValue=null,r.minDateRange=null,r.maxDateRange=null,r.isValidCondition=!1}r.operators=r.availableOperators=[{type:"$eq",symbol:"=",translate:"EQUALS",excludeFrom:["multiselect"]},{type:"$ne",symbol:"≠",translate:"IS_NOT_EQUAL",excludeFrom:["multiselect"]},{type:"$in",symbol:"∈",translate:"IS_AMONG",applyTo:["multiselect"]},{type:"$notIn",symbol:"∉",translate:"IS_NOT_AMONG",applyTo:["multiselect"]},{type:"$substring",symbol:"⊃",translate:"CONTAINS",applyTo:["text"]},{type:"$startsWith",symbol:"a..",translate:"STARTS_WITH",applyTo:["text"]},{type:"$endsWith",symbol:"..a",translate:"ENDS_WITH",applyTo:["text"]},{type:"$lt",symbol:"<",translate:"IS_LESS_THAN",applyTo:["date","number"]},{type:"$gt",symbol:">",translate:"IS_GREATER_THAN",applyTo:["date","number"]},{type:"$lte",symbol:"≤",translate:"IS_LESS_THAN_OR_EQUAL_TO",applyTo:["date","number"]},{type:"$gte",symbol:"≥",translate:"IS_GREATER_THAN_OR_EQUAL_TO",applyTo:["date","number"]},{type:"$between",symbol:"≬",translate:"IS_BETWEEN",applyTo:["date","number"]}],r.addCondition=l,r.editCondition=function(e){r.pendingCondition=e,r.pendingCondition.style="md-amber-200-bg",r.selectedField=_.find(r.options.fields,["name",r.pendingCondition.name]),n(),r.selectedOperator=_.find(r.availableOperators,["type",r.pendingCondition.query.operator]),"date"===r.selectedField.type&&"string"==typeof r.pendingCondition.value?(r.value=new Date(r.pendingCondition.value),r.minDateRange=moment(r.value).add(1,"day"),r.endRangeValue=r.pendingCondition.endValue?new Date(r.pendingCondition.endValue):void 0):(r.value=r.pendingCondition.value,r.endRangeValue=r.pendingCondition.endValue);r.isValidRange=!0,r.isValidCondition=!0},r.updateCondition=d,r.cancelUpdateCondition=function(){r.pendingCondition.style=null,r.pendingCondition=void 0},r.setConditionStatus=function(e){e.style=e.disabled?void 0:"chip-disabled",e.disabled=!e.disabled},r.removeCondition=function(){_.isEmpty(r.options.conditions)&&r.clearFilter()},r.getValues=function(){var n=angular.copy(r.selectedField.options.route);if("autocomplete"===r.selectedField.type)for(var e=0;e',compile:function(e){return e.addClass("ms-card"),function(e,n){e.cardTemplateLoaded=function(){e.$emit("msCard::cardTemplateLoaded",n)}}}}})}(),function(){"use strict";angular.module("app.core").directive("msChipColor",function(){return{restrict:"A",link:function(e,i,n){n.$observe("msChipColor",function(e){var n=i.parent().parent();if(n.hasClass("md-background-bg md-hue-3")||n.addClass("md-background-bg md-hue-3"),_.isEmpty(e)){var t=n[0].className.split(" "),a=t.indexOf("md-hue-3");t.length=a+1,n[0].className=t.join(" ")}else n.addClass(e)})}}})}(),function(){"use strict";angular.module("app.core").directive("msClickToCall",function(){return{restrict:"E",scope:{type:"=",disabled:"=",target:"=",prefix:"=",license:"="},controller:["$scope","$rootScope","$http","$translate","$document","$mdDialog","Auth","toasty","api",function(t,n,a,i,s,o,e,r,l){function d(e){switch(t.currentUser.showWebBar){case 0:return m("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/originate/"+c(e));case 2:return n.$broadcast("webrtc::call",{target:c(e)})}}function c(e){return _.isNil(e)?"":e.replace(/[^\w.+#*\-]+/g,"")}function m(e){return a.get(e).success(function(){r.success({title:"Successful call",msg:"Call properly handled!"})}).error(function(e){r.error({title:"PhoneBar API Error",msg:i.instant("CONTACTMANAGER.ERRORS.PHONEBAR_API")})})}t.currentUser=e.getCurrentUser(),t.showMenu=function(){return t.target&&t.target.indexOf("@")<0&&t.target!=t.currentUser.internal&&t.target!=t.currentUser.name&&(0==t.currentUser.showWebBar&&t.currentUser.phoneBarRemoteControl||2==t.currentUser.showWebBar&&t.license.webrtc)&&!t.disabled},t.call=function(e){return 2!==t.currentUser.showWebBar?(n=e,l.user.getVoicePrefixes({id:t.currentUser.id}).$promise.then(function(e){if(e.count)return o.show({controller:"PrefixDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/prefix/dialog.html",parent:angular.element(s.body),clickOutsideToClose:!0,locals:{prefixes:e,required:t.currentUser.phoneBarPrefixRequired}})}).then(function(e){t.currentUser.phoneBarPrefixRequired?e&&-1!==e&&d(e+n):e&&-1!==e?d(e+n):e||d(n)})):d(e);var n},t.transfer=function(e){switch(t.currentUser.showWebBar){case 0:return m("http://127.0.0.1:"+(t.currentUser.phoneBarRemoteControlPort||"9888")+"/api/transfer?number="+c(e));case 2:n.$broadcast("webrtc::transfer",{target:c(e)})}}}],templateUrl:"app/core/directives/ms-click-to-call/ms-click-to-call.html"}})}(),function(){"use strict";function e(i){return{require:"ngModel",priority:1,link:function(e,n,t,a){a.$formatters.push(i.formatter),a.$parsers.push(i.parser)}}}e.$inject=["msDatepickerFixConfig"],angular.module("app.core").provider("msDatepickerFixConfig",function(){var n={formatter:function(e){return e?""===e?e:new Date(e):""},parser:function(e){return e?moment(e).add(moment(e).utcOffset(),"m").toDate():""}};this.config=function(e){n=angular.extend({},n,e)},this.$get=function(){return n}}).directive("msDatepickerFix",e)}(),function(){"use strict";function e(s){return{restrict:"E",scope:{id:"=",model:"=",element:"=",title:"=",path:"="},replace:!0,link:function(n,e){var t=!1,a={};a.id=n.id,_.isNil(n.path)||(a.path=n.path);var i=document.createElement(n.element);i.setAttribute("preload","none"),i.setAttribute("controls","true"),"audio"===n.element&&i.setAttribute("style","width: 265px;"),"video"===n.element&&i.setAttribute("style","max-width: 500px;"),i.setAttribute("title",n.title),i.setAttribute("src"," "),i.onplay=function(e){t||(t=!0,e.preventDefault(),s[n.model].download(a).$promise.then(function(e){var n=[e.buffer],t=new Blob(n,{type:e.type});i.setAttribute("type",e.type),i.setAttribute("src",URL.createObjectURL(t)),i.play()}).catch(function(e){console.error(e)}))},e.append(i)}}}e.$inject=["api"],angular.module("app.core").directive("msDialogRecording",e)}(),function(){"use strict";function e(i){return{restrict:"A",link:function(t,a){a.bind("click",function(e){var n=i('
')(t);a.closest("md-dialog").prepend(n)})}}}e.$inject=["$compile"],angular.module("app.core").directive("msDialogSpinner",e)}(),function(){"use strict";angular.module("app.core").directive("msDualMultiselect",function(){return{restrict:"E",scope:{options:"="},controller:["$scope",function(o){o.canTransfer=function(e,n,t){if(!n.readOnly)return void 0!==e.isValid&&e.isValid?t?o.transfer(n.selectedItems,n.items,n.selectedItems.indexOf(e),t):o.transfer(n.items,n.selectedItems,n.items.indexOf(e),t):void 0},o.transfer=function(e,n,t,a){var i=[];if(0<=t)i.push(e[t]),n.push(e[t]),e.splice(t,1);else{for(var s=0;s',link:function(t,e){var n=e.emojioneArea({pickerPosition:t.pickerPosition,search:t.search,recentEmojis:t.recentEmojis,placeholder:a.instant(t.placeholder||"Type a message"),attributes:{spellcheck:!0},events:{keypress:function(e,n){t.ngModel=this.getText(),t.onReply({event:n,body:this.getText()})},emojibtn_click:function(){t.ngModel=this.getText()}}});t.ngModel&&n[0].emojioneArea.setText(t.ngModel),t.internalControl=t.ctrlMethods||{},t.internalControl.setText=function(e){n[0].emojioneArea.setText(e)},t.internalControl.getText=function(){return n[0].emojioneArea.getText()},t.$watch("ngModel",function(e){e||n[0].emojioneArea.setText("")})}}}e.$inject=["$translate"],angular.module("app.core").directive("msEmojiArea",e)}(),function(){"use strict";angular.module("app.core").directive("msFontFamily",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.fonts=[{option:"Arial",value:"Arial,Helvetica,sans-serif"},{option:"Century Gothic",value:"Century Gothic,Futura,Didact Gothic,san-serif"},{option:"Calibri",value:"Calibri, Verdana, Geneva, sans-serif"},{option:"Comic Sans MS",value:"Comic Sans MS,cursive"},{option:"Courier New",value:"Courier New,Courier,monospace"},{option:"Georgia",value:"Georgia,serif"},{option:"Lucida Sans Unicode",value:"Lucida Sans Unicode,Lucida Grande,sans-serif"},{option:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{option:"Times New Roman",value:"Times New Roman,Times,serif"},{option:"Trebuchet MS",value:"Trebuchet MS,Helvetica,sans-serif"},{option:"Verdana",value:"Verdana,Geneva,sans-serif"}]}],templateUrl:"app/core/directives/ms-font-family/ms-font-family.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsFormWizardController",function(){var n=this;function e(){return n.forms.length}function t(){return 0===n.selectedIndex}function a(){return n.selectedIndex===e()-1}n.forms=[],n.selectedIndex=0,n.registerForm=function(e){n.forms.push(e)},n.previousStep=function(){if(t())return;n.selectedIndex--},n.nextStep=function(){if(a())return;n.selectedIndex++},n.firstStep=function(){n.selectedIndex=0},n.lastStep=function(){n.selectedIndex=e()-1},n.totalSteps=e,n.isFirstStep=t,n.isLastStep=a,n.currentStepInvalid=function(){return angular.isDefined(n.forms[n.selectedIndex])&&n.forms[n.selectedIndex].$invalid},n.previousStepInvalid=function(){return 0d.options.responsive.md?d.options.responsive.md:d.columnCount:l("sm")?d.columnCount=d.columnCount>d.options.responsive.sm?d.options.responsive.sm:d.columnCount:d.columnCount=d.options.responsive.xs;d.columnWidth=d.containerPos.width/d.columnCount}(),r.$broadcast("msMasonry:relayoutStarted"),d.items=d.container.find("ms-masonry-item");for(var e=Array.apply(null,new Array(d.columnCount)).map(function(){return 0}),n=0;n'),r=angular.element('
'),l=n.parent();function d(){s.addClass("ms-nav-folded"),g.$broadcast("msNav::forceCollapse"),n.scrollTop(0),l.append(o),o.on("mouseenter touchstart",function(e){c(e),i=!0})}function c(e){angular.isDefined(e)&&e.preventDefault(),s.addClass("ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),l.find(o).remove(),l.parent().append(r),r.on("mouseenter touchstart",function(e){m(e),i=!1})}function m(e){angular.isDefined(e)&&e.preventDefault(),g.$broadcast("msNav::forceCollapse"),n.scrollTop(0),s.removeClass("ms-nav-folded-open"),l.parent().find(r).remove(),l.append(o),o.on("mouseenter touchstart",function(e){c(e),i=!0})}function u(){s.removeClass("ms-nav-folded ms-nav-folded-open"),g.$broadcast("msNav::expandMatchingToggles"),n.off("mouseenter mouseleave")}v.setFoldable(e,n,a),a?d():u(),e.toggleFold=function(){(a=!a)?d():u()},e.openFolded=c,e.closeFolded=m,e.isNavFoldedOpen=function(){return i},e.$on("$destroy",function(){o.off("mouseenter touchstart"),r.off("mouseenter touchstart"),n.off("mouseenter mouseleave")})}}}function n(t,a,i){return{restrict:"E",scope:{},controller:"MsNavController",compile:function(e){return e.addClass("ms-nav"),function(e){t.$broadcast("msNav::expandMatchingToggles");var n=t.$on("$stateChangeSuccess",function(){t.$broadcast("msNav::expandMatchingToggles"),a.when("navigation").then(function(e){e.close(),i.isNavFoldedOpen()&&i.closeFolded()})});e.$on("$destroy",function(){n()})}}}}function t(m,u,p,g){return{restrict:"A",require:"^msNav",scope:!0,compile:function(e,n){return e.addClass("ms-nav-toggle"),angular.isUndefined(n.collapsed)&&(n.collapsed=!0),e.attr("collapsed",n.collapsed),function(a,i,e,t){var s={expanded:"expanded",expandAnimation:"expand-animation",collapseAnimation:"collapse-animation"},n=i.find("a"),o=[],r=/\(.*\)/g;function l(){return"true"===i.attr("collapsed")}function d(){var e=u.defer();if(!l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!1);var n=angular.element(i.find("ms-nav-toggle-items")[0]);n.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var t=n[0].offsetHeight;return n.css({position:"",visibility:"",display:"",height:""}),a.$evalAsync(function(){p.animate(n,{display:"block",height:"0px"},{height:t+"px"},s.expandAnimation).then(function(){n.addClass(s.expanded),n.css({height:""}),e.resolve({success:!0})})}),e.promise}function c(){var e=u.defer();if(l())return e.reject({error:!0}),e.promise;i.attr("collapsed",!0);var n=angular.element(i.find("ms-nav-toggle-items")[0]),t=n[0].offsetHeight;return a.$evalAsync(function(){p.animate(n,{height:t+"px"},{height:"0px"},s.collapseAnimation).then(function(){n.removeClass(s.expanded),n.css({display:"",height:""}),e.resolve({success:!0})})}),e.promise}angular.forEach(n,function(e){var n=angular.element(e).attr("ui-sref");angular.isUndefined(n)||(n=n.replace(r,""),o.push(n))}),t.setToggleItem(i,a),i.children(".ms-nav-button").on("click",function(){if(t.isDisabled())return;t.disable(),l()?(t.clearLockedItems(),a.$emit("msNav::pushToLockedList"),m.$broadcast("msNav::collapse"),d().then(function(){t.enable()})):a.$broadcast("msNav::forceCollapse")}),a.$on("$destroy",function(){i.children(".ms-nav-button").off("click")}),a.$on("msNav::collapse",function(){var e=t.getLockedItems(),n=!1;angular.forEach(e,function(e){angular.equals(e.scope,a)&&(n=!0)}),n||c().then(function(){t.enable()})}),a.$on("msNav::forceCollapse",function(){c().then(function(){t.enable()})}),a.$on("msNav::expandMatchingToggles",function(){var n=g.current.name,t=!1;angular.forEach(o,function(e){n===e&&(t=!0)}),t?d():c()}),a.$on("msNav::pushToLockedList",function(){t.setLockedItem(i,a)})}}}}e.$inject=["$document","$rootScope","msNavFoldService"],n.$inject=["$rootScope","$mdComponentRegistry","msNavFoldService"],t.$inject=["$rootScope","$q","$animate","$state"],angular.module("app.core").factory("msNavFoldService",function(){var t={};return{setFoldable:function(e,n){t={scope:e,element:n}},isNavFoldedOpen:function(){return t.scope.isNavFoldedOpen()},toggleFold:function(){t.scope.toggleFold()},openFolded:function(){t.scope.openFolded()},closeFolded:function(){t.scope.closeFolded()}}}).directive("msNavIsFolded",e).controller("MsNavController",function(){var e=this,n=!1,t=[],a=[];e.isDisabled=function(){return n},e.enable=function(){n=!1},e.disable=function(){n=!0},e.setToggleItem=function(e,n){t.push({element:e,scope:n})},e.getLockedItems=function(){return a},e.setLockedItem=function(e,n){a.push({element:e,scope:n})},e.clearLockedItems=function(){a=[]}}).directive("msNav",n).directive("msNavTitle",function(){return{restrict:"A",compile:function(e){return e.addClass("ms-nav-title"),function(){}}}}).directive("msNavButton",function(){return{restrict:"AE",compile:function(e){return e.addClass("ms-nav-button"),function(){}}}}).directive("msNavToggle",t)}(),function(){"use strict";function e(e,n){e.root?this.navigation=n.getNavigation(e.root):this.navigation=n.getNavigation(),this.toggleHorizontalMobileMenu=function(){angular.element("body").toggleClass("ms-navigation-horizontal-mobile-menu-active")},n.sort()}function n(c,m,u,p){return{restrict:"E",scope:{folded:"=",root:"@"},controller:"MsNavigationController as vm",templateUrl:"app/core/directives/ms-navigation/templates/vertical.html",transclude:!0,compile:function(e){return e.addClass("ms-navigation"),function(e,n){var t=angular.element("body"),a=angular.element('
'),i=angular.element('
'),s=u("navigation");function o(e){if(p.setFolded(e),e)c.$broadcast("msNavigation::collapse"),t.addClass("ms-navigation-folded"),r();else{var n=p.getActiveItem();n&&n.scope.$emit("msNavigation::stateMatched"),t.removeClass("ms-navigation-folded ms-navigation-folded-open"),i.remove()}}function r(){n.parent().append(a),m(function(){a.on("mouseenter touchstart",l)})}function l(e){e&&e.preventDefault(),p.setFoldedOpen(!0);var n=p.getActiveItem();n&&n.scope.$emit("msNavigation::stateMatched"),t.addClass("ms-navigation-folded-open"),a.remove(),t.find("#main").append(i),i.on("mouseenter touchstart",d)}function d(e){e&&e.preventDefault(),p.setFoldedOpen(!1),c.$broadcast("msNavigation::collapse"),t.removeClass("ms-navigation-folded-open"),i.remove(),r()}p.setNavigationScope(e),function(){null===p.getFolded()&&p.setFolded(e.folded);p.getFolded()&&(m(function(){c.$broadcast("msNavigation::collapse")}),t.addClass("ms-navigation-folded"),r())}(),e.$watch(function(){return s.isLockedOpen()},function(e,n){if(!angular.isUndefined(e)&&!angular.equals(e,n)&&p.getFolded())if(e)c.$broadcast("msNavigation::collapse");else{var t=p.getActiveItem();t&&t.scope.$emit("msNavigation::stateMatched")}}),e.$watch("folded",function(e,n){angular.isUndefined(e)||angular.equals(e,n)||o(e)}),e.toggleFolded=function(){o(!p.getFolded())},e.$on("$stateChangeStart",function(){s.close()}),e.$on("$destroy",function(){i.off("mouseenter touchstart"),a.off("mouseenter touchstart")})}}}}function t(t,e,a,i,n,s){var o=this;o.element=e,o.node=t.node,o.hasChildren=void 0,o.collapsed=void 0,o.collapsable=void 0,o.group=void 0,o.animateHeightClass="animate-height",o.toggleCollapsed=function(){o.collapsed?o.expand():o.collapse()},o.collapse=function(){var e=o.element.children("ul"),n=e[0].offsetHeight;t.$evalAsync(function(){o.collapsed=!0,o.element.addClass("collapsing"),i.animate(e,{display:"block",height:n+"px"},{height:"0px"},o.animateHeightClass).then(function(){e.css({display:"",height:""}),o.element.removeClass("collapsing")}),t.$broadcast("msNavigation::collapse")})},o.expand=function(){var e=o.element.children("ul");e.css({position:"absolute",visibility:"hidden",display:"block",height:"auto"});var n=e[0].offsetHeight;e.css({position:"",visibility:"",display:"",height:""}),t.$evalAsync(function(){o.collapsed=!1,o.element.addClass("expanding"),i.animate(e,{display:"block",height:"0px"},{height:n+"px"},o.animateHeightClass).then(function(){e.css({height:""}),o.element.removeClass("expanding")}),a.$broadcast("msNavigation::collapse",o.node._path)})},o.getClass=function(){return o.node.class},o.isHidden=function(){if(angular.isDefined(o.node.hidden)&&angular.isFunction(o.node.hidden))return o.node.hidden();return!1},function(){o.hasChildren=0 target, inbound, fullname",e,n,t),b.calls.unshift({target:e,fullname:t||e,inbound:n,time:moment().format("HH:mm")}),50 session",e),b.conf.microphoneId?b.sessionConf.mediaConstraints.audio={deviceId:b.conf.microphoneId}:b.sessionConf.mediaConstraints.audio=!0,e.answer(b.sessionConf),b.isJabraEnabled&&(jabra.offHook(),b.jabraSession=e)}function S(e,n){console.debug("terminate -> session",e);var t={};if(n?t.status_code=n:e.isEstablished()||(t.status_code=603),e.terminate(t),b.isJabraEnabled)if(0===b.sessions.length)e.localHold&&jabra.resume(),jabra.onHook(),b.jabraSession=null;else{var a=_.last(b.sessions);a.localHold?(jabra.onHook(),jabra.hold(),b.jabraSession=a):jabra.offHook()}}function T(t){return console.debug("getVoiceChannels -> session",t),o.rpc.getVoiceChannels().$promise.then(function(e){var n=_.find(e.rows,function(e){return e.sipcalllinkedid===t.call_id?e:e.sipcalluniqueid===t.call_id?e:null});n&&(t.monitor=n.monitor,t.uniqueid=n.uniqueid,t.monitors=n.monitors)})}function I(e){console.debug("onAddstream -> data",e),this.remotePlayer.srcObject=e.stream,this.remotePlayer.play()}function C(){b.canGoInConference=!1,b.isInConference=!1,b.currentconferenceSessions=[]}function w(e,n){switch(e){case"ringing":b.soundPlayer.muted=b.conf.ringingMute,b.conf.ringingId&&b.soundPlayer.setSinkId(b.conf.ringingId).then(function(){b.soundPlayer.volume=b.conf.ringingVolume}).then(function(){n&&A()}).catch(function(e){console.info(e.message,b.conf.ringingId)});break;case"speaker":b.remotePlayer.muted=b.conf.speakerMute,b.conf.speakerId&&b.remotePlayer.setSinkId(b.conf.speakerId).then(function(){b.remotePlayer.volume=b.conf.speakerVolume}).then(function(){n&&A()}).catch(function(e){console.info(e.message,b.conf.speakerId)});break;case"microphone":for(var t=0;t session, textContent, position, delay",e,n,t,a),function(){i.show(i.simple().textContent(n).position(t).hideDelay(a)),S(e)}}function N(n){return console.debug("findSessionBySessionId -> sessionId, vm_pb.sessions",n,b.sessions),_.find(b.sessions,function(e){return e.call_id==n})}function D(e,n){return console.debug("callCallback -> url, params",e,n),s({url:e,method:"GET",params:n})}e(function(){},999),b.direction="right",b.selectedMode="md-scale",b.target="",b.showDialpad=!1,b.soundPlayer=document.createElement("audio"),b.remotePlayer=document.getElementById(b.conf.remotePlayerId),b.soundPlayer.volume=1,b.sessionConf={mediaConstraints:{audio:!0,video:!1},pcConfig:{iceServers:[]}},b.sessions=[],b.calls=[],b.callbackQueue=[],b.canGoInConference=!1,b.isInConference=!1,b.currentConferenceSessions=[],b.ua=new JsSIP.UA({sockets:[new JsSIP.WebSocketInterface("wss://"+b.conf.host+":8089/ws")],uri:new JsSIP.URI("sip",b.conf.name,b.conf.host,5060,null,null).toString(),authorization_user:b.conf.name,ha1:b.conf.ha1,realm:b.conf.realm,user_agent:b.conf.ua,session_timers_refresh_method:"invite",register_expires:b.conf.phoneBarExpires||60,register:!0}),b.conf=_.merge(d.webrtc,b.conf),b.initDeviceInProgress=!1,b.isJabraEnabled=!1,b.isJabraInitialized=!1,b.jabraSession=null,b.jabraClicked=!1,b.buttonClicked=!1,b.originateInProgress=!1,t.bind("keyup",function(e){switch(e.keyCode){case 27:p(function(){b.showDialpad=!1})}}),b.$onInit=function(){c(!1),navigator.mediaDevices.ondevicechange=function(e){b.initDeviceInProgress||(b.initDeviceInProgress=!0,jabra&&b.isJabraInitialized?jabra.shutdown().then(function(){b.isJabraInitialized=!1,c(!(b.isJabraEnabled=!1))}).catch(function(e){console.error("Unable to shutdown Jabra library",e)}):c(!0))};var e=[o.network.get({type:"turn",nolimit:!0}).$promise,o.network.get({type:"stun",nolimit:!0}).$promise];Promise.all(e).then(function(e){var n=e[0].rows,t=e[1].rows,a=[],i=[];t.forEach(function(e){i.push("stun:"+e.value)}),a.push({urls:i}),n.forEach(function(e){var n={urls:"turn:"+e.value};e.username&&(n.username=e.username),e.password&&(n.credential=e.password),a.push(n)}),b.sessionConf.pcConfig={iceServers:a}}),this.ua.on("registered",function(){this.registered=!0}.bind(this)),this.ua.on("unregistered",function(){this.registered=!1}.bind(this)),this.ua.on("newRTCSession",function(e){console.debug("onNewRTCSession -> data",e);var n,t,a,i,s,o=e.session,r=!0,l="",d=0;switch(e.originator){case"local":o.outgoing=!0,o.name=e.request.ruri.user,o.user=e.request.ruri.user,E(o.user,!1),t=e.request.extraHeaders,a="X-callback-url",s=_.find(t,function(e){return _.startsWith(e,a)}),n=!!s&&_.trim(s.replace(a,"").replace(i||":","")),b.isJabraEnabled&&(b.jabraSession&&jabra.resume(),b.jabraSession=o,jabra.offHook());break;case"remote":var c=f.getCurrentUser();if(c.voicePause&&c.phoneBarDnd||b.originateInProgress)r=!1;else if(o.incoming=!0,o.name=e.request.from.display_name,o.user=e.request.from.uri.user,l=e.request.getHeader("X-Answer-Mode")||"",d=e.request.getHeader("X-Answer-After")||0,function(n){console.debug("getNotification -> session",n);var e=n.name?n.name+" <"+n.user+">":n.user;h.create("Incoming call from: ",e,null,function(){y(n)},function(){S(n)}).then(function(e){n.notification=e}).catch(function(e){console.error("Error creating notification for incoming call",e)})}(e.session),E(e.session.user,!0),b.isJabraEnabled&&jabra.ring(),b.conf.autoAnswer&&p(function(){o.isInProgress()&&(o.autoAnswer=!0,y(o))},b.conf.autoAnswerDelay?1e3*b.conf.autoAnswerDelay:0),console.debug("xAnswerMode",l),console.debug("xAnswerAfterSec",d),"auto"==l.toLowerCase()){var m=0==d?500:1e3*d;console.debug("auto answer enabled after:"+m+" ms"),p(function(){o.isInProgress()&&(o.autoAnswer=!0,y(o))},m)}}r?(o.call_id=e.request.call_id,n&&D(b.callbackQueue[o.call_id]=n,{call_id:o.call_id}).then(function(){console.log('callbackurl:"'+n+'" called successfully')}).catch(function(e){console.log('fail callbackurl:"'+n+'" err:',e)}),o.connection&&(o.connection.onaddstream=I.bind(this)),o.iceCandidateTimeout=null,o.on("progress",function(e,n){console.debug("onProgress -> session, data",e,n);var t=!1;switch(n.originator){case"local":this.conf.ringingMute||(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/incoming-call.ogg"),t=!0);break;case"remote":this.putOtherCallsOnHold(e),this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/outgoing-call.ogg"),t=!0}b.originateInProgress&&(b.originateInProgress=!1),t&&(this.soundPlayer.loop="loop",this.soundPlayer.play().catch(function(e){console.log(e.message)})),T(e).then(function(){var n=b.callbackQueue[e.call_id];n&&D(n,{uniqueid:e.uniqueid,call_id:e.call_id,number_called:e.user}).then(function(){console.log('callbackurl:"'+n+'" called successfully')}).catch(function(e){console.log('fail callbackurl:"'+n+'" err:',e)}).finally(function(){delete b.callbackQueue[e.call_id]})}).catch(function(e){console.error("Unable to retrieve voice channels",e)})}.bind(this,o)),o.on("confirmed",function(e,n){console.debug("onConfirmed -> session, data",e,n);var t=document.getElementById("div_session_"+e.id.substr(0,32));t&&$(t).scope().$broadcast("timer-start"),e.confirmed=!0,"remote"===n.originator&&e.connection&&(e.connection.onaddstream=I.bind(this),_.head(e.connection.getRemoteStreams())&&(this.remotePlayer.srcObject=_.head(e.connection.getRemoteStreams()),this.remotePlayer.play())),this.soundPlayer.pause(),this.soundPlayer.loop=null,this.putOtherCallsOnHold(e),e.autoAnswer&&(this.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/beep.ogg"),this.soundPlayer.play().catch(function(e){console.log("Unable to play autoAnswer notification",e)})),b.canGoInConference=2==b.sessions.length,T(e).catch(function(e){console.error("Unable to retrieve voice channels",e)})}.bind(this,o)),o.on("hold",function(e,n){console.debug("onHold -> session, data",e,n),"local"===n.originator&&(e.localHold=!0)}.bind(this,o)),o.on("unhold",function(e,n){console.debug("onUnhold -> session, data",e,n),"local"===n.originator&&(e.localHold=!1)}.bind(this,o)),o.on("ended",function(e,n){if(console.debug("onEnded -> session, data",e,n),b.isInConference&&_.includes(b.currentConferenceSessions,e.id)&&(C(),b.buttonClicked=!0),_.remove(this.sessions,{id:e.id}),2!==b.sessions.length&&(b.canGoInConference=!1),b.isJabraEnabled)if(0===b.sessions.length)e.localHold&&jabra.resume(),jabra.onHook(),b.jabraSession=null;else{var t=_.last(b.sessions);t.localHold?(jabra.onHook(),jabra.hold(),b.jabraSession=t):jabra.offHook()}}.bind(this,o)),o.on("failed",function(e,n){if(console.debug("onFailed -> session, data",e,n),this.soundPlayer.pause(),this.soundPlayer.loop=null,e.notification&&e.notification.close(),b.isInConference&&_.includes(b.currentConferenceSessions,e.id)&&C(),b.originateInProgress&&(b.originateInProgress=!1),_.remove(this.sessions,{id:e.id}),2!==b.sessions.length&&(b.canGoInConference=!1),b.isJabraEnabled)if(0===b.sessions.length)e.localHold&&jabra.resume(),jabra.onHook(),b.jabraSession=null;else{var t=_.last(b.sessions);t.localHold?(jabra.onHook(),jabra.hold(),b.jabraSession=t):jabra.offHook()}}.bind(this,o)),o.on("icecandidate",function(e,n){console.debug("onIcecandidate -> session, data",e,n),null!==e.iceCandidateTimeout&&clearTimeout(e.iceCandidateTimeout),e.iceCandidateTimeout=setTimeout(n.ready,1e3)}.bind(this,o)),b.sessions.push(o),p(function(){u.$apply(),console.debug("onNewRTCSession -> vm_pb.sessions",b.sessions)})):S(o,486)}.bind(this)),r.on("webbar:originate",function(e){console.debug("originateHook -> payload",e);var n=e.callNumber,t=e.callerId,a=e.callbackUrl;b.conf.microphoneId?b.sessionConf.mediaConstraints.audio={deviceId:b.conf.microphoneId}:b.sessionConf.mediaConstraints.audio=!0;var i=n.replace(/ /g,"");if(i=(i=i.replace(/\(/g,"")).replace(/\)/g,"")){var s=angular.copy(b.sessionConf);s.extraHeaders=[],t&&s.extraHeaders.push("X-CID: "+t),a&&s.extraHeaders.push("X-callback-url: "+a),b.originateInProgress=!0,b.ua.call(i,s)}}.bind(this)),r.on("webbar:hangup",function(e){console.debug("hangupHook -> payload",e);var n=b.sessions;if(e.sessionId&&((n=[]).push(N(e.sessionId)),0==n.length))console.warn("call with session Id "+sessionId+" not found");else for(var t=0;t sessionToHangup",a),b.terminate(a)}}.bind(this)),r.on("webbar:answer",function(e){var n;console.debug("answerHook -> payload",e),n=e.sessionId?N(e.sessionId):_.find(b.sessions,function(e){return e.incoming&&!e.confirmed}),e.sessionId&&!n&&console.warn("call with session Id "+e.sessionId+" not found"),n&&b.answer(n)}.bind(this)),r.on("webbar:hold",function(e){console.debug("holdHook -> payload",e);var n=b.sessions;if(e.sessionId&&((n=[]).push(N(e.sessionId)),0==n.length))console.warn("call with session Id "+sessionId+" not found");else for(var t=0;t payload",e),e.sessionId){var n=N(e.sessionId);n?b.unhold(n):console.warn("call with session Id "+sessionId+" not found")}else console.error("sessionId required")}.bind(this)),r.on("webbar:transfer",function(e){if(console.debug("transferHook -> payload",e),e.sessionId)if(e.transferNumber){var n=N(e.sessionId);n?n.refer(e.transferNumber,{eventHandlers:{requestSucceeded:x(n,"requestSucceeded","top right",3e3),requestFailed:x(n,"requestFailed","top right",3e3)}}):console.warn("call with session Id "+sessionId+" not found")}else console.error("transferNumber required");else console.error("sessionId required")}.bind(this))}.bind(this),b.type=function(e,n){var t=e;switch(b.target||(b.target=""),n&&(b.target+=e,u.$broadcast("angucomplete-alt:changeInput","ms-target-wrap",b.target)),e){case"*":t="asterisk";break;case"#":t="pound"}b.conf.enableDtmfTone&&(b.soundPlayer.setAttribute("src","assets/ms-phonebar/sounds/dialpad/"+t+".ogg"),b.soundPlayer.play().catch(function(e){console.log(e.message)}));for(var a=0;a session",e),e.hold({useUpdate:!1}),b.isJabraEnabled&&(jabra.hold(),jabra.onHook())},b.refer=function(n){console.debug("refer -> session",n);var e=a.prompt().title("Transfer").textContent("Type the target").placeholder("Target").ariaLabel("Target").ok("Transfer").cancel("Cancel");a.show(e).then(function(e){return O(e)}).then(function(e){n.refer(e,{eventHandlers:{requestSucceeded:x(n,"requestSucceeded","top right",3e3),requestFailed:x(n,"requestFailed","top right",3e3)}})})},b.record=function(e){console.debug("record -> session",e),a.show({controller:"RecordDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/record/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:b.sessions}})},b.unhold=function(e){console.debug("unhold -> session",e),e.unhold({useUpdate:!1}),b.putOtherCallsOnHold(e),b.isJabraEnabled&&(jabra.offHook(),jabra.resume())},b.answer=y,b.terminate=S,b.selectSession=function(e){console.debug("selectSession -> session",e),b.unhold(e)},b.typeWrapper=function(e){switch(e.key.toLowerCase()){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"*":case"#":b.type(e.key);break;case"enter":b.call()}},b.toggleDialpad=function(){b.showDialpad=!b.showDialpad},b.referAttended=function(e){console.debug("referAttended -> session",e),a.show({controller:"ReferAttendedDialogController",controllerAs:"vm",templateUrl:"assets/ms-phonebar/referAttended/dialog.html",parent:angular.element(t.body),clickOutsideToClose:!0,locals:{session:e,sessions:_.reject(b.sessions,{id:e.id}),isJabraEnabled:b.isJabraEnabled}})},b.closeDialpad=function(){b.showDialpad=!1},b.initDevice=w,b.putOtherCallsOnHold=function(e){if(console.debug("putOtherCallsOnHold -> session",e),1 evt, data",e,n),n.target&&(b.target=n.target,b.call())}),u.$on("webrtc::transfer",function(e,n){if(console.debug("onRemoteTransfer -> evt, data",e,n),n.target)for(var t=0;t session, textContent, position, delay",e,n,t,a),function(){s.show(s.simple().textContent(n).position(t).hideDelay(a)),e.terminate(),jabra&&i&&jabra.onHook(),l()}}function l(e){n.hide(e)}o.title="Refer Attended",o.sessions=a,o.session=i,o.isJabraEnabled=e,o.sessionTarget=null,a.length&&(o.target=a[0].user),o.closeDialog=l,o.transfer=function(){var e,n,t=_.find(a,function(e){if(e.user===o.target)return e});n=t.outgoing?(e=t,o.session):(e=o.session,t);n.refer(e.user,{replaces:e,eventHandlers:{requestSucceeded:r(i,"requestSucceeded","top right",3e3,o.isJabraEnabled),requestFailed:r(i,"requestFailed","top right",3e3,o.isJabraEnabled)}})}}e.$inject=["$mdDialog","$mdToast","sessions","session","isJabraEnabled"],angular.module("app.core").controller("ReferAttendedDialogController",e)}(),function(){"use strict";function e(e,s,n){var t=this;function a(e,n,t){var a;if(s[t]){if(a=_.find(e,function(e){return e.deviceId===s[t]}))return a.deviceId;var i=_.findIndex(e,function(e){return e.kind===n});if(0<=i)return e[i].deviceId}else(a=_.find(e,function(e){return e.kind===n}))&&(s[t]=a.deviceId);return s[t]||null}_.remove(n,function(e){return"audioinput"===e.kind&&("default"===e.deviceId||"communications"===e.deviceId)||"audiooutput"===e.kind&&("default"===e.deviceId||"communications"===e.deviceId)}),s.ringingId=a(n,"audiooutput","ringingId"),s.speakerId=a(n,"audiooutput","speakerId"),s.microphoneId=a(n,"audioinput","microphoneId"),s.ringingVolume=s.ringingVolume||.5,s.speakerVolume=s.speakerVolume||.5,s.microphoneVolume=s.microphoneVolume||1,s.ringingMute=s.ringingMute||!1,s.speakerMute=s.speakerMute||!1,s.microphoneMute=s.microphoneMute||!1,t.conf=angular.copy(s),t.devices=n,t.saveSettings=function(){e.hide(t.conf)},t.closeDialog=function(){e.hide()},t.isCompatibleBrowser=function(){return"chrome"===t.conf.browserName.toLowerCase()||"opera"===t.conf.browserName.toLowerCase()||"safari"===t.conf.browserName.toLowerCase()}}e.$inject=["$mdDialog","conf","devices"],angular.module("app.toolbar").controller("SettingsController",e)}(),function(){"use strict";function e(t,a){var i=this;function s(e){var n=e.key,t={param:i.query[n],resources:e.options,placeholder:e.placeholder,ngValue:e.ngValue};a.setPlaceholder(t).then(function(e){i.placeholders[n]=e})}i.pickerModels={},i.placeholders={},i.localizationMap=t.localizationMap,i.onMultiselectInit=function(e){s(e)},i.onDateRangeInit=function(e){var n=e.key;i.query[n]?i.pickerModels[n]=t.setSelectedDate(i.query[n]):i.pickerModels[n]={dateStart:null}},i.onMultiselectSelection=function(e,n){n&&(s(e),i.search())},i.onDateRangeSelection=function(e){var n=e.key;i.pickerModels[n].dateStart?!0===e.useFromToKeys?i.query[n]={from:moment(i.pickerModels[n].dateStart).utcOffset(0,!0).format(),to:moment(i.pickerModels[n].dateEnd).utcOffset(0,!0).add(23,"hours").add(59,"minutes").add(59,"seconds").format()}:i.query[n]={$gte:moment(i.pickerModels[n].dateStart).utcOffset(0,!0).format(),$lte:moment(i.pickerModels[n].dateEnd).utcOffset(0,!0).add(23,"hours").add(59,"minutes").add(59,"seconds").format()}:i.query[n]=void 0;i.search()},i.clearDate=function(e){var n=e.key;i.pickerModels[n]={dateStart:null},delete i.query[n],i.search()},i.clearSelection=function(e){var n=e.key,t=e.ngValue||"id";i.query[n]=!1===e.clearAll?[_.head(e.options)[t]]:[],s(e),i.search()},i.selectAll=function(e){var n=e.key,t=e.ngValue||"id";i.query[n]=_.map(e.options,t),s(e),i.search()}}function n(p,e){var g={localizationMap:e,setSelectedDate:function(e){var n=e.$gte?new Date(moment.utc(e.$gte).format("YYYY-MM-DD")):new Date(moment.utc(e.from).format("YYYY-MM-DD")),t=e.$lte?new Date(moment.utc(e.$lte).format("YYYY-MM-DD")):new Date(moment.utc(e.to).format("YYYY-MM-DD")),a={dateStart:new Date(n.getFullYear(),n.getMonth(),n.getDate()),dateEnd:new Date(t.getFullYear(),t.getMonth(),t.getDate())};return a.selectedTemplateName=(i=a,moment(i.dateStart).isSame(i.dateEnd)?(u=i,moment().startOf("day").isSame(u.dateStart)?g.localizationMap.Today:(m=i,moment().subtract(1,"days").startOf("day").isSame(m.dateStart)?g.localizationMap.Yesterday:p("date")(i.dateStart,"dd MMM yyyy"))):(c=i,moment().startOf("isoWeek").isSame(c.dateStart,"day")&&moment().endOf("isoWeek").isSame(c.dateEnd,"day")?g.localizationMap["This Week"]:(d=i,moment().subtract(1,"weeks").startOf("isoWeek").isSame(d.dateStart,"day")&&moment().subtract(1,"weeks").endOf("isoWeek").isSame(d.dateEnd,"day")?g.localizationMap["Last Week"]:(l=i,moment().startOf("month").isSame(l.dateStart,"day")&&moment().endOf("month").isSame(l.dateEnd,"day")?g.localizationMap["This Month"]:(r=i,moment().subtract(1,"months").startOf("month").isSame(r.dateStart,"day")&&moment().subtract(1,"months").endOf("month").isSame(r.dateEnd,"day")?g.localizationMap["Last Month"]:(o=i,moment().startOf("year").isSame(o.dateStart,"day")&&moment().endOf("year").isSame(o.dateEnd,"day")?g.localizationMap["This Year"]:(s=i,moment().subtract(1,"years").startOf("year").isSame(s.dateStart,"day")&&moment().subtract(1,"years").endOf("year").isSame(s.dateEnd,"day")?g.localizationMap["Last Year"]:p("date")(i.dateStart,"dd"+(i.dateStart.getMonth()!==i.dateEnd.getMonth()||i.dateStart.getFullYear()!==i.dateEnd.getFullYear()?" MMM":"")+(i.dateStart.getFullYear()!==i.dateEnd.getFullYear()?" yyyy":""))+" - "+p("date")(i.dateEnd,"dd MMM yyyy")))))))),a;var i,s,o,r,l,d,c,m,u}};return g}n.$inject=["$filter","dateFilterLocalizationFactory"],e.$inject=["dateRangeManager","quickFilterManager"],angular.module("app.core").directive("msQuickFilter",function(){return{restrict:"E",scope:{query:"=",filters:"=",search:"&"},controller:e,controllerAs:"vm",bindToController:!0,templateUrl:"app/core/directives/ms-quick-filter/ms-quick-filter.html"}}).factory("dateRangeManager",n)}(),function(){"use strict";angular.module("app.core").directive("msRandomClass",function(){return{restrict:"A",scope:{msRandomClass:"="},link:function(e,n){var t=e.msRandomClass[Math.floor(Math.random()*e.msRandomClass.length)];n.addClass(t)}}})}(),function(){"use strict";function e(i){return{restrict:"E",scope:{id:"=",model:"=",download:"="},replace:!0,link:function(n,e){var t=!1,a=document.createElement("audio");n.download||a.setAttribute("controlsList","nodownload"),a.setAttribute("preload","none"),a.setAttribute("controls",""),a.setAttribute("style","width: 265px;"),a.setAttribute("src"," "),a.onplay=function(e){t||(t=!0,e.preventDefault(),i[n.model||"voiceRecording"].download({id:n.id}).$promise.then(function(e){var n=[e.buffer],t=new Blob(n,{type:e.type});a.setAttribute("type",e.type),a.setAttribute("src",URL.createObjectURL(t)),a.play()}).catch(function(e){console.error(e)}))},e.append(a)}}}e.$inject=["api"],angular.module("app.core").directive("msRecording",e)}(),function(){"use strict";angular.module("app.core").directive("msResponsiveTable",function(){return{restrict:"A",link:function(e,n){var t=angular.element('
');n.after(t),t.append(n)}}})}(),function(){"use strict";function e(s,o,n,t){return{restrict:"AE",compile:function(e){if(!(t.getConfig("disableCustomScrollbars")||t.getConfig("disableCustomScrollbarsOnMobile")&&n.isMobile()))return e.addClass("ms-scroll"),function(e,n,t){var a={};function i(){PerfectScrollbar.update(n[0])}t.msScroll&&(a=e.$eval(t.msScroll)),a=angular.extend({},o.getConfig(),a),s(function(){PerfectScrollbar.initialize(n[0],a)},0),n.on("mouseenter",i),e.$watch(function(){return n.prop("scrollHeight")},function(e,n){angular.isUndefined(e)||angular.equals(e,n)||i()}),e.$watch(function(){return n.prop("scrollWidth")},function(e,n){angular.isUndefined(e)||angular.equals(e,n)||i()}),e.$on("$destroy",function(){n.off("mouseenter"),PerfectScrollbar.destroy(n[0])})}}}}e.$inject=["$timeout","msScrollConfig","msUtils","motionConfig"],angular.module("app.core").provider("msScrollConfig",function(){var n={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,stopPropagationOnClick:!0};this.config=function(e){n=angular.extend({},n,e)},this.$get=function(){var e={getConfig:function(){return n}};return e}}).directive("msScroll",e)}(),function(){"use strict";function e(n,i,s,e){var o=this;function t(){angular.isArray(o.onSearch)?a(o.onSearch):o.onResultClick?(o.resultsLoading=!0,n.$parent.$eval("vm.search(query)",{query:o.query.filter}).then(function(e){a(e)}).catch(function(){a([])}).finally(function(){o.resultsLoading=!1})):o.onSearch()}function a(e){o.expanded&&angular.isArray(e)&&null===e&&(o.selectedResultIndex=0,o.results=e)}function r(){o.expanded=!0,o.displayOn=!0,n.expand()}function l(e){!1!==e&&(o.query.filter=void 0,o.onResultClick?a(null):t()),o.expanded=!1,n.collapse()}function d(e){o.onResultClick&&o.onResultClick({item:e}),l()}function c(){var e=i.find(".ms-search-bar-results"),n=angular.element(e.find(".result")[o.selectedResultIndex]);if(e&&n){var t=n.position().top-8,a=n.position().top+n.outerHeight()+8;o.ignoreMouseEvents=!0,s.cancel(o.mouseEventIgnoreTimeout),o.mouseEventIgnoreTimeout=s(function(){o.ignoreMouseEvents=!1},250),e.scrollTop()>t&&e.scrollTop(t),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}}o.queryOptions={debounce:o.debounce||0},o.searchOnEnterKey=e.get().searchOnEnterKey||!1,o.resultsLoading=!1,o.results=null,o.selectedResultIndex=0,o.ignoreMouseEvents=!1,o.expandBar=r,o.collapseBar=l,o.blurCollapse=function(){if(!o.collapseOnBlur)return;l()},o.onKeyDown=function(e){var n=e.keyCode;-1<[27,38,40].indexOf(n)&&e.preventDefault();switch(n){case 13:if(!o.onResultClick)return t();if(!o.results)return;d(o.results[o.selectedResultIndex]);break;case 27:l();break;case 38:0<=o.selectedResultIndex-1&&(o.selectedResultIndex--,c());break;case 40:if(!o.results)return;o.selectedResultIndex+1e.length)return}else r();t()}})}function n(a){return{restrict:"E",scope:{query:"=?",debounce:"=?",direction:"@",iconColor:"@",onSearch:"&",onResultClick:"&?",onExpand:"&?",onCollapse:"&?",collapseOnBlur:"=d.shortcuts.length&&(d.selectedResultIndex=d.shortcuts.length-1)));d.saveShortcuts()},d.handleResultClick=function(e){e.hasShortcut?d.removeShortcut(e):d.addShortcut(e)},d.absorbEvent=function(e){e.preventDefault()},d.handleKeydown=function(e){var n=e.keyCode;-1<[38,40].indexOf(n)&&e.preventDefault();switch(n){case 13:d.handleResultClick(d.results[d.selectedResultIndex]);break;case 38:0<=d.selectedResultIndex-1&&(d.selectedResultIndex--,d.ensureSelectedResultIsVisible());break;case 40:d.selectedResultIndex+1t&&e.scrollTop(t),a>e.height()+e.scrollTop()&&e.scrollTop(a-e.height())}},d.toggleMobileBar=function(){d.mobileBarActive=!d.mobileBarActive},d.loadShortcuts().then(function(e){d.shortcuts=e,0i.steps.length)}i.mainForm=void 0,i.orientation="horizontal",i.steps=[],i.currentStep=void 0,i.currentStepNumber=1,i.setOrientation=function(e){i.orientation=e||"horizontal"},i.registerMainForm=function(e){i.mainForm=e},i.registerStep=function(e,n,t){var a={element:e,scope:n,form:t,stepNumber:n.step||i.steps.length+1,stepTitle:n.stepTitle,stepTitleTranslate:n.stepTitleTranslate};return i.steps.push(a),i.steps.sort(function(e,n){return e.stepNumber-n.stepNumber}),a},i.setupSteps=function(){i.setCurrentStep(i.currentStepNumber)},i.resetForm=function(){e(function(){for(var e=0;ee.scrollWidth&&0==e.scrollLeft&&0==n.scrollLeft?"right":n.scrollWidth>e.scrollWidth&&n.scrollLeft>e.scrollLeft&&e.scrollWidth+n.scrollLeft>=n.scrollWidth?"left":n.scrollWidth>e.scrollWidth&&n.scrollLeft>e.scrollLeft&&e.scrollWidth+n.scrollLeftt.position().top+i&&(m(function(){o=!0}),r.off("scroll",c))}}}}}e.$inject=["$timeout","$q"],angular.module("app.core").controller("MsTimelineController",function(){var n=this;n.scrollEl=void 0,n.setScrollEl=function(e){n.scrollEl=e},n.getScrollEl=function(){return n.scrollEl}}).directive("msTimeline",function(){return{scope:{msTimeline:"=?",loadMore:"&?msTimelineLoadMore"},controller:"MsTimelineController",compile:function(e){return e.addClass("ms-timeline"),function(e,n,t,a){var i=angular.element('
');n.append(i);var s={scrollEl:"#content"};s=angular.extend(s,e.msTimeline,{});var o=angular.element(s.scrollEl);a.setScrollEl(o);var r=144;function l(){o.scrollTop()+o.height()+r>i.position().top&&(i.addClass("show"),c(),e.loadMore&&e.loadMore().then(function(){i.removeClass("show"),d()},function(){i.remove()}))}function d(){o.on("scroll",l)}function c(){o.off("scroll",l)}d(),e.$on("$destroy",function(){c()})}}}}).directive("msTimelineItem",e)}(),function(){"use strict";function e(a,e,n,i,t){var r=this;function s(){!function(){r.millis=l().diff(moment(r.startingTime));var e=moment.duration(r.millis),n=e.seconds(),t=e.minutes(),a=e.hours(),i=e.days(),s=e.months(),o=e.years();r.seconds=n<10?"0"+n:n,r.minutes=t<10?"0"+t:t,r.hours=a<10?"0"+a:a,r.days=i<10?"0"+i:i,r.months=s<10?"0"+s:s,r.years=o<10?"0"+o:o,r.timer=0{{ vm.timer }}
",compile:function(){return{pre:function(e,n,t){e.interval=t.interval||1e3}}},controller:e,controllerAs:"vm",bindToController:!0}})}(),function(){"use strict";angular.module("app.core").directive("msTimezone",function(){return{restrict:"E",scope:{ngModel:"="},controller:["$scope",function(e){e.timezone=[{name:"Europe/Andorra",utcOffset:60,offsetStr:"+01:00",countries:["AD"]},{name:"Asia/Dubai",utcOffset:240,offsetStr:"+04:00",countries:["AE","OM"]},{name:"Asia/Kabul",utcOffset:270,offsetStr:"+04:30",countries:["AF"]},{name:"Europe/Tirane",utcOffset:60,offsetStr:"+01:00",countries:["AL"]},{name:"Asia/Yerevan",utcOffset:240,offsetStr:"+04:00",countries:["AM"]},{name:"Antarctica/Rothera",utcOffset:-180,offsetStr:"-03:00",countries:["AQ"]},{name:"Antarctica/Palmer",utcOffset:-180,offsetStr:"-03:00",countries:["AQ"]},{name:"Antarctica/Mawson",utcOffset:300,offsetStr:"+05:00",countries:["AQ"]},{name:"Antarctica/Davis",utcOffset:420,offsetStr:"+07:00",countries:["AQ"]},{name:"Antarctica/Casey",utcOffset:480,offsetStr:"+08:00",countries:["AQ"]},{name:"Antarctica/Vostok",utcOffset:360,offsetStr:"+06:00",countries:["AQ"]},{name:"Antarctica/DumontDUrville",utcOffset:600,offsetStr:"+10:00",countries:["AQ"]},{name:"Antarctica/Syowa",utcOffset:180,offsetStr:"+03:00",countries:["AQ"]},{name:"Antarctica/Troll",utcOffset:0,offsetStr:"+00:00",countries:["AQ"]},{name:"America/Argentina/Buenos_Aires",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Cordoba",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Salta",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Jujuy",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Tucuman",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Catamarca",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/La_Rioja",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/San_Juan",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Mendoza",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/San_Luis",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Rio_Gallegos",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"America/Argentina/Ushuaia",utcOffset:-180,offsetStr:"-03:00",countries:["AR"]},{name:"Pacific/Pago_Pago",utcOffset:-660,offsetStr:"-11:00",countries:["AS","UM"]},{name:"Europe/Vienna",utcOffset:60,offsetStr:"+01:00",countries:["AT"]},{name:"Australia/Lord_Howe",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Antarctica/Macquarie",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Hobart",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Currie",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Melbourne",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Sydney",utcOffset:660,offsetStr:"+11:00",countries:["AU"]},{name:"Australia/Broken_Hill",utcOffset:630,offsetStr:"+10:30",countries:["AU"]},{name:"Australia/Brisbane",utcOffset:600,offsetStr:"+10:00",countries:["AU"]},{name:"Australia/Lindeman",utcOffset:600,offsetStr:"+10:00",countries:["AU"]},{name:"Australia/Adelaide",utcOffset:630,offsetStr:"+10:30",countries:["AU"]},{name:"Australia/Darwin",utcOffset:570,offsetStr:"+09:30",countries:["AU"]},{name:"Australia/Perth",utcOffset:480,offsetStr:"+08:00",countries:["AU"]},{name:"Australia/Eucla",utcOffset:525,offsetStr:"+08:45",countries:["AU"]},{name:"Asia/Baku",utcOffset:240,offsetStr:"+04:00",countries:["AZ"]},{name:"America/Barbados",utcOffset:-240,offsetStr:"-04:00",countries:["BB"]},{name:"Asia/Dhaka",utcOffset:360,offsetStr:"+06:00",countries:["BD"]},{name:"Europe/Brussels",utcOffset:60,offsetStr:"+01:00",countries:["BE"]},{name:"Europe/Sofia",utcOffset:120,offsetStr:"+02:00",countries:["BG"]},{name:"Atlantic/Bermuda",utcOffset:-240,offsetStr:"-04:00",countries:["BM"]},{name:"Asia/Brunei",utcOffset:480,offsetStr:"+08:00",countries:["BN"]},{name:"America/La_Paz",utcOffset:-240,offsetStr:"-04:00",countries:["BO"]},{name:"America/Noronha",utcOffset:-120,offsetStr:"-02:00",countries:["BR"]},{name:"America/Belem",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Fortaleza",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Recife",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Araguaina",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Maceio",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Bahia",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Sao_Paulo",utcOffset:-120,offsetStr:"-02:00",countries:["BR"]},{name:"America/Campo_Grande",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Cuiaba",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Santarem",utcOffset:-180,offsetStr:"-03:00",countries:["BR"]},{name:"America/Porto_Velho",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Boa_Vista",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Manaus",utcOffset:-240,offsetStr:"-04:00",countries:["BR"]},{name:"America/Eirunepe",utcOffset:-300,offsetStr:"-05:00",countries:["BR"]},{name:"America/Rio_Branco",utcOffset:-300,offsetStr:"-05:00",countries:["BR"]},{name:"America/Nassau",utcOffset:-300,offsetStr:"-05:00",countries:["BS"]},{name:"Asia/Thimphu",utcOffset:360,offsetStr:"+06:00",countries:["BT"]},{name:"Europe/Minsk",utcOffset:180,offsetStr:"+03:00",countries:["BY"]},{name:"America/Belize",utcOffset:-360,offsetStr:"-06:00",countries:["BZ"]},{name:"America/St_Johns",utcOffset:-210,offsetStr:"-03:30",countries:["CA"]},{name:"America/Halifax",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Glace_Bay",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Moncton",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Goose_Bay",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Blanc-Sablon",utcOffset:-240,offsetStr:"-04:00",countries:["CA"]},{name:"America/Toronto",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Nipigon",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Thunder_Bay",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Iqaluit",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Pangnirtung",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Resolute",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Atikokan",utcOffset:-300,offsetStr:"-05:00",countries:["CA"]},{name:"America/Rankin_Inlet",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Winnipeg",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Rainy_River",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Regina",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Swift_Current",utcOffset:-360,offsetStr:"-06:00",countries:["CA"]},{name:"America/Edmonton",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Cambridge_Bay",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Yellowknife",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Inuvik",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Creston",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Dawson_Creek",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Fort_Nelson",utcOffset:-420,offsetStr:"-07:00",countries:["CA"]},{name:"America/Vancouver",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"America/Whitehorse",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"America/Dawson",utcOffset:-480,offsetStr:"-08:00",countries:["CA"]},{name:"Indian/Cocos",utcOffset:390,offsetStr:"+06:30",countries:["CC"]},{name:"Europe/Zurich",utcOffset:60,offsetStr:"+01:00",countries:["CH","DE","LI"]},{name:"Africa/Abidjan",utcOffset:0,offsetStr:"+00:00",countries:["CI","BF","GM","GN","ML","MR","SH","SL","SN","ST","TG"]},{name:"Pacific/Rarotonga",utcOffset:-600,offsetStr:"-10:00",countries:["CK"]},{name:"America/Santiago",utcOffset:-180,offsetStr:"-03:00",countries:["CL"]},{name:"Pacific/Easter",utcOffset:-300,offsetStr:"-05:00",countries:["CL"]},{name:"Asia/Shanghai",utcOffset:480,offsetStr:"+08:00",countries:["CN"]},{name:"Asia/Urumqi",utcOffset:360,offsetStr:"+06:00",countries:["CN"]},{name:"America/Bogota",utcOffset:-300,offsetStr:"-05:00",countries:["CO"]},{name:"America/Costa_Rica",utcOffset:-360,offsetStr:"-06:00",countries:["CR"]},{name:"America/Havana",utcOffset:-300,offsetStr:"-05:00",countries:["CU"]},{name:"Atlantic/Cape_Verde",utcOffset:-60,offsetStr:"-01:00",countries:["CV"]},{name:"America/Curacao",utcOffset:-240,offsetStr:"-04:00",countries:["CW","AW","BQ","SX"]},{name:"Indian/Christmas",utcOffset:420,offsetStr:"+07:00",countries:["CX"]},{name:"Asia/Nicosia",utcOffset:120,offsetStr:"+02:00",countries:["CY"]},{name:"Europe/Prague",utcOffset:60,offsetStr:"+01:00",countries:["CZ","SK"]},{name:"Europe/Berlin",utcOffset:60,offsetStr:"+01:00",countries:["DE"]},{name:"Europe/Copenhagen",utcOffset:60,offsetStr:"+01:00",countries:["DK"]},{name:"America/Santo_Domingo",utcOffset:-240,offsetStr:"-04:00",countries:["DO"]},{name:"Africa/Algiers",utcOffset:60,offsetStr:"+01:00",countries:["DZ"]},{name:"America/Guayaquil",utcOffset:-300,offsetStr:"-05:00",countries:["EC"]},{name:"Pacific/Galapagos",utcOffset:-360,offsetStr:"-06:00",countries:["EC"]},{name:"Europe/Tallinn",utcOffset:120,offsetStr:"+02:00",countries:["EE"]},{name:"Africa/Cairo",utcOffset:120,offsetStr:"+02:00",countries:["EG"]},{name:"Africa/El_Aaiun",utcOffset:0,offsetStr:"+00:00",countries:["EH"]},{name:"Europe/Madrid",utcOffset:60,offsetStr:"+01:00",countries:["ES"]},{name:"Africa/Ceuta",utcOffset:60,offsetStr:"+01:00",countries:["ES"]},{name:"Atlantic/Canary",utcOffset:0,offsetStr:"+00:00",countries:["ES"]},{name:"Europe/Helsinki",utcOffset:120,offsetStr:"+02:00",countries:["FI","AX"]},{name:"Pacific/Fiji",utcOffset:720,offsetStr:"+12:00",countries:["FJ"]},{name:"Atlantic/Stanley",utcOffset:-180,offsetStr:"-03:00",countries:["FK"]},{name:"Pacific/Chuuk",utcOffset:600,offsetStr:"+10:00",countries:["FM"]},{name:"Pacific/Pohnpei",utcOffset:660,offsetStr:"+11:00",countries:["FM"]},{name:"Pacific/Kosrae",utcOffset:660,offsetStr:"+11:00",countries:["FM"]},{name:"Atlantic/Faroe",utcOffset:0,offsetStr:"+00:00",countries:["FO"]},{name:"Europe/Paris",utcOffset:60,offsetStr:"+01:00",countries:["FR"]},{name:"Europe/London",utcOffset:0,offsetStr:"+00:00",countries:["GB","GG","IM","JE"]},{name:"Asia/Tbilisi",utcOffset:240,offsetStr:"+04:00",countries:["GE"]},{name:"America/Cayenne",utcOffset:-180,offsetStr:"-03:00",countries:["GF"]},{name:"Africa/Accra",utcOffset:0,offsetStr:"+00:00",countries:["GH"]},{name:"Europe/Gibraltar",utcOffset:60,offsetStr:"+01:00",countries:["GI"]},{name:"America/Godthab",utcOffset:-180,offsetStr:"-03:00",countries:["GL"]},{name:"America/Danmarkshavn",utcOffset:0,offsetStr:"+00:00",countries:["GL"]},{name:"America/Scoresbysund",utcOffset:-60,offsetStr:"-01:00",countries:["GL"]},{name:"America/Thule",utcOffset:-240,offsetStr:"-04:00",countries:["GL"]},{name:"Europe/Athens",utcOffset:120,offsetStr:"+02:00",countries:["GR"]},{name:"Atlantic/South_Georgia",utcOffset:-120,offsetStr:"-02:00",countries:["GS"]},{name:"America/Guatemala",utcOffset:-360,offsetStr:"-06:00",countries:["GT"]},{name:"Pacific/Guam",utcOffset:600,offsetStr:"+10:00",countries:["GU","MP"]},{name:"Africa/Bissau",utcOffset:0,offsetStr:"+00:00",countries:["GW"]},{name:"America/Guyana",utcOffset:-240,offsetStr:"-04:00",countries:["GY"]},{name:"Asia/Hong_Kong",utcOffset:480,offsetStr:"+08:00",countries:["HK"]},{name:"America/Tegucigalpa",utcOffset:-360,offsetStr:"-06:00",countries:["HN"]},{name:"America/Port-au-Prince",utcOffset:-300,offsetStr:"-05:00",countries:["HT"]},{name:"Europe/Budapest",utcOffset:60,offsetStr:"+01:00",countries:["HU"]},{name:"Asia/Jakarta",utcOffset:420,offsetStr:"+07:00",countries:["ID"]},{name:"Asia/Pontianak",utcOffset:420,offsetStr:"+07:00",countries:["ID"]},{name:"Asia/Makassar",utcOffset:480,offsetStr:"+08:00",countries:["ID"]},{name:"Asia/Jayapura",utcOffset:540,offsetStr:"+09:00",countries:["ID"]},{name:"Europe/Dublin",utcOffset:0,offsetStr:"+00:00",countries:["IE"]},{name:"Asia/Jerusalem",utcOffset:120,offsetStr:"+02:00",countries:["IL"]},{name:"Asia/Kolkata",utcOffset:330,offsetStr:"+05:30",countries:["IN"]},{name:"Indian/Chagos",utcOffset:360,offsetStr:"+06:00",countries:["IO"]},{name:"Asia/Baghdad",utcOffset:180,offsetStr:"+03:00",countries:["IQ"]},{name:"Asia/Tehran",utcOffset:210,offsetStr:"+03:30",countries:["IR"]},{name:"Atlantic/Reykjavik",utcOffset:0,offsetStr:"+00:00",countries:["IS"]},{name:"Europe/Rome",utcOffset:60,offsetStr:"+01:00",countries:["IT","SM","VA"]},{name:"America/Jamaica",utcOffset:-300,offsetStr:"-05:00",countries:["JM"]},{name:"Asia/Amman",utcOffset:120,offsetStr:"+02:00",countries:["JO"]},{name:"Asia/Tokyo",utcOffset:540,offsetStr:"+09:00",countries:["JP"]},{name:"Africa/Nairobi",utcOffset:180,offsetStr:"+03:00",countries:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},{name:"Asia/Bishkek",utcOffset:360,offsetStr:"+06:00",countries:["KG"]},{name:"Pacific/Tarawa",utcOffset:720,offsetStr:"+12:00",countries:["KI"]},{name:"Pacific/Enderbury",utcOffset:780,offsetStr:"+13:00",countries:["KI"]},{name:"Pacific/Kiritimati",utcOffset:840,offsetStr:"+14:00",countries:["KI"]},{name:"Asia/Pyongyang",utcOffset:510,offsetStr:"+08:30",countries:["KP"]},{name:"Asia/Seoul",utcOffset:540,offsetStr:"+09:00",countries:["KR"]},{name:"America/Cayman",utcOffset:-300,offsetStr:"-05:00",countries:["KY"]},{name:"Asia/Almaty",utcOffset:360,offsetStr:"+06:00",countries:["KZ"]},{name:"Asia/Qyzylorda",utcOffset:360,offsetStr:"+06:00",countries:["KZ"]},{name:"Asia/Aqtobe",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Aqtau",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Oral",utcOffset:300,offsetStr:"+05:00",countries:["KZ"]},{name:"Asia/Beirut",utcOffset:120,offsetStr:"+02:00",countries:["LB"]},{name:"Asia/Colombo",utcOffset:330,offsetStr:"+05:30",countries:["LK"]},{name:"Africa/Monrovia",utcOffset:0,offsetStr:"+00:00",countries:["LR"]},{name:"Europe/Vilnius",utcOffset:120,offsetStr:"+02:00",countries:["LT"]},{name:"Europe/Luxembourg",utcOffset:60,offsetStr:"+01:00",countries:["LU"]},{name:"Europe/Riga",utcOffset:120,offsetStr:"+02:00",countries:["LV"]},{name:"Africa/Tripoli",utcOffset:120,offsetStr:"+02:00",countries:["LY"]},{name:"Africa/Casablanca",utcOffset:0,offsetStr:"+00:00",countries:["MA"]},{name:"Europe/Monaco",utcOffset:60,offsetStr:"+01:00",countries:["MC"]},{name:"Europe/Chisinau",utcOffset:120,offsetStr:"+02:00",countries:["MD"]},{name:"Pacific/Majuro",utcOffset:720,offsetStr:"+12:00",countries:["MH"]},{name:"Pacific/Kwajalein",utcOffset:720,offsetStr:"+12:00",countries:["MH"]},{name:"Asia/Rangoon",utcOffset:390,offsetStr:"+06:30",countries:["MM"]},{name:"Asia/Ulaanbaatar",utcOffset:480,offsetStr:"+08:00",countries:["MN"]},{name:"Asia/Hovd",utcOffset:420,offsetStr:"+07:00",countries:["MN"]},{name:"Asia/Choibalsan",utcOffset:480,offsetStr:"+08:00",countries:["MN"]},{name:"Asia/Macau",utcOffset:480,offsetStr:"+08:00",countries:["MO"]},{name:"America/Martinique",utcOffset:-240,offsetStr:"-04:00",countries:["MQ"]},{name:"Europe/Malta",utcOffset:60,offsetStr:"+01:00",countries:["MT"]},{name:"Indian/Mauritius",utcOffset:240,offsetStr:"+04:00",countries:["MU"]},{name:"Indian/Maldives",utcOffset:300,offsetStr:"+05:00",countries:["MV"]},{name:"America/Mexico_City",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Cancun",utcOffset:-300,offsetStr:"-05:00",countries:["MX"]},{name:"America/Merida",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Monterrey",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Matamoros",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"America/Mazatlan",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Chihuahua",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Ojinaga",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Hermosillo",utcOffset:-420,offsetStr:"-07:00",countries:["MX"]},{name:"America/Tijuana",utcOffset:-480,offsetStr:"-08:00",countries:["MX"]},{name:"America/Santa_Isabel",utcOffset:-480,offsetStr:"-08:00",countries:["MX"]},{name:"America/Bahia_Banderas",utcOffset:-360,offsetStr:"-06:00",countries:["MX"]},{name:"Asia/Kuala_Lumpur",utcOffset:480,offsetStr:"+08:00",countries:["MY"]},{name:"Asia/Kuching",utcOffset:480,offsetStr:"+08:00",countries:["MY"]},{name:"Africa/Maputo",utcOffset:120,offsetStr:"+02:00",countries:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},{name:"Africa/Windhoek",utcOffset:120,offsetStr:"+02:00",countries:["NA"]},{name:"Pacific/Noumea",utcOffset:660,offsetStr:"+11:00",countries:["NC"]},{name:"Pacific/Norfolk",utcOffset:660,offsetStr:"+11:00",countries:["NF"]},{name:"Africa/Lagos",utcOffset:60,offsetStr:"+01:00",countries:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},{name:"America/Managua",utcOffset:-360,offsetStr:"-06:00",countries:["NI"]},{name:"Europe/Amsterdam",utcOffset:60,offsetStr:"+01:00",countries:["NL"]},{name:"Europe/Oslo",utcOffset:60,offsetStr:"+01:00",countries:["NO","SJ"]},{name:"Asia/Kathmandu",utcOffset:345,offsetStr:"+05:45",countries:["NP"]},{name:"Pacific/Nauru",utcOffset:720,offsetStr:"+12:00",countries:["NR"]},{name:"Pacific/Niue",utcOffset:-660,offsetStr:"-11:00",countries:["NU"]},{name:"Pacific/Auckland",utcOffset:780,offsetStr:"+13:00",countries:["NZ","AQ"]},{name:"Pacific/Chatham",utcOffset:825,offsetStr:"+13:45",countries:["NZ"]},{name:"America/Panama",utcOffset:-300,offsetStr:"-05:00",countries:["PA"]},{name:"America/Lima",utcOffset:-300,offsetStr:"-05:00",countries:["PE"]},{name:"Pacific/Tahiti",utcOffset:-600,offsetStr:"-10:00",countries:["PF"]},{name:"Pacific/Marquesas",utcOffset:-570,offsetStr:"-09:30",countries:["PF"]},{name:"Pacific/Gambier",utcOffset:-540,offsetStr:"-09:00",countries:["PF"]},{name:"Pacific/Port_Moresby",utcOffset:600,offsetStr:"+10:00",countries:["PG"]},{name:"Pacific/Bougainville",utcOffset:660,offsetStr:"+11:00",countries:["PG"]},{name:"Asia/Manila",utcOffset:480,offsetStr:"+08:00",countries:["PH"]},{name:"Asia/Karachi",utcOffset:300,offsetStr:"+05:00",countries:["PK"]},{name:"Europe/Warsaw",utcOffset:60,offsetStr:"+01:00",countries:["PL"]},{name:"America/Miquelon",utcOffset:-180,offsetStr:"-03:00",countries:["PM"]},{name:"Pacific/Pitcairn",utcOffset:-480,offsetStr:"-08:00",countries:["PN"]},{name:"America/Puerto_Rico",utcOffset:-240,offsetStr:"-04:00",countries:["PR"]},{name:"Asia/Gaza",utcOffset:120,offsetStr:"+02:00",countries:["PS"]},{name:"Asia/Hebron",utcOffset:120,offsetStr:"+02:00",countries:["PS"]},{name:"Europe/Lisbon",utcOffset:0,offsetStr:"+00:00",countries:["PT"]},{name:"Atlantic/Madeira",utcOffset:0,offsetStr:"+00:00",countries:["PT"]},{name:"Atlantic/Azores",utcOffset:-60,offsetStr:"-01:00",countries:["PT"]},{name:"Pacific/Palau",utcOffset:540,offsetStr:"+09:00",countries:["PW"]},{name:"America/Asuncion",utcOffset:-180,offsetStr:"-03:00",countries:["PY"]},{name:"Asia/Qatar",utcOffset:180,offsetStr:"+03:00",countries:["QA","BH"]},{name:"Indian/Reunion",utcOffset:240,offsetStr:"+04:00",countries:["RE","TF"]},{name:"Europe/Bucharest",utcOffset:120,offsetStr:"+02:00",countries:["RO"]},{name:"Europe/Belgrade",utcOffset:60,offsetStr:"+01:00",countries:["RS","BA","HR","ME","MK","SI"]},{name:"Europe/Kaliningrad",utcOffset:120,offsetStr:"+02:00",countries:["RU"]},{name:"Europe/Moscow",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Simferopol",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Volgograd",utcOffset:180,offsetStr:"+03:00",countries:["RU"]},{name:"Europe/Samara",utcOffset:240,offsetStr:"+04:00",countries:["RU"]},{name:"Asia/Yekaterinburg",utcOffset:300,offsetStr:"+05:00",countries:["RU"]},{name:"Asia/Omsk",utcOffset:360,offsetStr:"+06:00",countries:["RU"]},{name:"Asia/Novosibirsk",utcOffset:360,offsetStr:"+06:00",countries:["RU"]},{name:"Asia/Novokuznetsk",utcOffset:420,offsetStr:"+07:00",countries:["RU"]},{name:"Asia/Krasnoyarsk",utcOffset:420,offsetStr:"+07:00",countries:["RU"]},{name:"Asia/Irkutsk",utcOffset:480,offsetStr:"+08:00",countries:["RU"]},{name:"Asia/Chita",utcOffset:480,offsetStr:"+08:00",countries:["RU"]},{name:"Asia/Yakutsk",utcOffset:540,offsetStr:"+09:00",countries:["RU"]},{name:"Asia/Khandyga",utcOffset:540,offsetStr:"+09:00",countries:["RU"]},{name:"Asia/Vladivostok",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Sakhalin",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Ust-Nera",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Magadan",utcOffset:600,offsetStr:"+10:00",countries:["RU"]},{name:"Asia/Srednekolymsk",utcOffset:660,offsetStr:"+11:00",countries:["RU"]},{name:"Asia/Kamchatka",utcOffset:720,offsetStr:"+12:00",countries:["RU"]},{name:"Asia/Anadyr",utcOffset:720,offsetStr:"+12:00",countries:["RU"]},{name:"Asia/Riyadh",utcOffset:180,offsetStr:"+03:00",countries:["SA","KW","YE"]},{name:"Pacific/Guadalcanal",utcOffset:660,offsetStr:"+11:00",countries:["SB"]},{name:"Indian/Mahe",utcOffset:240,offsetStr:"+04:00",countries:["SC"]},{name:"Africa/Khartoum",utcOffset:180,offsetStr:"+03:00",countries:["SD","SS"]},{name:"Europe/Stockholm",utcOffset:60,offsetStr:"+01:00",countries:["SE"]},{name:"Asia/Singapore",utcOffset:480,offsetStr:"+08:00",countries:["SG"]},{name:"America/Paramaribo",utcOffset:-180,offsetStr:"-03:00",countries:["SR"]},{name:"America/El_Salvador",utcOffset:-360,offsetStr:"-06:00",countries:["SV"]},{name:"Asia/Damascus",utcOffset:120,offsetStr:"+02:00",countries:["SY"]},{name:"America/Grand_Turk",utcOffset:-240,offsetStr:"-04:00",countries:["TC"]},{name:"Africa/Ndjamena",utcOffset:60,offsetStr:"+01:00",countries:["TD"]},{name:"Indian/Kerguelen",utcOffset:300,offsetStr:"+05:00",countries:["TF"]},{name:"Asia/Bangkok",utcOffset:420,offsetStr:"+07:00",countries:["TH","KH","LA","VN"]},{name:"Asia/Dushanbe",utcOffset:300,offsetStr:"+05:00",countries:["TJ"]},{name:"Pacific/Fakaofo",utcOffset:780,offsetStr:"+13:00",countries:["TK"]},{name:"Asia/Dili",utcOffset:540,offsetStr:"+09:00",countries:["TL"]},{name:"Asia/Ashgabat",utcOffset:300,offsetStr:"+05:00",countries:["TM"]},{name:"Africa/Tunis",utcOffset:60,offsetStr:"+01:00",countries:["TN"]},{name:"Pacific/Tongatapu",utcOffset:780,offsetStr:"+13:00",countries:["TO"]},{name:"Europe/Istanbul",utcOffset:120,offsetStr:"+02:00",countries:["TR"]},{name:"America/Port_of_Spain",utcOffset:-240,offsetStr:"-04:00",countries:["TT","AG","AI","BL","DM","GD","GP","KN","LC","MF","MS","VC","VG","VI"]},{name:"Pacific/Funafuti",utcOffset:720,offsetStr:"+12:00",countries:["TV"]},{name:"Asia/Taipei",utcOffset:480,offsetStr:"+08:00",countries:["TW"]},{name:"Europe/Kiev",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Europe/Uzhgorod",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Europe/Zaporozhye",utcOffset:120,offsetStr:"+02:00",countries:["UA"]},{name:"Pacific/Wake",utcOffset:720,offsetStr:"+12:00",countries:["UM"]},{name:"America/New_York",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Detroit",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Kentucky/Louisville",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Kentucky/Monticello",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Indianapolis",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Vincennes",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Winamac",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Marengo",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Petersburg",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Indiana/Vevay",utcOffset:-300,offsetStr:"-05:00",countries:["US"]},{name:"America/Chicago",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Indiana/Tell_City",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Indiana/Knox",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Menominee",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/Center",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/New_Salem",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/North_Dakota/Beulah",utcOffset:-360,offsetStr:"-06:00",countries:["US"]},{name:"America/Denver",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Boise",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Phoenix",utcOffset:-420,offsetStr:"-07:00",countries:["US"]},{name:"America/Los_Angeles",utcOffset:-480,offsetStr:"-08:00",countries:["US"]},{name:"America/Metlakatla",utcOffset:-480,offsetStr:"-08:00",countries:["US"]},{name:"America/Anchorage",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Juneau",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Sitka",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Yakutat",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Nome",utcOffset:-540,offsetStr:"-09:00",countries:["US"]},{name:"America/Adak",utcOffset:-600,offsetStr:"-10:00",countries:["US"]},{name:"Pacific/Honolulu",utcOffset:-600,offsetStr:"-10:00",countries:["US","UM"]},{name:"America/Montevideo",utcOffset:-180,offsetStr:"-03:00",countries:["UY"]},{name:"Asia/Samarkand",utcOffset:300,offsetStr:"+05:00",countries:["UZ"]},{name:"Asia/Tashkent",utcOffset:300,offsetStr:"+05:00",countries:["UZ"]},{name:"America/Caracas",utcOffset:-270,offsetStr:"-04:30",countries:["VE"]},{name:"Asia/Ho_Chi_Minh",utcOffset:420,offsetStr:"+07:00",countries:["VN"]},{name:"Pacific/Efate",utcOffset:660,offsetStr:"+11:00",countries:["VU"]},{name:"Pacific/Wallis",utcOffset:720,offsetStr:"+12:00",countries:["WF"]},{name:"Pacific/Apia",utcOffset:840,offsetStr:"+14:00",countries:["WS"]},{name:"Africa/Johannesburg",utcOffset:120,offsetStr:"+02:00",countries:["ZA","LS","SZ"]}]}],templateUrl:"app/core/directives/ms-timezone/ms-timezone.html"}})}(),function(){"use strict";angular.module("app.core").controller("MsWidgetEngineCounterController",function(){var a=this;a.filter=[],a.filtered=!1,a.fontSize=20,a.getCount=function(e){var n=0;if(e){a.fontSize=e.attrs[2]&&e.attrs[2].value?parseInt(e.attrs[2].value)-parseInt(e.attrs[2].value)%2:20,e.attrs[1].value&&e.attrs[1].value.length?(a.filtered=!0,a.filter=_.intersection(e.voiceQueuesSelected,e.attrs[1].value)):(a.filtered=!1,a.filter=e.voiceQueuesSelected);for(var t=0;tr.properties.length){var n=r.multiBarChart.series.length-r.properties.length;r.multiBarChart.series.splice(0,n),r.multiBarChart.data.splice(0,n)}for(var t=0;tr.filter.length){var a=r.multiBarChart.labels.length-r.filter.length;r.multiBarChart.labels.splice(0,a),r.multiBarChart.data[t].splice(0,a)}for(var i=0,s=0;io.properties.length){var n=o.pieChart.labels.length-o.properties.length;o.pieChart.labels.splice(0,n),o.pieChart.data.splice(0,n)}for(var t=0,a=0;t]+>/gm,"")}}).filter("nospace",function(){return function(e){return e?e.replace(/ /g,""):""}}).filter("humanizeDoc",function(){return function(e){if(e)return"directive"===e.type?e.name.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):e.label||e.name}})}(),function(){"use strict";angular.module("app.core").filter("capitalize",function(){return function(e){return e?_.capitalize(e):""}})}(),function(){"use strict";angular.module("app.core").filter("filterByIds",function(){return function(e,n){if(0===e.length||!n)return e;if(0===n.length)return[];for(var t=[],a=0;an.openedAt?1:-1:1}),n}})}(),function(){"use strict";angular.module("app.core").filter("snakecase",function(){return function(e){return e?_.snakeCase(e):""}})}(),function(){"use strict";angular.module("app.core").filter("startcase",function(){return function(e){return e?_.startCase(e):""}})}(),function(){"use strict";angular.module("app.core").filter("filterByTags",function(){return function(e,t){if(0===e.length||0===t.length)return e;var a=[];return e.forEach(function(e){var n=t.every(function(n){var t=!1;return e.tags.forEach(function(e){e.name!==n.name||(t=!0)}),t});n&&a.push(e)}),a}}).filter("filterSingleByTags",function(){return function(e,n){if(0!==e.length&&0!==n.length){if(e.length')).html(i),s.append(o)})},rgba:l};function l(e,n){var t=n||!1;return 4===e.length&&255===e[0]&&255===e[1]&&255===e[2]&&e.splice(3,4),t&&(e=function(e,n){var t={white:{1:"1",2:"0.7",3:"0.3",4:"0.12"},black:{1:"0.87",2:"0.54",3:"0.26",4:"0.12"}};255===e[0]&&255===e[1]&&255===e[2]?e[3]=t.white[n]:0===e[0]&&0===e[1]&&0===e[2]&&(e[3]=t.black[n]);return e}(e,t)),3===e.length?"rgb("+e.join(",")+")":4===e.length?"rgba("+e.join(",")+")":void a.error("Invalid number of arguments supplied in the color array: "+e.length+"\nThe array must have 3 or 4 colors.")}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}}e.$inject=["$cookies","$log","motionTheming"],angular.module("app.core").factory("motionGenerator",e)}(),function(){"use strict";angular.module("app.core").constant("motionPalettes",[{name:"motion-blue",options:{50:"#ebf1fa",100:"#c2d4ef",200:"#9ab8e5",300:"#78a0dc",400:"#5688d3",500:"#3470ca",600:"#2e62b1",700:"#275498",800:"#21467e",900:"#1a3865",A100:"#c2d4ef",A200:"#9ab8e5",A400:"#5688d3",A700:"#275498",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}},{name:"motion-paleblue",options:{50:"#ececee",100:"#c5c6cb",200:"#9ea1a9",300:"#7d818c",400:"#5c616f",500:"#3c4252",600:"#353a48",700:"#2d323e",800:"#262933",900:"#1e2129",A100:"#c5c6cb",A200:"#9ea1a9",A400:"#5c616f",A700:"#2d323e",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400"}}])}(),function(){"use strict";angular.module("app.core").constant("motionThemes",{default:{primary:{name:"motion-paleblue",hues:{default:"700","hue-1":"500","hue-2":"600","hue-3":"400"}},accent:{name:"light-blue",hues:{default:"600","hue-1":"400","hue-2":"700","hue-3":"A100"}},warn:{name:"red"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},pinkTheme:{primary:{name:"blue-grey",hues:{default:"800","hue-1":"600","hue-2":"400","hue-3":"A100"}},accent:{name:"pink",hues:{default:"400","hue-1":"300","hue-2":"600","hue-3":"A100"}},warn:{name:"blue"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}},tealTheme:{primary:{name:"motion-blue",hues:{default:"900","hue-1":"600","hue-2":"500","hue-3":"A100"}},accent:{name:"teal",hues:{default:"500","hue-1":"400","hue-2":"600","hue-3":"A100"}},warn:{name:"deep-orange"},background:{name:"grey",hues:{default:"A100","hue-1":"A100","hue-2":"100","hue-3":"300"}}}})}(),function(){"use strict";function e(t,e,n){var a;angular.injector(["ngCookies"]).invoke(["$cookies",function(e){a=e}]);var i=a.getObject("motion.customTheme");i&&(n.custom=i),t.alwaysWatchTheme(!0),angular.forEach(e,function(e){t.definePalette(e.name,e.options)}),angular.forEach(n,function(e,n){t.theme(n).primaryPalette(e.primary.name,e.primary.hues).accentPalette(e.accent.name,e.accent.hues).warnPalette(e.warn.name,e.warn.hues).backgroundPalette(e.background.name,e.background.hues)})}e.$inject=["$mdThemingProvider","motionPalettes","motionThemes"],angular.module("app.core").config(e)}(),function(){"use strict";function e(n,t,e){var a={getRegisteredPalettes:function(){return e.PALETTES},getRegisteredThemes:function(){return e.THEMES},setActiveTheme:function(e){if(angular.isUndefined(a.themes.list[e]))return angular.isUndefined(a.themes.list.default)?void t.error('You must have at least one theme named "default"'):(t.warn('The theme "'+e+'" does not exist! Falling back to the "default" theme.'),a.themes.active.name="default",a.themes.active.theme=a.themes.list.default,void n.put("motion.selectedTheme",a.themes.active.name));a.themes.active.name=e,a.themes.active.theme=a.themes.list[e],n.put("motion.selectedTheme",e)},setThemesList:function(e){a.themes.list=e},themes:{list:{},active:{name:"",theme:{}}}};return a}e.$inject=["$cookies","$log","$mdTheming"],angular.module("app.core").service("motionTheming",e)}(),function(){"use strict";function e(n,s,o,r){this.search=function(n){for(var e=[],t=r.getFlatNavigation(),a=o.defer(),i=0;i"+(e.name||"extractedReport")+" will be deleted.").ariaLabel("delete extractedReport").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){y(e)},function(){console.log("CANCEL")})},f.success=E,f.getExtractedReports=function(){f.query.offset=(f.query.page-1)*f.query.limit,g.hasRole("admin")?f.promise=m.analyticExtractedReport.get(f.query,E).$promise:(f.query.id=f.userProfile.id,f.query.section="ExtractedReports",f.promise=m.userProfile.getResources(f.query,E).$promise)},f.createOrEditExtractedReport=function(e,n){i.show({controller:"CreateOrEditExtractedReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/extractedReports/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{extractedReport:n,extractedReports:f.extractedReports.rows,license:f.license,setting:f.setting,crudPermissions:f.crudPermissions}})},f.deleteExtractedReport=y,f.exportSelectedExtractedReports=function(){var e=angular.copy(f.selectedExtractedReports);return f.selectedExtractedReports=[],e},f.deleteSelectedExtractedReports=function(e){var n=i.confirm().title("Are you sure want to delete the selected extractedReports?").htmlContent(""+f.selectedExtractedReports.length+" selected will be deleted.").ariaLabel("delete ExtractedReports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){f.selectedExtractedReports.forEach(function(e){y(e)}),f.selectedExtractedReports=[]})},f.deselectExtractedReports=function(){f.selectedExtractedReports=[]},f.selectAllExtractedReports=function(){f.selectedExtractedReports=f.extractedReports.rows};var b=!0,A=1;function E(e){f.extractedReports=e||{count:0,rows:[]}}function y(e){m.analyticExtractedReport.delete({id:e.id}).$promise.then(function(){_.remove(f.extractedReports.rows,{id:e.id}),f.extractedReports.count-=1,f.extractedReports.rows.length||f.getExtractedReports(),p.success({title:_.startCase("ExtractedReport")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){f.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticExtractedReport"}];for(var n=0;n"+(e.name||"metric")+" will be deleted.").ariaLabel("delete metric").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){y(e)},function(){console.log("CANCEL")})},f.success=E,f.getMetrics=function(){f.query.offset=(f.query.page-1)*f.query.limit,g.hasRole("admin")?f.promise=m.analyticMetric.get(f.query,E).$promise:(f.query.id=f.userProfile.id,f.query.section="Metrics",f.promise=m.userProfile.getResources(f.query,E).$promise)},f.createOrEditMetric=function(e,n){i.show({controller:"CreateOrEditMetricDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/metrics/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{metric:n,metrics:f.metrics.rows,license:f.license,setting:f.setting,crudPermissions:f.crudPermissions}})},f.deleteMetric=y,f.exportSelectedMetrics=function(){var e=angular.copy(f.selectedMetrics);return f.selectedMetrics=[],e},f.deleteSelectedMetrics=function(e){var n=i.confirm().title("Are you sure want to delete the selected metrics?").htmlContent(""+f.selectedMetrics.length+" selected will be deleted.").ariaLabel("delete Metrics").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){f.selectedMetrics.forEach(function(e){y(e)}),f.selectedMetrics=[]})},f.deselectMetrics=function(){f.selectedMetrics=[]},f.selectAllMetrics=function(){f.selectedMetrics=f.metrics.rows};var b=!0,A=1;function E(e){f.metrics=e||{count:0,rows:[]}}function y(e){m.analyticMetric.delete({id:e.id}).$promise.then(function(){_.remove(f.metrics.rows,{id:e.id}),f.metrics.count-=1,f.metrics.rows.length||f.getMetrics(),p.success({title:_.startCase("Metric")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){f.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEanalyticMetric"}];for(var n=0;n"+e.field+" will be deleted.").ariaLabel("delete field").targetEvent(n).ok("OK").cancel("CANCEL");a.show(t).then(function(){p(e)},function(){console.log("CANCEL")})},c.success=u,c.getReportFields=function(){c.promise=o.analyticFieldReport.get(c.query,u).$promise},c.createOrEditReportField=function(e,n){a.show({controller:"CreateOrEditReportFieldDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/edit/field/dialog.html",parent:angular.element(i.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:c.report,reportField:n,reportFields:c.reportFields.rows,metrics:c.metrics,columns:c.columns,setting:null,crudPermissions:c.crudPermissions}})},c.deleteReportField=p,c.deleteSelectedReportFields=function(e){var n=a.confirm().title("Are you sure want to delete the selected fields?").htmlContent(""+c.selectedReportFields.length+" selected will be deleted.").ariaLabel("delete fields").targetEvent(e).ok("OK").cancel("CANCEL");a.show(n).then(function(){c.selectedReportFields.forEach(function(e){p(e)}),c.selectedReportFields=[]})},c.getMetricName=function(e){var n=_.find(c.metrics,{id:e});return n?n.name:d.instant("ANALYTICS.NO_METRIC_FOUND")},c.getMetricValue=function(e){var n=_.find(c.metrics,{id:e});return n?n.metric:d.instant("ANALYTICS.NO_METRIC_FOUND")};var m=!0;function u(e){c.reportFields=e||{count:0,rows:[]}}function p(e){o.analyticFieldReport.delete({id:e.id}).$promise.then(function(){c.selectedReportFields=[],_.remove(c.reportFields.rows,{id:e.id}),c.reportFields.count-=1,c.reportFields.rows.length||c.getReportFields(),s.success({title:"Field deleted!",msg:e.field?e.field+" has been deleted!":""})}).catch(function(e){s.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEFIELD",msg:e.data?JSON.stringify(e.data):e.toString()})})}n.$watch("vm_rf.query.filter",function(e,n){m?t(function(){m=!1}):c.getReportFields()})}e.$inject=["$cookies","$scope","$timeout","$mdDialog","$document","toasty","api","describeTable","sqlUtil","$translate"],angular.module("app.analytics").controller("ReportFieldsController",e)}(),function(){"use strict";angular.module("app.analytics").factory("sqlUtil",function(){return{getFunctions:[{value:"SUM",option:function(e){return"SUM ("+e+")"}},{value:"COUNT",option:function(e){return"COUNT ("+e+")"}},{value:"COUNT DISTINCT",option:function(e){return"COUNT (DISTINCT "+e+")"}},{value:"MAX",option:function(e){return"MAX ("+e+")"}},{value:"MIN",option:function(e){return"MIN ("+e+")"}},{value:"AVG",option:function(e){return"AVG ("+e+")"}},{value:"GROUP_CONCAT",option:function(e){return"GROUP_CONCAT ("+e+")"}},{value:"GROUP_CONCAT ASC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" ASC)"}},{value:"GROUP_CONCAT DESC",option:function(e){return"GROUP_CONCAT ("+e+" ORDER BY "+e+" DESC)"}}],getFormats:[{value:"SEC_TO_TIME",option:function(e){return"SEC_TO_TIME ("+e+")"}},{value:"DATE",option:function(e){return"DATE ("+e+")"}},{value:"HOUR",option:function(e){return"HOUR ("+e+")"}},{value:"ROUND",option:function(e){return"ROUND ("+e+")"}},{value:"UNIX_TIMESTAMP",option:function(e){return"UNIX_TIMESTAMP ("+e+")"}}],getGroupBy:[{value:!1,option:function(){return"No"}},{value:!0,option:function(e){return"GROUP BY "+e}}],getOrderBy:[{value:"ASC",option:function(e){return"ORDER BY "+e+" ASC"}},{value:"DESC",option:function(e){return"ORDER BY "+e+" DESC"}}],getConditions:["=","!=","<","<=",">",">=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS EMPTY","IS NOT EMPTY"]}})}(),function(){"use strict";function e(e,n,t,a,i,s){var o=this;function r(e){return _.isArray(e)}o.report=a||{},o.userProfileSection=s&&1==s.count?s.rows[0]:null,o.crudPermissions=i.parseCrudPermissions(o.userProfileSection?o.userProfileSection.crudPermissions:null),o.selectedTab=e.params.tab||0,o.gotoReports=function(){e.go("app.analytics.reports",{},{reload:"app.analytics.reports"})},o.saveReport=function(){o.report.conditions=angular.toJson(o.report.condition),t.analyticCustomReport.update({id:o.report.id},_.omit(o.report,"joins")).$promise.then(function(){n.success({title:"Report updated!",msg:o.report.name?o.report.name+" has been updated!":""})}).catch(function(e){n.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETreport",msg:e.data?JSON.stringify(e.data):e.toString()})})},o.previewReport=function(){o.columns=[],o.rows=[],o.error=!1,t.analyticFieldReport.get({fields:"field,alias",nolimit:!0,CustomReportId:o.report.id}).$promise.then(function(e){return o.columns=e?e.rows:[],t.analyticCustomReport.preview({id:o.report.id}).$promise}).then(function(e){o.rows=e}).catch(function(e){console.log(e),o.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},n.error(o.error)})},o.queryReport=function(){return o.queryResult="Loading...",t.analyticCustomReport.query({id:o.report.id}).$promise.then(function(e){o.queryResult=e.sql}).catch(function(e){o.queryResult="",console.log(e),o.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},n.error(o.error)})},o.mapArray=function(e,n){if(r(e))return _.map(e,n).join(",");return""},o.isArray=r,o.valueReplacer=function(e,n){moment(n,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(n=moment(n,"").format("YYYY-MM-DD HH:mm:ss"));return n}}e.$inject=["$state","toasty","api","report","Auth","userProfileSection"],angular.module("app.analytics").controller("ReportController",e)}(),function(){"use strict";function e(e,n,t,a,i,s){var o=this;o.errors=[],o.report=angular.copy(a),o.valueReplacer=function(e,n){moment(n,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(n=moment(n,"").format("YYYY-MM-DD HH:mm:ss"));return n},o.closeDialog=function(){n.hide()},function(){o.columns=[],o.rows=[],o.error=!1;var e={fields:"field,alias",nolimit:!0};e["analyticCustomReport"===s?"CustomReportId":"DefaultReportId"]=o.report.id,o.promise=i.analyticFieldReport.get(e).$promise.then(function(e){return o.columns=e?e.rows:[],i[s].preview({id:o.report.id}).$promise}).then(function(e){o.rows=e}).catch(function(e){console.log(e),o.error={title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:analyticFieldReport",msg:e.data?e.data.message:e.toString(),sql:e.data&&e.data.parent?e.data.parent.sql:"NO QUERY"},t.error(o.error)})}()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName"],angular.module("app.analytics").controller("PreviewReportDialogController",e)}(),function(){"use strict";function e(e,t,a,i,s,o,n,r,l,d,c,m,u){var p=this;p.currentUser=u.getCurrentUser(),p.reports={count:0,rows:[]},p.userProfile=r,p.userProfileSection=l&&1==l.count?l.rows[0]:null,p.crudPermissions=u.parseCrudPermissions(p.userProfileSection?p.userProfileSection.crudPermissions:null),p.selectedReports=[],p.query={fields:"createdAt,updatedAt,id,name,description,table,parent,conditions,joins",limit:10,page:1,sort:"-updatedAt"},p.apiName=null,p.currentPath="",p.customTree=!0,p.editstate=function(e,n){s.go("app.analytics.reports.edit",{id:e.id,crudPermissions:p.crudPermissions})},p.copydialog=function(e,n){i.show({controller:"CopyReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/copy/dialog.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{report:e,apiName:p.apiName,treeCustomData:p.treeCustomInstance.jstree(!0).get_json("#")}}).finally(function(){})},p.previewdialog=function(e,n){i.show({controller:"PreviewReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/preview/dialog.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{report:e,apiName:p.apiName}})},p.rundialog=function(e,n){i.show({controller:"RunReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/dialog.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{report:e,apiName:p.apiName,currentPath:p.currentPath}})},p.downloadfile=function(a,e){var i;d.analyticMetric.get({fields:"id,name,metric,table",nolimit:!0}).$promise.then(function(e){i=_.keyBy(e.rows,"id");var n={fields:"field,alias,function,format,groupBy,orderBy,custom,MetricId",nolimit:!0};return n["analyticCustomReport"===p.apiName?"CustomReportId":"DefaultReportId"]=a.id,d.analyticFieldReport.get(n).$promise}).then(function(e){for(var n=0;n"+e.name+" will be deleted.").ariaLabel("delete report").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){b(e)},function(){console.log("CANCEL")})},p.success=h,p.getReports=f,p.createOrEditReport=function(e,n){i.show({controller:"CreateOrEditReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/create/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{report:n,reports:p.reports.rows,apiName:p.apiName,currentNode:p.currentNode,setting:null,crudPermissions:p.crudPermissions}})},p.importReport=function(e,n,t){if("application/json"===e.file.type){var a=new FileReader;a.onload=function(e){console.log(e.target.result);try{var t=atob(e.target.result.split(",")[1]);t=angular.fromJson(t),d.analyticCustomReport.save({name:t.name,description:t.description,table:t.table,conditions:t.conditions,joins:t.joins,parent:p.currentNode.id}).$promise.then(function(n){p.reports.rows.unshift(n),m.success({title:"Report saved!",msg:n.name?n.name+" has been saved!":""});var e=_.map(t.fields,function(e){return _.extend({},e,{CustomReportId:n.id})});return d.analyticFieldReport.bulkCreate(e).$promise}).then(function(e){m.success({title:"Fields saved!",msg:"Fields has been saved!"})}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETanalyticReport",msg:e.data?JSON.stringify(e.data):e.toString()})})}catch(e){console.error(e),m.error({title:"Decode File Error",msg:e.toString()})}},a.readAsDataURL(e.file)}else m.error({title:"Format Error",msg:"Please use only json files"})},p.deleteReport=b,p.exportSelectedReports=function(){var e=angular.copy(p.selectedReports);return p.selectedReports=[],e},p.deleteSelectedReports=function(e){var n=i.confirm().title("Are you sure want to delete the selected reports?").htmlContent(""+p.selectedReports.length+" selected will be deleted.").ariaLabel("delete Reports").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){p.selectedReports.forEach(function(e){b(e)}),p.selectedReports=[]})},p.deselectReports=function(){p.selectedReports=[]},p.selectAllReports=function(){p.selectedReports=p.reports.rows},p.treeDefaultData=c.rows[0]?angular.fromJson(c.rows[0].tree):[],p.treeCustomData=c.rows[1]?angular.fromJson(c.rows[1].tree):[],p.treeDefaultConfig=S(!1),p.treeCustomConfig=S(!0),p.treeDefaultEvents=T(!1),p.treeCustomEvents=T(!0);var g=!0,v=1;function h(e){p.reports=e||{count:0,rows:[]}}function f(){if(p.query.offset=(p.query.page-1)*p.query.limit,p.apiName)if("admin"===p.currentUser.role||p.userProfileSection.autoAssociation)p.promise=d[p.apiName].get(p.query,h).$promise;else{var a=[];p.promise=d[p.apiName].get(p.query).$promise.then(function(e){return 0<(a=e&&e.rows?e.rows:[]).length?d.userProfileResource.get({sectionId:p.userProfileSection.id,type:"analyticDefaultReport"===p.apiName?"DefaultReports":"CustomReports"}).$promise.then(function(e){var n=e&&e.rows?e.rows:[];if(0"+(t.text?t.text:"Node")+" and its subnode will be deleted.").ariaLabel("delete node").ok("OK").cancel("CANCEL");i.show(e).then(function(){var e,n=p.treeCustomInstance.jstree(!0).get_parent(t);n=p.treeCustomInstance.jstree(!0).get_node(n),p.treeCustomInstance.jstree(!0).delete_node(t),e=[t.id].concat(t.children_d||[]),d.analyticCustomReport.get({parent:e.join(","),fields:"id,name"}).$promise.then(function(e){e&&e.rows&&e.rows.forEach(function(e){b(e)})}).catch(function(e){m.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DELETEreportsByParents",msg:e.data?JSON.stringify(e.data):e.toString()})}),p.treeCustomInstance.jstree(!0).select_node(n)})}}}),e}}}}function T(e){return e?{create_node:y,rename_node:y,move_node:y,delete_node:y,select_node:A}:{select_node:E}}e.$watch("vm.query.filter",function(e,n){g?t(function(){g=!1}):(n||(v=p.query.page),e!==n&&(p.query.page=1),e||(p.query.page=v),p.getReports())}),e.$watch("vm.search",function(e,n){p.treeDefaultInstance&&p.treeDefaultInstance.jstree(!0).search(e),p.treeCustomInstance&&p.treeCustomInstance.jstree(!0).search(e)})}e.$inject=["$scope","$timeout","$document","$mdDialog","$state","$window","$translate","userProfile","userProfileSection","api","treeReports","toasty","Auth"],angular.module("app.analytics").controller("ReportsController",e)}(),function(){"use strict";function e(e,t,a,n,i,s,o,r){var l=this;function d(){l.export={id:l.report.id,name:l.report.name,startDate:new Date(moment().startOf("day")),endDate:new Date(moment().endOf("day")),output:"xlsx",fullPath:r?r+"/"+l.report.name:l.report.name}}function c(){t.hide()}l.errors=[],l.report=angular.copy(n),l.export={},l.runReport=function(n){l.errors=[],l.exportDate=_.assign({},l.export,{startDate:moment(l.export.startDate).format("YYYY-MM-DD HH:mm:ss"),endDate:moment(l.export.endDate).format("YYYY-MM-DD HH:mm:ss")}),i[s].run(l.exportDate).$promise.then(function(e){"web"===l.export.output?t.show({controller:"WebReportDialogController",controllerAs:"vm",templateUrl:"app/main/apps/analytics/views/reports/run/web/dialog.html",parent:angular.element(o.body),targetEvent:n,skipHide:!0,locals:{apiName:s,exportDate:l.exportDate,results:e},resolve:{columns:["apiResolver",function(e){var n={fields:"field,alias",nolimit:!0};return n["analyticCustomReport"===s?"CustomReportId":"DefaultReportId"]=l.report.id,e.resolve("analyticFieldReport@get",n)}]}}):(a.success({title:"Report properly run!",msg:l.report.name?l.report.name+" has been run!":""}),c())}).catch(function(e){a.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:DESCRIBE",msg:e.data?JSON.stringify(e.data.message):e.toString()})})},l.closeDialog=c,(l.refreshDate=d)()}e.$inject=["$location","$mdDialog","toasty","report","api","apiName","$document","currentPath"],angular.module("app.analytics").controller("RunReportDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o){var r=this;function l(e){r.results=e||{count:0,rows:[]}}r.errors=[],r.columns=a?a.rows:[],r.results=i||{rows:[],count:0},r.query={limit:10,page:1},r.closeDialog=function(){e.hide()},r.getResults=function(){o.offset=(r.query.page-1)*r.query.limit,o.limit=r.query.limit,r.promise=t[s].run(o,l).$promise},r.valueReplacer=function(e,n){moment(n,"YYYY-MM-DDTHH:mm:ssZ",!0).isValid()&&(n=moment(n,"").format("YYYY-MM-DD HH:mm:ss"));return n}}e.$inject=["$mdDialog","toasty","api","columns","results","apiName","exportDate"],angular.module("app.analytics").controller("WebReportDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CALLYSQUARE.EDIT_ODBC",g.odbc=angular.copy(l),g.odbcs=r,g.newOdbc=!1,g.odbc||(g.odbc={},g.title="CALLYSQUARE.NEW_ODBC",g.newOdbc=!0),g.addNewOdbc=function(){g.errors=[],d.squareOdbc.save(g.odbc).$promise.then(function(e){g.odbcs.unshift(e.toJSON()),o.success({title:"Odbc properly created",msg:g.odbc.name?g.odbc.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.squareOdbc.save"}];for(var n=0;n"+(e.name||"odbc")+" will be deleted.").ariaLabel("delete odbc").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){y(e)},function(){console.log("CANCEL")})},f.success=E,f.getODBC=function(){f.query.offset=(f.query.page-1)*f.query.limit,g.hasRole("admin")?f.promise=m.squareOdbc.get(f.query,E).$promise:(f.query.id=f.userProfile.id,f.query.section="ODBC",f.promise=m.userProfile.getResources(f.query,E).$promise)},f.createOrEditOdbc=function(e,n){i.show({controller:"CreateOrEditOdbcDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/odbcs/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{odbc:n,odbcs:f.odbcs.rows,license:f.license,setting:f.setting,crudPermissions:f.crudPermissions}})},f.deleteOdbc=y,f.exportSelectedODBC=function(){var e=angular.copy(f.selectedODBC);return f.selectedODBC=[],e},f.deleteSelectedODBC=function(e){var n=i.confirm().title("Are you sure want to delete the selected odbcs?").htmlContent(""+f.selectedODBC.length+" selected will be deleted.").ariaLabel("delete Odbcs").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){f.selectedODBC.forEach(function(e){y(e)}),f.selectedODBC=[]})},f.deselectODBC=function(){f.selectedODBC=[]},f.selectAllODBC=function(){f.selectedODBC=f.odbcs.rows};var b=!0,A=1;function E(e){f.odbcs=e||{count:0,rows:[]}}function y(e){m.squareOdbc.delete({id:e.id}).$promise.then(function(){_.remove(f.odbcs.rows,{id:e.id}),f.odbcs.count-=1,f.odbcs.rows.length||f.getODBC(),p.success({title:_.startCase("Odbc")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){f.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareOdbc"}];for(var n=0;n"+e.name+" will be deleted.").ariaLabel("delete project").targetEvent(n).ok("OK").cancel("CANCEL");l.show(t).then(function(){f(e)},function(){console.log("CANCEL")})},p.success=h,p.getProjects=function(){p.query.offset=(p.query.page-1)*p.query.limit,u.hasRole("admin")?p.promise=o.squareProject.get(p.query,h).$promise:(p.query.id=p.userProfile.id,p.query.section="SquareProjects",p.promise=o.userProfile.getResources(p.query,h).$promise)},p.createOrEditProject=function(e,n){l.show({controller:"CreateOrEditSquareProjectDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/projects/create/dialog.html",parent:angular.element(d.body),targetEvent:e,clickOutsideToClose:!0,locals:{project:n,projects:p.projects.rows,openFromEditor:null,setting:null,crudPermissions:p.crudPermissions}})},p.deleteProject=f,p.exportSelectedProjects=function(){var e=angular.copy(p.selectedProjects);return p.selectedProjects=[],e},p.deleteSelectedProjects=function(e){var n=l.confirm().title("Are you sure want to delete the selected projects?").htmlContent(""+p.selectedProjects.length+" selected will be deleted.").ariaLabel("delete Projects").targetEvent(e).ok("OK").cancel("CANCEL");l.show(n).then(function(){p.selectedProjects.forEach(function(e){f(e)}),p.selectedProjects=[]})},p.deselectProjects=function(){p.selectedProjects=[]},p.selectAllProjects=function(){p.selectedProjects=p.projects.rows};var g=!0,v=1;function h(e){p.projects=e||{count:0,rows:[]}}function f(e){o.squareProject.delete({id:e.id}).$promise.then(function(){_.remove(p.projects.rows,{id:e.id}),p.projects.count-=1,p.projects.rows.length||p.getProjects(),m.success({title:"Project deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){p.errors=e.data.errors||[{message:e.toString(),type:"api.project.delete"}];for(var n=0;n"+(e.name||"squareRecording")+" will be deleted.").ariaLabel("delete squareRecording").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){y(e)},function(){console.log("CANCEL")})},f.success=E,f.getSquareRecordings=function(){f.query.offset=(f.query.page-1)*f.query.limit,g.hasRole("admin")?f.promise=m.squareRecording.get(f.query,E).$promise:(f.query.id=f.userProfile.id,f.query.section="SquareRecordings",f.promise=m.userProfile.getResources(f.query,E).$promise)},f.createOrEditSquareRecording=function(e,n){i.show({controller:"CreateOrEditSquareRecordingDialogController",controllerAs:"vm",templateUrl:"app/main/apps/callysquare/views/squareRecordings/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{squareRecording:n,squareRecordings:f.squareRecordings.rows,license:f.license,setting:f.setting,crudPermissions:f.crudPermissions}})},f.deleteSquareRecording=y,f.exportSelectedSquareRecordings=function(){var e=angular.copy(f.selectedSquareRecordings);return f.selectedSquareRecordings=[],e},f.deleteSelectedSquareRecordings=function(e){var n=i.confirm().title("Are you sure want to delete the selected squareRecordings?").htmlContent(""+f.selectedSquareRecordings.length+" selected will be deleted.").ariaLabel("delete SquareRecordings").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){f.selectedSquareRecordings.forEach(function(e){y(e)}),f.selectedSquareRecordings=[]})},f.deselectSquareRecordings=function(){f.selectedSquareRecordings=[]},f.selectAllSquareRecordings=function(){f.selectedSquareRecordings=f.squareRecordings.rows};var b=!0,A=1;function E(e){f.squareRecordings=e||{count:0,rows:[]}}function y(e){m.squareRecording.delete({id:e.id}).$promise.then(function(){_.remove(f.squareRecordings.rows,{id:e.id}),f.squareRecordings.count-=1,f.squareRecordings.rows.length||f.getSquareRecordings(),p.success({title:_.startCase("SquareRecording")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){f.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEsquareRecording"}];for(var n=0;n"+(e.name||"chatQueue")+" will be deleted.").ariaLabel("delete chatQueue").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){y(e)},function(){console.log("CANCEL")})},f.gotorealtimegoto=function(e,n){{if(!g.hasRole("admin"))return m.userProfileSection.get({userProfileId:g.getCurrentUser().userProfileId,sectionId:510}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;n&&n.enabled?t.go("app.chat.realtime.queues",{}):p.info({title:r.instant("STAFF.PERMISSIONS_UNAUTHORIZED_REDIRECT_TITLE"),msg:r.instant("STAFF.PERMISSIONS_UNAUTHORIZED_REDIRECT_MESSAGE")})}).catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"USERPROFILE:GET_SECTION",msg:e.status?JSON.stringify(e.data):e.toString()})});t.go("app.chat.realtime.queues",{})}},f.success=E,f.getChatQueues=function(){f.query.offset=(f.query.page-1)*f.query.limit,g.hasRole("admin")?f.promise=m.chatQueue.get(f.query,E).$promise:(f.query.id=f.userProfile.id,f.query.section="ChatQueues",f.promise=m.userProfile.getResources(f.query,E).$promise)},f.createOrEditChatQueue=function(e,n){i.show({controller:"CreateOrEditChatQueueDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatQueue:n,chatQueues:f.chatQueues.rows,license:f.license,setting:f.setting,crudPermissions:f.crudPermissions}})},f.deleteChatQueue=y,f.exportSelectedChatQueues=function(){var e=angular.copy(f.selectedChatQueues);return f.selectedChatQueues=[],e},f.deleteSelectedChatQueues=function(e){var n=i.confirm().title("Are you sure want to delete the selected chatQueues?").htmlContent(""+f.selectedChatQueues.length+" selected will be deleted.").ariaLabel("delete ChatQueues").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){f.selectedChatQueues.forEach(function(e){y(e)}),f.selectedChatQueues=[]})},f.deselectChatQueues=function(){f.selectedChatQueues=[]},f.selectAllChatQueues=function(){f.selectedChatQueues=f.chatQueues.rows};var b=!0,A=1;function E(e){f.chatQueues=e||{count:0,rows:[]}}function y(e){m.chatQueue.delete({id:e.id}).$promise.then(function(){_.remove(f.chatQueues.rows,{id:e.id}),f.chatQueues.count-=1,f.chatQueues.rows.length||f.getChatQueues(),p.success({title:_.startCase("ChatQueue")+" deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){f.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:DELETEchatQueue"}];for(var n=0;n":"",n}),c.startingSelectedItems=angular.copy(c.selectedItems),c.dualMultiselectOptions.selectedItems=c.selectedItems,c.dualMultiselectOptions.items=_.differenceBy(c.allowedItems,c.dualMultiselectOptions.selectedItems,"id"),t()}).catch(function(e){n(e)})})}c.currentUser=l.getCurrentUser(),c.chatQueue=n,c.crudPermissions=d,c.realtime=o,c.items=[],c.allowedItems=[],c.selectedItems=[],c.startingAllowedItems=[],c.startingSelectedItems=[],c.pendingChanges=!1,c.onInit=function(){return l.hasRole("admin")?m().catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})}):a(function(t,n){s.userProfileSection.get({userProfileId:c.currentUser.userProfileId,name:"Agents"}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;t(n)}).catch(function(e){n(e)})}).then(function(e){return c.section=e,m()}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.saveAgents=function(){var e=_.differenceBy(c.startingSelectedItems,c.selectedItems,"id"),n=_.differenceBy(c.selectedItems,c.startingSelectedItems,"id");return(t=e,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.removeAgents({id:c.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})})).then(function(){return t=n,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.addAgents({id:c.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})});var t}).then(function(){c.pendingChanges=!1,c.startingAllowedItems=angular.copy(c.allowedItems),c.startingSelectedItems=angular.copy(c.selectedItems),i.success({title:"SUCCESS",msg:"Agents association has been updated!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:LISTS_ASSOCIATION",msg:e.status?JSON.stringify(e.data):e.toString()})});var t},c.closeDialog=function(){e.hide()},c.dualMultiselectOptions={readOnly:!c.crudPermissions.canEdit,items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"",labelAll:r.instant("CHAT.ALL_AGENTS"),labelSelected:r.instant("CHAT.SELECTED_AGENTS"),transferCallback:function(e,n){var t=_.xorBy(c.startingSelectedItems,c.selectedItems,"id");c.pendingChanges=!_.isEmpty(t)}}}e.$inject=["$mdDialog","$q","toasty","api","chatQueue","chatQueues","realtime","$translate","Auth","crudPermissions"],angular.module("app.chat").controller("ChatQueueagentaddController",e)}(),function(){"use strict";function e(e,a,i,s,n,t,o,r){var l=this;function d(){return a(function(t,n){return a(function(n,t){return s.team.get({fields:"id,name",nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}).then(function(e){return l.items=e.rows?e.rows:[],o.hasRole("admin")?e:l.section?l.section.autoAssociation?e:a(function(n,t){return s.userProfileResource.get({sectionId:l.section.id,nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}):null}).then(function(e){var n=e&&e.rows?e.rows:[];return l.allowedItems=_.map(n,function(e){return _.find(l.items,{id:o.hasRole("admin")||l.section.autoAssociation?e.id:e.resourceId})}),l.items.forEach(function(e){var n=_.find(l.allowedItems,{id:e.id});o.hasRole("admin")?e.isValid=!0:e.isValid=void 0!==n}),a(function(n,t){return s.chatQueue.getTeams({id:l.chatQueue.id,fields:"id,name",nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})})}).then(function(e){var n=e&&e.rows?e.rows:[];l.selectedItems=_.map(n,function(e){return _.find(l.items,{id:e.id})}),l.startingSelectedItems=angular.copy(l.selectedItems),l.dualMultiselectOptions.selectedItems=l.selectedItems,l.dualMultiselectOptions.items=_.differenceBy(l.allowedItems,l.dualMultiselectOptions.selectedItems,"id"),t()}).catch(function(e){n(e)})})}l.currentUser=o.getCurrentUser(),l.chatQueue=n,l.crudPermissions=r,l.items=[],l.allowedItems=[],l.selectedItems=[],l.startingAllowedItems=[],l.startingSelectedItems=[],l.pendingChanges=!1,l.dualMultiselectOptions={readOnly:!l.crudPermissions.canEdit,allowedItems:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"name",line2:"",line3:"",labelAll:t.instant("CHAT.ALL_TEAMS"),labelSelected:t.instant("CHAT.SELECTED_TEAMS"),transferCallback:function(e,n){var t=_.xorBy(l.startingSelectedItems,l.selectedItems,"id");l.pendingChanges=!_.isEmpty(t)}},l.onInit=function(){return o.hasRole("admin")?d().catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_TEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})}):a(function(t,n){s.userProfileSection.get({userProfileId:l.currentUser.userProfileId,name:"Teams"}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;t(n)}).catch(function(e){n(e)})}).then(function(e){return l.section=e,d()}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_TEAMS",msg:e.status?JSON.stringify(e.data):e.toString()})})},l.saveTeams=function(){var e=_.differenceBy(l.startingSelectedItems,l.selectedItems,"id"),n=_.differenceBy(l.selectedItems,l.startingSelectedItems,"id");return(t=e,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.removeTeams({id:l.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})})).then(function(){return t=n,a(function(e,n){_.isEmpty(t)?e():s.chatQueue.addTeams({id:l.chatQueue.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})});var t}).then(function(){l.pendingChanges=!1,l.startingAllowedItems=angular.copy(l.allowedItems),l.startingSelectedItems=angular.copy(l.selectedItems),i.success({title:"SUCCESS",msg:"Teams association has been updated!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:LISTS_ASSOCIATION",msg:e.status?JSON.stringify(e.data):e.toString()})});var t},l.closeDialog=function(){e.hide()}}e.$inject=["$mdDialog","$q","toasty","api","chatQueue","$translate","Auth","crudPermissions"],angular.module("app.chat").controller("ChatQueueteamaddController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m){var u=this;u.currentUser=d.getCurrentUser(),u.license=s,u.setting=o,u.passwordPattern=u.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",u.location=n.protocol()+"://"+n.host(),u.chatQueue=c||e.params.chatQueue||{},u.userProfileSection=m&&1==m.count?m.rows[0]:null,u.crudPermissions=d.parseCrudPermissions(u.userProfileSection?u.userProfileSection.crudPermissions:null),u.hasModulePermissions={},u.selectedTab=e.params.tab||0,u.teamadddialog=function(e,n){t.show({controller:"ChatQueueteamaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/teamadd/teamadd.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:u.chatQueues?u.chatQueues.rows:[],crudPermissions:u.crudPermissions}})},u.agentadddialog=function(e,n){t.show({controller:"ChatQueueagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatQueues/edit/agentadd/agentadd.html",parent:angular.element(a.body),targetEvent:n,clickOutsideToClose:!0,locals:{chatQueue:e,chatQueues:u.chatQueues?u.chatQueues.rows:[],crudPermissions:u.crudPermissions,realtime:!1}})},u.alert=l.info,u.gotoChatQueues=function(){e.go("app.chat.chatQueues",{},{reload:"app.chat.chatQueues"})},u.saveChatQueue=function(){r.chatQueue.update({id:u.chatQueue.id},u.chatQueue).$promise.then(function(){l.success({title:"ChatQueue updated!",msg:u.chatQueue.name?u.chatQueue.name+" has been updated!":""})}).catch(function(e){l.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GETchatQueue",msg:e.data?JSON.stringify(e.data):e.toString()})})}}e.$inject=["$state","$location","$mdDialog","$document","$translate","license","setting","api","toasty","Auth","chatQueue","userProfileSection"],angular.module("app.chat").controller("ChatQueueController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p,g,v,h){var f=this;f.license=v,f.setting=h,f.currentUser=g.getCurrentUser(),f.chatWebsites=l||{count:0,rows:[]},f.userProfile=d,f.userProfileSection=c&&1==c.count?c.rows[0]:null,f.crudPermissions=g.parseCrudPermissions(f.userProfileSection?f.userProfileSection.crudPermissions:null),f.table="chatWebsites",f.listOrder="",f.listOrderAsc=null,f.selectedChatWebsites=[],f.query={fields:"createdAt,updatedAt,id,token,agentIdentifier,customerAlias,messageFontSize,name,key,address,remote,ListId,fidelity,timeout,agentAlias,closingQuestion,formSubmitSuccessMessage,formSubmitFailureMessage,color,color_focus,color_button,textColor,backgroundColor,fontSize,header_shape,showAgentAvatar,showCustomerAvatar,alignment,verticalAlignment,messagesAlignment,defaultTitle,animation,defaultWhiteLabel,whiteLabel,defaultLogo,conditionAgreement,autoclose,enableUnmanagedNote,unmanagedMessage,skipUnmanaged,sendUnmanaged,enableCustomerWriting,waitingTitle,waitingMessage,closingMessage,noteTitle,placeholderMessage,skipMessageButton,enableRating,ratingType,ratingStarsNumber,enableFeedback,feedbackTitle,forwardTranscript,forwardTranscriptMessage,closingMessageButton,download_transcript,enableCustomerAttachment,enableSendButton,enableCustomerCheckmarks,systemAlias,enquiry_enable,enquiry_forwarding,enquiry_forwarding_address,name_title,username_placeholder,email_title,email_placeholder,header_online,hideWhenOffline,header_offline,start_chat_button,offline_chat_button,offlineMessageSubject,offlineMessageBody,offline_message,message_title,enquiry_message_placeholder,enquiry_button,rating_message,rating_send,rating_skip,onlineForm,offlineForm,mapKey,mapKeyOffline,forwardOffline,forwardOfflineAddress,IntervalId,timezone,waitForTheAssignedAgent,mandatoryDisposition,mandatoryDispositionPauseId,description,notificationSound,notificationShake,notificationTemplate,queueTransfer,queueTransferTimeout,agentTransfer,agentTransferTimeout,vidaooEscalation,vidaooApiKey",sort:"-updatedAt",limit:10,page:1},f.arrayagentIdentifier=_.keyBy([{option:"WebsiteAlias",value:"'website_alias'"},{option:"AgentAlias",value:"'agent_alias'"},{option:"AgentFullname",value:"'agent_fullname'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.arrayheader_shape=_.keyBy([{option:"Rounded",value:"'rounded'"},{option:"Squared",value:"'squared'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.arrayalignment=_.keyBy([{option:"bottom_right",value:"'bottom_right'"},{option:"right",value:"'right'"},{option:"left",value:"'left'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.arraymessagesAlignment=_.keyBy([{option:"alternate",value:"'alternate'"},{option:"centered",value:"'centered'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.arrayratingType=_.keyBy([{option:"Star",value:"'star'"},{option:"Thumb",value:"'thumb'"}],function(e){return _.replace(e.value,new RegExp("'","g"),"")}),f.editstate=function(e,n){t.go("app.chat.chatWebsites.edit",{id:e.id,chatWebsite:e,crudPermissions:f.crudPermissions})},f.interactionsgoto=function(e,n){t.go("app.chat.chatWebsites.edit",{id:e.id,tab:10})},f.offlinemessagesgoto=function(e,n){t.go("app.chat.chatWebsites.edit",{id:e.id,tab:11})},f.agentadddialog=function(e,n){i.show({controller:"ChatWebsiteagentaddController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/agentadd/agentadd.html",parent:angular.element(s.body),targetEvent:n,clickOutsideToClose:!0,locals:{chatWebsite:e,chatWebsites:f.chatWebsites?f.chatWebsites.rows:[],crudPermissions:f.crudPermissions,realtime:!1}})},f.deleteconfirm=function(e,n){var t=i.confirm().title("Are you sure want to delete the "+_.startCase("chatWebsite")+"?").htmlContent(""+(e.name||"chatWebsite")+" will be deleted.").ariaLabel("delete chatWebsite").targetEvent(n).ok("OK").cancel("CANCEL");i.show(t).then(function(){y(e)},function(){console.log("CANCEL")})},f.success=E,f.getChatWebsites=function(){f.query.offset=(f.query.page-1)*f.query.limit,g.hasRole("admin")?f.promise=m.chatWebsite.get(f.query,E).$promise:(f.query.id=f.userProfile.id,f.query.section="ChatWebsites",f.promise=m.userProfile.getResources(f.query,E).$promise)},f.createOrEditChatWebsite=function(e,n){i.show({controller:"CreateOrEditChatWebsiteDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/create/dialog.html",parent:angular.element(s.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:n,chatWebsites:f.chatWebsites.rows,license:f.license,setting:f.setting,crudPermissions:f.crudPermissions}})},f.deleteChatWebsite=y,f.exportSelectedChatWebsites=function(){var e=angular.copy(f.selectedChatWebsites);return f.selectedChatWebsites=[],e},f.deleteSelectedChatWebsites=function(e){var n=i.confirm().title("Are you sure want to delete the selected chatWebsites?").htmlContent(""+f.selectedChatWebsites.length+" selected will be deleted.").ariaLabel("delete ChatWebsites").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){f.selectedChatWebsites.forEach(function(e){y(e)}),f.selectedChatWebsites=[]})},f.deselectChatWebsites=function(){f.selectedChatWebsites=[]},f.selectAllChatWebsites=function(){f.selectedChatWebsites=f.chatWebsites.rows},g.hasRole("admin")?m.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){f.lists=e.rows||[]}).catch(function(e){p.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_LISTS",msg:e.data?JSON.stringify(e.data):e.toString()})}):m.cmList.get({fields:"id,name",sort:"name"}).$promise.then(function(e){f.lists=e.rows||[]}).then(function(){return m.userProfileSection.get({userProfileId:f.currentUser.userProfileId,sectionId:301}).$promise}).then(function(e){var n=e&&e.rows?e.rows[0]:null;if(n){if(!n.autoAssociation)return m.userProfileResource.get({sectionId:n.id}).$promise.then(function(e){var n=_.map(e.rows,function(e){return _.find(f.lists,{id:e.resourceId})}),t=null;if(f.chatWebsite&&(t=_.find(f.lists,{id:Number(f.chatWebsite.ListId)})),t&&!_.some(n,["id",t.id])){var a=_.find(f.lists,{id:t.id});a.canSelect=!1,n.push(a)}f.lists=n})}else{var t=[],a=null;f.chatWebsite&&(a=_.find(f.lists,{id:Number(f.chatWebsite.ListId)}));for(var i=0;i"+e.app+" will be deleted.").ariaLabel("delete application").targetEvent(t).ok("OK").cancel("CANCEL");i.show(a).then(function(){r.chatWebsiteApps.rows.splice(n,1),l()},function(){console.log("CANCEL")})},r.getChatWebsiteApps=function(){r.promise=o.chatWebsite.getApplications(r.query,t).$promise},r.editChatWebsiteApp=n,r.editInterval=function(e,n){if(r.chatWebsiteApps.rows.length){var t=r.chatWebsiteApps.rows[n]?r.chatWebsiteApps.rows[n]:r.chatWebsiteApps.rows[0];i.show({controller:"EditChatWebsiteAppintervalDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/apps/interval/dialog.html",parent:angular.element(a.body),targetEvent:e,clickOutsideToClose:!0,locals:{interval:{interval:t.interval,IntervalId:t.IntervalId,application:!0},intervals:[],crudPermissions:r.crudPermissions}}).then(function(e){e&&(t.interval=e.interval||"*,*,*,*",t.IntervalId=e.IntervalId||null,l())})}},r.deleteChatWebsiteApp=function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id}),l(),s.success({title:"App deleted!",msg:e.app?e.app+" has been deleted!":""})},r.deleteSelectedChatWebsiteApps=function(e){var n=i.confirm().title("Are you sure want to delete the selected applications?").htmlContent(""+r.selectedChatWebsiteApps.length+" selected will be deleted.").ariaLabel("delete applications").targetEvent(e).ok("OK").cancel("CANCEL");i.show(n).then(function(){r.selectedChatWebsiteApps.forEach(function(e){_.remove(r.chatWebsiteApps.rows,{id:e.id})}),r.selectedChatWebsiteApps=[],l()})},r.rewriteRouting=l,r.getIntervals=function(){return o.interval.get({fields:"id,interval,IntervalId"}).$promise.then(function(e){r.intervals=e}).catch(function(e){console.error(e)})}}e.$inject=["api","$mdDialog","$document","toasty","Auth"],angular.module("app.chat").controller("ChatWebsiteActionsController",e)}(),function(){"use strict";function e(e,a,i,s,n,t,o,r,l,d){var c=this;function m(){return a(function(t,n){return a(function(n,t){return s.user.get({fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}).then(function(e){return c.items=e.rows?e.rows:[],l.hasRole("admin")?e:c.section?c.section.autoAssociation?e:a(function(n,t){return s.userProfileResource.get({sectionId:c.section.id,nolimit:!0}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})}):null}).then(function(e){var n=e&&e.rows?e.rows:[];return c.allowedItems=_.map(n,function(e){return _.find(c.items,{id:l.hasRole("admin")||c.section.autoAssociation?e.id:e.resourceId})}),c.startingAllowedItems=angular.copy(c.allowedItems),c.items.forEach(function(e){var n=_.find(c.allowedItems,{id:e.id});l.hasRole("admin")?e.isValid=!0:e.isValid=void 0!==n}),a(function(n,t){return s.chatWebsite.getAgents({id:c.chatWebsite.id,fields:"id,name,internal,fullname",nolimit:!0,role:"agent"}).$promise.then(function(e){n(e)}).catch(function(e){t(e)})})}).then(function(e){var n=e&&e.rows?e.rows:[];c.selectedItems=_.map(n,function(e){var n=_.find(c.items,{id:e.id});return n.penalty=e.UserChatWebsite?"penalty "+e.UserChatWebsite.penalty:"",n.internal=e.hasOwnProperty("internal")?"<"+e.internal+">":"",n}),c.startingSelectedItems=angular.copy(c.selectedItems),c.dualMultiselectOptions.selectedItems=c.selectedItems,c.dualMultiselectOptions.items=_.differenceBy(c.allowedItems,c.dualMultiselectOptions.selectedItems,"id"),t()}).catch(function(e){n(e)})})}c.currentUser=l.getCurrentUser(),c.chatWebsite=n,c.crudPermissions=d,c.realtime=o,c.items=[],c.allowedItems=[],c.selectedItems=[],c.startingAllowedItems=[],c.startingSelectedItems=[],c.pendingChanges=!1,c.onInit=function(){return l.hasRole("admin")?m().catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})}):a(function(t,n){s.userProfileSection.get({userProfileId:c.currentUser.userProfileId,name:"Agents"}).$promise.then(function(e){var n=e&&e.rows?e.rows[0]:null;t(n)}).catch(function(e){n(e)})}).then(function(e){return c.section=e,m()}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:GET_AGENTS",msg:e.status?JSON.stringify(e.data):e.toString()})})},c.saveAgents=function(){var e=_.differenceBy(c.startingSelectedItems,c.selectedItems,"id"),n=_.differenceBy(c.selectedItems,c.startingSelectedItems,"id");return(t=e,a(function(e,n){_.isEmpty(t)?e():s.chatWebsite.removeAgents({id:c.chatWebsite.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})})).then(function(){return t=n,a(function(e,n){_.isEmpty(t)?e():s.chatWebsite.addAgents({id:c.chatWebsite.id,ids:_.map(t,"id")}).$promise.then(function(){e()}).catch(function(e){n(e)})});var t}).then(function(){c.pendingChanges=!1,c.startingAllowedItems=angular.copy(c.allowedItems),c.startingSelectedItems=angular.copy(c.selectedItems),i.success({title:"SUCCESS",msg:"Agents association has been updated!"})}).catch(function(e){i.error({title:e.status?"API:"+e.status+" - "+e.statusText:"SYSTEM:LISTS_ASSOCIATION",msg:e.status?JSON.stringify(e.data):e.toString()})});var t},c.closeDialog=function(){e.hide()},c.dualMultiselectOptions={readOnly:!c.crudPermissions.canEdit,items:[],selectedItems:[],showSelectAndDeselectAll:!0,orderBy:"name",line1:"fullname",line2:["name","internal"],line3:"",labelAll:r.instant("CHAT.ALL_AGENTS"),labelSelected:r.instant("CHAT.SELECTED_AGENTS"),transferCallback:function(e,n){var t=_.xorBy(c.startingSelectedItems,c.selectedItems,"id");c.pendingChanges=!_.isEmpty(t)}}}e.$inject=["$mdDialog","$q","toasty","api","chatWebsite","chatWebsites","realtime","$translate","Auth","crudPermissions"],angular.module("app.chat").controller("ChatWebsiteagentaddController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.crudPermissions,i.ngFlowOptions={singleFile:!0,maxChunkRetries:1,chunkSize:8388608,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var n=["png","jpg"];if(!_.includes(n,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported extension: "+n.join()}),!1;if(8388608"+(e.name||e.id&&_.upperFirst("chatCannedAnswer #")+e.id||"chatCannedAnswer")+" will be deleted.").ariaLabel("delete chatCannedAnswer").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteChatCannedAnswers=p,m.createOrEditChatWebsiteChatCannedAnswer=function(e,n){o.show({controller:"CreateOrEditChatCannedAnswerDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/chatCannedAnswers/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,chatCannedAnswer:n,chatCannedAnswers:m.chatWebsiteChatCannedAnswers.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.exportSelectedChatWebsiteChatCannedAnswers=function(){var e=angular.copy(m.selectedChatWebsiteChatCannedAnswers);return m.selectedChatWebsiteChatCannedAnswers=[],e},m.deleteChatWebsiteChatCannedAnswer=g,m.deleteSelectedChatWebsiteChatCannedAnswers=function(e){var n=o.confirm().title("Are you sure want to delete the selected chatCannedAnswers?").htmlContent(""+m.selectedChatWebsiteChatCannedAnswers.length+" selected will be deleted.").ariaLabel("delete chatCannedAnswers").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteChatCannedAnswers.forEach(function(e){g(e)}),m.selectedChatWebsiteChatCannedAnswers=[]})}}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteChatCannedAnswersController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CHAT.EDIT_CHATCANNEDANSWER",g.chatCannedAnswer=angular.copy(l),g.chatCannedAnswers=r,g.newChatCannedAnswer=!1,g.chatCannedAnswer||(g.chatCannedAnswer={},g.title="CHAT.NEW_CHATCANNEDANSWER",g.newChatCannedAnswer=!0),n.params.id&&(g.chatCannedAnswer.ChatWebsiteId=n.params.id),g.addNewChatCannedAnswer=function(){g.errors=[],d.cannedAnswer.save(g.chatCannedAnswer).$promise.then(function(e){g.chatCannedAnswers.unshift(e.toJSON()),o.success({title:"ChatCannedAnswer properly created",msg:g.chatCannedAnswer.name?g.chatCannedAnswer.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.cannedAnswer.save"}];for(var n=0;n":i.instant("DASHBOARDS.NOT_ASSIGNED")}m.currentUser=c.getCurrentUser(),m.chatWebsite={},m.chatWebsiteInteractions={count:0,rows:[]},m.selectedChatWebsiteInteractions=[],m.crudPermissions,m.query={read:"null",closed:"null",sort:"-createdAt",includeAll:"true",limit:10,page:1},m.init=function(e,n){m.chatWebsite=e,m.crudPermissions=void 0!==n?n:{readOnly:!0,canEdit:!1,canDelete:!1},m.query.ChatWebsiteId=m.chatWebsite.id,m.advancedSearch={fields:[{name:"Id",column:"id",type:"number"},{name:"Contact",column:"Contact",type:"autocomplete",options:{searchFields:["firstName","lastName","email"],route:{model:"cmContact",action:"get",params:{fields:"id,firstName,lastName,email",Contact:"@autocomplete",nolimit:!0}},extraOperators:["$substring"],excludedOperators:["$ne"]}},{name:"Body",column:"body",type:"text",options:{excludedOperators:["$eq","$ne"]}},{name:"Status",column:"closed",type:"select",values:[{id:0,translate:"DASHBOARDS.OPENED"},{id:1,translate:"DASHBOARDS.CLOSED"}],options:{excludedOperators:["$ne"]}},{name:"Customer Ip",column:"customerIp",type:"text",options:{excludedOperators:["$eq","$ne","$startsWith","$endsWith"]}},{name:"Agent",column:"User",type:"autocomplete",options:{table:"i",route:{model:"user",action:"get",params:{role:"agent",fields:"id,name,fullname",nolimit:!0}},searchFields:["fullname","name"],extraOperators:["$substring"],excludedOperators:["$ne"]}},{name:"Tags",column:"Tag",type:"multiselect",options:{route:{model:"tag",action:"get",params:{nolimit:!0}},excludedOperators:["$notIn"]}},{name:"Start Date",column:"createdAt",type:"date",options:{excludedOperators:["$ne"]}},{name:"Read",column:"unreadMessages",type:"select",values:[{id:1,translate:"DASHBOARDS.READ"},{id:0,translate:"DASHBOARDS.UNREAD"}],options:{excludedOperators:["$ne"]}}]},d.tag.get().$promise.then(function(e){m.tags=e||{count:0,rows:[]}}).then(function(){m.quickFilters=[{name:"Start Date",key:"createdAt",type:"date",label:"DASHBOARDS.SELECT_DATE"},{name:"Messages",key:"read",type:"select",label:"DASHBOARDS.SELECT_READ_UNREAD",customOptions:[{value:0,translate:"DASHBOARDS.UNREAD"},{value:1,translate:"DASHBOARDS.READ"},{value:null,translate:"DASHBOARDS.ALL"}]},{name:"Status",key:"closed",type:"select",label:"DASHBOARDS.SELECT_STATUS",customOptions:[{value:0,translate:"DASHBOARDS.OPENED"},{value:1,translate:"DASHBOARDS.CLOSED"},{value:null,translate:"DASHBOARDS.ALL"}]},{name:"Agent",key:"UserId",type:"select",label:"DASHBOARDS.SELECT_AGENT",customOptions:[{value:"null",translate:"DASHBOARDS.NOT_ASSIGNED"},{value:void 0,translate:"DASHBOARDS.ALL"}]},{name:"Tag",key:"tag",type:"multiselect",label:"DASHBOARDS.SELECT_TAG",options:m.tags.rows,placeholder:"DASHBOARDS.TAGS"}]})},m.deleteConfirm=function(e,n){var t=o.confirm().title("Are you sure want to delete the interaction?").htmlContent(""+(e.name||e.id&&_.upperFirst("interaction #")+e.id||"interaction")+" will be deleted.").ariaLabel("delete interaction").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.chatInteractionDownload=function(s,e,n){return d.chatInteraction.download({id:s.id,exists:!0,attachments:n}).$promise.then(function(e){var n=[e.buffer],t="interaction"+s.id,a=new Blob(n,{type:e.type});t="chat-interaction"+s.id+".zip";var i=window.document.createElement("a");i.setAttribute("href",URL.createObjectURL(a)),i.setAttribute("download",t),document.body.appendChild(i),i.click()}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length)for(var n=0;n"+m.selectedChatWebsiteInteractions.length+" selected will be deleted.").ariaLabel("delete interactions").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteInteractions.forEach(function(e){g(e)}),m.selectedChatWebsiteInteractions=[]})}}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteInteractionsController",e)}(),function(){"use strict";function e(e,a){var i=this;i.chatWebsite={},i.crudPermissions,i.ngFlowOptions={singleFile:!0,maxChunkRetries:1,chunkSize:8388608,simultaneousUploads:1,testChunks:!1,progressCallbacksInterval:1e3,allowDuplicateUploads:!0},i.ngFlow={flow:{}},i.dropping=!1,i.fileAdded=function(e){var n=["png","jpg"];if(!_.includes(n,e.getExtension()))return a.error({title:"Invalid extension: "+e.getExtension(),msg:"Supported extension: "+n.join()}),!1;if(8388608"+(e.name||e.id&&_.upperFirst("offlineMessage #")+e.id||"offlineMessage")+" will be deleted.").ariaLabel("delete offlineMessage").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteOfflineMessages=p,m.createOrEditChatWebsiteOfflineMessage=function(e,n){o.show({controller:"CreateOrEditOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,offlineMessage:n,offlineMessages:m.chatWebsiteOfflineMessages.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.showOfflineMessageChatWebsiteOfflineMessage=function(e,t){o.show({controller:"ShowOfflineMessageOfflineMessageDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/offlineMessages/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,resolve:{message:["apiResolver","$stateParams",function(e,n){return e.resolve("chatOfflineMessage@get",{fields:"id,body",id:t.id})}]}})},m.exportSelectedChatWebsiteOfflineMessages=function(){var e=angular.copy(m.selectedChatWebsiteOfflineMessages);return m.selectedChatWebsiteOfflineMessages=[],e},m.deleteChatWebsiteOfflineMessage=g,m.deleteSelectedChatWebsiteOfflineMessages=function(e){var n=o.confirm().title("Are you sure want to delete the selected offlineMessages?").htmlContent(""+m.selectedChatWebsiteOfflineMessages.length+" selected will be deleted.").ariaLabel("delete offlineMessages").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteOfflineMessages.forEach(function(e){g(e)}),m.selectedChatWebsiteOfflineMessages=[]})}}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteOfflineMessagesController",e)}(),function(){"use strict";function e(n,e){this.title="CHAT.OFFLINE_MESSAGE",this.message=e,this.closeDialog=function(e){n.hide(e)}}e.$inject=["$mdDialog","message"],angular.module("app.chat").controller("ShowOfflineMessageOfflineMessageDialogController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c){var m=this;function u(e){m.chatWebsiteProactiveActions=e||{count:0,rows:[]}}function p(){m.query.offset=(m.query.page-1)*m.query.limit,m.promise=d.chatWebsite.getProactiveActions(m.query,u).$promise}function g(e){d.chatProactiveAction.delete({id:e.id}).$promise.then(function(){_.remove(m.chatWebsiteProactiveActions.rows,{id:e.id}),m.chatWebsiteProactiveActions.count-=1,m.chatWebsiteProactiveActions.rows.length||p(),l.success({title:"ChatProactiveAction deleted!",msg:e.name?e.name+" has been deleted!":""})}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){m.errors=e.data.errors||[{message:e.toString(),type:"SYSTEM:GETchatWebsite"}];for(var n=0;n"+(e.name||e.id&&_.upperFirst("chatProactiveAction #")+e.id||"chatProactiveAction")+" will be deleted.").ariaLabel("delete chatProactiveAction").targetEvent(n).ok("OK").cancel("CANCEL");o.show(t).then(function(){g(e)},function(){console.log("CANCEL")})},m.success=u,m.getChatWebsiteProactiveActions=p,m.createOrEditChatWebsiteChatProactiveAction=function(e,n){o.show({controller:"CreateOrEditChatProactiveActionDialogController",controllerAs:"vm",templateUrl:"app/main/apps/chat/views/chatWebsites/edit/proactive/dialog.html",parent:angular.element(r.body),targetEvent:e,clickOutsideToClose:!0,locals:{chatWebsite:m.chatWebsite,chatProactiveAction:n,proactive:m.chatWebsiteProactiveActions.rows,license:null,setting:null,crudPermissions:m.crudPermissions}})},m.exportSelectedChatWebsiteProactiveActions=function(){var e=angular.copy(m.selectedChatWebsiteProactiveActions);return m.selectedChatWebsiteProactiveActions=[],e},m.deleteChatWebsiteChatProactiveAction=g,m.deleteSelectedChatWebsiteProactiveActions=function(e){var n=o.confirm().title("Are you sure want to delete the selected proactive?").htmlContent(""+m.selectedChatWebsiteProactiveActions.length+" selected will be deleted.").ariaLabel("delete proactive").targetEvent(e).ok("OK").cancel("CANCEL");o.show(n).then(function(){m.selectedChatWebsiteProactiveActions.forEach(function(e){g(e)}),m.selectedChatWebsiteProactiveActions=[]})}}e.$inject=["$cookies","$scope","$state","$q","$translate","$timeout","$mdDialog","$document","toasty","api","Auth"],angular.module("app.chat").controller("ChatWebsiteProactiveActionsController",e)}(),function(){"use strict";function e(e,n,t,a,i,s,o,r,l,d,c,m,u,p){var g=this;function v(e){a.hide(e)}g.currentUser=c.getCurrentUser(),g.errors=[],g.setting=u,g.license=m,g.crudPermissions=p,g.hasModulePermissions={},g.passwordPattern=g.setting&&g.setting.securePassword?/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/:"",g.title="CHAT.EDIT_CHATPROACTIVEACTION",g.chatProactiveAction=angular.copy(l),g.proactive=r,g.newChatProactiveAction=!1,g.chatProactiveAction||(g.chatProactiveAction={type:"mouseOver"},g.title="CHAT.NEW_CHATPROACTIVEACTION",g.newChatProactiveAction=!0),n.params.id&&(g.chatProactiveAction.ChatWebsiteId=n.params.id),g.addNewChatProactiveAction=function(){g.errors=[],d.chatProactiveAction.save(g.chatProactiveAction).$promise.then(function(e){g.proactive.unshift(e.toJSON()),o.success({title:"ChatProactiveAction properly created",msg:g.chatProactiveAction.name?g.chatProactiveAction.name+" has been created!":""}),v(e)}).catch(function(e){if(e.data&&e.data.errors&&e.data.errors.length){g.errors=e.data.errors||[{message:e.toString(),type:"api.chatProactiveAction.save"}];for(var n=0;n<\/script>',n.end="\n\x3c!-- START Motion Chat Script --\x3e"},n.info={},e.$watch("vm_ac.chatWebsite.remote",function(e){n.script='\n + + + + + + + +Server
+Uri
+Password + + +
+Call
+ + + + diff --git a/server/files/attachments/1615214408648-ring.log b/server/files/attachments/1615214408648-ring.log new file mode 100644 index 0000000..c235e46 --- /dev/null +++ b/server/files/attachments/1615214408648-ring.log @@ -0,0 +1,357 @@ +JsSIP:WebSocketInterface received WebSocket message +3m jssip-3.7.1.min.js:9:251234 +JsSIP:Transport received text message: + +INVITE sip:ehab9fmc@lel5ec6qauj2.invalid;transport=ws SIP/2.0 + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK5DeH431SQpZ0p + +Route: ;transport=wss + +Max-Forwards: 69 + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +To: + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052540 INVITE + +Contact: + +User-Agent: FreeSWITCH-mod_sofia/1.10.6-dev-5007~e5277a8~32bit + +Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE + +Supported: timer, path, replaces + +Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer + +Session-Expires: 120;refresher=uac + +Min-SE: 120 + +Content-Type: application/sdp + +Content-Disposition: session + +Content-Length: 1144 + +X-FS-Support: update_display,send_info + +Remote-Party-ID: "Extension 1001" ;party=calling;screen=yes;privacy=off + + + +v=0 + +o=FreeSWITCH 1615193920 1615193921 IN IP4 192.168.42.185 + +s=FreeSWITCH + +c=IN IP4 192.168.42.185 + +t=0 0 + +a=msid-semantic: WMS 7jkPiu3BxFY5YlvrZSj5Wf4JNx2ti2Zv + +m=audio 18744 RTP/SAVPF 8 0 102 9 101 103 + +a=rtpmap:8 PCMA/8000 + +a=rtpmap:0 PCMU/8000 + +a=rtpmap:102 opus/48000/2 + +a=fmtp:102 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40; stereo=1 + +a=rtpmap:9 G722/8000 + +a=rtpmap:101 telephone-event/8000 + +a=rtpmap:103 telephone-event/48000 + +a=fingerprint:sha-256 F7:D1:8D:57:AA:25:B0:28:2B:30:7D:B0:C0:E9:D7:0A:0B:8F:2E:11:9C:BF:75:2F:30:67:ED:15:CB:92:A5:60 + +a=setup:actpass + +a=rtcp-mux + +a=rtcp:18744 IN IP4 192.168.42.185 + +a=ssrc:1804308712 cname:D8ExKOnioX7jouqt + +a=ssrc:1804308712 msid:7jkPiu3BxFY5YlvrZSj5Wf4JNx2ti2Zv a0 + +a=ssrc:1804308712 mslabel:7jkPiu3BxFY5YlvrZSj5Wf4JNx2ti2Zv + +a=ssrc:1804308712 label:7jkPiu3BxFY5YlvrZSj5Wf4JNx2ti2Zva0 + +a=ice-ufrag:SlCfL6KlUQvyIyPF + +a=ice-pwd:sOe5IaB1KKAZ7KbzL7SPzhEF + +a=candidate:7199272615 1 udp 2130706431 192.168.42.185 18744 typ host generation 0 + +a=candidate:7199272615 2 udp 2130706431 192.168.42.185 18744 typ host generation 0 + +a=ptime:20 + + + +3m jssip-3.7.1.min.js:9:251234 +JsSIP:Transport send() +7ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport sending message: + +SIP/2.0 100 Trying + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK5DeH431SQpZ0p + +To: + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052540 INVITE + +Supported: timer,ice,replaces,outbound + +Content-Length: 0 + + + + + +1ms jssip-3.7.1.min.js:9:251234 +JsSIP:WebSocketInterface send() +10ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession new +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession init_incoming() +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:Dialog new UAS dialog created with status EARLY +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession newRTCSession() +1ms jssip-3.7.1.min.js:9:251234 +[SIP] Call event incoming jssip.html:15:10 +[SIP] ******* ANSWER jssip.html:15:10 +JsSIP:RTCSession answer() +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:Dialog dialog f6218b95-faba-1239-c385-9916c842b3cb71urnlqaahBvcUt8Ncv2KQQ changed to CONFIRMED state +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "peerconnection" +12ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport send() +18ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport sending message: + +SIP/2.0 180 Ringing + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK5DeH431SQpZ0p + +To: ;tag=71urnlqaah + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052540 INVITE + +Contact: + +Supported: timer,ice,replaces,outbound + +Content-Length: 0 + + + + + +1ms jssip-3.7.1.min.js:9:251234 +JsSIP:WebSocketInterface send() +18ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession session progress +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "progress" +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "sdp" +6s jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession session connecting +3ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "connecting" +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession createLocalDescription() +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "sdp" +14ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport send() +7s jssip-3.7.1.min.js:9:251234 +JsSIP:Transport sending message: + +SIP/2.0 200 OK + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK5DeH431SQpZ0p + +To: ;tag=71urnlqaah + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052540 INVITE + +Contact: + +Session-Expires: 120;refresher=uac + +Supported: timer,ice,replaces,outbound + +Content-Type: application/sdp + +Content-Length: 1343 + + + +v=0 + +o=mozilla...THIS_IS_SDPARTA-86.0 6638910987847320033 0 IN IP4 0.0.0.0 + +s=- + +t=0 0 + +a=sendrecv + +a=fingerprint:sha-256 8F:D6:F2:56:72:CE:38:8C:15:4C:3C:3C:03:82:AA:C6:7E:8B:96:9B:6F:AA:C6:8A:70:7E:B1:30:0F:B0:14:15 + +a=ice-options:trickle + +a=msid-semantic:WMS * + +m=audio 49387 RTP/SAVPF 8 0 102 9 101 + +c=IN IP4 172.26.96.1 + +a=candidate:0 1 UDP 2122252543 172.26.96.1 49387 typ host + +a=candidate:1 1 UDP 2122055935 192.168.42.185 49388 typ host + +a=candidate:2 1 UDP 2122187007 192.168.56.1 49389 typ host + +a=candidate:3 1 UDP 2122121471 192.168.99.1 49390 typ host + +a=candidate:4 1 TCP 2105524479 172.26.96.1 9 typ host tcptype active + +a=candidate:5 1 TCP 2105327871 192.168.42.185 9 typ host tcptype active + +a=candidate:6 1 TCP 2105458943 192.168.56.1 9 typ host tcptype active + +a=candidate:7 1 TCP 2105393407 192.168.99.1 9 typ host tcptype active + +a=sendrecv + +a=end-of-candidates + +a=fmtp:102 maxplaybackrate=48000;stereo=1;useinbandfec=1 + +a=fmtp:101 0-15 + +a=ice-pwd:d4aae272e5b04aef0b85f5079a5c6d1f + +a=ice-ufrag:214a86ee + +a=mid:0 + +a=msid:{5618135a-897f-46e7-b5bb-ebc17d6152c9} {28f60f6c-46db-46aa-87cd-1f1f5e561f87} + +a=rtcp-mux + +a=rtpmap:8 PCMA/8000 + +a=rtpmap:0 PCMU/8000 + +a=rtpmap:102 opus/48000/2 + +a=rtpmap:9 G722/8000/1 + +a=rtpmap:101 telephone-event/8000 + +a=setup:active + +a=ssrc:2822897356 cname:{c1d62ff3-abcb-472f-b664-76e7d4a48bf9} + + + +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:WebSocketInterface send() +7s jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession session accepted +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "accepted" +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:WebSocketInterface received WebSocket message +28ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport received text message: + +ACK sip:ehab9fmc@lel5ec6qauj2.invalid;transport=ws SIP/2.0 + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK6p795yjXmZNKj + +Max-Forwards: 70 + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +To: ;tag=71urnlqaah + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052540 ACK + +Contact: + +Content-Length: 0 + + + + + +28ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession receiveRequest() +32ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession session confirmed +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "confirmed" +1ms jssip-3.7.1.min.js:9:251234 +JsSIP:WebSocketInterface received WebSocket message +6ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport received text message: + +BYE sip:ehab9fmc@lel5ec6qauj2.invalid;transport=ws SIP/2.0 + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK7Z027S30H8B6D + +Max-Forwards: 70 + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +To: ;tag=71urnlqaah + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052541 BYE + +User-Agent: FreeSWITCH-mod_sofia/1.10.6-dev-5007~e5277a8~32bit + +Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE + +Supported: timer, path, replaces + +Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION" + +Content-Length: 0 + + + + + +7ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession receiveRequest() +3ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport send() +3ms jssip-3.7.1.min.js:9:251234 +JsSIP:Transport sending message: + +SIP/2.0 200 OK + +Via: SIP/2.0/WSS 192.168.42.185:7443;branch=z9hG4bK7Z027S30H8B6D + +To: ;tag=71urnlqaah + +From: "Extension 1001" ;tag=BvcUt8Ncv2KQQ + +Call-ID: f6218b95-faba-1239-c385-9916c842b3cb + +CSeq: 33052541 BYE + +Supported: outbound + +Content-Length: 0 + + + + + +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:WebSocketInterface send() +4ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession session ended +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession close() +0ms jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession close() | closing local MediaStream +1ms jssip-3.7.1.min.js:9:251234 +JsSIP:Dialog dialog f6218b95-faba-1239-c385-9916c842b3cb71urnlqaahBvcUt8Ncv2KQQ deleted +7s jssip-3.7.1.min.js:9:251234 +JsSIP:RTCSession emit "ended" +2ms jssip-3.7.1.min.js:9:251234 +JsSIP:NonInviteServerTransaction Timer J expired for transaction z9hG4bK7Z027S30H8B6D +3m jssip-3.7.1.min.js:9:251234 diff --git a/server/migrations/2.5.11.js b/server/migrations/2.5.11.js index e902192..7a702f1 100644 --- a/server/migrations/2.5.11.js +++ b/server/migrations/2.5.11.js @@ -1,174 +1,167 @@ -'use strict'; - -var BPromise = require('bluebird'); -var util = require('util'); - -var logger = require('../config/logger')('migration'); - -var Sequence = function () {}; - -Sequence.prototype.enqueue = function (fn) { - this.tail = this.tail ? this.tail.finally(fn) : fn(); -}; - -var Migration = function (queryInterface) { - this.queryInterface = queryInterface; - this.sequence = new Sequence(); -}; - -Migration.prototype.changeColumn = function (table, column, type) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .changeColumn(table, column, type) - .then(function () { - logger.info('Changed column %s in table %s', column, table); - }) - .catch(function (err) { - logger.info(JSON.stringify(err)); - }); - }); -}; - -Migration.prototype.addColumn = function (table, column, type) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .addColumn(table, column, type) - .then(function () { - logger.info('Added column %s to %s', column, table); - }) - .catch(function (err) { - logger.info(JSON.stringify(err)); - }); - }); -}; - -Migration.prototype.dropTable = function (table) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .dropTable(table, { - force: true - }) - .then(function () { - logger.info('table dropped %s', table); - }) - .catch(function (err) { - logger.info(JSON.stringify(err)); - }); - }); -}; - -Migration.prototype.addIndex = function (table, column, options) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .addIndex(table, column, { - indexName: options.indexName, - indicesType: options.indicesType - }) - .then(function () { - logger.info('addIndex %s %s %s [%s]', table, column.join(','), options.indexName, options.indicesType); - }) - .catch(function (err) { - logger.info(JSON.stringify(err)); - }); - }); -}; - -Migration.prototype.removeIndex = function (table, indexName) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .removeIndex(table, indexName) - .then(function () { - logger.info('removeIndex %s %s', table, indexName); - }) - .catch(function (err) { - logger.info(JSON.stringify(err)); - }); - }); -}; - -Migration.prototype.query = function (sql) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface.sequelize - .query(sql) - .then(function () { - logger.info('query %s', sql); - }) - .catch(function (err) { - logger.info(JSON.stringify(err)); - }); - }); -}; - -Migration.prototype.removeColumn = function (table, column) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .removeColumn(table, column) - .then(function () { - logger.info('Removed column %s from %s', column, table); - }) - .catch(function (err) { - logger.info( - util.inspect(err, { - showHidden: false, - depth: null - }) - ); - }); - }); -}; - -Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { - var _this = this; - this.sequence.enqueue(function () { - return _this.queryInterface - .renameColumn(table, oldColumn, newColumn) - .then(function () { - logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); - }) - .catch(function (err) { - logger.info( - util.inspect(err, { - showHidden: false, - depth: null - }) - ); - }); - }); -}; - -Migration.prototype.final = function (resolve) { - this.sequence.enqueue(function () { - return resolve(); - }); -}; - -module.exports = { - up: function (queryInterface, Sequelize) { - return new BPromise(function (resolve) { - - var migration = new Migration(queryInterface); - - // START settings - migration.addColumn('settings', 'searchOnEnterKey', { - type: Sequelize.BOOLEAN, - defaultValue: false - }); - // END settings - - // START FINAL - migration.final(resolve); - // END FINAL - }); - }, - - down: function (queryInterface, Sequelize) { - // var migration = new Migration(queryInterface); - } -}; +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () {}; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, options) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: options.indexName, + indicesType: options.indicesType + }) + .then(function () { + logger.info('addIndex %s %s %s [%s]', table, column.join(','), options.indexName, options.indicesType); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + + var migration = new Migration(queryInterface); + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; \ No newline at end of file diff --git a/server/migrations/2.5.15.js b/server/migrations/2.5.15.js new file mode 100644 index 0000000..1017ee5 --- /dev/null +++ b/server/migrations/2.5.15.js @@ -0,0 +1,177 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () {}; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, options) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: options.indexName, + indicesType: options.indicesType + }) + .then(function () { + logger.info('addIndex %s %s %s [%s]', table, column.join(','), options.indexName, options.indicesType); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + + var migration = new Migration(queryInterface); + + //START jscripty + migration.changeColumn('report_jscripty_questions', 'question', { + type: Sequelize.TEXT + }); + + migration.changeColumn('report_jscripty_answers', 'question', { + type: Sequelize.TEXT + }); + //END jscripty + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/migrations/2.5.16.js b/server/migrations/2.5.16.js new file mode 100644 index 0000000..b23a60f --- /dev/null +++ b/server/migrations/2.5.16.js @@ -0,0 +1,179 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () {}; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: indexName + }) + .then(function () { + logger.info('addIndex %s %s %s', table, column.join(','), indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + var migration = new Migration(queryInterface); + + // START SMSACCOUNT + migration.addColumn('sms_accounts', 'applicationId', { + type: Sequelize.STRING + }); + + migration.addColumn('sms_accounts', 'accountId', { + type: Sequelize.STRING + }); + + migration.changeColumn('sms_accounts', 'type', { + type: Sequelize.ENUM('twilio', 'skebby', 'connectel', 'clicksend', 'plivo', 'clickatell', 'csc', 'bandwidth') + }); + // END SMSACCOUNT + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/migrations/2.5.17.js b/server/migrations/2.5.17.js new file mode 100644 index 0000000..c22bc2a --- /dev/null +++ b/server/migrations/2.5.17.js @@ -0,0 +1,165 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () { }; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: indexName + }) + .then(function () { + logger.info('addIndex %s %s %s', table, column.join(','), indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + var migration = new Migration(queryInterface); + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/migrations/2.5.18.js b/server/migrations/2.5.18.js new file mode 100644 index 0000000..bd1b659 --- /dev/null +++ b/server/migrations/2.5.18.js @@ -0,0 +1,198 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () { }; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: indexName + }) + .then(function () { + logger.info('addIndex %s %s %s', table, column.join(','), indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + var migration = new Migration(queryInterface); + + // START settings + migration.addColumn('settings', 'chatInteractionsReloadTimeout', { + type: Sequelize.INTEGER, + defaultValue: 0 + }); + + migration.addColumn('settings', 'mailInteractionsReloadTimeout', { + type: Sequelize.INTEGER, + defaultValue: 0 + }); + + migration.addColumn('settings', 'openchannelInteractionsReloadTimeout', { + type: Sequelize.INTEGER, + defaultValue: 0 + }); + + migration.addColumn('settings', 'smsInteractionsReloadTimeout', { + type: Sequelize.INTEGER, + defaultValue: 0 + }); + + migration.addColumn('settings', 'whatsappInteractionsReloadTimeout', { + type: Sequelize.INTEGER, + defaultValue: 0 + }); + // END settings + + // START mail_applications + migration.query('UPDATE mail_applications SET appdata = REPLACE(appdata, \'0,\', \'0,1\') WHERE appdata LIKE \'0,%\' AND app = \'autoreply\';'); + + migration.query('UPDATE mail_applications SET appdata = REPLACE(appdata, \'1,\', \'1,1\') WHERE appdata LIKE \'1,%\' AND app = \'autoreply\';'); + // END mail_applications + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/migrations/2.5.19.js b/server/migrations/2.5.19.js new file mode 100644 index 0000000..92c836d --- /dev/null +++ b/server/migrations/2.5.19.js @@ -0,0 +1,165 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () { }; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: indexName + }) + .then(function () { + logger.info('addIndex %s %s %s', table, column.join(','), indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + var migration = new Migration(queryInterface); + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/migrations/2.5.20.js b/server/migrations/2.5.20.js new file mode 100644 index 0000000..793a5e3 --- /dev/null +++ b/server/migrations/2.5.20.js @@ -0,0 +1,179 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () { }; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: indexName + }) + .then(function () { + logger.info('addIndex %s %s %s', table, column.join(','), indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + var migration = new Migration(queryInterface); + + // START settings + migration.addColumn('settings', 'searchOnEnterKey', { + type: Sequelize.BOOLEAN, + defaultValue: true + }); + // END settings + + // START DASHBOARD_ITEM + migration.addColumn('dashboard_items', 'titleFontSize', { + type: Sequelize.INTEGER, + defaultValue: 12 + }); + // END DASHBOARD_ITEM + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/migrations/2.5.21.js b/server/migrations/2.5.21.js new file mode 100644 index 0000000..92c836d --- /dev/null +++ b/server/migrations/2.5.21.js @@ -0,0 +1,165 @@ +'use strict'; + +var BPromise = require('bluebird'); +var util = require('util'); + +var logger = require('../config/logger')('migration'); + +var Sequence = function () { }; + +Sequence.prototype.enqueue = function (fn) { + this.tail = this.tail ? this.tail.finally(fn) : fn(); +}; + +var Migration = function (queryInterface) { + this.queryInterface = queryInterface; + this.sequence = new Sequence(); +}; + +Migration.prototype.changeColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .changeColumn(table, column, type) + .then(function () { + logger.info('Changed column %s in table %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addColumn = function (table, column, type) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addColumn(table, column, type) + .then(function () { + logger.info('Added column %s to %s', column, table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.dropTable = function (table) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .dropTable(table, { + force: true + }) + .then(function () { + logger.info('table dropped %s', table); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.addIndex = function (table, column, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .addIndex(table, column, { + indexName: indexName + }) + .then(function () { + logger.info('addIndex %s %s %s', table, column.join(','), indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeIndex = function (table, indexName) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeIndex(table, indexName) + .then(function () { + logger.info('removeIndex %s %s', table, indexName); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.query = function (sql) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface.sequelize + .query(sql) + .then(function () { + logger.info('query %s', sql); + }) + .catch(function (err) { + logger.info(JSON.stringify(err)); + }); + }); +}; + +Migration.prototype.removeColumn = function (table, column) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .removeColumn(table, column) + .then(function () { + logger.info('Removed column %s from %s', column, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.renameColumn = function (table, oldColumn, newColumn) { + var _this = this; + this.sequence.enqueue(function () { + return _this.queryInterface + .renameColumn(table, oldColumn, newColumn) + .then(function () { + logger.info('Renamed column from %s to %s on %s', oldColumn, newColumn, table); + }) + .catch(function (err) { + logger.info( + util.inspect(err, { + showHidden: false, + depth: null + }) + ); + }); + }); +}; + +Migration.prototype.final = function (resolve) { + this.sequence.enqueue(function () { + return resolve(); + }); +}; + +module.exports = { + up: function (queryInterface, Sequelize) { + return new BPromise(function (resolve) { + var migration = new Migration(queryInterface); + + // START FINAL + migration.final(resolve); + // END FINAL + }); + }, + + down: function (queryInterface, Sequelize) { + // var migration = new Migration(queryInterface); + } +}; diff --git a/server/mysqldb/index.js b/server/mysqldb/index.js index 4d6f434..054a48f 100644 --- a/server/mysqldb/index.js +++ b/server/mysqldb/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf78f=['Condition','../api/condition/condition.model','Interval','../api/interval/interval.model','Pause','Cdr','../api/cdr/cdr.model','Schedule','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','../api/tag/tag.model','Template','../api/variable/variable.model','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticMetric/analyticMetric.model','AnalyticFieldReport','AnalyticTreeReport','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','ZendeskConfiguration','ZendeskField','FreshdeskConfiguration','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','VtigerField','../api/intVtigerField/intVtigerField.model','../api/intServicenowAccount/intServicenowAccount.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','../api/intServicenowField/intServicenowField.model','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','../api/intDynamics365Field/intDynamics365Field.model','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','Integration','Network','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','SquareOdbc','../api/squareProject/squareProject.model','SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','../api/license/license.model','Campaign','../api/campaign/campaign.model','../api/migration/migration.model','Attachment','../api/mailTransferReport/mailTransferReport.model','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','OpenchannelTransferReport','../api/openchannelTransferReport/openchannelTransferReport.model','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','VoicePrefix','../api/voicePrefix/voicePrefix.model','UserProfile','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','../api/userProfileResource/userProfileResource.model','Notification','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','WhatsappTransferReport','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','UserId','VoiceRecording','Recordings','hasMany','VoiceQueuesRt','Extensions','cascade','HopperFinals','CmHopperHistory','HopperHistory','OpenchannelInteraction','OpenchannelInteractions','ChatInteractions','SmsInteractions','FaxInteraction','FaxInteractions','WhatsappInteractions','Notifications','belongsTo','userProfileId','belongsToMany','CmContact','Lists','Team','user_has_teams','MailInteractions','user_has_mail_interactions','user_has_chat_interactions','user_has_fax_interactions','user_has_sms_interactions','VoiceQueues','MailQueues','ChatQueues','UserChatQueue','FaxQueue','SmsQueues','OpenchannelQueues','WhatsappQueues','cm_user_has_lists','VoicePrefixes','user_has_voice_prefixes','ChatWebsites','user_has_chat_websites','FaxAccounts','user_has_fax_accounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','WhatsappAccounts','user_has_square_projects','SpiedAgents','ChanSpyId','moh_has_sounds','VoiceQueueId','Hoppers','HopperHistories','HopperBlacks','JscriptySessions','TrunkId','TrunkBackup','TrunkBackupId','IntervalId','mandatoryDispositionPause','mandatoryDispositionPauseId','voice_queues_has_cm_lists','Agents','Teams','team_has_voice_queues','BlackLists','voice_queues_has_cm_blacklists','Messages','mailbox','VoiceCallReport','QueueCalls','uniqueid','AgentReports','Contact','ContactId','MailAccountId','Imap','Smtp','Dispositions','MailApplication','Applications','ListId','TemplateId','team_has_mail_queues','Account','Owner','mail_interaction_has_tags','Tags','ThroughTags','Users','MailInteractionId','Attachments','restrict','TagId','List','Dashboard','Items','Answers','FaxAccountId','Interactions','Exntensions','FaxMessage','FaxInteractionId','Interaction','AttachmentId','team_has_fax_queues','SmsAccountId','user_has_sms_accounts','sms_interaction_has_tags','SmsInteractionId','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelApplication','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','user_has_openchannel_interactions','team_has_openchannel_queues','ChatWebsiteId','ProactiveActions','OpenchannelQueueReport','Agent','ChatQueueId','Website','chat_interaction_has_tags','ChatInteractionId','team_has_chat_queues','ChatGroupId','Members','Contacts','CompanyId','cm_user_has_contacts','cm_contact_has_tags','CmHopper','Queue','CampaignId','Automation','All','OneAll','AutomationAllId','Any','Actions','AutomationId','ParentId','Intervals','ChatApplications','SmsApplications','DefaultReportId','Mohs','whatsapp_interaction_has_tags','Trigger','AllConditions','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','Fields','CustomReportId','MetricId','SalesforceField','SubjectId','Descriptions','DescriptionId','FieldId','AccountId','Subject','Description','Variable','VariableId','Configurations','Subjects','Field','int_desk_configuration_has_tags','int_zendesk_configuration_has_tags','FreshdeskAccount','int_freshdesk_configuration_has_tags','VtigerConfiguration','ServicenowAccount','Dynamics365Account','Dynamics365Field','FreshsalesAccount','ToId','SessionId','ProjectId','FaxQueues','team_has_whatsapp_queues','SquareProject','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','MailTransferReport','FromMailAccountId','FromAccount','FromUserId','FromAgent','ToUserId','ChatTransferReport','ToChatQueueId','ToQueue','ToChatWebsiteId','FromFaxAccountId','ToAgent','ToFaxQueueId','ToAccount','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','SmsTransferReport','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','CustomFields','Queues','UserProfileSections','Resources','WhatsappAccountId','user_has_whatsapp_accounts','WhatsappInteractionId','ToQueueId','exports','path','sequelize','lodash','jstz','determine','defaultsDeep','xC@LL1234','mysql','utf8mb4','name','utf8','sequelizeHistory','motion2','xcall','127.0.0.1','utf8_general_ci','database','password','options','User','import','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','ScreenRecording','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','Trunk','../api/trunk/trunk.model','VoiceTransferReport','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','../api/userMailQueue/userMailQueue.model','UserFaxQueue','UserSmsQueue','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','../api/mailServerIn/mailServerIn.model','MailServerOut','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','MailInteraction','MailMessage','../api/mailMessage/mailMessage.model','../api/mailApplication/mailApplication.model','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','../api/dashboard/dashboard.model','DashboardItem','FaxAccount','FaxApplication','../api/faxApplication/faxApplication.model','../api/faxInteraction/faxInteraction.model','../api/faxMessage/faxMessage.model','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','SmsApplication','../api/smsApplication/smsApplication.model','SmsInteraction','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','../api/openchannelApplication/openchannelApplication.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','ChatMessage','../api/chatMessage/chatMessage.model','ChatOfflineMessage','ChatQueue','../api/chatQueue/chatQueue.model','ChatGroup','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','../api/cmCompany/cmCompany.model','../api/cmContact/cmContact.model','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','../api/reportAgentPreview/reportAgentPreview.model','CmCustomField','../api/cmCustomField/cmCustomField.model','Action','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','Disposition','../api/disposition/disposition.model'];(function(_0x327d82,_0x551167){var _0x78153d=function(_0x36b556){while(--_0x36b556){_0x327d82['push'](_0x327d82['shift']());}};_0x78153d(++_0x551167);}(_0xf78f,0x168));var _0xff78=function(_0x3ea849,_0x1d0eb0){_0x3ea849=_0x3ea849-0x0;var _0x5ccdb2=_0xf78f[_0x3ea849];return _0x5ccdb2;};'use strict';var path=require(_0xff78('0x0'));var config=require('../config/environment');var Sequelize=require(_0xff78('0x1'));var _=require(_0xff78('0x2'));var jstz=require(_0xff78('0x3'));var timezone=jstz[_0xff78('0x4')]();config['sequelize']=_[_0xff78('0x5')](config['sequelize'],{'database':'motion2','username':'xcall','password':_0xff78('0x6'),'options':{'host':'127.0.0.1','port':0xcea,'dialect':_0xff78('0x7'),'dialectOptions':{'charset':_0xff78('0x8')},'logging':![],'timezone':timezone[_0xff78('0x9')](),'define':{'charset':_0xff78('0xa'),'collate':'utf8_general_ci'}}});config[_0xff78('0xb')]=_[_0xff78('0x5')](config[_0xff78('0xb')],{'database':_0xff78('0xc'),'username':_0xff78('0xd'),'password':_0xff78('0x6'),'options':{'host':_0xff78('0xe'),'port':0xcea,'dialect':_0xff78('0x7'),'dialectOptions':{'charset':_0xff78('0x8')},'logging':![],'timezone':timezone['name'](),'define':{'charset':'utf8','collate':_0xff78('0xf')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xff78('0x1')][_0xff78('0x10')],config[_0xff78('0x1')]['username'],config[_0xff78('0x1')][_0xff78('0x11')],config[_0xff78('0x1')][_0xff78('0x12')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xff78('0xb')][_0xff78('0x10')],config[_0xff78('0xb')]['username'],config[_0xff78('0xb')][_0xff78('0x11')],config[_0xff78('0xb')]['options'])};db[_0xff78('0x13')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x15'));db[_0xff78('0x16')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x17'));db[_0xff78('0x18')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x19'));db[_0xff78('0x1a')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x1b'));db[_0xff78('0x1c')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x1d'));db[_0xff78('0x1e')]=db[_0xff78('0x1')]['import'](_0xff78('0x1f'));db['VoiceRecording']=db['sequelize'][_0xff78('0x14')]('../api/voiceRecording/voiceRecording.model');db[_0xff78('0x20')]=db['sequelize']['import'](_0xff78('0x21'));db[_0xff78('0x22')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x23'));db[_0xff78('0x24')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x25'));db['VoiceCallReport']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x26'));db[_0xff78('0x27')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x28'));db[_0xff78('0x29')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x2a'));db[_0xff78('0x2b')]=db['sequelize']['import'](_0xff78('0x2c'));db[_0xff78('0x2d')]=db['sequelize']['import'](_0xff78('0x2e'));db[_0xff78('0x2f')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x30'));db[_0xff78('0x31')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/voiceTransferReport/voiceTransferReport.model');db[_0xff78('0x32')]=db[_0xff78('0x1')]['import'](_0xff78('0x33'));db[_0xff78('0x34')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x35'));db['UserChatQueue']=db['sequelize'][_0xff78('0x14')]('../api/userChatQueue/userChatQueue.model');db['UserMailQueue']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x36'));db[_0xff78('0x37')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/userFaxQueue/userFaxQueue.model');db[_0xff78('0x38')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/userSmsQueue/userSmsQueue.model');db[_0xff78('0x39')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x3a'));db[_0xff78('0x3b')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x3c'));db[_0xff78('0x3d')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x3e'));db[_0xff78('0x3f')]=db['sequelize']['import']('../api/mailServerOut/mailServerOut.model');db[_0xff78('0x40')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x41'));db[_0xff78('0x42')]=db[_0xff78('0x1')]['import'](_0xff78('0x43'));db[_0xff78('0x44')]=db[_0xff78('0x1')]['import'](_0xff78('0x45'));db[_0xff78('0x46')]=db['sequelize']['import']('../api/mailInteraction/mailInteraction.model');db[_0xff78('0x47')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x48'));db['MailApplication']=db['sequelize']['import'](_0xff78('0x49'));db[_0xff78('0x4a')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x4b'));db['Dashboard']=db[_0xff78('0x1')]['import'](_0xff78('0x4c'));db[_0xff78('0x4d')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/dashboardItem/dashboardItem.model');db[_0xff78('0x4e')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/faxAccount/faxAccount.model');db[_0xff78('0x4f')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x50'));db['FaxInteraction']=db['sequelize']['import'](_0xff78('0x51'));db['FaxMessage']=db['sequelize']['import'](_0xff78('0x52'));db['FaxQueue']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x53'));db[_0xff78('0x54')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x55'));db[_0xff78('0x56')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/smsAccount/smsAccount.model');db[_0xff78('0x57')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x58'));db[_0xff78('0x59')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x5a'));db[_0xff78('0x5b')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x5c'));db[_0xff78('0x5d')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x5e'));db[_0xff78('0x5f')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x60'));db['OpenchannelApplication']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x61'));db['OpenchannelInteraction']=db[_0xff78('0x1')][_0xff78('0x14')]('../api/openchannelInteraction/openchannelInteraction.model');db[_0xff78('0x62')]=db[_0xff78('0x1')]['import'](_0xff78('0x63'));db[_0xff78('0x64')]=db[_0xff78('0x1')]['import'](_0xff78('0x65'));db[_0xff78('0x66')]=db[_0xff78('0x1')]['import'](_0xff78('0x67'));db['OpenchannelQueueReport']=db[_0xff78('0x1')]['import'](_0xff78('0x68'));db[_0xff78('0x69')]=db[_0xff78('0x1')]['import'](_0xff78('0x6a'));db[_0xff78('0x6b')]=db[_0xff78('0x1')]['import']('../api/chatInteraction/chatInteraction.model');db[_0xff78('0x6c')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x6d'));db[_0xff78('0x6e')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/chatOfflineMessage/chatOfflineMessage.model');db[_0xff78('0x6f')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x70'));db[_0xff78('0x71')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/chatGroup/chatGroup.model');db[_0xff78('0x72')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x73'));db[_0xff78('0x74')]=db[_0xff78('0x1')]['import'](_0xff78('0x75'));db['CmContact']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x76'));db['CmHopper']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x77'));db[_0xff78('0x78')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x79'));db[_0xff78('0x7a')]=db[_0xff78('0x1')]['import'](_0xff78('0x7b'));db['CmHopperHistory']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x7c'));db[_0xff78('0x7d')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x7e'));db[_0xff78('0x7f')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x80'));db[_0xff78('0x81')]=db[_0xff78('0x1')]['import']('../api/action/action.model');db['Automation']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x82'));db[_0xff78('0x83')]=db[_0xff78('0x1')]['import'](_0xff78('0x84'));db[_0xff78('0x85')]=db[_0xff78('0x1')]['import'](_0xff78('0x86'));db[_0xff78('0x87')]=db[_0xff78('0x1')]['import'](_0xff78('0x88'));db[_0xff78('0x89')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x8a'));db[_0xff78('0x8b')]=db[_0xff78('0x1')]['import']('../api/pause/pause.model');db[_0xff78('0x8c')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x8d'));db['VoiceQueuesLog']=db[_0xff78('0x1')]['import']('../api/voiceQueuesLog/voiceQueuesLog.model');db[_0xff78('0x8e')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x8f'));db[_0xff78('0x90')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x91'));db[_0xff78('0x92')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x93'));db[_0xff78('0x94')]=db['sequelize'][_0xff78('0x14')]('../api/template/template.model');db['Trigger']=db[_0xff78('0x1')]['import']('../api/trigger/trigger.model');db['Variable']=db[_0xff78('0x1')]['import'](_0xff78('0x95'));db['Integration']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x96'));db[_0xff78('0x97')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x98'));db[_0xff78('0x99')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x9a'));db[_0xff78('0x9b')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x9c'));db[_0xff78('0x9d')]=db[_0xff78('0x1')]['import'](_0xff78('0x9e'));db[_0xff78('0x9f')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xa0'));db[_0xff78('0xa1')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/analyticFieldReport/analyticFieldReport.model');db[_0xff78('0xa2')]=db[_0xff78('0x1')]['import']('../api/analyticTreeReport/analyticTreeReport.model');db[_0xff78('0xa3')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xa4'));db[_0xff78('0xa5')]=db['sequelize'][_0xff78('0x14')]('../api/intSalesforceConfiguration/intSalesforceConfiguration.model');db['SalesforceField']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xa6'));db[_0xff78('0xa7')]=db['sequelize']['import'](_0xff78('0xa8'));db[_0xff78('0xa9')]=db[_0xff78('0x1')]['import'](_0xff78('0xaa'));db[_0xff78('0xab')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xac'));db[_0xff78('0xad')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xae'));db[_0xff78('0xaf')]=db[_0xff78('0x1')]['import'](_0xff78('0xb0'));db[_0xff78('0xb1')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xb2'));db[_0xff78('0xb3')]=db[_0xff78('0x1')]['import']('../api/intZohoAccount/intZohoAccount.model');db[_0xff78('0xb4')]=db[_0xff78('0x1')]['import'](_0xff78('0xb5'));db[_0xff78('0xb6')]=db['sequelize'][_0xff78('0x14')](_0xff78('0xb7'));db[_0xff78('0xb8')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/intZendeskAccount/intZendeskAccount.model');db[_0xff78('0xb9')]=db[_0xff78('0x1')]['import']('../api/intZendeskConfiguration/intZendeskConfiguration.model');db[_0xff78('0xba')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/intZendeskField/intZendeskField.model');db['FreshdeskAccount']=db[_0xff78('0x1')]['import']('../api/intFreshdeskAccount/intFreshdeskAccount.model');db[_0xff78('0xbb')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model');db[_0xff78('0xbc')]=db['sequelize'][_0xff78('0x14')](_0xff78('0xbd'));db[_0xff78('0xbe')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xbf'));db['VtigerConfiguration']=db[_0xff78('0x1')][_0xff78('0x14')]('../api/intVtigerConfiguration/intVtigerConfiguration.model');db[_0xff78('0xc0')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xc1'));db['ServicenowAccount']=db['sequelize'][_0xff78('0x14')](_0xff78('0xc2'));db[_0xff78('0xc3')]=db[_0xff78('0x1')]['import'](_0xff78('0xc4'));db[_0xff78('0xc5')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xc6'));db['Dynamics365Account']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xc7'));db[_0xff78('0xc8')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/intDynamics365Configuration/intDynamics365Configuration.model');db['Dynamics365Field']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xc9'));db['FreshsalesAccount']=db[_0xff78('0x1')]['import'](_0xff78('0xca'));db[_0xff78('0xcb')]=db['sequelize'][_0xff78('0x14')](_0xff78('0xcc'));db[_0xff78('0xcd')]=db[_0xff78('0x1')]['import']('../api/intFreshsalesField/intFreshsalesField.model');db[_0xff78('0xce')]=db[_0xff78('0x1')]['import']('../api/integration/integration.model');db[_0xff78('0xcf')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xd0'));db[_0xff78('0xd1')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xd2'));db[_0xff78('0xd3')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xd4'));db[_0xff78('0xd5')]=db[_0xff78('0x1')]['import']('../api/jscriptyAnswerReport/jscriptyAnswerReport.model');db[_0xff78('0xd6')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xd7'));db[_0xff78('0xd8')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xd9'));db[_0xff78('0xda')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xdb'));db[_0xff78('0xdc')]=db['sequelize']['import']('../api/squareReport/squareReport.model');db['SquareDetailsReport']=db['sequelize']['import']('../api/squareReportDetail/squareReportDetail.model');db[_0xff78('0xdd')]=db[_0xff78('0x1')]['import'](_0xff78('0xde'));db[_0xff78('0xdf')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xe0'));db[_0xff78('0xe1')]=db[_0xff78('0x1')]['import']('../api/squareOdbc/squareOdbc.model');db['SquareProject']=db[_0xff78('0x1')]['import'](_0xff78('0xe2'));db[_0xff78('0xe3')]=db['sequelize'][_0xff78('0x14')](_0xff78('0xe4'));db[_0xff78('0xe5')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xe6'));db['Team']=db[_0xff78('0x1')]['import']('../api/team/team.model');db['License']=db['sequelize']['import'](_0xff78('0xe7'));db[_0xff78('0xe8')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xe9'));db['Migration']=db['sequelize'][_0xff78('0x14')](_0xff78('0xea'));db[_0xff78('0xeb')]=db['sequelize'][_0xff78('0x14')]('../api/attachment/attachment.model');db['Plugin']=db[_0xff78('0x1')]['import']('../api/plugin/plugin.model');db['MailTransferReport']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xec'));db['ChatTransferReport']=db[_0xff78('0x1')]['import'](_0xff78('0xed'));db[_0xff78('0xee')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xef'));db[_0xff78('0xf0')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xf1'));db['SmsTransferReport']=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xf2'));db[_0xff78('0xf3')]=db[_0xff78('0x1')]['import'](_0xff78('0xf4'));db[_0xff78('0xf5')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xf6'));db[_0xff78('0xf7')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/userProfile/userProfile.model');db[_0xff78('0xf8')]=db[_0xff78('0x1')]['import'](_0xff78('0xf9'));db[_0xff78('0xfa')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xfb'));db[_0xff78('0xfc')]=db[_0xff78('0x1')][_0xff78('0x14')]('../api/notification/notification.model');db[_0xff78('0xfd')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0xfe'));db[_0xff78('0xff')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x100'));db[_0xff78('0x101')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x102'));db[_0xff78('0x103')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x104'));db[_0xff78('0x105')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x106'));db[_0xff78('0x107')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x108'));db[_0xff78('0x109')]=db['sequelize'][_0xff78('0x14')](_0xff78('0x10a'));db[_0xff78('0x10b')]=db[_0xff78('0x1')][_0xff78('0x14')](_0xff78('0x10c'));db[_0xff78('0x13')]['hasOne'](db[_0xff78('0x22')],{'as':_0xff78('0x22'),'onDelete':'cascade','foreignKey':_0xff78('0x10d')});db[_0xff78('0x13')]['hasMany'](db[_0xff78('0x10e')],{'as':_0xff78('0x10f'),'foreignKey':'UserId'});db[_0xff78('0x13')][_0xff78('0x110')](db[_0xff78('0x32')],{'as':_0xff78('0x111'),'foreignKey':_0xff78('0x10d')});db['User']['hasMany'](db[_0xff78('0x1a')],{'as':_0xff78('0x112'),'onDelete':_0xff78('0x113'),'hooks':!![]});db[_0xff78('0x13')][_0xff78('0x110')](db[_0xff78('0x7a')],{'as':_0xff78('0x114'),'foreignKey':'UserId'});db['User'][_0xff78('0x110')](db[_0xff78('0x115')],{'as':_0xff78('0x116'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x13')][_0xff78('0x110')](db['ReportAgentPreview'],{'as':_0xff78('0x7d'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x13')]['hasMany'](db[_0xff78('0x117')],{'as':_0xff78('0x118'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x13')][_0xff78('0x110')](db['ChatInteraction'],{'as':_0xff78('0x119'),'foreignKey':_0xff78('0x10d')});db['User']['hasMany'](db[_0xff78('0x59')],{'as':_0xff78('0x11a'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x13')][_0xff78('0x110')](db[_0xff78('0x11b')],{'as':_0xff78('0x11c'),'foreignKey':'UserId'});db[_0xff78('0x13')]['hasMany'](db[_0xff78('0x46')],{'as':'MailInteractions','foreignKey':_0xff78('0x10d')});db[_0xff78('0x13')]['hasMany'](db[_0xff78('0x101')],{'as':_0xff78('0x11d'),'foreignKey':_0xff78('0x10d')});db['User'][_0xff78('0x110')](db[_0xff78('0xfc')],{'as':_0xff78('0x11e'),'foreignKey':'SenderId'});db['User'][_0xff78('0x11f')](db[_0xff78('0xf7')],{'as':_0xff78('0xf7'),'foreignKey':_0xff78('0x120')});db[_0xff78('0x13')]['belongsToMany'](db['ChatGroup'],{'as':'Groups','through':'chat_group_has_users'});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x122')],{'as':'Contacts','through':'cm_user_has_contacts'});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0xf3')],{'as':_0xff78('0x123'),'through':'cm_user_has_lists'});db['User'][_0xff78('0x121')](db[_0xff78('0x124')],{'through':_0xff78('0x125')});db['User'][_0xff78('0x121')](db[_0xff78('0x46')],{'as':_0xff78('0x126'),'through':_0xff78('0x127')});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x6b')],{'as':_0xff78('0x119'),'through':_0xff78('0x128')});db['User'][_0xff78('0x121')](db[_0xff78('0x11b')],{'as':'FaxInteractions','through':_0xff78('0x129')});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x59')],{'as':'SmsInteractions','through':_0xff78('0x12a')});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x117')],{'as':_0xff78('0x118'),'through':'user_has_openchannel_interactions'});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x101')],{'as':_0xff78('0x11d'),'through':'user_has_whatsapp_interactions'});db[_0xff78('0x13')][_0xff78('0x121')](db['VoiceQueue'],{'as':_0xff78('0x12b'),'through':'UserVoiceQueue','required':![]});db['User']['belongsToMany'](db[_0xff78('0x42')],{'as':_0xff78('0x12c'),'through':'UserMailQueue','required':![]});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x6f')],{'as':_0xff78('0x12d'),'through':_0xff78('0x12e'),'required':![],'hooks':!![]});db['User'][_0xff78('0x121')](db[_0xff78('0x12f')],{'as':'FaxQueues','through':_0xff78('0x37'),'required':![]});db['User'][_0xff78('0x121')](db[_0xff78('0x5d')],{'as':_0xff78('0x130'),'through':_0xff78('0x38'),'required':![]});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x64')],{'as':_0xff78('0x131'),'through':_0xff78('0x39'),'required':![]});db[_0xff78('0x13')][_0xff78('0x121')](db['WhatsappQueue'],{'as':_0xff78('0x132'),'through':_0xff78('0x3b'),'required':![]});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0xf3')],{'through':_0xff78('0x133')});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0xf5')],{'as':_0xff78('0x134'),'through':_0xff78('0x135'),'required':![]});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x66')],{'as':_0xff78('0x136'),'through':_0xff78('0x137')});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x4e')],{'as':_0xff78('0x138'),'through':_0xff78('0x139')});db['User']['belongsToMany'](db[_0xff78('0x40')],{'as':'MailAccounts','through':_0xff78('0x13a')});db[_0xff78('0x13')]['belongsToMany'](db[_0xff78('0x5f')],{'as':_0xff78('0x13b'),'through':_0xff78('0x13c')});db[_0xff78('0x13')][_0xff78('0x121')](db[_0xff78('0x56')],{'as':_0xff78('0x13d'),'through':'user_has_sms_accounts'});db[_0xff78('0x13')][_0xff78('0x121')](db['WhatsappAccount'],{'as':_0xff78('0x13e'),'through':'user_has_whatsapp_accounts'});db['User']['belongsToMany'](db['SquareProject'],{'as':'SquareProjects','through':_0xff78('0x13f')});db['VoiceChanSpy'][_0xff78('0x110')](db[_0xff78('0x1a')],{'as':_0xff78('0x140'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x141')});db[_0xff78('0x18')][_0xff78('0x110')](db[_0xff78('0x1a')],{'onDelete':_0xff78('0x113')});db[_0xff78('0x1a')]['hasMany'](db[_0xff78('0x1a')],{'as':'Applications','onDelete':_0xff78('0x113')});db[_0xff78('0x1c')][_0xff78('0x121')](db[_0xff78('0x90')],{'as':'Sounds','through':_0xff78('0x142')});db[_0xff78('0x1e')][_0xff78('0x110')](db[_0xff78('0x32')],{'as':'Members','foreignKey':_0xff78('0x143')});db[_0xff78('0x1e')]['hasMany'](db['CmHopper'],{'as':_0xff78('0x144'),'foreignKey':_0xff78('0x143')});db[_0xff78('0x1e')]['hasMany'](db[_0xff78('0x7a')],{'as':'HopperFinals','foreignKey':_0xff78('0x143')});db[_0xff78('0x1e')][_0xff78('0x110')](db[_0xff78('0x115')],{'as':_0xff78('0x145'),'foreignKey':_0xff78('0x143')});db[_0xff78('0x1e')][_0xff78('0x110')](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':'VoiceQueueId'});db[_0xff78('0x1e')]['hasMany'](db[_0xff78('0x78')],{'as':_0xff78('0x146'),'foreignKey':_0xff78('0x143')});db[_0xff78('0x1e')]['hasMany'](db['JscriptySessionReport'],{'as':_0xff78('0x147'),'foreignKey':_0xff78('0x143')});db[_0xff78('0x1e')][_0xff78('0x11f')](db[_0xff78('0x2f')],{'as':_0xff78('0x2f'),'foreignKey':_0xff78('0x148')});db[_0xff78('0x1e')]['belongsTo'](db['Trunk'],{'as':_0xff78('0x149'),'foreignKey':_0xff78('0x14a')});db[_0xff78('0x1e')][_0xff78('0x11f')](db[_0xff78('0x89')],{'as':_0xff78('0x89'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0x1e')][_0xff78('0x11f')](db[_0xff78('0x8b')],{'as':_0xff78('0x14c'),'foreignKey':_0xff78('0x14d')});db[_0xff78('0x1e')][_0xff78('0x121')](db[_0xff78('0xf3')],{'as':_0xff78('0x123'),'through':_0xff78('0x14e')});db[_0xff78('0x1e')]['belongsToMany'](db[_0xff78('0x13')],{'as':_0xff78('0x14f'),'through':_0xff78('0x34')});db[_0xff78('0x1e')][_0xff78('0x121')](db[_0xff78('0x124')],{'as':_0xff78('0x150'),'through':_0xff78('0x151')});db['VoiceQueue']['belongsToMany'](db[_0xff78('0xf3')],{'as':_0xff78('0x152'),'through':_0xff78('0x153')});db[_0xff78('0x10e')][_0xff78('0x11f')](db['User'],{'as':_0xff78('0x13'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x20')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':'User','foreignKey':_0xff78('0x10d')});db[_0xff78('0x22')]['hasMany'](db['VoiceMailMessage'],{'as':_0xff78('0x154'),'onDelete':_0xff78('0x113'),'foreignKey':'mailboxuser','sourceKey':_0xff78('0x155')});db[_0xff78('0x24')][_0xff78('0x11f')](db[_0xff78('0x22')],{'foreignKey':'mailboxuser','targetKey':'mailbox'});db[_0xff78('0x156')][_0xff78('0x110')](db['VoiceQueueReport'],{'as':_0xff78('0x157'),'foreignKey':_0xff78('0x158'),'constraints':![]});db[_0xff78('0x156')][_0xff78('0x110')](db['VoiceAgentReport'],{'as':_0xff78('0x159'),'foreignKey':_0xff78('0x158'),'constraints':![]});db['VoiceCallReport'][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x13'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x156')][_0xff78('0x11f')](db['CmContact'],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x3d')][_0xff78('0x11f')](db[_0xff78('0x40')],{'as':'MailAccount','foreignKey':_0xff78('0x15c')});db[_0xff78('0x3f')][_0xff78('0x11f')](db[_0xff78('0x40')],{'as':_0xff78('0x40'),'foreignKey':'MailAccountId'});db['MailAccount']['hasOne'](db[_0xff78('0x3d')],{'as':_0xff78('0x15d'),'onDelete':_0xff78('0x113')});db[_0xff78('0x40')]['hasOne'](db[_0xff78('0x3f')],{'as':_0xff78('0x15e'),'onDelete':_0xff78('0x113')});db[_0xff78('0x40')]['hasMany'](db[_0xff78('0x85')],{'as':_0xff78('0x15f'),'foreignKey':_0xff78('0x15c')});db[_0xff78('0x40')][_0xff78('0x110')](db['CannedAnswer'],{'as':'Answers','foreignKey':'MailAccountId'});db[_0xff78('0x40')][_0xff78('0x110')](db['MailMessage'],{'as':_0xff78('0x154'),'foreignKey':'MailAccountId'});db['MailAccount'][_0xff78('0x110')](db[_0xff78('0x46')],{'as':'Interactions'});db[_0xff78('0x40')][_0xff78('0x110')](db[_0xff78('0x160')],{'as':_0xff78('0x161')});db[_0xff78('0x40')]['belongsTo'](db['CmList'],{'as':'List','foreignKey':_0xff78('0x162')});db[_0xff78('0x40')]['belongsTo'](db[_0xff78('0x94')],{'as':'Template','foreignKey':_0xff78('0x163')});db[_0xff78('0x40')]['belongsTo'](db[_0xff78('0x8b')],{'as':_0xff78('0x14c'),'foreignKey':_0xff78('0x14d')});db[_0xff78('0x40')][_0xff78('0x121')](db['User'],{'as':'Agents','through':_0xff78('0x13a')});db[_0xff78('0x42')][_0xff78('0x121')](db['User'],{'as':_0xff78('0x14f'),'through':'UserMailQueue'});db['MailQueue'][_0xff78('0x121')](db[_0xff78('0x124')],{'through':_0xff78('0x164'),'as':_0xff78('0x150')});db[_0xff78('0x46')]['hasMany'](db[_0xff78('0x47')],{'as':_0xff78('0x154'),'onDelete':_0xff78('0x113'),'foreignKey':'MailInteractionId'});db[_0xff78('0x46')][_0xff78('0x11f')](db[_0xff78('0x40')],{'as':_0xff78('0x165'),'foreignKey':'MailAccountId'});db[_0xff78('0x46')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x46')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x166'),'foreignKey':'UserId'});db[_0xff78('0x46')][_0xff78('0x121')](db[_0xff78('0x92')],{'through':_0xff78('0x167'),'as':_0xff78('0x168')});db['MailInteraction']['belongsToMany'](db[_0xff78('0x92')],{'through':_0xff78('0x167'),'as':_0xff78('0x169')});db['MailInteraction'][_0xff78('0x121')](db[_0xff78('0x13')],{'as':_0xff78('0x16a'),'through':_0xff78('0x127'),'foreignKey':_0xff78('0x16b')});db[_0xff78('0x47')]['hasMany'](db[_0xff78('0xeb')],{'as':_0xff78('0x16c'),'onDelete':_0xff78('0x113')});db[_0xff78('0x47')]['belongsTo'](db[_0xff78('0x13')],{'as':_0xff78('0x13')});db[_0xff78('0x47')][_0xff78('0x11f')](db[_0xff78('0x122')],{'onDelete':_0xff78('0x113'),'as':'Contact'});db['MailMessage'][_0xff78('0x11f')](db['MailInteraction'],{'as':'Interaction','foreignKey':'MailInteractionId'});db['MailMessage'][_0xff78('0x11f')](db[_0xff78('0x40')],{'as':'Account','foreignKey':_0xff78('0x15c')});db[_0xff78('0x160')][_0xff78('0x11f')](db['User'],{'onDelete':'restrict'});db[_0xff78('0x160')][_0xff78('0x11f')](db['MailQueue'],{'onDelete':_0xff78('0x16d')});db[_0xff78('0x160')][_0xff78('0x11f')](db[_0xff78('0x40')],{'onDelete':_0xff78('0x16d')});db[_0xff78('0x160')]['belongsTo'](db[_0xff78('0x89')],{'onDelete':'restrict','foreignKey':_0xff78('0x14b')});db[_0xff78('0x160')]['belongsTo'](db['Tag'],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x16e')});db[_0xff78('0x4a')][_0xff78('0x11f')](db[_0xff78('0x40')],{});db[_0xff78('0x4a')][_0xff78('0x11f')](db['CmList'],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db[_0xff78('0x4a')]['belongsTo'](db[_0xff78('0x122')],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x4a')][_0xff78('0x11f')](db[_0xff78('0x46')],{});db[_0xff78('0x4a')][_0xff78('0x11f')](db['MailMessage'],{});db[_0xff78('0x4a')][_0xff78('0x11f')](db[_0xff78('0x13')],{});db[_0xff78('0x4a')][_0xff78('0x11f')](db[_0xff78('0x42')],{});db[_0xff78('0x170')][_0xff78('0x110')](db[_0xff78('0x4d')],{'as':_0xff78('0x171'),'onDelete':'cascade'});db[_0xff78('0x4e')][_0xff78('0x110')](db[_0xff78('0x85')],{'as':_0xff78('0x15f'),'foreignKey':'FaxAccountId'});db[_0xff78('0x4e')][_0xff78('0x110')](db['CannedAnswer'],{'as':_0xff78('0x172'),'foreignKey':_0xff78('0x173')});db[_0xff78('0x4e')][_0xff78('0x110')](db[_0xff78('0x11b')],{'as':_0xff78('0x174')});db['FaxAccount'][_0xff78('0x110')](db['FaxApplication'],{'as':'Applications'});db[_0xff78('0x4e')]['hasMany'](db[_0xff78('0x1a')],{'as':_0xff78('0x175'),'onDelete':_0xff78('0x113')});db[_0xff78('0x4e')][_0xff78('0x110')](db[_0xff78('0x176')],{'as':_0xff78('0x154')});db[_0xff78('0x4e')][_0xff78('0x11f')](db[_0xff78('0x2f')],{'as':_0xff78('0x2f')});db['FaxAccount'][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':'ListId'});db[_0xff78('0x4e')]['belongsTo'](db[_0xff78('0x8b')],{'as':_0xff78('0x14c'),'foreignKey':_0xff78('0x14d')});db[_0xff78('0x4e')][_0xff78('0x121')](db['User'],{'as':'Agents','through':_0xff78('0x139')});db[_0xff78('0x4f')][_0xff78('0x11f')](db[_0xff78('0x13')],{'onDelete':_0xff78('0x16d')});db['FaxApplication'][_0xff78('0x11f')](db[_0xff78('0x12f')],{'onDelete':'restrict'});db[_0xff78('0x4f')][_0xff78('0x11f')](db['FaxAccount'],{'onDelete':_0xff78('0x16d')});db[_0xff78('0x4f')]['belongsTo'](db[_0xff78('0x92')],{'onDelete':_0xff78('0x16d'),'foreignKey':'TagId'});db[_0xff78('0x11b')][_0xff78('0x110')](db[_0xff78('0x176')],{'as':_0xff78('0x154'),'onDelete':'cascade','foreignKey':'FaxInteractionId'});db[_0xff78('0x11b')][_0xff78('0x11f')](db['FaxAccount'],{'as':'Account','foreignKey':_0xff78('0x173')});db[_0xff78('0x11b')][_0xff78('0x11f')](db['CmContact'],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x11b')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x166'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x11b')][_0xff78('0x121')](db[_0xff78('0x92')],{'through':'fax_interaction_has_tags','as':_0xff78('0x168')});db['FaxInteraction'][_0xff78('0x121')](db['Tag'],{'through':'fax_interaction_has_tags','as':_0xff78('0x169')});db[_0xff78('0x11b')][_0xff78('0x121')](db[_0xff78('0x13')],{'as':'Users','through':_0xff78('0x129'),'foreignKey':_0xff78('0x177')});db[_0xff78('0x176')]['belongsTo'](db['User'],{'onDelete':'cascade','as':_0xff78('0x13')});db[_0xff78('0x176')][_0xff78('0x11f')](db[_0xff78('0x11b')],{'as':_0xff78('0x178'),'foreignKey':_0xff78('0x177')});db[_0xff78('0x176')][_0xff78('0x11f')](db[_0xff78('0x122')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x15a')});db[_0xff78('0x176')][_0xff78('0x11f')](db[_0xff78('0xeb')],{'as':_0xff78('0xeb'),'foreignKey':_0xff78('0x179')});db[_0xff78('0x176')][_0xff78('0x11f')](db[_0xff78('0x4e')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x173')});db[_0xff78('0x12f')][_0xff78('0x121')](db['User'],{'as':_0xff78('0x14f'),'through':'UserFaxQueue'});db[_0xff78('0x12f')]['belongsToMany'](db[_0xff78('0x124')],{'through':_0xff78('0x17a'),'as':_0xff78('0x150')});db[_0xff78('0x54')]['belongsTo'](db[_0xff78('0x4e')],{});db['FaxQueueReport'][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db[_0xff78('0x54')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x54')]['belongsTo'](db[_0xff78('0x11b')],{});db[_0xff78('0x54')][_0xff78('0x11f')](db[_0xff78('0x176')],{});db[_0xff78('0x54')][_0xff78('0x11f')](db['User'],{});db[_0xff78('0x54')][_0xff78('0x11f')](db[_0xff78('0x12f')],{});db['SmsAccount'][_0xff78('0x110')](db['Disposition'],{'as':_0xff78('0x15f'),'foreignKey':'SmsAccountId'});db[_0xff78('0x56')][_0xff78('0x110')](db[_0xff78('0x83')],{'as':'Answers','foreignKey':'SmsAccountId'});db[_0xff78('0x56')][_0xff78('0x110')](db[_0xff78('0x5b')],{'as':'Messages','foreignKey':_0xff78('0x17b')});db[_0xff78('0x56')][_0xff78('0x110')](db['SmsInteraction'],{'as':_0xff78('0x174')});db['SmsAccount'][_0xff78('0x110')](db['SmsApplication'],{'as':_0xff78('0x161')});db[_0xff78('0x56')]['belongsTo'](db['CmList'],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db['SmsAccount'][_0xff78('0x11f')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':_0xff78('0x14d')});db['SmsAccount'][_0xff78('0x121')](db[_0xff78('0x13')],{'as':_0xff78('0x14f'),'through':_0xff78('0x17c')});db[_0xff78('0x57')][_0xff78('0x11f')](db[_0xff78('0x13')],{'onDelete':_0xff78('0x16d')});db[_0xff78('0x57')][_0xff78('0x11f')](db['SmsQueue'],{'onDelete':_0xff78('0x16d')});db['SmsApplication'][_0xff78('0x11f')](db['SmsAccount'],{'onDelete':_0xff78('0x16d')});db[_0xff78('0x57')][_0xff78('0x11f')](db[_0xff78('0x89')],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0x57')][_0xff78('0x11f')](db['Tag'],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x16e')});db[_0xff78('0x59')][_0xff78('0x110')](db[_0xff78('0x5b')],{'as':_0xff78('0x154'),'onDelete':_0xff78('0x113'),'foreignKey':'SmsInteractionId'});db[_0xff78('0x59')][_0xff78('0x11f')](db['SmsAccount'],{'as':'Account','foreignKey':_0xff78('0x17b')});db[_0xff78('0x59')]['belongsTo'](db['CmContact'],{'as':'Contact','foreignKey':_0xff78('0x15b')});db[_0xff78('0x59')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x166'),'foreignKey':'UserId'});db[_0xff78('0x59')][_0xff78('0x121')](db[_0xff78('0x92')],{'through':_0xff78('0x17d'),'as':_0xff78('0x168')});db[_0xff78('0x59')]['belongsToMany'](db['Tag'],{'through':'sms_interaction_has_tags','as':_0xff78('0x169')});db[_0xff78('0x59')][_0xff78('0x121')](db['User'],{'as':_0xff78('0x16a'),'through':_0xff78('0x12a'),'foreignKey':'SmsInteractionId'});db[_0xff78('0x5b')]['belongsTo'](db[_0xff78('0x13')],{'as':'User'});db[_0xff78('0x5b')][_0xff78('0x11f')](db['CmContact'],{'onDelete':_0xff78('0x113'),'as':'Contact'});db['SmsMessage'][_0xff78('0x11f')](db[_0xff78('0x59')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x178'),'foreignKey':_0xff78('0x17e')});db[_0xff78('0x5b')][_0xff78('0x11f')](db[_0xff78('0x56')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x17b')});db[_0xff78('0x5d')][_0xff78('0x121')](db['User'],{'as':_0xff78('0x14f'),'through':_0xff78('0x38'),'foreignKey':_0xff78('0x17f')});db[_0xff78('0x5d')][_0xff78('0x121')](db[_0xff78('0x124')],{'through':_0xff78('0x180'),'as':'Teams'});db['OpenchannelAccount'][_0xff78('0x110')](db['Disposition'],{'as':_0xff78('0x15f'),'foreignKey':_0xff78('0x181')});db[_0xff78('0x5f')][_0xff78('0x110')](db['CannedAnswer'],{'as':_0xff78('0x172'),'foreignKey':_0xff78('0x181')});db[_0xff78('0x5f')]['hasMany'](db['OpenchannelInteraction'],{'as':_0xff78('0x174'),'foreignKey':_0xff78('0x181')});db[_0xff78('0x5f')][_0xff78('0x110')](db[_0xff78('0x62')],{'as':_0xff78('0x154'),'foreignKey':_0xff78('0x181')});db[_0xff78('0x5f')]['hasMany'](db['OpenchannelApplication'],{'as':'Applications','foreignKey':_0xff78('0x181')});db[_0xff78('0x5f')][_0xff78('0x11f')](db['CmList'],{'as':'List','foreignKey':_0xff78('0x162')});db[_0xff78('0x5f')]['belongsTo'](db[_0xff78('0x8b')],{'as':'mandatoryDispositionPause','foreignKey':'mandatoryDispositionPauseId'});db[_0xff78('0x5f')][_0xff78('0x121')](db[_0xff78('0x13')],{'as':_0xff78('0x14f'),'through':_0xff78('0x13c')});db[_0xff78('0x182')]['belongsTo'](db[_0xff78('0x13')],{'onDelete':_0xff78('0x16d')});db[_0xff78('0x182')][_0xff78('0x11f')](db['OpenchannelQueue'],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x183')});db[_0xff78('0x182')][_0xff78('0x11f')](db['OpenchannelAccount'],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x181')});db[_0xff78('0x182')][_0xff78('0x11f')](db[_0xff78('0x89')],{'onDelete':'restrict','foreignKey':'IntervalId'});db[_0xff78('0x182')][_0xff78('0x11f')](db['Tag'],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x16e')});db['OpenchannelInteraction']['hasMany'](db['OpenchannelMessage'],{'as':'Messages','onDelete':'cascade','foreignKey':_0xff78('0x184')});db[_0xff78('0x117')][_0xff78('0x11f')](db[_0xff78('0x5f')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x181')});db['OpenchannelInteraction'][_0xff78('0x11f')](db['CmContact'],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db['OpenchannelInteraction'][_0xff78('0x11f')](db['User'],{'as':'Owner','foreignKey':_0xff78('0x10d')});db[_0xff78('0x117')]['belongsToMany'](db[_0xff78('0x92')],{'through':_0xff78('0x185'),'as':'Tags'});db[_0xff78('0x117')][_0xff78('0x121')](db['Tag'],{'through':'openchannel_interaction_has_tags','as':_0xff78('0x169')});db[_0xff78('0x117')][_0xff78('0x121')](db['User'],{'as':'Users','through':_0xff78('0x186'),'foreignKey':_0xff78('0x184')});db[_0xff78('0x62')][_0xff78('0x11f')](db[_0xff78('0x13')],{'onDelete':'cascade','as':'User'});db[_0xff78('0x62')][_0xff78('0x11f')](db[_0xff78('0x122')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x15a')});db[_0xff78('0x62')][_0xff78('0x11f')](db[_0xff78('0x117')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x178'),'foreignKey':_0xff78('0x184')});db[_0xff78('0x62')][_0xff78('0x11f')](db[_0xff78('0xeb')],{'as':_0xff78('0xeb'),'foreignKey':'AttachmentId'});db[_0xff78('0x62')]['belongsTo'](db['OpenchannelAccount'],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x181')});db[_0xff78('0x64')][_0xff78('0x121')](db[_0xff78('0x13')],{'as':'Agents','through':_0xff78('0x39'),'foreignKey':'OpenchannelQueueId'});db['OpenchannelQueue'][_0xff78('0x121')](db[_0xff78('0x124')],{'through':_0xff78('0x187'),'as':_0xff78('0x150')});db[_0xff78('0x66')][_0xff78('0x110')](db[_0xff78('0x85')],{'as':_0xff78('0x15f'),'foreignKey':'ChatWebsiteId'});db[_0xff78('0x66')][_0xff78('0x110')](db[_0xff78('0x83')],{'as':'Answers','foreignKey':_0xff78('0x188')});db[_0xff78('0x66')][_0xff78('0x110')](db[_0xff78('0x72')],{'as':_0xff78('0x189')});db['ChatWebsite']['hasMany'](db[_0xff78('0x6b')],{'as':'Interactions'});db['ChatWebsite']['hasMany'](db[_0xff78('0x69')],{'as':_0xff78('0x161')});db[_0xff78('0x66')][_0xff78('0x110')](db[_0xff78('0x6c')],{'as':_0xff78('0x154')});db[_0xff78('0x66')]['belongsTo'](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db[_0xff78('0x66')][_0xff78('0x11f')](db[_0xff78('0x89')],{'as':_0xff78('0x89'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0x66')][_0xff78('0x11f')](db[_0xff78('0x8b')],{'as':'mandatoryDispositionPause','foreignKey':_0xff78('0x14d')});db[_0xff78('0x66')]['belongsToMany'](db['User'],{'as':'Agents','through':_0xff78('0x137')});db[_0xff78('0x18a')][_0xff78('0x11f')](db['OpenchannelAccount'],{});db[_0xff78('0x18a')][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db[_0xff78('0x18a')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':'Contact','foreignKey':'ContactId'});db[_0xff78('0x18a')][_0xff78('0x11f')](db[_0xff78('0x117')],{});db[_0xff78('0x18a')]['belongsTo'](db[_0xff78('0x62')],{});db[_0xff78('0x18a')][_0xff78('0x11f')](db[_0xff78('0x13')],{});db['OpenchannelQueueReport'][_0xff78('0x11f')](db['OpenchannelQueue'],{});db[_0xff78('0x69')]['belongsTo'](db[_0xff78('0x13')],{'as':_0xff78('0x18b'),'foreignKey':_0xff78('0x10d'),'onDelete':_0xff78('0x16d')});db[_0xff78('0x69')][_0xff78('0x11f')](db[_0xff78('0x6f')],{'as':'Queue','foreignKey':_0xff78('0x18c'),'onDelete':_0xff78('0x16d')});db[_0xff78('0x69')][_0xff78('0x11f')](db[_0xff78('0x66')],{'as':_0xff78('0x18d'),'foreignKey':_0xff78('0x188'),'onDelete':'restrict'});db[_0xff78('0x69')][_0xff78('0x11f')](db['Tag'],{'onDelete':'restrict','foreignKey':_0xff78('0x16e')});db[_0xff78('0x6b')][_0xff78('0x110')](db[_0xff78('0x6c')],{'as':_0xff78('0x154'),'onDelete':_0xff78('0x113'),'foreignKey':'ChatInteractionId'});db[_0xff78('0x6b')][_0xff78('0x11f')](db[_0xff78('0x66')],{'as':'Account','foreignKey':'ChatWebsiteId'});db[_0xff78('0x6b')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':'Contact','foreignKey':_0xff78('0x15b')});db[_0xff78('0x6b')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x166'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x6b')]['belongsToMany'](db[_0xff78('0x92')],{'through':_0xff78('0x18e'),'as':_0xff78('0x168')});db[_0xff78('0x6b')]['belongsToMany'](db['Tag'],{'through':'chat_interaction_has_tags','as':_0xff78('0x169')});db['ChatInteraction'][_0xff78('0x121')](db[_0xff78('0x13')],{'as':'Users','through':'user_has_chat_interactions','foreignKey':_0xff78('0x18f')});db[_0xff78('0x6c')][_0xff78('0x11f')](db[_0xff78('0x13')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x13')});db[_0xff78('0x6c')][_0xff78('0x11f')](db[_0xff78('0x122')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x6c')][_0xff78('0x11f')](db[_0xff78('0x6b')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x178'),'foreignKey':_0xff78('0x18f')});db[_0xff78('0x6c')][_0xff78('0x11f')](db['Attachment'],{'as':_0xff78('0xeb'),'foreignKey':_0xff78('0x179')});db[_0xff78('0x6c')][_0xff78('0x11f')](db[_0xff78('0x66')],{'as':'Account','foreignKey':'ChatWebsiteId'});db['ChatOfflineMessage'][_0xff78('0x11f')](db[_0xff78('0x122')],{'onDelete':_0xff78('0x113'),'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db['ChatOfflineMessage'][_0xff78('0x11f')](db[_0xff78('0x66')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x188')});db[_0xff78('0x6f')][_0xff78('0x121')](db[_0xff78('0x13')],{'as':_0xff78('0x14f'),'through':'UserChatQueue','hooks':!![]});db[_0xff78('0x6f')][_0xff78('0x121')](db['Team'],{'through':_0xff78('0x190'),'as':_0xff78('0x150')});db[_0xff78('0x71')]['hasMany'](db[_0xff78('0xd3')],{'as':'Messages','foreignKey':_0xff78('0x191'),'onDelete':_0xff78('0x113')});db[_0xff78('0x71')][_0xff78('0x121')](db['User'],{'as':_0xff78('0x192'),'through':'chat_group_has_users'});db['ChatProactiveAction'][_0xff78('0x11f')](db[_0xff78('0x66')],{'as':_0xff78('0x18d'),'foreignKey':'ChatWebsiteId'});db[_0xff78('0x74')]['hasMany'](db[_0xff78('0x122')],{'as':_0xff78('0x193'),'foreignKey':_0xff78('0x194')});db[_0xff78('0x122')]['hasMany'](db['CmHopper'],{'as':_0xff78('0x144'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x122')]['hasMany'](db['CmHopperFinal'],{'as':_0xff78('0x114'),'foreignKey':'ContactId'});db[_0xff78('0x122')][_0xff78('0x110')](db['CmHopperHistory'],{'as':_0xff78('0x145'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x122')][_0xff78('0x110')](db[_0xff78('0x7d')],{'as':'ReportAgentPreview','foreignKey':_0xff78('0x15b')});db['CmContact'][_0xff78('0x110')](db[_0xff78('0xd8')],{'as':_0xff78('0x147'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x122')]['hasMany'](db[_0xff78('0x117')],{'as':_0xff78('0x118'),'foreignKey':_0xff78('0x15b'),'onDelete':_0xff78('0x16d')});db[_0xff78('0x122')]['hasMany'](db['ChatInteraction'],{'as':_0xff78('0x119'),'foreignKey':_0xff78('0x15b'),'onDelete':_0xff78('0x16d')});db[_0xff78('0x122')][_0xff78('0x110')](db[_0xff78('0x59')],{'as':_0xff78('0x11a'),'foreignKey':'ContactId','onDelete':'restrict'});db[_0xff78('0x122')]['hasMany'](db[_0xff78('0x11b')],{'as':_0xff78('0x11c'),'foreignKey':_0xff78('0x15b'),'onDelete':_0xff78('0x16d')});db[_0xff78('0x122')]['hasMany'](db[_0xff78('0x46')],{'as':'MailInteractions','foreignKey':_0xff78('0x15b'),'onDelete':_0xff78('0x16d')});db[_0xff78('0x122')][_0xff78('0x11f')](db['CmCompany'],{'as':'Company','foreignKey':_0xff78('0x194')});db[_0xff78('0x122')][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162'),'onDelete':_0xff78('0x113')});db[_0xff78('0x122')][_0xff78('0x121')](db['User'],{'as':'Users','through':_0xff78('0x195')});db[_0xff78('0x122')][_0xff78('0x121')](db['Tag'],{'as':_0xff78('0x168'),'through':_0xff78('0x196')});db[_0xff78('0x122')][_0xff78('0x121')](db[_0xff78('0x92')],{'through':_0xff78('0x196'),'as':_0xff78('0x169')});db[_0xff78('0x197')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b'),'onDelete':'cascade'});db[_0xff78('0x197')][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':'List','foreignKey':_0xff78('0x162'),'onDelete':_0xff78('0x113')});db[_0xff78('0x197')]['belongsTo'](db['User'],{'as':_0xff78('0x18b'),'foreignKey':_0xff78('0x10d')});db[_0xff78('0x197')][_0xff78('0x11f')](db[_0xff78('0x1e')],{'as':_0xff78('0x198'),'foreignKey':'VoiceQueueId','onDelete':_0xff78('0x113')});db[_0xff78('0x197')][_0xff78('0x11f')](db['Campaign'],{'as':'Campaign','foreignKey':_0xff78('0x199'),'onDelete':_0xff78('0x113')});db[_0xff78('0x197')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x166'),'foreignKey':'OwnerId'});db[_0xff78('0x78')]['belongsTo'](db['CmContact'],{'as':'Contact','foreignKey':_0xff78('0x15b'),'onDelete':_0xff78('0x113')});db[_0xff78('0x78')][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':'ListId','onDelete':'cascade'});db['CmHopperBlack']['belongsTo'](db['VoiceQueue'],{'as':_0xff78('0x198'),'foreignKey':'VoiceQueueId','onDelete':_0xff78('0x113')});db[_0xff78('0x78')][_0xff78('0x11f')](db[_0xff78('0xe8')],{'as':'Campaign','foreignKey':'CampaignId','onDelete':_0xff78('0x113')});db[_0xff78('0x19a')][_0xff78('0x110')](db['Condition'],{'as':{'plural':_0xff78('0x19b'),'singular':_0xff78('0x19c')},'foreignKey':_0xff78('0x19d'),'onDelete':_0xff78('0x113'),'hooks':!![]});db[_0xff78('0x19a')][_0xff78('0x110')](db[_0xff78('0x87')],{'as':{'plural':_0xff78('0x19e'),'singular':'OneAny'},'foreignKey':'AutomationAnyId','onDelete':_0xff78('0x113'),'hooks':!![]});db[_0xff78('0x19a')]['hasMany'](db['Action'],{'as':_0xff78('0x19f'),'foreignKey':_0xff78('0x1a0'),'onDelete':_0xff78('0x113'),'hooks':!![]});db['Disposition'][_0xff78('0x110')](db[_0xff78('0x85')],{'as':_0xff78('0x15f'),'foreignKey':_0xff78('0x1a1'),'onDelete':'cascade'});db[_0xff78('0x89')][_0xff78('0x110')](db[_0xff78('0x89')],{'as':_0xff78('0x1a2'),'foreignKey':'IntervalId','onDelete':_0xff78('0x113'),'hooks':!![],'required':![]});db[_0xff78('0x89')][_0xff78('0x110')](db['VoiceExtension'],{'as':_0xff78('0x112'),'foreignKey':'IntervalId','onDelete':_0xff78('0x16d')});db[_0xff78('0x89')][_0xff78('0x110')](db[_0xff78('0x160')],{'as':'MailApplications','foreignKey':_0xff78('0x14b')});db['Interval']['hasMany'](db[_0xff78('0x69')],{'as':_0xff78('0x1a3'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0x89')][_0xff78('0x110')](db[_0xff78('0x4f')],{'as':'FaxApplications','foreignKey':_0xff78('0x14b')});db[_0xff78('0x89')][_0xff78('0x110')](db[_0xff78('0x57')],{'as':_0xff78('0x1a4'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0x8e')][_0xff78('0x11f')](db[_0xff78('0x40')],{});db[_0xff78('0x8e')][_0xff78('0x11f')](db['AnalyticDefaultReport'],{'foreignKey':_0xff78('0x1a5')});db[_0xff78('0x8e')]['belongsTo'](db[_0xff78('0x99')],{'foreignKey':'CustomReportId'});db[_0xff78('0x90')]['belongsToMany'](db['VoiceMusicOnHold'],{'as':_0xff78('0x1a6'),'through':'moh_has_sounds','onDelete':_0xff78('0x16d')});db[_0xff78('0x92')][_0xff78('0x121')](db[_0xff78('0x122')],{'through':_0xff78('0x196')});db['Tag'][_0xff78('0x121')](db['ChatInteraction'],{'through':_0xff78('0x18e')});db[_0xff78('0x92')][_0xff78('0x121')](db[_0xff78('0x46')],{'through':_0xff78('0x167')});db['Tag'][_0xff78('0x121')](db[_0xff78('0x59')],{'through':'sms_interaction_has_tags'});db[_0xff78('0x92')][_0xff78('0x121')](db[_0xff78('0x11b')],{'through':'fax_interaction_has_tags'});db[_0xff78('0x92')][_0xff78('0x121')](db['OpenchannelInteraction'],{'through':_0xff78('0x185')});db[_0xff78('0x92')][_0xff78('0x121')](db[_0xff78('0x101')],{'through':_0xff78('0x1a7')});db[_0xff78('0x1a8')][_0xff78('0x110')](db[_0xff78('0x87')],{'as':{'plural':_0xff78('0x1a9'),'singular':_0xff78('0x1aa')},'foreignKey':_0xff78('0x1ab'),'onDelete':_0xff78('0x113'),'hooks':!![]});db['Trigger'][_0xff78('0x110')](db[_0xff78('0x87')],{'as':{'plural':_0xff78('0x1ac'),'singular':_0xff78('0x1ad')},'foreignKey':_0xff78('0x1ae'),'onDelete':_0xff78('0x113'),'hooks':!![]});db['Trigger'][_0xff78('0x110')](db[_0xff78('0x81')],{'as':_0xff78('0x19f'),'foreignKey':'TriggerId','onDelete':_0xff78('0x113'),'hooks':!![]});db[_0xff78('0x99')][_0xff78('0x110')](db['AnalyticFieldReport'],{'as':_0xff78('0x1af'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b0'),'hooks':!![]});db[_0xff78('0x9b')][_0xff78('0x110')](db[_0xff78('0xa1')],{'as':_0xff78('0x1af'),'onDelete':_0xff78('0x113'),'foreignKey':'DefaultReportId'});db[_0xff78('0x9f')][_0xff78('0x110')](db[_0xff78('0xa1')],{'as':_0xff78('0x1af'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b1')});db['AnalyticFieldReport']['belongsTo'](db[_0xff78('0x9f')],{'foreignKey':_0xff78('0x1b1')});db[_0xff78('0xa3')][_0xff78('0x110')](db['SalesforceConfiguration'],{'as':'Configurations','onDelete':_0xff78('0x113'),'foreignKey':'AccountId'});db['SalesforceConfiguration']['hasMany'](db[_0xff78('0x1b2')],{'as':'Subjects','onDelete':'cascade','foreignKey':_0xff78('0x1b3')});db['SalesforceConfiguration'][_0xff78('0x110')](db[_0xff78('0x1b2')],{'as':_0xff78('0x1b4'),'onDelete':'cascade','foreignKey':_0xff78('0x1b5')});db[_0xff78('0xa5')][_0xff78('0x110')](db[_0xff78('0x1b2')],{'as':_0xff78('0x1af'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b6')});db[_0xff78('0xa5')][_0xff78('0x11f')](db[_0xff78('0xa3')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x1b7')});db[_0xff78('0x1b2')][_0xff78('0x110')](db[_0xff78('0x1b2')],{'as':_0xff78('0x1b8'),'foreignKey':_0xff78('0x1b3')});db[_0xff78('0x1b2')][_0xff78('0x110')](db[_0xff78('0x1b2')],{'as':_0xff78('0x1b9'),'foreignKey':'DescriptionId'});db['SalesforceField'][_0xff78('0x110')](db['SalesforceField'],{'as':'Field','foreignKey':'FieldId'});db[_0xff78('0x1b2')][_0xff78('0x11f')](db['Variable'],{'as':_0xff78('0x1ba'),'foreignKey':_0xff78('0x1bb')});db[_0xff78('0xa7')][_0xff78('0x110')](db['SugarcrmConfiguration'],{'as':_0xff78('0x1bc'),'onDelete':'cascade','foreignKey':_0xff78('0x1b7')});db[_0xff78('0xa9')][_0xff78('0x110')](db['SugarcrmField'],{'as':_0xff78('0x1bd'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b3')});db[_0xff78('0xa9')][_0xff78('0x110')](db[_0xff78('0xab')],{'as':_0xff78('0x1b4'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xa9')]['hasMany'](db['SugarcrmField'],{'as':_0xff78('0x1af'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b6')});db[_0xff78('0xa9')][_0xff78('0x11f')](db['SugarcrmAccount'],{'as':'Account','foreignKey':_0xff78('0x1b7')});db[_0xff78('0xab')]['hasMany'](db[_0xff78('0xab')],{'as':_0xff78('0x1b8'),'foreignKey':_0xff78('0x1b3')});db[_0xff78('0xab')]['hasMany'](db['SugarcrmField'],{'as':_0xff78('0x1b9'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xab')][_0xff78('0x110')](db[_0xff78('0xab')],{'as':_0xff78('0x1be'),'foreignKey':'FieldId'});db['SugarcrmField']['belongsTo'](db[_0xff78('0x1ba')],{'as':_0xff78('0x1ba'),'foreignKey':_0xff78('0x1bb')});db[_0xff78('0xad')][_0xff78('0x110')](db[_0xff78('0xaf')],{'as':_0xff78('0x1bc'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b7')});db[_0xff78('0xaf')][_0xff78('0x110')](db['DeskField'],{'as':_0xff78('0x1bd'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b3')});db['DeskConfiguration'][_0xff78('0x110')](db[_0xff78('0xb1')],{'as':_0xff78('0x1b4'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b5')});db['DeskConfiguration'][_0xff78('0x110')](db['DeskField'],{'as':'Fields','onDelete':'cascade','foreignKey':'FieldId'});db[_0xff78('0xaf')][_0xff78('0x11f')](db[_0xff78('0xad')],{'as':_0xff78('0x165'),'foreignKey':'AccountId'});db[_0xff78('0xaf')][_0xff78('0x121')](db[_0xff78('0x92')],{'through':_0xff78('0x1bf')});db[_0xff78('0xb1')]['hasMany'](db['DeskField'],{'as':'Subject','foreignKey':_0xff78('0x1b3')});db[_0xff78('0xb1')][_0xff78('0x110')](db[_0xff78('0xb1')],{'as':'Description','foreignKey':'DescriptionId'});db[_0xff78('0xb1')][_0xff78('0x110')](db[_0xff78('0xb1')],{'as':_0xff78('0x1be'),'foreignKey':_0xff78('0x1b6')});db[_0xff78('0xb1')]['belongsTo'](db[_0xff78('0x1ba')],{'as':_0xff78('0x1ba'),'foreignKey':'VariableId'});db[_0xff78('0xb3')]['hasMany'](db['ZohoConfiguration'],{'as':'Configurations','onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b7')});db['ZohoConfiguration']['hasMany'](db[_0xff78('0xb6')],{'as':_0xff78('0x1bd'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b3')});db['ZohoConfiguration']['hasMany'](db[_0xff78('0xb6')],{'as':'Descriptions','onDelete':'cascade','foreignKey':_0xff78('0x1b5')});db[_0xff78('0xb4')][_0xff78('0x110')](db[_0xff78('0xb6')],{'as':'Fields','onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b6')});db[_0xff78('0xb4')][_0xff78('0x11f')](db[_0xff78('0xb3')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x1b7')});db['ZohoField']['hasMany'](db['ZohoField'],{'as':'Subject','foreignKey':_0xff78('0x1b3')});db[_0xff78('0xb6')][_0xff78('0x110')](db[_0xff78('0xb6')],{'as':_0xff78('0x1b9'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xb6')][_0xff78('0x110')](db[_0xff78('0xb6')],{'as':_0xff78('0x1be'),'foreignKey':_0xff78('0x1b6')});db['ZohoField'][_0xff78('0x11f')](db[_0xff78('0x1ba')],{'as':'Variable','foreignKey':_0xff78('0x1bb')});db['ZendeskAccount']['hasMany'](db[_0xff78('0xb9')],{'as':_0xff78('0x1bc'),'onDelete':'cascade','foreignKey':_0xff78('0x1b7')});db[_0xff78('0xb9')]['hasMany'](db['ZendeskField'],{'as':_0xff78('0x1bd'),'foreignKey':'SubjectId'});db[_0xff78('0xb9')][_0xff78('0x110')](db[_0xff78('0xba')],{'as':_0xff78('0x1b4'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xb9')]['hasMany'](db[_0xff78('0xba')],{'as':_0xff78('0x1af'),'foreignKey':'FieldId'});db[_0xff78('0xb9')][_0xff78('0x11f')](db[_0xff78('0xb8')],{'as':_0xff78('0x165'),'foreignKey':'AccountId'});db[_0xff78('0xb9')][_0xff78('0x121')](db[_0xff78('0x92')],{'through':_0xff78('0x1c0')});db[_0xff78('0xba')][_0xff78('0x110')](db[_0xff78('0xba')],{'as':_0xff78('0x1b8'),'foreignKey':'SubjectId'});db[_0xff78('0xba')][_0xff78('0x110')](db[_0xff78('0xba')],{'as':'Description','foreignKey':'DescriptionId'});db['ZendeskField'][_0xff78('0x110')](db['ZendeskField'],{'as':_0xff78('0x1be'),'foreignKey':'FieldId'});db['ZendeskField'][_0xff78('0x11f')](db[_0xff78('0x1ba')],{'as':_0xff78('0x1ba'),'foreignKey':'VariableId'});db['FreshdeskAccount'][_0xff78('0x110')](db[_0xff78('0xbb')],{'as':_0xff78('0x1bc'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b7')});db['FreshdeskConfiguration'][_0xff78('0x110')](db[_0xff78('0xbc')],{'as':_0xff78('0x1bd'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b3')});db['FreshdeskConfiguration'][_0xff78('0x110')](db[_0xff78('0xbc')],{'as':'Descriptions','onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xbb')][_0xff78('0x110')](db[_0xff78('0xbc')],{'as':'Fields','onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b6')});db['FreshdeskConfiguration'][_0xff78('0x11f')](db[_0xff78('0x1c1')],{'as':'Account','foreignKey':_0xff78('0x1b7')});db['FreshdeskConfiguration'][_0xff78('0x121')](db[_0xff78('0x92')],{'through':_0xff78('0x1c2')});db[_0xff78('0xbc')][_0xff78('0x110')](db[_0xff78('0xbc')],{'as':_0xff78('0x1b8'),'foreignKey':'SubjectId'});db[_0xff78('0xbc')][_0xff78('0x110')](db[_0xff78('0xbc')],{'as':'Description','foreignKey':_0xff78('0x1b5')});db['FreshdeskField'][_0xff78('0x110')](db[_0xff78('0xbc')],{'as':_0xff78('0x1be'),'foreignKey':_0xff78('0x1b6')});db[_0xff78('0xbc')][_0xff78('0x11f')](db[_0xff78('0x1ba')],{'as':'Variable','foreignKey':_0xff78('0x1bb')});db[_0xff78('0xbe')]['hasMany'](db[_0xff78('0x1c3')],{'as':_0xff78('0x1bc'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b7')});db[_0xff78('0x1c3')][_0xff78('0x110')](db['VtigerField'],{'as':_0xff78('0x1bd'),'foreignKey':'SubjectId'});db[_0xff78('0x1c3')][_0xff78('0x110')](db[_0xff78('0xc0')],{'as':_0xff78('0x1b4'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0x1c3')][_0xff78('0x110')](db[_0xff78('0xc0')],{'as':'Fields','foreignKey':_0xff78('0x1b6')});db[_0xff78('0x1c3')][_0xff78('0x11f')](db['VtigerAccount'],{'as':'Account','foreignKey':'AccountId'});db[_0xff78('0xc0')]['hasMany'](db[_0xff78('0xc0')],{'as':_0xff78('0x1b8'),'foreignKey':_0xff78('0x1b3')});db[_0xff78('0xc0')][_0xff78('0x110')](db['VtigerField'],{'as':_0xff78('0x1b9'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xc0')][_0xff78('0x110')](db[_0xff78('0xc0')],{'as':_0xff78('0x1be'),'foreignKey':'FieldId'});db['VtigerField'][_0xff78('0x11f')](db['Variable'],{'as':_0xff78('0x1ba'),'foreignKey':_0xff78('0x1bb')});db[_0xff78('0x1c4')][_0xff78('0x110')](db['ServicenowConfiguration'],{'as':'Configurations','onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b7')});db[_0xff78('0xc3')][_0xff78('0x110')](db[_0xff78('0xc5')],{'as':_0xff78('0x1bd'),'foreignKey':'SubjectId'});db[_0xff78('0xc3')][_0xff78('0x110')](db[_0xff78('0xc5')],{'as':'Descriptions','foreignKey':_0xff78('0x1b5')});db[_0xff78('0xc3')]['hasMany'](db[_0xff78('0xc5')],{'as':'Fields','foreignKey':_0xff78('0x1b6')});db[_0xff78('0xc3')]['belongsTo'](db['ServicenowAccount'],{'as':'Account','foreignKey':'AccountId'});db[_0xff78('0xc5')][_0xff78('0x110')](db[_0xff78('0xc5')],{'as':'Subject','foreignKey':_0xff78('0x1b3')});db['ServicenowField'][_0xff78('0x110')](db[_0xff78('0xc5')],{'as':_0xff78('0x1b9'),'foreignKey':_0xff78('0x1b5')});db['ServicenowField']['hasMany'](db[_0xff78('0xc5')],{'as':_0xff78('0x1be'),'foreignKey':_0xff78('0x1b6')});db[_0xff78('0xc5')][_0xff78('0x11f')](db[_0xff78('0x1ba')],{'as':'Variable','foreignKey':'VariableId'});db[_0xff78('0x1c5')][_0xff78('0x110')](db[_0xff78('0xc8')],{'as':_0xff78('0x1bc'),'onDelete':_0xff78('0x113'),'foreignKey':'AccountId'});db['Dynamics365Configuration'][_0xff78('0x110')](db[_0xff78('0x1c6')],{'as':'Subjects','onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b3')});db[_0xff78('0xc8')][_0xff78('0x110')](db['Dynamics365Field'],{'as':_0xff78('0x1b4'),'onDelete':_0xff78('0x113'),'foreignKey':'DescriptionId'});db[_0xff78('0xc8')]['hasMany'](db[_0xff78('0x1c6')],{'as':_0xff78('0x1af'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b6')});db['Dynamics365Configuration'][_0xff78('0x11f')](db[_0xff78('0x1c5')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x1b7')});db[_0xff78('0x1c6')][_0xff78('0x110')](db[_0xff78('0x1c6')],{'as':'Subject','foreignKey':'SubjectId'});db[_0xff78('0x1c6')][_0xff78('0x110')](db[_0xff78('0x1c6')],{'as':_0xff78('0x1b9'),'foreignKey':'DescriptionId'});db[_0xff78('0x1c6')][_0xff78('0x110')](db[_0xff78('0x1c6')],{'as':'Field','foreignKey':_0xff78('0x1b6')});db[_0xff78('0x1c6')]['belongsTo'](db[_0xff78('0x1ba')],{'as':_0xff78('0x1ba'),'foreignKey':_0xff78('0x1bb')});db[_0xff78('0x1c7')][_0xff78('0x110')](db['FreshsalesConfiguration'],{'as':_0xff78('0x1bc'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1b7')});db[_0xff78('0xcb')][_0xff78('0x110')](db[_0xff78('0xcd')],{'as':_0xff78('0x1bd'),'foreignKey':_0xff78('0x1b3')});db[_0xff78('0xcb')][_0xff78('0x110')](db[_0xff78('0xcd')],{'as':_0xff78('0x1b4'),'foreignKey':'DescriptionId'});db['FreshsalesConfiguration'][_0xff78('0x110')](db[_0xff78('0xcd')],{'as':'Fields','foreignKey':_0xff78('0x1b6')});db['FreshsalesConfiguration'][_0xff78('0x11f')](db[_0xff78('0x1c7')],{'as':'Account','foreignKey':'AccountId'});db[_0xff78('0xcd')][_0xff78('0x110')](db['FreshsalesField'],{'as':_0xff78('0x1b8'),'foreignKey':_0xff78('0x1b3')});db['FreshsalesField'][_0xff78('0x110')](db[_0xff78('0xcd')],{'as':_0xff78('0x1b9'),'foreignKey':_0xff78('0x1b5')});db[_0xff78('0xcd')]['hasMany'](db[_0xff78('0xcd')],{'as':_0xff78('0x1be'),'foreignKey':_0xff78('0x1b6')});db['FreshsalesField'][_0xff78('0x11f')](db[_0xff78('0x1ba')],{'as':_0xff78('0x1ba'),'foreignKey':_0xff78('0x1bb')});db[_0xff78('0xd1')]['belongsTo'](db[_0xff78('0x66')],{});db[_0xff78('0xd1')][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db[_0xff78('0xd1')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':'Contact','foreignKey':'ContactId'});db[_0xff78('0xd1')]['belongsTo'](db[_0xff78('0x6b')],{});db[_0xff78('0xd1')][_0xff78('0x11f')](db[_0xff78('0x6c')],{});db[_0xff78('0xd1')][_0xff78('0x11f')](db[_0xff78('0x13')],{});db['ChatQueueReport'][_0xff78('0x11f')](db[_0xff78('0x6f')],{});db[_0xff78('0xd3')][_0xff78('0x11f')](db['User'],{'onDelete':_0xff78('0x113'),'foreignKey':'FromId'});db[_0xff78('0xd3')][_0xff78('0x11f')](db[_0xff78('0x13')],{'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1c8')});db['JscriptySessionReport'][_0xff78('0x110')](db[_0xff78('0xd6')],{'foreignKey':_0xff78('0x1c9'),'onDelete':_0xff78('0x113')});db['JscriptySessionReport']['hasMany'](db['JscriptyAnswerReport'],{'foreignKey':_0xff78('0x1c9'),'onDelete':_0xff78('0x113')});db[_0xff78('0xda')][_0xff78('0x11f')](db[_0xff78('0x56')],{});db[_0xff78('0xda')]['belongsTo'](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':_0xff78('0x162')});db[_0xff78('0xda')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0xda')][_0xff78('0x11f')](db['SmsInteraction'],{});db['SmsQueueReport'][_0xff78('0x11f')](db[_0xff78('0x5b')],{});db['SmsQueueReport'][_0xff78('0x11f')](db['User'],{});db[_0xff78('0xda')][_0xff78('0x11f')](db[_0xff78('0x5d')],{});db['JscriptyProject'][_0xff78('0x110')](db[_0xff78('0xd8')],{'foreignKey':_0xff78('0x1ca')});db[_0xff78('0xdd')]['hasMany'](db['JscriptyQuestionReport'],{'foreignKey':_0xff78('0x1ca')});db[_0xff78('0xdd')][_0xff78('0x110')](db[_0xff78('0xd5')],{'foreignKey':_0xff78('0x1ca')});db['SquareProject'][_0xff78('0x121')](db[_0xff78('0x13')],{'as':_0xff78('0x16a'),'through':_0xff78('0x13f')});db['Team'][_0xff78('0x121')](db['User'],{'as':'Agents','through':_0xff78('0x125')});db[_0xff78('0x124')][_0xff78('0x121')](db[_0xff78('0x1e')],{'through':_0xff78('0x151'),'as':_0xff78('0x12b')});db[_0xff78('0x124')][_0xff78('0x121')](db[_0xff78('0x42')],{'through':'team_has_mail_queues','as':_0xff78('0x12c')});db[_0xff78('0x124')]['belongsToMany'](db['ChatQueue'],{'through':'team_has_chat_queues','as':_0xff78('0x12d')});db[_0xff78('0x124')][_0xff78('0x121')](db[_0xff78('0x12f')],{'through':_0xff78('0x17a'),'as':_0xff78('0x1cb')});db[_0xff78('0x124')][_0xff78('0x121')](db['SmsQueue'],{'through':_0xff78('0x180'),'as':_0xff78('0x130')});db['Team'][_0xff78('0x121')](db[_0xff78('0x64')],{'through':'team_has_openchannel_queues','as':_0xff78('0x131')});db[_0xff78('0x124')]['belongsToMany'](db[_0xff78('0x109')],{'through':_0xff78('0x1cc'),'as':_0xff78('0x132')});db['Campaign'][_0xff78('0x110')](db['CmHopper'],{'as':_0xff78('0x144'),'foreignKey':_0xff78('0x199')});db[_0xff78('0xe8')]['hasMany'](db[_0xff78('0x7a')],{'as':_0xff78('0x114'),'foreignKey':_0xff78('0x199')});db[_0xff78('0xe8')][_0xff78('0x110')](db[_0xff78('0x115')],{'as':_0xff78('0x145'),'foreignKey':_0xff78('0x199')});db[_0xff78('0xe8')]['hasMany'](db[_0xff78('0x78')],{'as':_0xff78('0x146'),'foreignKey':'CampaignId'});db[_0xff78('0xe8')][_0xff78('0x11f')](db[_0xff78('0x2f')],{'as':_0xff78('0x2f'),'foreignKey':_0xff78('0x148')});db[_0xff78('0xe8')][_0xff78('0x11f')](db[_0xff78('0x2f')],{'as':_0xff78('0x149'),'foreignKey':'TrunkBackupId'});db[_0xff78('0xe8')][_0xff78('0x11f')](db[_0xff78('0x89')],{'as':_0xff78('0x89'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0xe8')]['belongsTo'](db[_0xff78('0x1cd')],{'as':_0xff78('0x1cd'),'foreignKey':_0xff78('0x1ce')});db[_0xff78('0xe8')][_0xff78('0x121')](db[_0xff78('0xf3')],{'as':_0xff78('0x123'),'through':_0xff78('0x1cf')});db[_0xff78('0xe8')][_0xff78('0x121')](db['CmList'],{'as':'BlackLists','through':_0xff78('0x1d0')});db[_0xff78('0x1d1')][_0xff78('0x11f')](db[_0xff78('0x47')],{});db[_0xff78('0x1d1')][_0xff78('0x11f')](db['MailInteraction'],{});db[_0xff78('0x1d1')][_0xff78('0x11f')](db[_0xff78('0x40')],{'foreignKey':_0xff78('0x1d2'),'as':_0xff78('0x1d3')});db[_0xff78('0x1d1')][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d4'),'as':_0xff78('0x1d5')});db[_0xff78('0x1d1')]['belongsTo'](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d6'),'as':'ToAgent'});db[_0xff78('0x1d1')][_0xff78('0x11f')](db[_0xff78('0x42')],{'foreignKey':'ToMailQueueId','as':'ToQueue'});db['MailTransferReport']['belongsTo'](db[_0xff78('0x40')],{'foreignKey':'ToMailAccountId','as':'ToAccount'});db['ChatTransferReport']['belongsTo'](db[_0xff78('0x6c')],{});db['ChatTransferReport'][_0xff78('0x11f')](db[_0xff78('0x6b')],{});db[_0xff78('0x1d7')][_0xff78('0x11f')](db[_0xff78('0x66')],{'foreignKey':'FromChatWebsiteId','as':_0xff78('0x1d3')});db['ChatTransferReport'][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d4'),'as':_0xff78('0x1d5')});db[_0xff78('0x1d7')][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d6'),'as':'ToAgent'});db[_0xff78('0x1d7')]['belongsTo'](db[_0xff78('0x6f')],{'foreignKey':_0xff78('0x1d8'),'as':_0xff78('0x1d9')});db['ChatTransferReport'][_0xff78('0x11f')](db[_0xff78('0x66')],{'foreignKey':_0xff78('0x1da'),'as':'ToAccount'});db[_0xff78('0xee')][_0xff78('0x11f')](db[_0xff78('0x176')],{});db[_0xff78('0xee')]['belongsTo'](db[_0xff78('0x11b')],{});db['FaxTransferReport'][_0xff78('0x11f')](db['FaxAccount'],{'foreignKey':_0xff78('0x1db'),'as':_0xff78('0x1d3')});db[_0xff78('0xee')][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d4'),'as':_0xff78('0x1d5')});db[_0xff78('0xee')][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d6'),'as':_0xff78('0x1dc')});db['FaxTransferReport'][_0xff78('0x11f')](db['FaxQueue'],{'foreignKey':_0xff78('0x1dd'),'as':_0xff78('0x1d9')});db['FaxTransferReport']['belongsTo'](db[_0xff78('0x4e')],{'foreignKey':'ToFaxAccountId','as':_0xff78('0x1de')});db[_0xff78('0xf0')][_0xff78('0x11f')](db[_0xff78('0x62')],{});db['OpenchannelTransferReport'][_0xff78('0x11f')](db[_0xff78('0x117')],{});db[_0xff78('0xf0')]['belongsTo'](db[_0xff78('0x5f')],{'foreignKey':_0xff78('0x1df'),'as':_0xff78('0x1d3')});db[_0xff78('0xf0')][_0xff78('0x11f')](db['User'],{'foreignKey':_0xff78('0x1d4'),'as':_0xff78('0x1d5')});db[_0xff78('0xf0')][_0xff78('0x11f')](db['User'],{'foreignKey':_0xff78('0x1d6'),'as':_0xff78('0x1dc')});db[_0xff78('0xf0')][_0xff78('0x11f')](db['OpenchannelQueue'],{'foreignKey':_0xff78('0x1e0'),'as':'ToQueue'});db[_0xff78('0xf0')][_0xff78('0x11f')](db[_0xff78('0x5f')],{'foreignKey':_0xff78('0x1e1'),'as':_0xff78('0x1de')});db['SmsTransferReport'][_0xff78('0x11f')](db[_0xff78('0x5b')],{});db[_0xff78('0x1e2')][_0xff78('0x11f')](db[_0xff78('0x59')],{});db[_0xff78('0x1e2')][_0xff78('0x11f')](db[_0xff78('0x56')],{'foreignKey':_0xff78('0x1e3'),'as':_0xff78('0x1d3')});db[_0xff78('0x1e2')][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d4'),'as':_0xff78('0x1d5')});db[_0xff78('0x1e2')][_0xff78('0x11f')](db['User'],{'foreignKey':_0xff78('0x1d6'),'as':_0xff78('0x1dc')});db[_0xff78('0x1e2')][_0xff78('0x11f')](db[_0xff78('0x5d')],{'foreignKey':_0xff78('0x1e4'),'as':_0xff78('0x1d9')});db[_0xff78('0x1e2')]['belongsTo'](db[_0xff78('0x56')],{'foreignKey':_0xff78('0x1e5'),'as':'ToAccount'});db['CmList'][_0xff78('0x110')](db[_0xff78('0x85')],{'as':_0xff78('0x15f'),'foreignKey':_0xff78('0x162')});db['CmList'][_0xff78('0x110')](db['CmCustomField'],{'as':_0xff78('0x1e6'),'foreignKey':'ListId'});db[_0xff78('0xf3')][_0xff78('0x110')](db[_0xff78('0x122')],{'as':_0xff78('0x193'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x162')});db['CmList'][_0xff78('0x110')](db[_0xff78('0x7a')],{'as':'HopperFinals','foreignKey':_0xff78('0x162')});db[_0xff78('0xf3')][_0xff78('0x110')](db['CmHopperHistory'],{'as':_0xff78('0x116'),'foreignKey':_0xff78('0x162')});db[_0xff78('0xf3')]['hasMany'](db[_0xff78('0x7d')],{'as':'ReportAgentPreview','foreignKey':'ListId'});db[_0xff78('0xf3')]['belongsToMany'](db[_0xff78('0x1e')],{'as':_0xff78('0x1e7'),'through':'voice_queues_has_cm_lists'});db[_0xff78('0xf3')]['belongsToMany'](db[_0xff78('0x13')],{'as':_0xff78('0x14f'),'through':_0xff78('0x133')});db[_0xff78('0xf5')][_0xff78('0x110')](db[_0xff78('0x1a')],{'as':'Extensions','onDelete':_0xff78('0x113')});db['VoicePrefix'][_0xff78('0x121')](db['User'],{'as':_0xff78('0x14f'),'through':_0xff78('0x135')});db[_0xff78('0xf7')][_0xff78('0x110')](db['User'],{'as':_0xff78('0x16a'),'foreignKey':_0xff78('0x120')});db[_0xff78('0xf7')]['hasMany'](db[_0xff78('0xf8')],{'as':_0xff78('0x1e8'),'foreignKey':_0xff78('0x120'),'onDelete':_0xff78('0x113')});db[_0xff78('0xf8')]['hasMany'](db[_0xff78('0xfa')],{'as':_0xff78('0x1e9'),'foreignKey':'sectionId','onDelete':'cascade'});db['WhatsappAccount']['hasMany'](db[_0xff78('0x85')],{'as':_0xff78('0x15f'),'foreignKey':_0xff78('0x1ea')});db['WhatsappAccount'][_0xff78('0x110')](db[_0xff78('0x83')],{'as':_0xff78('0x172'),'foreignKey':'WhatsappAccountId'});db['WhatsappAccount'][_0xff78('0x110')](db['WhatsappMessage'],{'as':_0xff78('0x154'),'foreignKey':_0xff78('0x1ea')});db[_0xff78('0xfd')][_0xff78('0x110')](db['WhatsappInteraction'],{'as':_0xff78('0x174')});db[_0xff78('0xfd')][_0xff78('0x110')](db[_0xff78('0xff')],{'as':_0xff78('0x161')});db['WhatsappAccount'][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':'List','foreignKey':_0xff78('0x162')});db['WhatsappAccount']['belongsTo'](db[_0xff78('0x8b')],{'as':_0xff78('0x14c'),'foreignKey':'mandatoryDispositionPauseId'});db[_0xff78('0xfd')][_0xff78('0x121')](db['User'],{'as':_0xff78('0x14f'),'through':_0xff78('0x1eb')});db[_0xff78('0xff')][_0xff78('0x11f')](db[_0xff78('0x13')],{'onDelete':_0xff78('0x16d')});db['WhatsappApplication'][_0xff78('0x11f')](db['WhatsappQueue'],{'onDelete':_0xff78('0x16d')});db[_0xff78('0xff')][_0xff78('0x11f')](db[_0xff78('0xfd')],{'onDelete':'restrict'});db[_0xff78('0xff')][_0xff78('0x11f')](db[_0xff78('0x89')],{'onDelete':_0xff78('0x16d'),'foreignKey':_0xff78('0x14b')});db[_0xff78('0xff')][_0xff78('0x11f')](db[_0xff78('0x92')],{'onDelete':'restrict','foreignKey':_0xff78('0x16e')});db['WhatsappInteraction'][_0xff78('0x110')](db['WhatsappMessage'],{'as':_0xff78('0x154'),'onDelete':_0xff78('0x113'),'foreignKey':_0xff78('0x1ec')});db[_0xff78('0x101')][_0xff78('0x11f')](db[_0xff78('0xfd')],{'as':_0xff78('0x165'),'foreignKey':_0xff78('0x1ea')});db[_0xff78('0x101')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':'Contact','foreignKey':_0xff78('0x15b')});db[_0xff78('0x101')][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x166'),'foreignKey':'UserId'});db[_0xff78('0x101')]['belongsToMany'](db[_0xff78('0x92')],{'through':_0xff78('0x1a7'),'as':'Tags'});db['WhatsappInteraction'][_0xff78('0x121')](db[_0xff78('0x92')],{'through':'whatsapp_interaction_has_tags','as':_0xff78('0x169')});db[_0xff78('0x101')][_0xff78('0x121')](db[_0xff78('0x13')],{'as':_0xff78('0x16a'),'through':'user_has_whatsapp_interactions','foreignKey':_0xff78('0x1ec')});db['WhatsappMessage'][_0xff78('0x11f')](db[_0xff78('0x13')],{'as':_0xff78('0x13')});db[_0xff78('0x103')][_0xff78('0x11f')](db[_0xff78('0x122')],{'onDelete':'cascade','as':_0xff78('0x15a')});db[_0xff78('0x103')][_0xff78('0x11f')](db[_0xff78('0x101')],{'onDelete':_0xff78('0x113'),'as':'Interaction','foreignKey':_0xff78('0x1ec')});db['WhatsappMessage'][_0xff78('0x11f')](db['WhatsappAccount'],{'as':'Account','foreignKey':_0xff78('0x1ea')});db[_0xff78('0x105')][_0xff78('0x11f')](db[_0xff78('0xfd')],{});db['WhatsappQueueReport'][_0xff78('0x11f')](db[_0xff78('0xf3')],{'as':_0xff78('0x16f'),'foreignKey':'ListId'});db[_0xff78('0x105')][_0xff78('0x11f')](db[_0xff78('0x122')],{'as':_0xff78('0x15a'),'foreignKey':_0xff78('0x15b')});db[_0xff78('0x105')][_0xff78('0x11f')](db[_0xff78('0x101')],{});db['WhatsappQueueReport'][_0xff78('0x11f')](db[_0xff78('0x109')],{});db['WhatsappQueueReport'][_0xff78('0x11f')](db['WhatsappMessage'],{});db[_0xff78('0x105')][_0xff78('0x11f')](db[_0xff78('0x13')],{});db[_0xff78('0x107')][_0xff78('0x11f')](db['WhatsappMessage'],{});db[_0xff78('0x107')]['belongsTo'](db['WhatsappInteraction'],{});db['WhatsappTransferReport'][_0xff78('0x11f')](db[_0xff78('0xfd')],{'foreignKey':'FromWhatsappAccountId','as':_0xff78('0x1d3')});db[_0xff78('0x107')]['belongsTo'](db[_0xff78('0xfd')],{'foreignKey':'ToWhatsappAccountId','as':_0xff78('0x1de')});db[_0xff78('0x107')][_0xff78('0x11f')](db['WhatsappQueue'],{'foreignKey':_0xff78('0x1ed'),'as':_0xff78('0x1d9')});db[_0xff78('0x107')][_0xff78('0x11f')](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d4'),'as':_0xff78('0x1d5')});db[_0xff78('0x107')]['belongsTo'](db[_0xff78('0x13')],{'foreignKey':_0xff78('0x1d6'),'as':_0xff78('0x1dc')});db[_0xff78('0x109')][_0xff78('0x121')](db[_0xff78('0x13')],{'as':'Agents','through':_0xff78('0x3b'),'foreignKey':'WhatsappQueueId'});db[_0xff78('0x109')][_0xff78('0x121')](db[_0xff78('0x124')],{'through':'team_has_whatsapp_queues','as':'Teams'});module[_0xff78('0x1ee')]={'db':db,'dbH':dbH}; \ No newline at end of file +var _0xfc5c=['../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/cmContact/cmContact.model','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/reportAgentPreview/reportAgentPreview.model','CmCustomField','Action','../api/action/action.model','Automation','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','Condition','../api/condition/condition.model','Interval','../api/pause/pause.model','../api/cdr/cdr.model','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','../api/sound/sound.model','Tag','../api/tag/tag.model','Template','Trigger','../api/trigger/trigger.model','Variable','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','../api/intSalesforceField/intSalesforceField.model','../api/intSugarcrmAccount/intSugarcrmAccount.model','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','../api/intZendeskConfiguration/intZendeskConfiguration.model','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','ServicenowAccount','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','../api/intServicenowField/intServicenowField.model','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','../api/intFreshsalesAccount/intFreshsalesAccount.model','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Network','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','../api/jscriptyProject/jscriptyProject.model','SquareProject','../api/squareProject/squareProject.model','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','../api/team/team.model','License','Campaign','../api/campaign/campaign.model','Migration','../api/attachment/attachment.model','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','OpenchannelTransferReport','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','VoicePrefix','UserProfile','../api/userProfile/userProfile.model','../api/userProfileSection/userProfileSection.model','UserProfileResource','../api/userProfileResource/userProfileResource.model','Notification','../api/notification/notification.model','UserNotification','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','WhatsappTransferReport','../api/whatsappTransferReport/whatsappTransferReport.model','../api/whatsappQueue/whatsappQueue.model','../api/cloudProvider/cloudProvider.model','hasOne','VoiceMail','cascade','hasMany','Recordings','UserId','UserVoiceQueueRt','VoiceQueuesRt','Extensions','CmHopperFinal','ReportAgentPreview','ChatInteraction','ChatInteractions','SmsInteraction','SmsInteractions','MailInteractions','WhatsappInteractions','Notifications','SenderId','UserNotifications','belongsTo','userProfileId','chat_group_has_users','belongsToMany','CmContact','Contacts','Lists','user_has_teams','user_has_chat_interactions','FaxInteractions','user_has_fax_interactions','user_has_sms_interactions','OpenchannelInteractions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueues','MailQueues','ChatQueues','FaxQueues','SmsQueues','WhatsappQueue','WhatsappQueues','cm_user_has_lists','VoicePrefixes','user_has_voice_prefixes','ChatWebsites','user_has_chat_websites','FaxAccounts','user_has_fax_accounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','WhatsappAccounts','user_has_whatsapp_accounts','SquareProjects','VoiceChanSpy','SpiedAgents','ChanSpyId','Applications','Sound','Sounds','moh_has_sounds','Members','VoiceQueueId','VoiceQueue','CmHopper','Hoppers','HopperFinals','HopperHistories','HopperBlacks','JscriptySessions','TrunkId','TrunkBackupId','IntervalId','Pause','mandatoryDispositionPause','mandatoryDispositionPauseId','voice_queues_has_cm_lists','Agents','Teams','team_has_voice_queues','BlackLists','voice_queues_has_cm_blacklists','ScreenRecording','Messages','mailbox','mailboxuser','QueueCalls','uniqueid','AgentReports','Contact','ContactId','MailAccountId','Imap','Smtp','Disposition','Dispositions','Interactions','ListId','TemplateId','team_has_mail_queues','MailInteractionId','Account','Owner','mail_interaction_has_tags','Tags','ThroughTags','Users','user_has_mail_interactions','Attachments','Interaction','restrict','TagId','List','DashboardItem','Answers','Exntensions','FaxMessage','FaxInteractionId','FaxAccountId','fax_interaction_has_tags','Attachment','AttachmentId','SmsAccountId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','OpenchannelAccountId','OpenchannelQueueId','openchannel_interaction_has_tags','OpenchannelInteractionId','team_has_openchannel_queues','ChatWebsiteId','Agent','ChatQueueId','Website','ChatInteractionId','chat_interaction_has_tags','ChatGroupId','CmCompany','Company','CompanyId','cm_user_has_contacts','cm_contact_has_tags','Queue','CampaignId','OwnerId','All','AutomationAllId','Any','OneAny','AutomationAnyId','AutomationId','Intervals','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','AllCondition','AnyCondition','Actions','TriggerId','Fields','CustomReportId','AnalyticMetric','MetricId','Configurations','AccountId','Subjects','SubjectId','Descriptions','DescriptionId','FieldId','Subject','Description','Field','VariableId','SugarcrmAccount','SugarcrmConfiguration','SugarcrmField','ZohoConfiguration','ZendeskConfiguration','ZendeskField','int_zendesk_configuration_has_tags','int_freshdesk_configuration_has_tags','FreshsalesAccount','FreshsalesConfiguration','FromId','ToId','SessionId','JscriptyProject','ProjectId','user_has_square_projects','team_has_chat_queues','team_has_fax_queues','OpenchannelQueues','team_has_whatsapp_queues','TrunkBackup','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','FromUserId','FromAgent','ToUserId','ToMailQueueId','ToQueue','ToMailAccountId','ToAccount','FromChatWebsiteId','FromAccount','ToAgent','ToChatQueueId','ToChatWebsiteId','FromFaxAccountId','ToFaxQueueId','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','UserProfileSection','UserProfileSections','Resources','sectionId','WhatsappAccountId','WhatsappMessage','WhatsappInteractionId','whatsapp_interaction_has_tags','FromWhatsappAccountId','ToWhatsappAccountId','exports','../config/environment','sequelize','lodash','determine','defaultsDeep','motion2','xcall','mysql','utf8mb4','name','utf8','utf8_general_ci','sequelizeHistory','xC@LL1234','127.0.0.1','database','options','password','User','import','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','../api/voiceQueue/voiceQueue.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','../api/voiceMail/voiceMail.model','VoiceMailMessage','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','MemberReport','../api/memberReport/memberReport.model','Trunk','VoiceTransferReport','UserVoiceQueue','UserChatQueue','../api/userChatQueue/userChatQueue.model','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','../api/userSmsQueue/userSmsQueue.model','UserOpenchannelQueue','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','../api/mailServerIn/mailServerIn.model','MailServerOut','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','MailInteraction','../api/mailInteraction/mailInteraction.model','MailMessage','../api/mailMessage/mailMessage.model','MailApplication','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','Dashboard','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','../api/smsApplication/smsApplication.model','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','OpenchannelQueue','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','../api/chatInteraction/chatInteraction.model','ChatMessage','../api/chatMessage/chatMessage.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue'];(function(_0x5aace1,_0x30d389){var _0x4933e1=function(_0x359088){while(--_0x359088){_0x5aace1['push'](_0x5aace1['shift']());}};_0x4933e1(++_0x30d389);}(_0xfc5c,0x185));var _0xcfc5=function(_0x13e741,_0x5d3c24){_0x13e741=_0x13e741-0x0;var _0x3f8bb3=_0xfc5c[_0x13e741];return _0x3f8bb3;};'use strict';var path=require('path');var config=require(_0xcfc5('0x0'));var Sequelize=require(_0xcfc5('0x1'));var _=require(_0xcfc5('0x2'));var jstz=require('jstz');var timezone=jstz[_0xcfc5('0x3')]();config['sequelize']=_[_0xcfc5('0x4')](config['sequelize'],{'database':_0xcfc5('0x5'),'username':_0xcfc5('0x6'),'password':'xC@LL1234','options':{'host':'127.0.0.1','port':0xcea,'dialect':_0xcfc5('0x7'),'dialectOptions':{'charset':_0xcfc5('0x8')},'logging':![],'timezone':timezone[_0xcfc5('0x9')](),'define':{'charset':_0xcfc5('0xa'),'collate':_0xcfc5('0xb')}}});config[_0xcfc5('0xc')]=_[_0xcfc5('0x4')](config[_0xcfc5('0xc')],{'database':_0xcfc5('0x5'),'username':_0xcfc5('0x6'),'password':_0xcfc5('0xd'),'options':{'host':_0xcfc5('0xe'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0xcfc5('0x8')},'logging':![],'timezone':timezone[_0xcfc5('0x9')](),'define':{'charset':_0xcfc5('0xa'),'collate':'utf8_general_ci'}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xcfc5('0x1')][_0xcfc5('0xf')],config[_0xcfc5('0x1')]['username'],config[_0xcfc5('0x1')]['password'],config[_0xcfc5('0x1')][_0xcfc5('0x10')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xcfc5('0xc')][_0xcfc5('0xf')],config[_0xcfc5('0xc')]['username'],config['sequelizeHistory'][_0xcfc5('0x11')],config[_0xcfc5('0xc')][_0xcfc5('0x10')])};db[_0xcfc5('0x12')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/user/user.model');db['VoiceChanSpy']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x14'));db[_0xcfc5('0x15')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x16'));db[_0xcfc5('0x17')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x18'));db[_0xcfc5('0x19')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x1a'));db['VoiceQueue']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x1b'));db[_0xcfc5('0x1c')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x1d'));db['ScreenRecording']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/screenRecording/screenRecording.model');db['VoiceMail']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x1e'));db[_0xcfc5('0x1f')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/voiceMailMessage/voiceMailMessage.model');db[_0xcfc5('0x20')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x21'));db[_0xcfc5('0x22')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/voiceDialReport/voiceDialReport.model');db[_0xcfc5('0x23')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x24'));db[_0xcfc5('0x25')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/voiceQueueReport/voiceQueueReport.model');db[_0xcfc5('0x26')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x27'));db[_0xcfc5('0x28')]=db[_0xcfc5('0x1')]['import']('../api/trunk/trunk.model');db[_0xcfc5('0x29')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/voiceTransferReport/voiceTransferReport.model');db['UserVoiceQueueRt']=db['sequelize'][_0xcfc5('0x13')]('../api/userVoiceQueueRt/userVoiceQueueRt.model');db[_0xcfc5('0x2a')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/userVoiceQueue/userVoiceQueue.model');db[_0xcfc5('0x2b')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x2c'));db[_0xcfc5('0x2d')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x2e'));db[_0xcfc5('0x2f')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x30'));db[_0xcfc5('0x31')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x32'));db[_0xcfc5('0x33')]=db[_0xcfc5('0x1')]['import']('../api/userOpenchannelQueue/userOpenchannelQueue.model');db[_0xcfc5('0x34')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x35'));db[_0xcfc5('0x36')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x37'));db[_0xcfc5('0x38')]=db['sequelize'][_0xcfc5('0x13')]('../api/mailServerOut/mailServerOut.model');db[_0xcfc5('0x39')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x3a'));db[_0xcfc5('0x3b')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x3c'));db[_0xcfc5('0x3d')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x3e'));db[_0xcfc5('0x3f')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x40'));db[_0xcfc5('0x41')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x42'));db[_0xcfc5('0x43')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/mailApplication/mailApplication.model');db[_0xcfc5('0x44')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x45'));db[_0xcfc5('0x46')]=db[_0xcfc5('0x1')]['import']('../api/dashboard/dashboard.model');db['DashboardItem']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/dashboardItem/dashboardItem.model');db[_0xcfc5('0x47')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x48'));db[_0xcfc5('0x49')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/faxApplication/faxApplication.model');db[_0xcfc5('0x4a')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x4b'));db['FaxMessage']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/faxMessage/faxMessage.model');db[_0xcfc5('0x4c')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x4d'));db[_0xcfc5('0x4e')]=db['sequelize'][_0xcfc5('0x13')]('../api/faxQueueReport/faxQueueReport.model');db[_0xcfc5('0x4f')]=db['sequelize']['import'](_0xcfc5('0x50'));db[_0xcfc5('0x51')]=db['sequelize']['import'](_0xcfc5('0x52'));db['SmsInteraction']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x53'));db[_0xcfc5('0x54')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x55'));db[_0xcfc5('0x56')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/smsQueue/smsQueue.model');db[_0xcfc5('0x57')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x58'));db[_0xcfc5('0x59')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x5a'));db[_0xcfc5('0x5b')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x5c'));db[_0xcfc5('0x5d')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/openchannelMessage/openchannelMessage.model');db[_0xcfc5('0x5e')]=db[_0xcfc5('0x1')]['import']('../api/openchannelQueue/openchannelQueue.model');db[_0xcfc5('0x5f')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x60'));db[_0xcfc5('0x61')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x62'));db[_0xcfc5('0x63')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x64'));db['ChatInteraction']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x65'));db[_0xcfc5('0x66')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x67'));db[_0xcfc5('0x68')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x69'));db[_0xcfc5('0x6a')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x6b'));db[_0xcfc5('0x6c')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x6d'));db[_0xcfc5('0x6e')]=db[_0xcfc5('0x1')]['import']('../api/chatProactiveAction/chatProactiveAction.model');db['CmCompany']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/cmCompany/cmCompany.model');db['CmContact']=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x6f'));db['CmHopper']=db['sequelize']['import'](_0xcfc5('0x70'));db[_0xcfc5('0x71')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x72'));db['CmHopperFinal']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x73'));db[_0xcfc5('0x74')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/cmHopperHistory/cmHopperHistory.model');db['ReportAgentPreview']=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x75'));db[_0xcfc5('0x76')]=db['sequelize'][_0xcfc5('0x13')]('../api/cmCustomField/cmCustomField.model');db[_0xcfc5('0x77')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x78'));db[_0xcfc5('0x79')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x7a'));db[_0xcfc5('0x7b')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x7c'));db['Disposition']=db['sequelize'][_0xcfc5('0x13')]('../api/disposition/disposition.model');db[_0xcfc5('0x7d')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x7e'));db[_0xcfc5('0x7f')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/interval/interval.model');db['Pause']=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x80'));db['Cdr']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x81'));db[_0xcfc5('0x82')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x83'));db[_0xcfc5('0x84')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x85'));db['Sound']=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x86'));db[_0xcfc5('0x87')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x88'));db[_0xcfc5('0x89')]=db[_0xcfc5('0x1')]['import']('../api/template/template.model');db[_0xcfc5('0x8a')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x8b'));db[_0xcfc5('0x8c')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/variable/variable.model');db[_0xcfc5('0x8d')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x8e'));db[_0xcfc5('0x8f')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x90'));db[_0xcfc5('0x91')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x92'));db[_0xcfc5('0x93')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x94'));db[_0xcfc5('0x95')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x96'));db['AnalyticMetric']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/analyticMetric/analyticMetric.model');db[_0xcfc5('0x97')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x98'));db['AnalyticTreeReport']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x99'));db[_0xcfc5('0x9a')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x9b'));db[_0xcfc5('0x9c')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x9d'));db[_0xcfc5('0x9e')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x9f'));db['SugarcrmAccount']=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xa0'));db['SugarcrmConfiguration']=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xa1'));db['SugarcrmField']=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xa2'));db[_0xcfc5('0xa3')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xa4'));db[_0xcfc5('0xa5')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xa6'));db[_0xcfc5('0xa7')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xa8'));db[_0xcfc5('0xa9')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xaa'));db['ZohoConfiguration']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xab'));db[_0xcfc5('0xac')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/intZohoField/intZohoField.model');db[_0xcfc5('0xad')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xae'));db['ZendeskConfiguration']=db['sequelize']['import'](_0xcfc5('0xaf'));db['ZendeskField']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/intZendeskField/intZendeskField.model');db[_0xcfc5('0xb0')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xb1'));db[_0xcfc5('0xb2')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model');db[_0xcfc5('0xb3')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xb4'));db[_0xcfc5('0xb5')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/intVtigerAccount/intVtigerAccount.model');db[_0xcfc5('0xb6')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xb7'));db[_0xcfc5('0xb8')]=db[_0xcfc5('0x1')]['import']('../api/intVtigerField/intVtigerField.model');db[_0xcfc5('0xb9')]=db[_0xcfc5('0x1')]['import']('../api/intServicenowAccount/intServicenowAccount.model');db[_0xcfc5('0xba')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xbb'));db[_0xcfc5('0xbc')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xbd'));db[_0xcfc5('0xbe')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xbf'));db[_0xcfc5('0xc0')]=db['sequelize']['import']('../api/intDynamics365Configuration/intDynamics365Configuration.model');db[_0xcfc5('0xc1')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xc2'));db['FreshsalesAccount']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xc3'));db['FreshsalesConfiguration']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xc4'));db[_0xcfc5('0xc5')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xc6'));db[_0xcfc5('0x8d')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x8e'));db[_0xcfc5('0xc7')]=db['sequelize'][_0xcfc5('0x13')]('../api/network/network.model');db[_0xcfc5('0xc8')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xc9'));db[_0xcfc5('0xca')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xcb'));db[_0xcfc5('0xcc')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xcd'));db[_0xcfc5('0xce')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xcf'));db[_0xcfc5('0xd0')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xd1'));db[_0xcfc5('0xd2')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xd3'));db[_0xcfc5('0xd4')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xd5'));db[_0xcfc5('0xd6')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xd7'));db['JscriptyProject']=db['sequelize']['import'](_0xcfc5('0xd8'));db['Setting']=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/setting/setting.model');db['SquareOdbc']=db[_0xcfc5('0x1')]['import']('../api/squareOdbc/squareOdbc.model');db[_0xcfc5('0xd9')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xda'));db['SquareRecording']=db['sequelize']['import'](_0xcfc5('0xdb'));db[_0xcfc5('0xdc')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xdd'));db[_0xcfc5('0xde')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xdf'));db[_0xcfc5('0xe0')]=db[_0xcfc5('0x1')]['import']('../api/license/license.model');db[_0xcfc5('0xe1')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xe2'));db[_0xcfc5('0xe3')]=db['sequelize'][_0xcfc5('0x13')]('../api/migration/migration.model');db['Attachment']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xe4'));db['Plugin']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xe5'));db[_0xcfc5('0xe6')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xe7'));db[_0xcfc5('0xe8')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0xe9'));db[_0xcfc5('0xea')]=db[_0xcfc5('0x1')]['import']('../api/faxTransferReport/faxTransferReport.model');db[_0xcfc5('0xeb')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xec'));db[_0xcfc5('0xed')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xee'));db[_0xcfc5('0xef')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xf0'));db[_0xcfc5('0xf1')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/voicePrefix/voicePrefix.model');db[_0xcfc5('0xf2')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xf3'));db['UserProfileSection']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xf4'));db[_0xcfc5('0xf5')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xf6'));db[_0xcfc5('0xf7')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xf8'));db[_0xcfc5('0xf9')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/userNotification/userNotification.model');db[_0xcfc5('0xfa')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0xfb'));db[_0xcfc5('0xfc')]=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0xfd'));db[_0xcfc5('0xfe')]=db[_0xcfc5('0x1')][_0xcfc5('0x13')]('../api/whatsappInteraction/whatsappInteraction.model');db['WhatsappMessage']=db['sequelize']['import'](_0xcfc5('0xff'));db[_0xcfc5('0x100')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x101'));db[_0xcfc5('0x102')]=db[_0xcfc5('0x1')]['import'](_0xcfc5('0x103'));db['WhatsappQueue']=db['sequelize'][_0xcfc5('0x13')](_0xcfc5('0x104'));db['CloudProvider']=db[_0xcfc5('0x1')][_0xcfc5('0x13')](_0xcfc5('0x105'));db[_0xcfc5('0x12')][_0xcfc5('0x106')](db[_0xcfc5('0x107')],{'as':'VoiceMail','onDelete':_0xcfc5('0x108'),'foreignKey':'UserId'});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0x1c')],{'as':_0xcfc5('0x10a'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')]['hasMany'](db[_0xcfc5('0x10c')],{'as':_0xcfc5('0x10d'),'foreignKey':_0xcfc5('0x10b')});db['User'][_0xcfc5('0x109')](db[_0xcfc5('0x17')],{'as':_0xcfc5('0x10e'),'onDelete':_0xcfc5('0x108'),'hooks':!![]});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0x10f')],{'as':'HopperFinals','foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0x74')],{'as':'HopperHistory','foreignKey':_0xcfc5('0x10b')});db['User'][_0xcfc5('0x109')](db[_0xcfc5('0x110')],{'as':_0xcfc5('0x110'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db['OpenchannelInteraction'],{'as':'OpenchannelInteractions','foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0x111')],{'as':_0xcfc5('0x112'),'foreignKey':_0xcfc5('0x10b')});db['User']['hasMany'](db[_0xcfc5('0x113')],{'as':_0xcfc5('0x114'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')]['hasMany'](db['FaxInteraction'],{'as':'FaxInteractions','foreignKey':'UserId'});db['User'][_0xcfc5('0x109')](db[_0xcfc5('0x3f')],{'as':_0xcfc5('0x115'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0xfe')],{'as':_0xcfc5('0x116'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0xf7')],{'as':_0xcfc5('0x117'),'foreignKey':_0xcfc5('0x118')});db[_0xcfc5('0x12')][_0xcfc5('0x109')](db[_0xcfc5('0xf9')],{'as':_0xcfc5('0x119'),'foreignKey':_0xcfc5('0x118')});db[_0xcfc5('0x12')][_0xcfc5('0x11a')](db[_0xcfc5('0xf2')],{'as':'UserProfile','foreignKey':_0xcfc5('0x11b')});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x6c')],{'as':'Groups','through':_0xcfc5('0x11c')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x11f'),'through':'cm_user_has_contacts'});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x120'),'through':'cm_user_has_lists'});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db['Team'],{'through':_0xcfc5('0x121')});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x3f')],{'as':'MailInteractions','through':'user_has_mail_interactions'});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x111')],{'as':_0xcfc5('0x112'),'through':_0xcfc5('0x122')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x4a')],{'as':_0xcfc5('0x123'),'through':_0xcfc5('0x124')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db['SmsInteraction'],{'as':'SmsInteractions','through':_0xcfc5('0x125')});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x5b')],{'as':_0xcfc5('0x126'),'through':_0xcfc5('0x127')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0xfe')],{'as':_0xcfc5('0x116'),'through':_0xcfc5('0x128')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db['VoiceQueue'],{'as':_0xcfc5('0x129'),'through':'UserVoiceQueue','required':![]});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x3b')],{'as':_0xcfc5('0x12a'),'through':'UserMailQueue','required':![]});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x6a')],{'as':_0xcfc5('0x12b'),'through':'UserChatQueue','required':![],'hooks':!![]});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x4c')],{'as':_0xcfc5('0x12c'),'through':_0xcfc5('0x2f'),'required':![]});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x56')],{'as':_0xcfc5('0x12d'),'through':'UserSmsQueue','required':![]});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x5e')],{'as':'OpenchannelQueues','through':_0xcfc5('0x33'),'required':![]});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x12e')],{'as':_0xcfc5('0x12f'),'through':_0xcfc5('0x34'),'required':![]});db['User'][_0xcfc5('0x11d')](db[_0xcfc5('0xef')],{'through':_0xcfc5('0x130')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0xf1')],{'as':_0xcfc5('0x131'),'through':_0xcfc5('0x132'),'required':![]});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x5f')],{'as':_0xcfc5('0x133'),'through':_0xcfc5('0x134')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db['FaxAccount'],{'as':_0xcfc5('0x135'),'through':_0xcfc5('0x136')});db[_0xcfc5('0x12')][_0xcfc5('0x11d')](db[_0xcfc5('0x39')],{'as':'MailAccounts','through':_0xcfc5('0x137')});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0x57')],{'as':_0xcfc5('0x138'),'through':_0xcfc5('0x139')});db['User'][_0xcfc5('0x11d')](db['SmsAccount'],{'as':_0xcfc5('0x13a'),'through':_0xcfc5('0x13b')});db[_0xcfc5('0x12')]['belongsToMany'](db[_0xcfc5('0xfa')],{'as':_0xcfc5('0x13c'),'through':_0xcfc5('0x13d')});db[_0xcfc5('0x12')]['belongsToMany'](db['SquareProject'],{'as':_0xcfc5('0x13e'),'through':'user_has_square_projects'});db[_0xcfc5('0x13f')][_0xcfc5('0x109')](db['VoiceExtension'],{'as':_0xcfc5('0x140'),'onDelete':'cascade','foreignKey':_0xcfc5('0x141')});db[_0xcfc5('0x15')][_0xcfc5('0x109')](db[_0xcfc5('0x17')],{'onDelete':'cascade'});db['VoiceExtension'][_0xcfc5('0x109')](db[_0xcfc5('0x17')],{'as':_0xcfc5('0x142'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x19')][_0xcfc5('0x11d')](db[_0xcfc5('0x143')],{'as':_0xcfc5('0x144'),'through':_0xcfc5('0x145')});db['VoiceQueue'][_0xcfc5('0x109')](db['UserVoiceQueueRt'],{'as':_0xcfc5('0x146'),'foreignKey':_0xcfc5('0x147')});db[_0xcfc5('0x148')]['hasMany'](db[_0xcfc5('0x149')],{'as':_0xcfc5('0x14a'),'foreignKey':_0xcfc5('0x147')});db[_0xcfc5('0x148')][_0xcfc5('0x109')](db[_0xcfc5('0x10f')],{'as':_0xcfc5('0x14b'),'foreignKey':_0xcfc5('0x147')});db[_0xcfc5('0x148')][_0xcfc5('0x109')](db[_0xcfc5('0x74')],{'as':_0xcfc5('0x14c'),'foreignKey':_0xcfc5('0x147')});db['VoiceQueue'][_0xcfc5('0x109')](db['ReportAgentPreview'],{'as':_0xcfc5('0x110'),'foreignKey':_0xcfc5('0x147')});db[_0xcfc5('0x148')][_0xcfc5('0x109')](db[_0xcfc5('0x71')],{'as':_0xcfc5('0x14d'),'foreignKey':_0xcfc5('0x147')});db[_0xcfc5('0x148')]['hasMany'](db[_0xcfc5('0xd0')],{'as':_0xcfc5('0x14e'),'foreignKey':_0xcfc5('0x147')});db['VoiceQueue'][_0xcfc5('0x11a')](db['Trunk'],{'as':_0xcfc5('0x28'),'foreignKey':_0xcfc5('0x14f')});db[_0xcfc5('0x148')][_0xcfc5('0x11a')](db['Trunk'],{'as':'TrunkBackup','foreignKey':_0xcfc5('0x150')});db[_0xcfc5('0x148')][_0xcfc5('0x11a')](db['Interval'],{'as':_0xcfc5('0x7f'),'foreignKey':_0xcfc5('0x151')});db[_0xcfc5('0x148')][_0xcfc5('0x11a')](db[_0xcfc5('0x152')],{'as':_0xcfc5('0x153'),'foreignKey':_0xcfc5('0x154')});db[_0xcfc5('0x148')]['belongsToMany'](db[_0xcfc5('0xef')],{'as':'Lists','through':_0xcfc5('0x155')});db['VoiceQueue'][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x2a')});db[_0xcfc5('0x148')]['belongsToMany'](db[_0xcfc5('0xde')],{'as':_0xcfc5('0x157'),'through':_0xcfc5('0x158')});db['VoiceQueue'][_0xcfc5('0x11d')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x159'),'through':_0xcfc5('0x15a')});db[_0xcfc5('0x1c')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x12'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x15b')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x12'),'foreignKey':_0xcfc5('0x10b')});db['VoiceMail'][_0xcfc5('0x109')](db['VoiceMailMessage'],{'as':_0xcfc5('0x15c'),'onDelete':'cascade','foreignKey':'mailboxuser','sourceKey':_0xcfc5('0x15d')});db['VoiceMailMessage'][_0xcfc5('0x11a')](db[_0xcfc5('0x107')],{'foreignKey':_0xcfc5('0x15e'),'targetKey':'mailbox'});db[_0xcfc5('0x20')]['hasMany'](db[_0xcfc5('0x25')],{'as':_0xcfc5('0x15f'),'foreignKey':_0xcfc5('0x160'),'constraints':![]});db[_0xcfc5('0x20')][_0xcfc5('0x109')](db[_0xcfc5('0x23')],{'as':_0xcfc5('0x161'),'foreignKey':_0xcfc5('0x160'),'constraints':![]});db[_0xcfc5('0x20')]['belongsTo'](db['User'],{'as':_0xcfc5('0x12'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x20')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x36')][_0xcfc5('0x11a')](db['MailAccount'],{'as':_0xcfc5('0x39'),'foreignKey':_0xcfc5('0x164')});db['MailServerOut'][_0xcfc5('0x11a')](db[_0xcfc5('0x39')],{'as':'MailAccount','foreignKey':_0xcfc5('0x164')});db[_0xcfc5('0x39')][_0xcfc5('0x106')](db[_0xcfc5('0x36')],{'as':_0xcfc5('0x165'),'onDelete':'cascade'});db[_0xcfc5('0x39')][_0xcfc5('0x106')](db[_0xcfc5('0x38')],{'as':_0xcfc5('0x166'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x39')]['hasMany'](db[_0xcfc5('0x167')],{'as':_0xcfc5('0x168'),'foreignKey':_0xcfc5('0x164')});db[_0xcfc5('0x39')][_0xcfc5('0x109')](db['CannedAnswer'],{'as':'Answers','foreignKey':_0xcfc5('0x164')});db[_0xcfc5('0x39')][_0xcfc5('0x109')](db['MailMessage'],{'as':'Messages','foreignKey':_0xcfc5('0x164')});db[_0xcfc5('0x39')][_0xcfc5('0x109')](db[_0xcfc5('0x3f')],{'as':_0xcfc5('0x169')});db[_0xcfc5('0x39')][_0xcfc5('0x109')](db[_0xcfc5('0x43')],{'as':_0xcfc5('0x142')});db[_0xcfc5('0x39')][_0xcfc5('0x11a')](db['CmList'],{'as':'List','foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0x39')][_0xcfc5('0x11a')](db[_0xcfc5('0x89')],{'as':'Template','foreignKey':_0xcfc5('0x16b')});db[_0xcfc5('0x39')][_0xcfc5('0x11a')](db[_0xcfc5('0x152')],{'as':_0xcfc5('0x153'),'foreignKey':'mandatoryDispositionPauseId'});db[_0xcfc5('0x39')][_0xcfc5('0x11d')](db['User'],{'as':'Agents','through':_0xcfc5('0x137')});db[_0xcfc5('0x3b')][_0xcfc5('0x11d')](db['User'],{'as':'Agents','through':_0xcfc5('0x2d')});db[_0xcfc5('0x3b')][_0xcfc5('0x11d')](db['Team'],{'through':_0xcfc5('0x16c'),'as':'Teams'});db[_0xcfc5('0x3f')][_0xcfc5('0x109')](db['MailMessage'],{'as':_0xcfc5('0x15c'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x16d')});db[_0xcfc5('0x3f')][_0xcfc5('0x11a')](db[_0xcfc5('0x39')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x164')});db[_0xcfc5('0x3f')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':'Contact','foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x3f')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x16f'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x3f')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x170'),'as':_0xcfc5('0x171')});db[_0xcfc5('0x3f')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x170'),'as':_0xcfc5('0x172')});db[_0xcfc5('0x3f')]['belongsToMany'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'through':_0xcfc5('0x174'),'foreignKey':'MailInteractionId'});db[_0xcfc5('0x41')][_0xcfc5('0x109')](db['Attachment'],{'as':_0xcfc5('0x175'),'onDelete':_0xcfc5('0x108')});db['MailMessage']['belongsTo'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x12')});db[_0xcfc5('0x41')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'onDelete':_0xcfc5('0x108'),'as':'Contact'});db['MailMessage'][_0xcfc5('0x11a')](db[_0xcfc5('0x3f')],{'as':_0xcfc5('0x176'),'foreignKey':'MailInteractionId'});db[_0xcfc5('0x41')][_0xcfc5('0x11a')](db[_0xcfc5('0x39')],{'as':_0xcfc5('0x16e'),'foreignKey':'MailAccountId'});db['MailApplication']['belongsTo'](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x177')});db['MailApplication'][_0xcfc5('0x11a')](db['MailQueue'],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x43')][_0xcfc5('0x11a')](db[_0xcfc5('0x39')],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x43')]['belongsTo'](db[_0xcfc5('0x7f')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x151')});db[_0xcfc5('0x43')]['belongsTo'](db[_0xcfc5('0x87')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x178')});db[_0xcfc5('0x44')][_0xcfc5('0x11a')](db[_0xcfc5('0x39')],{});db['MailQueueReport'][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':'ListId'});db[_0xcfc5('0x44')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':'Contact','foreignKey':_0xcfc5('0x163')});db['MailQueueReport']['belongsTo'](db[_0xcfc5('0x3f')],{});db[_0xcfc5('0x44')][_0xcfc5('0x11a')](db[_0xcfc5('0x41')],{});db[_0xcfc5('0x44')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{});db[_0xcfc5('0x44')][_0xcfc5('0x11a')](db[_0xcfc5('0x3b')],{});db['Dashboard'][_0xcfc5('0x109')](db[_0xcfc5('0x17a')],{'as':'Items','onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x47')][_0xcfc5('0x109')](db[_0xcfc5('0x167')],{'as':'Dispositions','foreignKey':'FaxAccountId'});db[_0xcfc5('0x47')]['hasMany'](db['CannedAnswer'],{'as':_0xcfc5('0x17b'),'foreignKey':'FaxAccountId'});db['FaxAccount'][_0xcfc5('0x109')](db[_0xcfc5('0x4a')],{'as':_0xcfc5('0x169')});db[_0xcfc5('0x47')]['hasMany'](db[_0xcfc5('0x49')],{'as':_0xcfc5('0x142')});db[_0xcfc5('0x47')][_0xcfc5('0x109')](db['VoiceExtension'],{'as':_0xcfc5('0x17c'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x47')]['hasMany'](db[_0xcfc5('0x17d')],{'as':_0xcfc5('0x15c')});db[_0xcfc5('0x47')][_0xcfc5('0x11a')](db[_0xcfc5('0x28')],{'as':_0xcfc5('0x28')});db[_0xcfc5('0x47')]['belongsTo'](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0x47')][_0xcfc5('0x11a')](db[_0xcfc5('0x152')],{'as':_0xcfc5('0x153'),'foreignKey':'mandatoryDispositionPauseId'});db['FaxAccount']['belongsToMany'](db[_0xcfc5('0x12')],{'as':'Agents','through':'user_has_fax_accounts'});db['FaxApplication']['belongsTo'](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x49')][_0xcfc5('0x11a')](db[_0xcfc5('0x4c')],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x49')][_0xcfc5('0x11a')](db['FaxAccount'],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x49')][_0xcfc5('0x11a')](db[_0xcfc5('0x87')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x178')});db[_0xcfc5('0x4a')][_0xcfc5('0x109')](db[_0xcfc5('0x17d')],{'as':_0xcfc5('0x15c'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x17e')});db[_0xcfc5('0x4a')]['belongsTo'](db[_0xcfc5('0x47')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x17f')});db[_0xcfc5('0x4a')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x4a')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x16f'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x4a')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x180'),'as':'Tags'});db['FaxInteraction']['belongsToMany'](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x180'),'as':_0xcfc5('0x172')});db[_0xcfc5('0x4a')]['belongsToMany'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'through':'user_has_fax_interactions','foreignKey':_0xcfc5('0x17e')});db['FaxMessage'][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'onDelete':'cascade','as':_0xcfc5('0x12')});db[_0xcfc5('0x17d')]['belongsTo'](db['FaxInteraction'],{'as':_0xcfc5('0x176'),'foreignKey':'FaxInteractionId'});db[_0xcfc5('0x17d')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x162')});db[_0xcfc5('0x17d')][_0xcfc5('0x11a')](db['Attachment'],{'as':_0xcfc5('0x181'),'foreignKey':_0xcfc5('0x182')});db[_0xcfc5('0x17d')][_0xcfc5('0x11a')](db[_0xcfc5('0x47')],{'as':_0xcfc5('0x16e'),'foreignKey':'FaxAccountId'});db[_0xcfc5('0x4c')]['belongsToMany'](db['User'],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x2f')});db['FaxQueue']['belongsToMany'](db['Team'],{'through':'team_has_fax_queues','as':_0xcfc5('0x157')});db[_0xcfc5('0x4e')][_0xcfc5('0x11a')](db[_0xcfc5('0x47')],{});db[_0xcfc5('0x4e')][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':'ListId'});db[_0xcfc5('0x4e')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':'ContactId'});db[_0xcfc5('0x4e')][_0xcfc5('0x11a')](db[_0xcfc5('0x4a')],{});db[_0xcfc5('0x4e')][_0xcfc5('0x11a')](db[_0xcfc5('0x17d')],{});db['FaxQueueReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{});db[_0xcfc5('0x4e')][_0xcfc5('0x11a')](db[_0xcfc5('0x4c')],{});db['SmsAccount'][_0xcfc5('0x109')](db[_0xcfc5('0x167')],{'as':_0xcfc5('0x168'),'foreignKey':_0xcfc5('0x183')});db[_0xcfc5('0x4f')][_0xcfc5('0x109')](db['CannedAnswer'],{'as':_0xcfc5('0x17b'),'foreignKey':_0xcfc5('0x183')});db[_0xcfc5('0x4f')][_0xcfc5('0x109')](db['SmsMessage'],{'as':_0xcfc5('0x15c'),'foreignKey':_0xcfc5('0x183')});db[_0xcfc5('0x4f')][_0xcfc5('0x109')](db[_0xcfc5('0x113')],{'as':'Interactions'});db[_0xcfc5('0x4f')][_0xcfc5('0x109')](db['SmsApplication'],{'as':_0xcfc5('0x142')});db[_0xcfc5('0x4f')]['belongsTo'](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0x4f')]['belongsTo'](db[_0xcfc5('0x152')],{'as':_0xcfc5('0x153'),'foreignKey':'mandatoryDispositionPauseId'});db[_0xcfc5('0x4f')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x13b')});db[_0xcfc5('0x51')][_0xcfc5('0x11a')](db['User'],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x51')][_0xcfc5('0x11a')](db['SmsQueue'],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x51')][_0xcfc5('0x11a')](db[_0xcfc5('0x4f')],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x51')][_0xcfc5('0x11a')](db[_0xcfc5('0x7f')],{'onDelete':'restrict','foreignKey':_0xcfc5('0x151')});db[_0xcfc5('0x51')][_0xcfc5('0x11a')](db[_0xcfc5('0x87')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x178')});db['SmsInteraction'][_0xcfc5('0x109')](db[_0xcfc5('0x54')],{'as':'Messages','onDelete':'cascade','foreignKey':_0xcfc5('0x184')});db['SmsInteraction'][_0xcfc5('0x11a')](db['SmsAccount'],{'as':'Account','foreignKey':'SmsAccountId'});db[_0xcfc5('0x113')]['belongsTo'](db[_0xcfc5('0x11e')],{'as':'Contact','foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x113')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x16f'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x113')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x185'),'as':_0xcfc5('0x171')});db[_0xcfc5('0x113')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x185'),'as':_0xcfc5('0x172')});db[_0xcfc5('0x113')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'through':_0xcfc5('0x125'),'foreignKey':_0xcfc5('0x184')});db['SmsMessage'][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x12')});db['SmsMessage']['belongsTo'](db['CmContact'],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x162')});db[_0xcfc5('0x54')][_0xcfc5('0x11a')](db[_0xcfc5('0x113')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x176'),'foreignKey':_0xcfc5('0x184')});db[_0xcfc5('0x54')][_0xcfc5('0x11a')](db['SmsAccount'],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x183')});db[_0xcfc5('0x56')]['belongsToMany'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x31'),'foreignKey':_0xcfc5('0x186')});db[_0xcfc5('0x56')][_0xcfc5('0x11d')](db[_0xcfc5('0xde')],{'through':'team_has_sms_queues','as':_0xcfc5('0x157')});db[_0xcfc5('0x57')][_0xcfc5('0x109')](db[_0xcfc5('0x167')],{'as':_0xcfc5('0x168'),'foreignKey':_0xcfc5('0x187')});db['OpenchannelAccount']['hasMany'](db[_0xcfc5('0x7b')],{'as':'Answers','foreignKey':'OpenchannelAccountId'});db['OpenchannelAccount'][_0xcfc5('0x109')](db[_0xcfc5('0x5b')],{'as':_0xcfc5('0x169'),'foreignKey':_0xcfc5('0x187')});db[_0xcfc5('0x57')][_0xcfc5('0x109')](db[_0xcfc5('0x5d')],{'as':_0xcfc5('0x15c'),'foreignKey':_0xcfc5('0x187')});db[_0xcfc5('0x57')]['hasMany'](db['OpenchannelApplication'],{'as':_0xcfc5('0x142'),'foreignKey':_0xcfc5('0x187')});db['OpenchannelAccount']['belongsTo'](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':'ListId'});db['OpenchannelAccount'][_0xcfc5('0x11a')](db[_0xcfc5('0x152')],{'as':'mandatoryDispositionPause','foreignKey':'mandatoryDispositionPauseId'});db[_0xcfc5('0x57')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':'Agents','through':_0xcfc5('0x139')});db[_0xcfc5('0x59')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x177')});db['OpenchannelApplication'][_0xcfc5('0x11a')](db[_0xcfc5('0x5e')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x188')});db['OpenchannelApplication'][_0xcfc5('0x11a')](db[_0xcfc5('0x57')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x187')});db[_0xcfc5('0x59')][_0xcfc5('0x11a')](db[_0xcfc5('0x7f')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x151')});db[_0xcfc5('0x59')][_0xcfc5('0x11a')](db[_0xcfc5('0x87')],{'onDelete':_0xcfc5('0x177'),'foreignKey':'TagId'});db[_0xcfc5('0x5b')][_0xcfc5('0x109')](db[_0xcfc5('0x5d')],{'as':_0xcfc5('0x15c'),'onDelete':_0xcfc5('0x108'),'foreignKey':'OpenchannelInteractionId'});db[_0xcfc5('0x5b')][_0xcfc5('0x11a')](db[_0xcfc5('0x57')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x187')});db[_0xcfc5('0x5b')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x5b')][_0xcfc5('0x11a')](db['User'],{'as':_0xcfc5('0x16f'),'foreignKey':'UserId'});db[_0xcfc5('0x5b')]['belongsToMany'](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x189'),'as':_0xcfc5('0x171')});db[_0xcfc5('0x5b')]['belongsToMany'](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x189'),'as':'ThroughTags'});db[_0xcfc5('0x5b')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':'Users','through':_0xcfc5('0x127'),'foreignKey':_0xcfc5('0x18a')});db[_0xcfc5('0x5d')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x12')});db[_0xcfc5('0x5d')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x162')});db[_0xcfc5('0x5d')][_0xcfc5('0x11a')](db['OpenchannelInteraction'],{'onDelete':'cascade','as':_0xcfc5('0x176'),'foreignKey':'OpenchannelInteractionId'});db['OpenchannelMessage'][_0xcfc5('0x11a')](db['Attachment'],{'as':'Attachment','foreignKey':_0xcfc5('0x182')});db[_0xcfc5('0x5d')][_0xcfc5('0x11a')](db[_0xcfc5('0x57')],{'as':_0xcfc5('0x16e'),'foreignKey':'OpenchannelAccountId'});db[_0xcfc5('0x5e')]['belongsToMany'](db['User'],{'as':'Agents','through':_0xcfc5('0x33'),'foreignKey':_0xcfc5('0x188')});db[_0xcfc5('0x5e')][_0xcfc5('0x11d')](db[_0xcfc5('0xde')],{'through':_0xcfc5('0x18b'),'as':'Teams'});db[_0xcfc5('0x5f')]['hasMany'](db[_0xcfc5('0x167')],{'as':_0xcfc5('0x168'),'foreignKey':_0xcfc5('0x18c')});db[_0xcfc5('0x5f')]['hasMany'](db['CannedAnswer'],{'as':_0xcfc5('0x17b'),'foreignKey':_0xcfc5('0x18c')});db[_0xcfc5('0x5f')][_0xcfc5('0x109')](db['ChatProactiveAction'],{'as':'ProactiveActions'});db[_0xcfc5('0x5f')]['hasMany'](db[_0xcfc5('0x111')],{'as':_0xcfc5('0x169')});db['ChatWebsite'][_0xcfc5('0x109')](db[_0xcfc5('0x63')],{'as':_0xcfc5('0x142')});db[_0xcfc5('0x5f')][_0xcfc5('0x109')](db[_0xcfc5('0x66')],{'as':'Messages'});db[_0xcfc5('0x5f')][_0xcfc5('0x11a')](db['CmList'],{'as':_0xcfc5('0x179'),'foreignKey':'ListId'});db[_0xcfc5('0x5f')][_0xcfc5('0x11a')](db['Interval'],{'as':_0xcfc5('0x7f'),'foreignKey':_0xcfc5('0x151')});db['ChatWebsite'][_0xcfc5('0x11a')](db[_0xcfc5('0x152')],{'as':'mandatoryDispositionPause','foreignKey':_0xcfc5('0x154')});db[_0xcfc5('0x5f')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x134')});db[_0xcfc5('0x61')]['belongsTo'](db['OpenchannelAccount'],{});db[_0xcfc5('0x61')][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0x61')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db['OpenchannelQueueReport']['belongsTo'](db[_0xcfc5('0x5b')],{});db[_0xcfc5('0x61')][_0xcfc5('0x11a')](db[_0xcfc5('0x5d')],{});db[_0xcfc5('0x61')]['belongsTo'](db[_0xcfc5('0x12')],{});db['OpenchannelQueueReport'][_0xcfc5('0x11a')](db['OpenchannelQueue'],{});db[_0xcfc5('0x63')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x18d'),'foreignKey':'UserId','onDelete':_0xcfc5('0x177')});db['ChatApplication'][_0xcfc5('0x11a')](db[_0xcfc5('0x6a')],{'as':'Queue','foreignKey':_0xcfc5('0x18e'),'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x63')][_0xcfc5('0x11a')](db['ChatWebsite'],{'as':_0xcfc5('0x18f'),'foreignKey':_0xcfc5('0x18c'),'onDelete':_0xcfc5('0x177')});db['ChatApplication'][_0xcfc5('0x11a')](db[_0xcfc5('0x87')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x178')});db[_0xcfc5('0x111')][_0xcfc5('0x109')](db['ChatMessage'],{'as':_0xcfc5('0x15c'),'onDelete':'cascade','foreignKey':_0xcfc5('0x190')});db[_0xcfc5('0x111')][_0xcfc5('0x11a')](db['ChatWebsite'],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x18c')});db[_0xcfc5('0x111')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':'Contact','foreignKey':'ContactId'});db['ChatInteraction']['belongsTo'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x16f'),'foreignKey':_0xcfc5('0x10b')});db['ChatInteraction']['belongsToMany'](db['Tag'],{'through':_0xcfc5('0x191'),'as':_0xcfc5('0x171')});db[_0xcfc5('0x111')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':'chat_interaction_has_tags','as':'ThroughTags'});db[_0xcfc5('0x111')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'through':_0xcfc5('0x122'),'foreignKey':_0xcfc5('0x190')});db[_0xcfc5('0x66')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x12')});db[_0xcfc5('0x66')]['belongsTo'](db[_0xcfc5('0x11e')],{'onDelete':_0xcfc5('0x108'),'as':'Contact','foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x66')][_0xcfc5('0x11a')](db[_0xcfc5('0x111')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x176'),'foreignKey':_0xcfc5('0x190')});db['ChatMessage']['belongsTo'](db[_0xcfc5('0x181')],{'as':'Attachment','foreignKey':_0xcfc5('0x182')});db[_0xcfc5('0x66')][_0xcfc5('0x11a')](db[_0xcfc5('0x5f')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x18c')});db[_0xcfc5('0x68')][_0xcfc5('0x11a')](db['CmContact'],{'onDelete':'cascade','as':'Contact','foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x68')][_0xcfc5('0x11a')](db[_0xcfc5('0x5f')],{'as':_0xcfc5('0x16e'),'foreignKey':'ChatWebsiteId'});db[_0xcfc5('0x6a')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':'UserChatQueue','hooks':!![]});db[_0xcfc5('0x6a')][_0xcfc5('0x11d')](db[_0xcfc5('0xde')],{'through':'team_has_chat_queues','as':_0xcfc5('0x157')});db[_0xcfc5('0x6c')][_0xcfc5('0x109')](db[_0xcfc5('0xca')],{'as':_0xcfc5('0x15c'),'foreignKey':_0xcfc5('0x192'),'onDelete':_0xcfc5('0x108')});db['ChatGroup']['belongsToMany'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x146'),'through':_0xcfc5('0x11c')});db[_0xcfc5('0x6e')][_0xcfc5('0x11a')](db['ChatWebsite'],{'as':_0xcfc5('0x18f'),'foreignKey':_0xcfc5('0x18c')});db[_0xcfc5('0x193')][_0xcfc5('0x109')](db[_0xcfc5('0x11e')],{'as':'Contacts','foreignKey':'CompanyId'});db[_0xcfc5('0x11e')]['hasMany'](db[_0xcfc5('0x149')],{'as':'Hoppers','foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x11e')][_0xcfc5('0x109')](db[_0xcfc5('0x10f')],{'as':'HopperFinals','foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x11e')][_0xcfc5('0x109')](db[_0xcfc5('0x74')],{'as':'HopperHistories','foreignKey':_0xcfc5('0x163')});db['CmContact'][_0xcfc5('0x109')](db['ReportAgentPreview'],{'as':_0xcfc5('0x110'),'foreignKey':'ContactId'});db['CmContact'][_0xcfc5('0x109')](db['JscriptySessionReport'],{'as':_0xcfc5('0x14e'),'foreignKey':_0xcfc5('0x163')});db['CmContact']['hasMany'](db[_0xcfc5('0x5b')],{'as':_0xcfc5('0x126'),'foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x11e')][_0xcfc5('0x109')](db[_0xcfc5('0x111')],{'as':'ChatInteractions','foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x11e')][_0xcfc5('0x109')](db[_0xcfc5('0x113')],{'as':_0xcfc5('0x114'),'foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x11e')][_0xcfc5('0x109')](db[_0xcfc5('0x4a')],{'as':_0xcfc5('0x123'),'foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x11e')]['hasMany'](db[_0xcfc5('0x3f')],{'as':_0xcfc5('0x115'),'foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0x11e')][_0xcfc5('0x11a')](db[_0xcfc5('0x193')],{'as':_0xcfc5('0x194'),'foreignKey':_0xcfc5('0x195')});db[_0xcfc5('0x11e')]['belongsTo'](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a'),'onDelete':'cascade'});db[_0xcfc5('0x11e')][_0xcfc5('0x11d')](db['User'],{'as':_0xcfc5('0x173'),'through':_0xcfc5('0x196')});db[_0xcfc5('0x11e')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'as':_0xcfc5('0x171'),'through':_0xcfc5('0x197')});db[_0xcfc5('0x11e')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x197'),'as':'ThroughTags'});db[_0xcfc5('0x149')]['belongsTo'](db['CmContact'],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x149')][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x149')]['belongsTo'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x18d'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0x149')]['belongsTo'](db[_0xcfc5('0x148')],{'as':_0xcfc5('0x198'),'foreignKey':'VoiceQueueId','onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x149')][_0xcfc5('0x11a')](db[_0xcfc5('0xe1')],{'as':'Campaign','foreignKey':_0xcfc5('0x199'),'onDelete':'cascade'});db[_0xcfc5('0x149')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x16f'),'foreignKey':_0xcfc5('0x19a')});db[_0xcfc5('0x71')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163'),'onDelete':_0xcfc5('0x108')});db['CmHopperBlack'][_0xcfc5('0x11a')](db['CmList'],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x71')]['belongsTo'](db[_0xcfc5('0x148')],{'as':'Queue','foreignKey':_0xcfc5('0x147'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x71')][_0xcfc5('0x11a')](db[_0xcfc5('0xe1')],{'as':_0xcfc5('0xe1'),'foreignKey':'CampaignId','onDelete':_0xcfc5('0x108')});db['Automation']['hasMany'](db[_0xcfc5('0x7d')],{'as':{'plural':_0xcfc5('0x19b'),'singular':'OneAll'},'foreignKey':_0xcfc5('0x19c'),'onDelete':'cascade','hooks':!![]});db[_0xcfc5('0x79')][_0xcfc5('0x109')](db[_0xcfc5('0x7d')],{'as':{'plural':_0xcfc5('0x19d'),'singular':_0xcfc5('0x19e')},'foreignKey':_0xcfc5('0x19f'),'onDelete':_0xcfc5('0x108'),'hooks':!![]});db[_0xcfc5('0x79')][_0xcfc5('0x109')](db[_0xcfc5('0x77')],{'as':'Actions','foreignKey':_0xcfc5('0x1a0'),'onDelete':_0xcfc5('0x108'),'hooks':!![]});db[_0xcfc5('0x167')]['hasMany'](db[_0xcfc5('0x167')],{'as':_0xcfc5('0x168'),'foreignKey':'ParentId','onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x7f')]['hasMany'](db['Interval'],{'as':_0xcfc5('0x1a1'),'foreignKey':_0xcfc5('0x151'),'onDelete':_0xcfc5('0x108'),'hooks':!![],'required':![]});db[_0xcfc5('0x7f')][_0xcfc5('0x109')](db[_0xcfc5('0x17')],{'as':_0xcfc5('0x10e'),'foreignKey':_0xcfc5('0x151'),'onDelete':_0xcfc5('0x177')});db['Interval'][_0xcfc5('0x109')](db['MailApplication'],{'as':'MailApplications','foreignKey':'IntervalId'});db[_0xcfc5('0x7f')][_0xcfc5('0x109')](db[_0xcfc5('0x63')],{'as':_0xcfc5('0x1a2'),'foreignKey':_0xcfc5('0x151')});db[_0xcfc5('0x7f')][_0xcfc5('0x109')](db[_0xcfc5('0x49')],{'as':_0xcfc5('0x1a3'),'foreignKey':_0xcfc5('0x151')});db[_0xcfc5('0x7f')][_0xcfc5('0x109')](db[_0xcfc5('0x51')],{'as':_0xcfc5('0x1a4'),'foreignKey':'IntervalId'});db[_0xcfc5('0x84')]['belongsTo'](db['MailAccount'],{});db[_0xcfc5('0x84')][_0xcfc5('0x11a')](db[_0xcfc5('0x93')],{'foreignKey':_0xcfc5('0x1a5')});db['Schedule'][_0xcfc5('0x11a')](db[_0xcfc5('0x91')],{'foreignKey':'CustomReportId'});db[_0xcfc5('0x143')]['belongsToMany'](db['VoiceMusicOnHold'],{'as':'Mohs','through':_0xcfc5('0x145'),'onDelete':'restrict'});db[_0xcfc5('0x87')]['belongsToMany'](db[_0xcfc5('0x11e')],{'through':_0xcfc5('0x197')});db['Tag'][_0xcfc5('0x11d')](db[_0xcfc5('0x111')],{'through':_0xcfc5('0x191')});db[_0xcfc5('0x87')][_0xcfc5('0x11d')](db[_0xcfc5('0x3f')],{'through':_0xcfc5('0x170')});db['Tag'][_0xcfc5('0x11d')](db[_0xcfc5('0x113')],{'through':_0xcfc5('0x185')});db[_0xcfc5('0x87')][_0xcfc5('0x11d')](db[_0xcfc5('0x4a')],{'through':_0xcfc5('0x180')});db[_0xcfc5('0x87')][_0xcfc5('0x11d')](db[_0xcfc5('0x5b')],{'through':_0xcfc5('0x189')});db['Tag']['belongsToMany'](db[_0xcfc5('0xfe')],{'through':'whatsapp_interaction_has_tags'});db[_0xcfc5('0x8a')]['hasMany'](db[_0xcfc5('0x7d')],{'as':{'plural':'AllConditions','singular':_0xcfc5('0x1a6')},'foreignKey':'TriggerAllId','onDelete':_0xcfc5('0x108'),'hooks':!![]});db[_0xcfc5('0x8a')][_0xcfc5('0x109')](db[_0xcfc5('0x7d')],{'as':{'plural':'AnyConditions','singular':_0xcfc5('0x1a7')},'foreignKey':'TriggerAnyId','onDelete':_0xcfc5('0x108'),'hooks':!![]});db[_0xcfc5('0x8a')]['hasMany'](db['Action'],{'as':_0xcfc5('0x1a8'),'foreignKey':_0xcfc5('0x1a9'),'onDelete':_0xcfc5('0x108'),'hooks':!![]});db[_0xcfc5('0x91')][_0xcfc5('0x109')](db[_0xcfc5('0x97')],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1ab'),'hooks':!![]});db[_0xcfc5('0x93')][_0xcfc5('0x109')](db['AnalyticFieldReport'],{'as':_0xcfc5('0x1aa'),'onDelete':'cascade','foreignKey':_0xcfc5('0x1a5')});db[_0xcfc5('0x1ac')][_0xcfc5('0x109')](db['AnalyticFieldReport'],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1ad')});db[_0xcfc5('0x97')][_0xcfc5('0x11a')](db['AnalyticMetric'],{'foreignKey':_0xcfc5('0x1ad')});db['SalesforceAccount'][_0xcfc5('0x109')](db[_0xcfc5('0x9c')],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0x9c')][_0xcfc5('0x109')](db[_0xcfc5('0x9e')],{'as':_0xcfc5('0x1b0'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0x9c')]['hasMany'](db[_0xcfc5('0x9e')],{'as':_0xcfc5('0x1b2'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0x9c')][_0xcfc5('0x109')](db[_0xcfc5('0x9e')],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0x9c')][_0xcfc5('0x11a')](db['SalesforceAccount'],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0x9e')][_0xcfc5('0x109')](db[_0xcfc5('0x9e')],{'as':_0xcfc5('0x1b5'),'foreignKey':_0xcfc5('0x1b1')});db['SalesforceField']['hasMany'](db[_0xcfc5('0x9e')],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0x9e')][_0xcfc5('0x109')](db[_0xcfc5('0x9e')],{'as':_0xcfc5('0x1b7'),'foreignKey':'FieldId'});db[_0xcfc5('0x9e')]['belongsTo'](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db[_0xcfc5('0x1b9')][_0xcfc5('0x109')](db[_0xcfc5('0x1ba')],{'as':_0xcfc5('0x1ae'),'onDelete':'cascade','foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0x1ba')][_0xcfc5('0x109')](db[_0xcfc5('0x1bb')],{'as':_0xcfc5('0x1b0'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0x1ba')][_0xcfc5('0x109')](db[_0xcfc5('0x1bb')],{'as':_0xcfc5('0x1b2'),'onDelete':_0xcfc5('0x108'),'foreignKey':'DescriptionId'});db[_0xcfc5('0x1ba')][_0xcfc5('0x109')](db[_0xcfc5('0x1bb')],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':'FieldId'});db[_0xcfc5('0x1ba')][_0xcfc5('0x11a')](db[_0xcfc5('0x1b9')],{'as':_0xcfc5('0x16e'),'foreignKey':'AccountId'});db['SugarcrmField'][_0xcfc5('0x109')](db[_0xcfc5('0x1bb')],{'as':_0xcfc5('0x1b5'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0x1bb')]['hasMany'](db['SugarcrmField'],{'as':_0xcfc5('0x1b6'),'foreignKey':'DescriptionId'});db[_0xcfc5('0x1bb')][_0xcfc5('0x109')](db['SugarcrmField'],{'as':'Field','foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0x1bb')][_0xcfc5('0x11a')](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db[_0xcfc5('0xa3')][_0xcfc5('0x109')](db[_0xcfc5('0xa5')],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':'AccountId'});db[_0xcfc5('0xa5')]['hasMany'](db[_0xcfc5('0xa7')],{'as':_0xcfc5('0x1b0'),'onDelete':_0xcfc5('0x108'),'foreignKey':'SubjectId'});db['DeskConfiguration'][_0xcfc5('0x109')](db[_0xcfc5('0xa7')],{'as':_0xcfc5('0x1b2'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xa5')]['hasMany'](db[_0xcfc5('0xa7')],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0xa5')]['belongsTo'](db[_0xcfc5('0xa3')],{'as':_0xcfc5('0x16e'),'foreignKey':'AccountId'});db[_0xcfc5('0xa5')]['belongsToMany'](db[_0xcfc5('0x87')],{'through':'int_desk_configuration_has_tags'});db[_0xcfc5('0xa7')][_0xcfc5('0x109')](db[_0xcfc5('0xa7')],{'as':_0xcfc5('0x1b5'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xa7')][_0xcfc5('0x109')](db[_0xcfc5('0xa7')],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xa7')][_0xcfc5('0x109')](db['DeskField'],{'as':_0xcfc5('0x1b7'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0xa7')][_0xcfc5('0x11a')](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db[_0xcfc5('0xa9')][_0xcfc5('0x109')](db[_0xcfc5('0x1bc')],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0x1bc')]['hasMany'](db[_0xcfc5('0xac')],{'as':'Subjects','onDelete':_0xcfc5('0x108'),'foreignKey':'SubjectId'});db[_0xcfc5('0x1bc')]['hasMany'](db[_0xcfc5('0xac')],{'as':_0xcfc5('0x1b2'),'onDelete':'cascade','foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0x1bc')][_0xcfc5('0x109')](db[_0xcfc5('0xac')],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':'FieldId'});db[_0xcfc5('0x1bc')]['belongsTo'](db[_0xcfc5('0xa9')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db['ZohoField']['hasMany'](db[_0xcfc5('0xac')],{'as':'Subject','foreignKey':_0xcfc5('0x1b1')});db['ZohoField'][_0xcfc5('0x109')](db[_0xcfc5('0xac')],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xac')]['hasMany'](db[_0xcfc5('0xac')],{'as':_0xcfc5('0x1b7'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0xac')][_0xcfc5('0x11a')](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':'VariableId'});db[_0xcfc5('0xad')][_0xcfc5('0x109')](db[_0xcfc5('0x1bd')],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0x1bd')][_0xcfc5('0x109')](db[_0xcfc5('0x1be')],{'as':_0xcfc5('0x1b0'),'foreignKey':'SubjectId'});db['ZendeskConfiguration']['hasMany'](db['ZendeskField'],{'as':_0xcfc5('0x1b2'),'foreignKey':'DescriptionId'});db[_0xcfc5('0x1bd')][_0xcfc5('0x109')](db[_0xcfc5('0x1be')],{'as':_0xcfc5('0x1aa'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0x1bd')][_0xcfc5('0x11a')](db['ZendeskAccount'],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db['ZendeskConfiguration'][_0xcfc5('0x11d')](db['Tag'],{'through':_0xcfc5('0x1bf')});db[_0xcfc5('0x1be')]['hasMany'](db[_0xcfc5('0x1be')],{'as':_0xcfc5('0x1b5'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0x1be')][_0xcfc5('0x109')](db['ZendeskField'],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0x1be')][_0xcfc5('0x109')](db[_0xcfc5('0x1be')],{'as':_0xcfc5('0x1b7'),'foreignKey':'FieldId'});db[_0xcfc5('0x1be')]['belongsTo'](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db['FreshdeskAccount']['hasMany'](db['FreshdeskConfiguration'],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0xb2')][_0xcfc5('0x109')](db[_0xcfc5('0xb3')],{'as':_0xcfc5('0x1b0'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xb2')][_0xcfc5('0x109')](db['FreshdeskField'],{'as':'Descriptions','onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xb2')]['hasMany'](db[_0xcfc5('0xb3')],{'as':_0xcfc5('0x1aa'),'onDelete':_0xcfc5('0x108'),'foreignKey':'FieldId'});db[_0xcfc5('0xb2')][_0xcfc5('0x11a')](db[_0xcfc5('0xb0')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0xb2')][_0xcfc5('0x11d')](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x1c0')});db[_0xcfc5('0xb3')][_0xcfc5('0x109')](db['FreshdeskField'],{'as':_0xcfc5('0x1b5'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xb3')][_0xcfc5('0x109')](db[_0xcfc5('0xb3')],{'as':_0xcfc5('0x1b6'),'foreignKey':'DescriptionId'});db[_0xcfc5('0xb3')][_0xcfc5('0x109')](db[_0xcfc5('0xb3')],{'as':_0xcfc5('0x1b7'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0xb3')][_0xcfc5('0x11a')](db['Variable'],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db['VtigerAccount']['hasMany'](db['VtigerConfiguration'],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0xb6')][_0xcfc5('0x109')](db[_0xcfc5('0xb8')],{'as':_0xcfc5('0x1b0'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xb6')][_0xcfc5('0x109')](db['VtigerField'],{'as':_0xcfc5('0x1b2'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xb6')][_0xcfc5('0x109')](db['VtigerField'],{'as':_0xcfc5('0x1aa'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0xb6')][_0xcfc5('0x11a')](db['VtigerAccount'],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db['VtigerField']['hasMany'](db['VtigerField'],{'as':'Subject','foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xb8')][_0xcfc5('0x109')](db['VtigerField'],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xb8')][_0xcfc5('0x109')](db['VtigerField'],{'as':_0xcfc5('0x1b7'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0xb8')][_0xcfc5('0x11a')](db['Variable'],{'as':'Variable','foreignKey':'VariableId'});db[_0xcfc5('0xb9')]['hasMany'](db[_0xcfc5('0xba')],{'as':'Configurations','onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0xba')][_0xcfc5('0x109')](db[_0xcfc5('0xbc')],{'as':_0xcfc5('0x1b0'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xba')][_0xcfc5('0x109')](db[_0xcfc5('0xbc')],{'as':'Descriptions','foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xba')][_0xcfc5('0x109')](db[_0xcfc5('0xbc')],{'as':_0xcfc5('0x1aa'),'foreignKey':'FieldId'});db['ServicenowConfiguration'][_0xcfc5('0x11a')](db[_0xcfc5('0xb9')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0xbc')][_0xcfc5('0x109')](db[_0xcfc5('0xbc')],{'as':_0xcfc5('0x1b5'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xbc')][_0xcfc5('0x109')](db[_0xcfc5('0xbc')],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xbc')][_0xcfc5('0x109')](db['ServicenowField'],{'as':_0xcfc5('0x1b7'),'foreignKey':'FieldId'});db['ServicenowField'][_0xcfc5('0x11a')](db[_0xcfc5('0x8c')],{'as':'Variable','foreignKey':_0xcfc5('0x1b8')});db[_0xcfc5('0xbe')][_0xcfc5('0x109')](db['Dynamics365Configuration'],{'as':_0xcfc5('0x1ae'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db['Dynamics365Configuration'][_0xcfc5('0x109')](db[_0xcfc5('0xc1')],{'as':_0xcfc5('0x1b0'),'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xc0')][_0xcfc5('0x109')](db[_0xcfc5('0xc1')],{'as':'Descriptions','onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0xc0')][_0xcfc5('0x109')](db[_0xcfc5('0xc1')],{'as':_0xcfc5('0x1aa'),'onDelete':'cascade','foreignKey':'FieldId'});db[_0xcfc5('0xc0')]['belongsTo'](db[_0xcfc5('0xbe')],{'as':_0xcfc5('0x16e'),'foreignKey':'AccountId'});db[_0xcfc5('0xc1')][_0xcfc5('0x109')](db[_0xcfc5('0xc1')],{'as':'Subject','foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xc1')][_0xcfc5('0x109')](db['Dynamics365Field'],{'as':'Description','foreignKey':_0xcfc5('0x1b3')});db['Dynamics365Field'][_0xcfc5('0x109')](db[_0xcfc5('0xc1')],{'as':'Field','foreignKey':'FieldId'});db[_0xcfc5('0xc1')][_0xcfc5('0x11a')](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db[_0xcfc5('0x1c1')]['hasMany'](db['FreshsalesConfiguration'],{'as':'Configurations','onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1af')});db[_0xcfc5('0x1c2')][_0xcfc5('0x109')](db[_0xcfc5('0xc5')],{'as':_0xcfc5('0x1b0'),'foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0x1c2')][_0xcfc5('0x109')](db[_0xcfc5('0xc5')],{'as':_0xcfc5('0x1b2'),'foreignKey':_0xcfc5('0x1b3')});db[_0xcfc5('0x1c2')][_0xcfc5('0x109')](db[_0xcfc5('0xc5')],{'as':_0xcfc5('0x1aa'),'foreignKey':_0xcfc5('0x1b4')});db[_0xcfc5('0x1c2')]['belongsTo'](db[_0xcfc5('0x1c1')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1af')});db['FreshsalesField']['hasMany'](db['FreshsalesField'],{'as':'Subject','foreignKey':_0xcfc5('0x1b1')});db[_0xcfc5('0xc5')][_0xcfc5('0x109')](db['FreshsalesField'],{'as':_0xcfc5('0x1b6'),'foreignKey':_0xcfc5('0x1b3')});db['FreshsalesField'][_0xcfc5('0x109')](db[_0xcfc5('0xc5')],{'as':_0xcfc5('0x1b7'),'foreignKey':'FieldId'});db[_0xcfc5('0xc5')][_0xcfc5('0x11a')](db[_0xcfc5('0x8c')],{'as':_0xcfc5('0x8c'),'foreignKey':_0xcfc5('0x1b8')});db['ChatQueueReport']['belongsTo'](db[_0xcfc5('0x5f')],{});db['ChatQueueReport']['belongsTo'](db[_0xcfc5('0xef')],{'as':'List','foreignKey':_0xcfc5('0x16a')});db['ChatQueueReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0xc8')][_0xcfc5('0x11a')](db[_0xcfc5('0x111')],{});db['ChatQueueReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x66')],{});db[_0xcfc5('0xc8')]['belongsTo'](db[_0xcfc5('0x12')],{});db['ChatQueueReport'][_0xcfc5('0x11a')](db['ChatQueue'],{});db[_0xcfc5('0xca')][_0xcfc5('0x11a')](db['User'],{'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1c3')});db[_0xcfc5('0xca')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1c4')});db[_0xcfc5('0xd0')][_0xcfc5('0x109')](db[_0xcfc5('0xce')],{'foreignKey':_0xcfc5('0x1c5'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0xd0')][_0xcfc5('0x109')](db[_0xcfc5('0xcc')],{'foreignKey':_0xcfc5('0x1c5'),'onDelete':'cascade'});db['SmsQueueReport']['belongsTo'](db[_0xcfc5('0x4f')],{});db[_0xcfc5('0xd2')][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0xd2')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0xd2')][_0xcfc5('0x11a')](db['SmsInteraction'],{});db['SmsQueueReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x54')],{});db[_0xcfc5('0xd2')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{});db[_0xcfc5('0xd2')][_0xcfc5('0x11a')](db[_0xcfc5('0x56')],{});db[_0xcfc5('0x1c6')][_0xcfc5('0x109')](db[_0xcfc5('0xd0')],{'foreignKey':_0xcfc5('0x1c7')});db[_0xcfc5('0x1c6')][_0xcfc5('0x109')](db['JscriptyQuestionReport'],{'foreignKey':'ProjectId'});db[_0xcfc5('0x1c6')][_0xcfc5('0x109')](db['JscriptyAnswerReport'],{'foreignKey':_0xcfc5('0x1c7')});db[_0xcfc5('0xd9')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'through':_0xcfc5('0x1c8')});db['Team']['belongsToMany'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x121')});db[_0xcfc5('0xde')][_0xcfc5('0x11d')](db[_0xcfc5('0x148')],{'through':_0xcfc5('0x158'),'as':_0xcfc5('0x129')});db[_0xcfc5('0xde')][_0xcfc5('0x11d')](db['MailQueue'],{'through':'team_has_mail_queues','as':_0xcfc5('0x12a')});db[_0xcfc5('0xde')][_0xcfc5('0x11d')](db['ChatQueue'],{'through':_0xcfc5('0x1c9'),'as':_0xcfc5('0x12b')});db[_0xcfc5('0xde')][_0xcfc5('0x11d')](db[_0xcfc5('0x4c')],{'through':_0xcfc5('0x1ca'),'as':_0xcfc5('0x12c')});db['Team']['belongsToMany'](db[_0xcfc5('0x56')],{'through':'team_has_sms_queues','as':'SmsQueues'});db[_0xcfc5('0xde')][_0xcfc5('0x11d')](db['OpenchannelQueue'],{'through':_0xcfc5('0x18b'),'as':_0xcfc5('0x1cb')});db['Team'][_0xcfc5('0x11d')](db[_0xcfc5('0x12e')],{'through':_0xcfc5('0x1cc'),'as':_0xcfc5('0x12f')});db['Campaign']['hasMany'](db[_0xcfc5('0x149')],{'as':_0xcfc5('0x14a'),'foreignKey':_0xcfc5('0x199')});db[_0xcfc5('0xe1')]['hasMany'](db['CmHopperFinal'],{'as':_0xcfc5('0x14b'),'foreignKey':'CampaignId'});db[_0xcfc5('0xe1')][_0xcfc5('0x109')](db['CmHopperHistory'],{'as':'HopperHistories','foreignKey':_0xcfc5('0x199')});db[_0xcfc5('0xe1')][_0xcfc5('0x109')](db[_0xcfc5('0x71')],{'as':_0xcfc5('0x14d'),'foreignKey':_0xcfc5('0x199')});db[_0xcfc5('0xe1')][_0xcfc5('0x11a')](db[_0xcfc5('0x28')],{'as':_0xcfc5('0x28'),'foreignKey':_0xcfc5('0x14f')});db[_0xcfc5('0xe1')][_0xcfc5('0x11a')](db[_0xcfc5('0x28')],{'as':_0xcfc5('0x1cd'),'foreignKey':_0xcfc5('0x150')});db[_0xcfc5('0xe1')]['belongsTo'](db[_0xcfc5('0x7f')],{'as':_0xcfc5('0x7f'),'foreignKey':'IntervalId'});db[_0xcfc5('0xe1')][_0xcfc5('0x11a')](db['SquareProject'],{'as':'SquareProject','foreignKey':_0xcfc5('0x1ce')});db['Campaign'][_0xcfc5('0x11d')](db[_0xcfc5('0xef')],{'as':'Lists','through':_0xcfc5('0x1cf')});db[_0xcfc5('0xe1')][_0xcfc5('0x11d')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x159'),'through':_0xcfc5('0x1d0')});db[_0xcfc5('0xe6')][_0xcfc5('0x11a')](db['MailMessage'],{});db[_0xcfc5('0xe6')]['belongsTo'](db['MailInteraction'],{});db[_0xcfc5('0xe6')][_0xcfc5('0x11a')](db[_0xcfc5('0x39')],{'foreignKey':'FromMailAccountId','as':'FromAccount'});db['MailTransferReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d1'),'as':_0xcfc5('0x1d2')});db[_0xcfc5('0xe6')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d3'),'as':'ToAgent'});db['MailTransferReport']['belongsTo'](db[_0xcfc5('0x3b')],{'foreignKey':_0xcfc5('0x1d4'),'as':_0xcfc5('0x1d5')});db[_0xcfc5('0xe6')]['belongsTo'](db[_0xcfc5('0x39')],{'foreignKey':_0xcfc5('0x1d6'),'as':_0xcfc5('0x1d7')});db['ChatTransferReport'][_0xcfc5('0x11a')](db['ChatMessage'],{});db[_0xcfc5('0xe8')][_0xcfc5('0x11a')](db['ChatInteraction'],{});db[_0xcfc5('0xe8')][_0xcfc5('0x11a')](db['ChatWebsite'],{'foreignKey':_0xcfc5('0x1d8'),'as':_0xcfc5('0x1d9')});db[_0xcfc5('0xe8')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d1'),'as':_0xcfc5('0x1d2')});db[_0xcfc5('0xe8')][_0xcfc5('0x11a')](db['User'],{'foreignKey':_0xcfc5('0x1d3'),'as':_0xcfc5('0x1da')});db[_0xcfc5('0xe8')][_0xcfc5('0x11a')](db[_0xcfc5('0x6a')],{'foreignKey':_0xcfc5('0x1db'),'as':_0xcfc5('0x1d5')});db[_0xcfc5('0xe8')]['belongsTo'](db[_0xcfc5('0x5f')],{'foreignKey':_0xcfc5('0x1dc'),'as':_0xcfc5('0x1d7')});db['FaxTransferReport'][_0xcfc5('0x11a')](db['FaxMessage'],{});db[_0xcfc5('0xea')][_0xcfc5('0x11a')](db[_0xcfc5('0x4a')],{});db['FaxTransferReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x47')],{'foreignKey':_0xcfc5('0x1dd'),'as':_0xcfc5('0x1d9')});db[_0xcfc5('0xea')][_0xcfc5('0x11a')](db['User'],{'foreignKey':'FromUserId','as':_0xcfc5('0x1d2')});db[_0xcfc5('0xea')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d3'),'as':'ToAgent'});db[_0xcfc5('0xea')]['belongsTo'](db[_0xcfc5('0x4c')],{'foreignKey':_0xcfc5('0x1de'),'as':_0xcfc5('0x1d5')});db[_0xcfc5('0xea')][_0xcfc5('0x11a')](db[_0xcfc5('0x47')],{'foreignKey':'ToFaxAccountId','as':'ToAccount'});db[_0xcfc5('0xeb')][_0xcfc5('0x11a')](db[_0xcfc5('0x5d')],{});db[_0xcfc5('0xeb')]['belongsTo'](db[_0xcfc5('0x5b')],{});db[_0xcfc5('0xeb')][_0xcfc5('0x11a')](db[_0xcfc5('0x57')],{'foreignKey':_0xcfc5('0x1df'),'as':_0xcfc5('0x1d9')});db[_0xcfc5('0xeb')]['belongsTo'](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d1'),'as':_0xcfc5('0x1d2')});db['OpenchannelTransferReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d3'),'as':'ToAgent'});db[_0xcfc5('0xeb')][_0xcfc5('0x11a')](db[_0xcfc5('0x5e')],{'foreignKey':_0xcfc5('0x1e0'),'as':'ToQueue'});db[_0xcfc5('0xeb')][_0xcfc5('0x11a')](db['OpenchannelAccount'],{'foreignKey':_0xcfc5('0x1e1'),'as':_0xcfc5('0x1d7')});db['SmsTransferReport'][_0xcfc5('0x11a')](db['SmsMessage'],{});db['SmsTransferReport'][_0xcfc5('0x11a')](db[_0xcfc5('0x113')],{});db[_0xcfc5('0xed')][_0xcfc5('0x11a')](db[_0xcfc5('0x4f')],{'foreignKey':_0xcfc5('0x1e2'),'as':_0xcfc5('0x1d9')});db[_0xcfc5('0xed')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d1'),'as':'FromAgent'});db[_0xcfc5('0xed')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d3'),'as':_0xcfc5('0x1da')});db[_0xcfc5('0xed')][_0xcfc5('0x11a')](db[_0xcfc5('0x56')],{'foreignKey':_0xcfc5('0x1e3'),'as':_0xcfc5('0x1d5')});db[_0xcfc5('0xed')]['belongsTo'](db['SmsAccount'],{'foreignKey':_0xcfc5('0x1e4'),'as':_0xcfc5('0x1d7')});db[_0xcfc5('0xef')][_0xcfc5('0x109')](db['Disposition'],{'as':_0xcfc5('0x168'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0xef')][_0xcfc5('0x109')](db[_0xcfc5('0x76')],{'as':'CustomFields','foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0xef')][_0xcfc5('0x109')](db[_0xcfc5('0x11e')],{'as':'Contacts','onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x16a')});db['CmList'][_0xcfc5('0x109')](db[_0xcfc5('0x10f')],{'as':_0xcfc5('0x14b'),'foreignKey':_0xcfc5('0x16a')});db['CmList'][_0xcfc5('0x109')](db[_0xcfc5('0x74')],{'as':'HopperHistory','foreignKey':_0xcfc5('0x16a')});db['CmList'][_0xcfc5('0x109')](db['ReportAgentPreview'],{'as':_0xcfc5('0x110'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0xef')][_0xcfc5('0x11d')](db[_0xcfc5('0x148')],{'as':'Queues','through':_0xcfc5('0x155')});db[_0xcfc5('0xef')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x130')});db[_0xcfc5('0xf1')][_0xcfc5('0x109')](db['VoiceExtension'],{'as':_0xcfc5('0x10e'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0xf1')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':'Agents','through':'user_has_voice_prefixes'});db[_0xcfc5('0xf2')][_0xcfc5('0x109')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'foreignKey':_0xcfc5('0x11b')});db[_0xcfc5('0xf2')][_0xcfc5('0x109')](db[_0xcfc5('0x1e5')],{'as':_0xcfc5('0x1e6'),'foreignKey':_0xcfc5('0x11b'),'onDelete':_0xcfc5('0x108')});db[_0xcfc5('0x1e5')][_0xcfc5('0x109')](db['UserProfileResource'],{'as':_0xcfc5('0x1e7'),'foreignKey':_0xcfc5('0x1e8'),'onDelete':'cascade'});db['WhatsappAccount'][_0xcfc5('0x109')](db['Disposition'],{'as':'Dispositions','foreignKey':_0xcfc5('0x1e9')});db[_0xcfc5('0xfa')]['hasMany'](db[_0xcfc5('0x7b')],{'as':_0xcfc5('0x17b'),'foreignKey':_0xcfc5('0x1e9')});db[_0xcfc5('0xfa')][_0xcfc5('0x109')](db[_0xcfc5('0x1ea')],{'as':_0xcfc5('0x15c'),'foreignKey':_0xcfc5('0x1e9')});db[_0xcfc5('0xfa')]['hasMany'](db[_0xcfc5('0xfe')],{'as':_0xcfc5('0x169')});db['WhatsappAccount']['hasMany'](db[_0xcfc5('0xfc')],{'as':_0xcfc5('0x142')});db[_0xcfc5('0xfa')][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':'List','foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0xfa')]['belongsTo'](db[_0xcfc5('0x152')],{'as':_0xcfc5('0x153'),'foreignKey':'mandatoryDispositionPauseId'});db['WhatsappAccount'][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':_0xcfc5('0x13d')});db[_0xcfc5('0xfc')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0xfc')][_0xcfc5('0x11a')](db[_0xcfc5('0x12e')],{'onDelete':_0xcfc5('0x177')});db[_0xcfc5('0xfc')][_0xcfc5('0x11a')](db[_0xcfc5('0xfa')],{'onDelete':_0xcfc5('0x177')});db['WhatsappApplication'][_0xcfc5('0x11a')](db[_0xcfc5('0x7f')],{'onDelete':'restrict','foreignKey':_0xcfc5('0x151')});db['WhatsappApplication']['belongsTo'](db[_0xcfc5('0x87')],{'onDelete':_0xcfc5('0x177'),'foreignKey':_0xcfc5('0x178')});db[_0xcfc5('0xfe')][_0xcfc5('0x109')](db['WhatsappMessage'],{'as':'Messages','onDelete':_0xcfc5('0x108'),'foreignKey':_0xcfc5('0x1eb')});db[_0xcfc5('0xfe')]['belongsTo'](db[_0xcfc5('0xfa')],{'as':_0xcfc5('0x16e'),'foreignKey':_0xcfc5('0x1e9')});db[_0xcfc5('0xfe')]['belongsTo'](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0xfe')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x16f'),'foreignKey':_0xcfc5('0x10b')});db[_0xcfc5('0xfe')][_0xcfc5('0x11d')](db['Tag'],{'through':_0xcfc5('0x1ec'),'as':_0xcfc5('0x171')});db['WhatsappInteraction']['belongsToMany'](db[_0xcfc5('0x87')],{'through':_0xcfc5('0x1ec'),'as':_0xcfc5('0x172')});db[_0xcfc5('0xfe')][_0xcfc5('0x11d')](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x173'),'through':_0xcfc5('0x128'),'foreignKey':'WhatsappInteractionId'});db[_0xcfc5('0x1ea')][_0xcfc5('0x11a')](db['User'],{'as':_0xcfc5('0x12')});db[_0xcfc5('0x1ea')]['belongsTo'](db[_0xcfc5('0x11e')],{'onDelete':'cascade','as':_0xcfc5('0x162')});db['WhatsappMessage'][_0xcfc5('0x11a')](db[_0xcfc5('0xfe')],{'onDelete':_0xcfc5('0x108'),'as':_0xcfc5('0x176'),'foreignKey':_0xcfc5('0x1eb')});db[_0xcfc5('0x1ea')][_0xcfc5('0x11a')](db['WhatsappAccount'],{'as':_0xcfc5('0x16e'),'foreignKey':'WhatsappAccountId'});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db['WhatsappAccount'],{});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db[_0xcfc5('0xef')],{'as':_0xcfc5('0x179'),'foreignKey':_0xcfc5('0x16a')});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db[_0xcfc5('0x11e')],{'as':_0xcfc5('0x162'),'foreignKey':_0xcfc5('0x163')});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db[_0xcfc5('0xfe')],{});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db[_0xcfc5('0x12e')],{});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db[_0xcfc5('0x1ea')],{});db[_0xcfc5('0x100')][_0xcfc5('0x11a')](db['User'],{});db[_0xcfc5('0x102')][_0xcfc5('0x11a')](db[_0xcfc5('0x1ea')],{});db['WhatsappTransferReport'][_0xcfc5('0x11a')](db[_0xcfc5('0xfe')],{});db[_0xcfc5('0x102')][_0xcfc5('0x11a')](db[_0xcfc5('0xfa')],{'foreignKey':_0xcfc5('0x1ed'),'as':'FromAccount'});db[_0xcfc5('0x102')]['belongsTo'](db['WhatsappAccount'],{'foreignKey':_0xcfc5('0x1ee'),'as':_0xcfc5('0x1d7')});db[_0xcfc5('0x102')]['belongsTo'](db[_0xcfc5('0x12e')],{'foreignKey':'ToQueueId','as':_0xcfc5('0x1d5')});db[_0xcfc5('0x102')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d1'),'as':'FromAgent'});db[_0xcfc5('0x102')][_0xcfc5('0x11a')](db[_0xcfc5('0x12')],{'foreignKey':_0xcfc5('0x1d3'),'as':_0xcfc5('0x1da')});db['WhatsappQueue']['belongsToMany'](db[_0xcfc5('0x12')],{'as':_0xcfc5('0x156'),'through':'UserWhatsappQueue','foreignKey':'WhatsappQueueId'});db[_0xcfc5('0x12e')][_0xcfc5('0x11d')](db[_0xcfc5('0xde')],{'through':_0xcfc5('0x1cc'),'as':'Teams'});module[_0xcfc5('0x1ef')]={'db':db,'dbH':dbH}; \ No newline at end of file diff --git a/server/routes.js b/server/routes.js index 49c4266..1b6e5a5 100644 --- a/server/routes.js +++ b/server/routes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x757a=['/api/cm/contacts','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','./api/cmHopperFinal','/api/cm/hopper_history','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','./api/condition','/api/intervals','./api/interval','/api/pauses','./api/pause','/api/cdr','./api/voiceQueuesLog','./api/schedule','/api/sounds','./api/sound','/api/tags','/api/templates','./api/template','/api/variables','./api/variable','/api/integrations','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','/api/integrations/salesforce/fields','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','/api/integrations/sugarcrm/configurations','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','/api/integrations/desk/fields','./api/intDeskField','./api/intZohoAccount','/api/integrations/zoho/configurations','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','./api/intZendeskAccount','/api/integrations/zendesk/configurations','./api/intZendeskConfiguration','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','/api/integrations/servicenow/configurations','/api/integrations/servicenow/fields','/api/integrations/dynamics365/accounts','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','./api/intDynamics365Field','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','./api/intFreshsalesConfiguration','/api/integrations/freshsales/fields','./api/intFreshsalesField','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','/api/sms/reports/queue','./api/smsQueueReport','./api/squareReport','./api/squareReportDetail','/api/jscripty/projects','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','/api/teams','./api/team','/api/license','./api/license','/api/campaigns','./api/campaign','/api/migrations','./api/migration','/api/attachments','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','/api/chat/reports/transfer','./api/faxTransferReport','./api/openchannelTransferReport','/api/sms/reports/transfer','./api/smsTransferReport','/api/cm/lists','./api/cmList','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/whatsapp/accounts','./api/whatsappAccount','/api/whatsapp/applications','./api/whatsappApplication','./api/whatsappInteraction','/api/whatsapp/messages','./api/whatsappMessage','/api/whatsapp/reports/queue','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','/api/whatsapp/queues','./api/whatsappQueue','./api/cloudProvider','/api/auth/local','./api/authLocal','/api/auth/google','./api/authGoogle','./api/jira','/api/rpc','./api/rpc','/api/version','./api/version','/api/system','./api/system','/api/pm2','/api/webbar','join','root','/apidoc','/www','static','/demo','/snippet','snippet','1.0.16','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','get','sendFile','appPath','/index.html','username','newPassword','apiKey','firstName','lastName','street','phone','fax','email','clientId','clientSecret','securityToken','tenantId','channelSecret','accessTokenSecret','authToken','consumerKey','consumerSecret','membername','calleridname','calleridnum','exten','vidaooApiKey','clientEmail','privateKey','secretaccesskey','key','pass','accountSid','localstationid','secret','registry','length','isPlainObject','isString','replace','path','express','./config/environment','./config/logger','api','auth','default','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','body','format','method','headers','x-forwarded-for','responseTime','user','role','inspect','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','device','remoteAddress','statusCode','name','agent_id','agent_name','url','/api/voice/chanspy','/api/voice/contexts','./api/voiceExtension','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','/api/voice/mails','./api/voiceMail','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','./api/voiceAgentReport','./api/voiceQueueReport','/api/members/reports','./api/memberReport','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailQueue','/api/mail/substatuses','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','./api/mailApplication','/api/dashboards','/api/dashboards/items','./api/dashboardItem','./api/faxAccount','/api/fax/applications','./api/faxApplication','./api/faxInteraction','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/sms/accounts','./api/smsAccount','/api/sms/applications','./api/smsApplication','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','/api/sms/queues','/api/openchannel/accounts','/api/openchannel/applications','./api/openchannelApplication','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','/api/openchannel/queues','/api/chat/websites','./api/chatWebsite','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','/api/chat/messages','./api/chatMessage','/api/chat/offline_messages','./api/chatOfflineMessage','/api/chat/queues','./api/chatQueue','/api/chat/groups','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany'];(function(_0x1880cf,_0x25ef12){var _0x48ecb7=function(_0x4422dc){while(--_0x4422dc){_0x1880cf['push'](_0x1880cf['shift']());}};_0x48ecb7(++_0x25ef12);}(_0x757a,0xde));var _0xa757=function(_0x1abe88,_0x364fb0){_0x1abe88=_0x1abe88-0x0;var _0x2b6141=_0x757a[_0x1abe88];return _0x2b6141;};'use strict';var _=require('lodash');var path=require(_0xa757('0x0'));var express=require(_0xa757('0x1'));var ewinston=require('express-winston');var util=require('util');var errors=require('./errors');var config=require(_0xa757('0x2'));var logger=require(_0xa757('0x3'))(_0xa757('0x4'));var authLogger=require(_0xa757('0x3'))(_0xa757('0x5'));exports[_0xa757('0x6')]=function(_0x5edca8){_0x5edca8[_0xa757('0x7')](ewinston[_0xa757('0x8')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x53be0e,_0x2930fa){var _0x2f7793=_0xa757('0x9');if(!_[_0xa757('0xa')](_0x53be0e[_0xa757('0xb')])){_0x2f7793+='\x20body=%s';var _0x89c630=_0x53be0e[_0xa757('0xb')];maskSensitiveData(_0x89c630);}return util[_0xa757('0xc')](_0x2f7793,_0x53be0e[_0xa757('0xd')],_0x53be0e[_0xa757('0xe')][_0xa757('0xf')]?_0x53be0e[_0xa757('0xe')]['x-forwarded-for']:_0x53be0e['connection']['remoteAddress']||_0x53be0e['ip'],_0x53be0e['url'],_0x2930fa['statusCode'],_0x2930fa[_0xa757('0x10')],_0x53be0e['user']?_0x53be0e['user']['id']:null,_0x53be0e[_0xa757('0x11')]?_0x53be0e['user']['name']:null,_0x53be0e[_0xa757('0x11')]?_0x53be0e[_0xa757('0x11')][_0xa757('0x12')]:null,_0x89c630?util[_0xa757('0x13')](_0x89c630,![],null):'');}}));_0x5edca8[_0xa757('0x7')](ewinston[_0xa757('0x8')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0xf12b68,_0x2f7947){var _0x185011=_0xa757('0x14');if(_0xf12b68['body']&&_0xf12b68[_0xa757('0xb')][_0xa757('0x15')]&&_0xf12b68[_0xa757('0xb')]['agent_id']){_0x185011='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)';}return util[_0xa757('0xc')](_0x185011,_0xf12b68[_0xa757('0xd')],_0xf12b68[_0xa757('0xe')][_0xa757('0xf')]?_0xf12b68[_0xa757('0xe')][_0xa757('0xf')]:_0xf12b68['connection'][_0xa757('0x16')]||_0xf12b68['ip'],_0xf12b68['url'],_0x2f7947[_0xa757('0x17')],_0x2f7947[_0xa757('0x10')],_0xf12b68[_0xa757('0x11')]?_0xf12b68[_0xa757('0x11')]['id']:null,_0xf12b68['user']?_0xf12b68['user'][_0xa757('0x18')]:null,_0xf12b68[_0xa757('0x11')]?_0xf12b68[_0xa757('0x11')][_0xa757('0x12')]:null,_0xf12b68[_0xa757('0xb')]&&_0xf12b68[_0xa757('0xb')][_0xa757('0x15')]?_0xf12b68[_0xa757('0xb')][_0xa757('0x15')]:'other',_0xf12b68[_0xa757('0xb')]&&_0xf12b68['body'][_0xa757('0x19')]?_0xf12b68['body'][_0xa757('0x19')]:'',_0xf12b68[_0xa757('0xb')]&&_0xf12b68[_0xa757('0xb')]['agent_name']?_0xf12b68[_0xa757('0xb')][_0xa757('0x1a')]:'');},'ignoreRoute':function(_0x471e84){var _0x3bf7f3=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x3bf7f3['test'](_0x471e84[_0xa757('0x1b')]);}}));_0x5edca8['use']('/api/users',require('./api/user'));_0x5edca8['use'](_0xa757('0x1c'),require('./api/voiceChanSpy'));_0x5edca8[_0xa757('0x7')](_0xa757('0x1d'),require('./api/voiceContext'));_0x5edca8[_0xa757('0x7')]('/api/voice/extensions',require(_0xa757('0x1e')));_0x5edca8[_0xa757('0x7')]('/api/voice/mohs',require(_0xa757('0x1f')));_0x5edca8['use'](_0xa757('0x20'),require(_0xa757('0x21')));_0x5edca8[_0xa757('0x7')](_0xa757('0x22'),require(_0xa757('0x23')));_0x5edca8[_0xa757('0x7')](_0xa757('0x24'),require(_0xa757('0x25')));_0x5edca8[_0xa757('0x7')](_0xa757('0x26'),require(_0xa757('0x27')));_0x5edca8[_0xa757('0x7')](_0xa757('0x28'),require(_0xa757('0x29')));_0x5edca8[_0xa757('0x7')](_0xa757('0x2a'),require(_0xa757('0x2b')));_0x5edca8[_0xa757('0x7')](_0xa757('0x2c'),require(_0xa757('0x2d')));_0x5edca8[_0xa757('0x7')](_0xa757('0x2e'),require(_0xa757('0x2f')));_0x5edca8[_0xa757('0x7')]('/api/voice/queues/reports',require(_0xa757('0x30')));_0x5edca8[_0xa757('0x7')](_0xa757('0x31'),require(_0xa757('0x32')));_0x5edca8[_0xa757('0x7')]('/api/trunks',require(_0xa757('0x33')));_0x5edca8[_0xa757('0x7')](_0xa757('0x34'),require(_0xa757('0x35')));_0x5edca8[_0xa757('0x7')](_0xa757('0x36'),require('./api/mailServerOut'));_0x5edca8[_0xa757('0x7')](_0xa757('0x37'),require(_0xa757('0x38')));_0x5edca8[_0xa757('0x7')](_0xa757('0x39'),require(_0xa757('0x3a')));_0x5edca8[_0xa757('0x7')](_0xa757('0x3b'),require(_0xa757('0x3c')));_0x5edca8['use'](_0xa757('0x3d'),require(_0xa757('0x3e')));_0x5edca8[_0xa757('0x7')](_0xa757('0x3f'),require(_0xa757('0x40')));_0x5edca8[_0xa757('0x7')]('/api/mail/applications',require(_0xa757('0x41')));_0x5edca8[_0xa757('0x7')]('/api/mail/reports/queue',require('./api/mailQueueReport'));_0x5edca8[_0xa757('0x7')](_0xa757('0x42'),require('./api/dashboard'));_0x5edca8['use'](_0xa757('0x43'),require(_0xa757('0x44')));_0x5edca8[_0xa757('0x7')]('/api/fax/accounts',require(_0xa757('0x45')));_0x5edca8[_0xa757('0x7')](_0xa757('0x46'),require(_0xa757('0x47')));_0x5edca8[_0xa757('0x7')]('/api/fax/interactions',require(_0xa757('0x48')));_0x5edca8['use']('/api/fax/messages',require(_0xa757('0x49')));_0x5edca8[_0xa757('0x7')](_0xa757('0x4a'),require(_0xa757('0x4b')));_0x5edca8[_0xa757('0x7')]('/api/fax/reports/queue',require('./api/faxQueueReport'));_0x5edca8[_0xa757('0x7')](_0xa757('0x4c'),require(_0xa757('0x4d')));_0x5edca8[_0xa757('0x7')](_0xa757('0x4e'),require(_0xa757('0x4f')));_0x5edca8['use'](_0xa757('0x50'),require(_0xa757('0x51')));_0x5edca8['use'](_0xa757('0x52'),require('./api/smsMessage'));_0x5edca8[_0xa757('0x7')](_0xa757('0x53'),require('./api/smsQueue'));_0x5edca8[_0xa757('0x7')](_0xa757('0x54'),require('./api/openchannelAccount'));_0x5edca8[_0xa757('0x7')](_0xa757('0x55'),require(_0xa757('0x56')));_0x5edca8[_0xa757('0x7')]('/api/openchannel/interactions',require(_0xa757('0x57')));_0x5edca8[_0xa757('0x7')](_0xa757('0x58'),require(_0xa757('0x59')));_0x5edca8['use'](_0xa757('0x5a'),require('./api/openchannelQueue'));_0x5edca8['use'](_0xa757('0x5b'),require(_0xa757('0x5c')));_0x5edca8[_0xa757('0x7')]('/api/openchannel/reports/queue',require(_0xa757('0x5d')));_0x5edca8['use'](_0xa757('0x5e'),require(_0xa757('0x5f')));_0x5edca8[_0xa757('0x7')](_0xa757('0x60'),require(_0xa757('0x61')));_0x5edca8[_0xa757('0x7')](_0xa757('0x62'),require(_0xa757('0x63')));_0x5edca8['use'](_0xa757('0x64'),require(_0xa757('0x65')));_0x5edca8[_0xa757('0x7')](_0xa757('0x66'),require(_0xa757('0x67')));_0x5edca8[_0xa757('0x7')](_0xa757('0x68'),require(_0xa757('0x69')));_0x5edca8[_0xa757('0x7')](_0xa757('0x6a'),require(_0xa757('0x6b')));_0x5edca8[_0xa757('0x7')](_0xa757('0x6c'),require(_0xa757('0x6d')));_0x5edca8[_0xa757('0x7')](_0xa757('0x6e'),require('./api/cmContact'));_0x5edca8[_0xa757('0x7')]('/api/cm/hopper',require(_0xa757('0x6f')));_0x5edca8[_0xa757('0x7')](_0xa757('0x70'),require(_0xa757('0x71')));_0x5edca8['use'](_0xa757('0x72'),require(_0xa757('0x73')));_0x5edca8[_0xa757('0x7')](_0xa757('0x74'),require('./api/cmHopperHistory'));_0x5edca8[_0xa757('0x7')](_0xa757('0x75'),require(_0xa757('0x76')));_0x5edca8[_0xa757('0x7')](_0xa757('0x77'),require(_0xa757('0x78')));_0x5edca8['use']('/api/automations',require('./api/automation'));_0x5edca8['use'](_0xa757('0x79'),require(_0xa757('0x7a')));_0x5edca8[_0xa757('0x7')](_0xa757('0x7b'),require(_0xa757('0x7c')));_0x5edca8[_0xa757('0x7')]('/api/conditions',require(_0xa757('0x7d')));_0x5edca8[_0xa757('0x7')](_0xa757('0x7e'),require(_0xa757('0x7f')));_0x5edca8['use'](_0xa757('0x80'),require(_0xa757('0x81')));_0x5edca8['use'](_0xa757('0x82'),require('./api/cdr'));_0x5edca8[_0xa757('0x7')]('/api/voiceQueuesLog',require(_0xa757('0x83')));_0x5edca8['use']('/api/schedules',require(_0xa757('0x84')));_0x5edca8[_0xa757('0x7')](_0xa757('0x85'),require(_0xa757('0x86')));_0x5edca8[_0xa757('0x7')](_0xa757('0x87'),require('./api/tag'));_0x5edca8['use'](_0xa757('0x88'),require(_0xa757('0x89')));_0x5edca8[_0xa757('0x7')]('/api/triggers',require('./api/trigger'));_0x5edca8[_0xa757('0x7')](_0xa757('0x8a'),require(_0xa757('0x8b')));_0x5edca8[_0xa757('0x7')](_0xa757('0x8c'),require(_0xa757('0x8d')));_0x5edca8['use'](_0xa757('0x8e'),require(_0xa757('0x8f')));_0x5edca8[_0xa757('0x7')](_0xa757('0x90'),require(_0xa757('0x91')));_0x5edca8[_0xa757('0x7')](_0xa757('0x92'),require(_0xa757('0x93')));_0x5edca8[_0xa757('0x7')](_0xa757('0x94'),require('./api/analyticExtractedReport'));_0x5edca8[_0xa757('0x7')]('/api/analytics/metrics',require('./api/analyticMetric'));_0x5edca8[_0xa757('0x7')](_0xa757('0x95'),require(_0xa757('0x96')));_0x5edca8[_0xa757('0x7')](_0xa757('0x97'),require(_0xa757('0x98')));_0x5edca8[_0xa757('0x7')](_0xa757('0x99'),require(_0xa757('0x9a')));_0x5edca8[_0xa757('0x7')](_0xa757('0x9b'),require('./api/intSalesforceConfiguration'));_0x5edca8[_0xa757('0x7')](_0xa757('0x9c'),require('./api/intSalesforceField'));_0x5edca8[_0xa757('0x7')](_0xa757('0x9d'),require(_0xa757('0x9e')));_0x5edca8[_0xa757('0x7')](_0xa757('0x9f'),require(_0xa757('0xa0')));_0x5edca8['use'](_0xa757('0xa1'),require('./api/intSugarcrmField'));_0x5edca8[_0xa757('0x7')](_0xa757('0xa2'),require(_0xa757('0xa3')));_0x5edca8[_0xa757('0x7')](_0xa757('0xa4'),require('./api/intDeskConfiguration'));_0x5edca8['use'](_0xa757('0xa5'),require(_0xa757('0xa6')));_0x5edca8[_0xa757('0x7')]('/api/integrations/zoho/accounts',require(_0xa757('0xa7')));_0x5edca8['use'](_0xa757('0xa8'),require(_0xa757('0xa9')));_0x5edca8[_0xa757('0x7')](_0xa757('0xaa'),require(_0xa757('0xab')));_0x5edca8[_0xa757('0x7')]('/api/integrations/zendesk/accounts',require(_0xa757('0xac')));_0x5edca8[_0xa757('0x7')](_0xa757('0xad'),require(_0xa757('0xae')));_0x5edca8[_0xa757('0x7')]('/api/integrations/zendesk/fields',require(_0xa757('0xaf')));_0x5edca8[_0xa757('0x7')](_0xa757('0xb0'),require(_0xa757('0xb1')));_0x5edca8[_0xa757('0x7')]('/api/integrations/freshdesk/configurations',require(_0xa757('0xb2')));_0x5edca8[_0xa757('0x7')](_0xa757('0xb3'),require('./api/intFreshdeskField'));_0x5edca8[_0xa757('0x7')](_0xa757('0xb4'),require(_0xa757('0xb5')));_0x5edca8[_0xa757('0x7')](_0xa757('0xb6'),require(_0xa757('0xb7')));_0x5edca8[_0xa757('0x7')](_0xa757('0xb8'),require(_0xa757('0xb9')));_0x5edca8[_0xa757('0x7')](_0xa757('0xba'),require(_0xa757('0xbb')));_0x5edca8[_0xa757('0x7')](_0xa757('0xbc'),require('./api/intServicenowConfiguration'));_0x5edca8[_0xa757('0x7')](_0xa757('0xbd'),require('./api/intServicenowField'));_0x5edca8[_0xa757('0x7')](_0xa757('0xbe'),require('./api/intDynamics365Account'));_0x5edca8[_0xa757('0x7')](_0xa757('0xbf'),require(_0xa757('0xc0')));_0x5edca8[_0xa757('0x7')](_0xa757('0xc1'),require(_0xa757('0xc2')));_0x5edca8[_0xa757('0x7')](_0xa757('0xc3'),require(_0xa757('0xc4')));_0x5edca8[_0xa757('0x7')](_0xa757('0xc5'),require(_0xa757('0xc6')));_0x5edca8[_0xa757('0x7')](_0xa757('0xc7'),require(_0xa757('0xc8')));_0x5edca8[_0xa757('0x7')]('/api/networks',require(_0xa757('0xc9')));_0x5edca8['use'](_0xa757('0xca'),require(_0xa757('0xcb')));_0x5edca8[_0xa757('0x7')](_0xa757('0xcc'),require(_0xa757('0xcd')));_0x5edca8['use'](_0xa757('0xce'),require(_0xa757('0xcf')));_0x5edca8[_0xa757('0x7')]('/api/jscripty/questions/reports',require(_0xa757('0xd0')));_0x5edca8[_0xa757('0x7')](_0xa757('0xd1'),require('./api/jscriptySessionReport'));_0x5edca8['use'](_0xa757('0xd2'),require(_0xa757('0xd3')));_0x5edca8[_0xa757('0x7')]('/api/square/reports',require(_0xa757('0xd4')));_0x5edca8['use']('/api/square/details/reports',require(_0xa757('0xd5')));_0x5edca8[_0xa757('0x7')](_0xa757('0xd6'),require('./api/jscriptyProject'));_0x5edca8[_0xa757('0x7')](_0xa757('0xd7'),require(_0xa757('0xd8')));_0x5edca8[_0xa757('0x7')](_0xa757('0xd9'),require(_0xa757('0xda')));_0x5edca8[_0xa757('0x7')](_0xa757('0xdb'),require(_0xa757('0xdc')));_0x5edca8[_0xa757('0x7')](_0xa757('0xdd'),require(_0xa757('0xde')));_0x5edca8['use'](_0xa757('0xdf'),require(_0xa757('0xe0')));_0x5edca8[_0xa757('0x7')](_0xa757('0xe1'),require(_0xa757('0xe2')));_0x5edca8[_0xa757('0x7')](_0xa757('0xe3'),require(_0xa757('0xe4')));_0x5edca8[_0xa757('0x7')](_0xa757('0xe5'),require(_0xa757('0xe6')));_0x5edca8[_0xa757('0x7')](_0xa757('0xe7'),require(_0xa757('0xe8')));_0x5edca8[_0xa757('0x7')](_0xa757('0xe9'),require(_0xa757('0xea')));_0x5edca8[_0xa757('0x7')](_0xa757('0xeb'),require(_0xa757('0xec')));_0x5edca8[_0xa757('0x7')](_0xa757('0xed'),require('./api/mailTransferReport'));_0x5edca8[_0xa757('0x7')](_0xa757('0xee'),require('./api/chatTransferReport'));_0x5edca8[_0xa757('0x7')]('/api/fax/reports/transfer',require(_0xa757('0xef')));_0x5edca8[_0xa757('0x7')]('/api/openchannel/reports/transfer',require(_0xa757('0xf0')));_0x5edca8[_0xa757('0x7')](_0xa757('0xf1'),require(_0xa757('0xf2')));_0x5edca8['use'](_0xa757('0xf3'),require(_0xa757('0xf4')));_0x5edca8['use'](_0xa757('0xf5'),require(_0xa757('0xf6')));_0x5edca8['use'](_0xa757('0xf7'),require(_0xa757('0xf8')));_0x5edca8[_0xa757('0x7')](_0xa757('0xf9'),require(_0xa757('0xfa')));_0x5edca8[_0xa757('0x7')](_0xa757('0xfb'),require(_0xa757('0xfc')));_0x5edca8[_0xa757('0x7')]('/api/notifications',require('./api/notification'));_0x5edca8[_0xa757('0x7')](_0xa757('0xfd'),require(_0xa757('0xfe')));_0x5edca8[_0xa757('0x7')](_0xa757('0xff'),require(_0xa757('0x100')));_0x5edca8[_0xa757('0x7')]('/api/whatsapp/interactions',require(_0xa757('0x101')));_0x5edca8['use'](_0xa757('0x102'),require(_0xa757('0x103')));_0x5edca8[_0xa757('0x7')](_0xa757('0x104'),require(_0xa757('0x105')));_0x5edca8['use'](_0xa757('0x106'),require('./api/whatsappTransferReport'));_0x5edca8[_0xa757('0x7')](_0xa757('0x107'),require(_0xa757('0x108')));_0x5edca8[_0xa757('0x7')]('/api/cloudProviders',require(_0xa757('0x109')));_0x5edca8[_0xa757('0x7')](_0xa757('0x10a'),require(_0xa757('0x10b')));_0x5edca8[_0xa757('0x7')](_0xa757('0x10c'),require(_0xa757('0x10d')));_0x5edca8[_0xa757('0x7')]('/api/jira',require(_0xa757('0x10e')));_0x5edca8[_0xa757('0x7')](_0xa757('0x10f'),require(_0xa757('0x110')));_0x5edca8['use'](_0xa757('0x111'),require(_0xa757('0x112')));_0x5edca8[_0xa757('0x7')](_0xa757('0x113'),require(_0xa757('0x114')));_0x5edca8[_0xa757('0x7')](_0xa757('0x115'),require('./api/pm2'));_0x5edca8['use'](_0xa757('0x116'),require('./api/webbar'));_0x5edca8[_0xa757('0x7')]('/apidoc',express['static'](path[_0xa757('0x117')](config[_0xa757('0x118')],_0xa757('0x119'))));_0x5edca8[_0xa757('0x7')](_0xa757('0x11a'),express[_0xa757('0x11b')](path[_0xa757('0x117')](config[_0xa757('0x118')],_0xa757('0x11a'))));_0x5edca8[_0xa757('0x7')]('/demo',express[_0xa757('0x11b')](path['join'](config[_0xa757('0x118')],_0xa757('0x11c'))));_0x5edca8[_0xa757('0x7')](_0xa757('0x11d'),express['static'](path[_0xa757('0x117')](config[_0xa757('0x118')],_0xa757('0x11e'),_0xa757('0x11f'))));_0x5edca8[_0xa757('0x7')](_0xa757('0x120'),express[_0xa757('0x11b')](path[_0xa757('0x117')](config[_0xa757('0x118')],_0xa757('0x121'))));_0x5edca8[_0xa757('0x122')](_0xa757('0x123'))[_0xa757('0x124')](errors[0x194]);_0x5edca8[_0xa757('0x122')]('/*')[_0xa757('0x124')](function(_0x56a060,_0x4af060){_0x4af060[_0xa757('0x125')](path['resolve'](_0x5edca8[_0xa757('0x124')](_0xa757('0x126'))+_0xa757('0x127')));});};var sensitiveFields=[_0xa757('0x128'),'password',_0xa757('0x129'),_0xa757('0x12a'),_0xa757('0x12b'),_0xa757('0x12c'),_0xa757('0x12d'),_0xa757('0x12e'),'mobile',_0xa757('0x12f'),_0xa757('0x130'),_0xa757('0x131'),_0xa757('0x132'),_0xa757('0x133'),'code','accessKey',_0xa757('0x134'),'token',_0xa757('0x135'),'accessToken',_0xa757('0x136'),_0xa757('0x137'),_0xa757('0x138'),_0xa757('0x139'),_0xa757('0x13a'),_0xa757('0x13b'),_0xa757('0x13c'),_0xa757('0x13d'),_0xa757('0x13e'),_0xa757('0x13f'),_0xa757('0x140'),'accesskeyid',_0xa757('0x141'),_0xa757('0x142'),_0xa757('0x11'),_0xa757('0x143'),_0xa757('0x144'),_0xa757('0x145'),'dsn',_0xa757('0x146'),_0xa757('0x147'),'oldPassword'];function maskSensitiveData(_0x133f0c){var _0x68a80b=/(?!^)[\s\S](?!$)/g;for(var _0x1f4782 in _0x133f0c){if(_['isArray'](_0x133f0c[_0x1f4782])){for(var _0x3ae3bf=0x0;_0x3ae3bf<_0x133f0c[_0x1f4782][_0xa757('0x148')];_0x3ae3bf++){maskSensitiveData(_0x133f0c[_0x1f4782][_0x3ae3bf]);}}else if(_[_0xa757('0x149')](_0x133f0c[_0x1f4782])){maskSensitiveData(_0x133f0c[_0x1f4782]);}else if(_[_0xa757('0x14a')](_0x133f0c[_0x1f4782])){_0x133f0c[_0x1f4782]=_0x133f0c[_0x1f4782][_0xa757('0x14b')](/{{{/g,'@@{')[_0xa757('0x14b')](/}}}/g,'}@@')['replace'](/{{/g,'@{')[_0xa757('0x14b')](/}}/g,'}@');if(_['includes'](sensitiveFields,_0x1f4782)){_0x133f0c[_0x1f4782]=_0x133f0c[_0x1f4782]['replace'](_0x68a80b,'*');}}}} \ No newline at end of file +var _0xf197=['lodash','path','express','./errors','./config/logger','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','body','\x20body=%s','format','method','headers','x-forwarded-for','remoteAddress','url','statusCode','user','inspect','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','device','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','connection','responseTime','name','agent_id','agent_name','test','/api/users','./api/voiceContext','/api/voice/extensions','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/screen/recordings','./api/screenRecording','/api/voice/mails','./api/voiceMailMessage','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','./api/voiceAgentReport','/api/members/reports','./api/memberReport','/api/trunks','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','/api/mail/queues','./api/mailQueue','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','./api/mailMessage','/api/dashboards','./api/dashboard','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','/api/fax/applications','./api/faxInteraction','/api/fax/messages','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','./api/faxQueueReport','./api/smsAccount','/api/sms/applications','./api/smsApplication','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','/api/openchannel/accounts','/api/openchannel/applications','./api/openchannelApplication','/api/openchannel/interactions','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','/api/openchannel/queues','./api/openchannelQueue','/api/chat/websites','./api/chatWebsite','/api/openchannel/reports/queue','./api/openchannelQueueReport','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','./api/chatMessage','/api/chat/queues','/api/chat/groups','./api/chatGroup','/api/cm/companies','./api/cmCompany','/api/cm/contacts','./api/cmContact','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperFinal','/api/cm/hopper_history','./api/cmHopperHistory','./api/cmCustomField','./api/action','/api/automations','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','/api/conditions','./api/condition','./api/interval','/api/pauses','./api/pause','/api/cdr','/api/voiceQueuesLog','./api/voiceQueuesLog','/api/schedules','/api/sounds','./api/sound','/api/templates','/api/variables','/api/integrations','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/configurations','/api/integrations/sugarcrm/fields','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/zoho/accounts','./api/intZohoAccount','./api/intZohoConfiguration','/api/integrations/zoho/fields','/api/integrations/zendesk/accounts','./api/intZendeskAccount','./api/intZendeskConfiguration','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','./api/intDynamics365Field','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','/api/integrations/freshsales/fields','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','./api/chatInternalMessage','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','/api/jscripty/questions/reports','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/square/reports','./api/squareReport','./api/squareReportDetail','/api/jscripty/projects','./api/jscriptyProject','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','./api/squareRecording','./api/squareMessage','./api/team','/api/license','./api/license','./api/campaign','/api/migrations','./api/attachment','./api/plugin','./api/mailTransferReport','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','./api/openchannelTransferReport','/api/cm/lists','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/notifications','./api/notification','./api/whatsappAccount','/api/whatsapp/interactions','./api/whatsappInteraction','/api/whatsapp/messages','/api/whatsapp/reports/queue','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','./api/whatsappTransferReport','./api/whatsappQueue','/api/cloudProviders','./api/cloudProvider','/api/auth/local','./api/authLocal','./api/authGoogle','/api/jira','./api/jira','/api/rpc','./api/rpc','/api/version','./api/version','/api/system','./api/system','/api/pm2','./api/pm2','./api/webbar','static','join','/apidoc','root','/demo','/snippet','snippet','1.0.16','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','get','appPath','/index.html','username','password','newPassword','apiKey','firstName','lastName','street','phone','mobile','email','clientId','clientSecret','code','tenantId','token','channelSecret','accessToken','accessTokenSecret','authToken','consumerSecret','calleridname','calleridnum','exten','vidaooApiKey','clientEmail','secretaccesskey','pass','accountSid','localstationid','dsn','secret','registry','isPlainObject','isArray','isString','replace','@@{','}@@','includes'];(function(_0x4c1535,_0xad180e){var _0x4eef7b=function(_0xa18df3){while(--_0xa18df3){_0x4c1535['push'](_0x4c1535['shift']());}};_0x4eef7b(++_0xad180e);}(_0xf197,0x130));var _0x7f19=function(_0x4b1a15,_0x45ae49){_0x4b1a15=_0x4b1a15-0x0;var _0x33db44=_0xf197[_0x4b1a15];return _0x33db44;};'use strict';var _=require(_0x7f19('0x0'));var path=require(_0x7f19('0x1'));var express=require(_0x7f19('0x2'));var ewinston=require('express-winston');var util=require('util');var errors=require(_0x7f19('0x3'));var config=require('./config/environment');var logger=require('./config/logger')('api');var authLogger=require(_0x7f19('0x4'))('auth');exports['default']=function(_0x1a3591){_0x1a3591[_0x7f19('0x5')](ewinston[_0x7f19('0x6')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x1851e3,_0x39c494){var _0x2ebbfb=_0x7f19('0x7');if(!_['isEmpty'](_0x1851e3[_0x7f19('0x8')])){_0x2ebbfb+=_0x7f19('0x9');var _0x7c5f2c=_0x1851e3['body'];maskSensitiveData(_0x7c5f2c);}return util[_0x7f19('0xa')](_0x2ebbfb,_0x1851e3[_0x7f19('0xb')],_0x1851e3[_0x7f19('0xc')][_0x7f19('0xd')]?_0x1851e3['headers'][_0x7f19('0xd')]:_0x1851e3['connection'][_0x7f19('0xe')]||_0x1851e3['ip'],_0x1851e3[_0x7f19('0xf')],_0x39c494[_0x7f19('0x10')],_0x39c494['responseTime'],_0x1851e3['user']?_0x1851e3[_0x7f19('0x11')]['id']:null,_0x1851e3[_0x7f19('0x11')]?_0x1851e3[_0x7f19('0x11')]['name']:null,_0x1851e3[_0x7f19('0x11')]?_0x1851e3[_0x7f19('0x11')]['role']:null,_0x7c5f2c?util[_0x7f19('0x12')](_0x7c5f2c,![],null):'');}}));_0x1a3591[_0x7f19('0x5')](ewinston[_0x7f19('0x6')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x5c0b64,_0x3d81d1){var _0x520281=_0x7f19('0x13');if(_0x5c0b64[_0x7f19('0x8')]&&_0x5c0b64[_0x7f19('0x8')][_0x7f19('0x14')]&&_0x5c0b64[_0x7f19('0x8')]['agent_id']){_0x520281=_0x7f19('0x15');}return util[_0x7f19('0xa')](_0x520281,_0x5c0b64[_0x7f19('0xb')],_0x5c0b64['headers'][_0x7f19('0xd')]?_0x5c0b64[_0x7f19('0xc')][_0x7f19('0xd')]:_0x5c0b64[_0x7f19('0x16')]['remoteAddress']||_0x5c0b64['ip'],_0x5c0b64[_0x7f19('0xf')],_0x3d81d1[_0x7f19('0x10')],_0x3d81d1[_0x7f19('0x17')],_0x5c0b64[_0x7f19('0x11')]?_0x5c0b64['user']['id']:null,_0x5c0b64[_0x7f19('0x11')]?_0x5c0b64[_0x7f19('0x11')][_0x7f19('0x18')]:null,_0x5c0b64[_0x7f19('0x11')]?_0x5c0b64[_0x7f19('0x11')]['role']:null,_0x5c0b64[_0x7f19('0x8')]&&_0x5c0b64[_0x7f19('0x8')][_0x7f19('0x14')]?_0x5c0b64[_0x7f19('0x8')][_0x7f19('0x14')]:'other',_0x5c0b64['body']&&_0x5c0b64[_0x7f19('0x8')][_0x7f19('0x19')]?_0x5c0b64['body'][_0x7f19('0x19')]:'',_0x5c0b64[_0x7f19('0x8')]&&_0x5c0b64[_0x7f19('0x8')][_0x7f19('0x1a')]?_0x5c0b64[_0x7f19('0x8')][_0x7f19('0x1a')]:'');},'ignoreRoute':function(_0x3550a9){var _0x4ae0d2=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x4ae0d2[_0x7f19('0x1b')](_0x3550a9[_0x7f19('0xf')]);}}));_0x1a3591['use'](_0x7f19('0x1c'),require('./api/user'));_0x1a3591[_0x7f19('0x5')]('/api/voice/chanspy',require('./api/voiceChanSpy'));_0x1a3591[_0x7f19('0x5')]('/api/voice/contexts',require(_0x7f19('0x1d')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x1e'),require('./api/voiceExtension'));_0x1a3591[_0x7f19('0x5')]('/api/voice/mohs',require(_0x7f19('0x1f')));_0x1a3591['use'](_0x7f19('0x20'),require(_0x7f19('0x21')));_0x1a3591[_0x7f19('0x5')]('/api/voice/recordings',require('./api/voiceRecording'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x22'),require(_0x7f19('0x23')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x24'),require('./api/voiceMail'));_0x1a3591['use']('/api/voice/mails/messages',require(_0x7f19('0x25')));_0x1a3591[_0x7f19('0x5')]('/api/voice/calls/reports',require(_0x7f19('0x26')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x27'),require(_0x7f19('0x28')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x29'),require(_0x7f19('0x2a')));_0x1a3591[_0x7f19('0x5')]('/api/voice/queues/reports',require('./api/voiceQueueReport'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x2b'),require(_0x7f19('0x2c')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x2d'),require(_0x7f19('0x2e')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x2f'),require(_0x7f19('0x30')));_0x1a3591['use'](_0x7f19('0x31'),require(_0x7f19('0x32')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x33'),require('./api/mailAccount'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x34'),require(_0x7f19('0x35')));_0x1a3591[_0x7f19('0x5')]('/api/mail/substatuses',require(_0x7f19('0x36')));_0x1a3591['use'](_0x7f19('0x37'),require(_0x7f19('0x38')));_0x1a3591['use']('/api/mail/messages',require(_0x7f19('0x39')));_0x1a3591[_0x7f19('0x5')]('/api/mail/applications',require('./api/mailApplication'));_0x1a3591['use']('/api/mail/reports/queue',require('./api/mailQueueReport'));_0x1a3591['use'](_0x7f19('0x3a'),require(_0x7f19('0x3b')));_0x1a3591[_0x7f19('0x5')]('/api/dashboards/items',require(_0x7f19('0x3c')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x3d'),require(_0x7f19('0x3e')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x3f'),require('./api/faxApplication'));_0x1a3591[_0x7f19('0x5')]('/api/fax/interactions',require(_0x7f19('0x40')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x41'),require('./api/faxMessage'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x42'),require(_0x7f19('0x43')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x44'),require(_0x7f19('0x45')));_0x1a3591[_0x7f19('0x5')]('/api/sms/accounts',require(_0x7f19('0x46')));_0x1a3591['use'](_0x7f19('0x47'),require(_0x7f19('0x48')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x49'),require(_0x7f19('0x4a')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x4b'),require(_0x7f19('0x4c')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x4d'),require('./api/smsQueue'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x4e'),require('./api/openchannelAccount'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x4f'),require(_0x7f19('0x50')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x51'),require(_0x7f19('0x52')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x53'),require(_0x7f19('0x54')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x55'),require(_0x7f19('0x56')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x57'),require(_0x7f19('0x58')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x59'),require(_0x7f19('0x5a')));_0x1a3591[_0x7f19('0x5')]('/api/chat/applications',require(_0x7f19('0x5b')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x5c'),require(_0x7f19('0x5d')));_0x1a3591['use']('/api/chat/messages',require(_0x7f19('0x5e')));_0x1a3591[_0x7f19('0x5')]('/api/chat/offline_messages',require('./api/chatOfflineMessage'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x5f'),require('./api/chatQueue'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x60'),require(_0x7f19('0x61')));_0x1a3591[_0x7f19('0x5')]('/api/chat/proactive_actions',require('./api/chatProactiveAction'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x62'),require(_0x7f19('0x63')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x64'),require(_0x7f19('0x65')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x66'),require(_0x7f19('0x67')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x68'),require('./api/cmHopperBlack'));_0x1a3591[_0x7f19('0x5')]('/api/cm/hopper_final',require(_0x7f19('0x69')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x6a'),require(_0x7f19('0x6b')));_0x1a3591[_0x7f19('0x5')]('/api/cm/custom_fields',require(_0x7f19('0x6c')));_0x1a3591['use']('/api/actions',require(_0x7f19('0x6d')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x6e'),require(_0x7f19('0x6f')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x70'),require(_0x7f19('0x71')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x72'),require(_0x7f19('0x73')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x74'),require(_0x7f19('0x75')));_0x1a3591[_0x7f19('0x5')]('/api/intervals',require(_0x7f19('0x76')));_0x1a3591['use'](_0x7f19('0x77'),require(_0x7f19('0x78')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x79'),require('./api/cdr'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x7a'),require(_0x7f19('0x7b')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x7c'),require('./api/schedule'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x7d'),require(_0x7f19('0x7e')));_0x1a3591[_0x7f19('0x5')]('/api/tags',require('./api/tag'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x7f'),require('./api/template'));_0x1a3591[_0x7f19('0x5')]('/api/triggers',require('./api/trigger'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x80'),require('./api/variable'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x81'),require(_0x7f19('0x82')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x83'),require(_0x7f19('0x84')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x85'),require('./api/analyticCustomReport'));_0x1a3591[_0x7f19('0x5')]('/api/analytics/default_reports',require(_0x7f19('0x86')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x87'),require(_0x7f19('0x88')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x89'),require('./api/analyticMetric'));_0x1a3591[_0x7f19('0x5')]('/api/analytics/field_reports',require(_0x7f19('0x8a')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x8b'),require(_0x7f19('0x8c')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x8d'),require(_0x7f19('0x8e')));_0x1a3591['use']('/api/integrations/salesforce/configurations',require(_0x7f19('0x8f')));_0x1a3591['use'](_0x7f19('0x90'),require(_0x7f19('0x91')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/sugarcrm/accounts',require('./api/intSugarcrmAccount'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x92'),require('./api/intSugarcrmConfiguration'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x93'),require('./api/intSugarcrmField'));_0x1a3591[_0x7f19('0x5')]('/api/integrations/desk/accounts',require(_0x7f19('0x94')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x95'),require(_0x7f19('0x96')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/desk/fields',require('./api/intDeskField'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x97'),require(_0x7f19('0x98')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/zoho/configurations',require(_0x7f19('0x99')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x9a'),require('./api/intZohoField'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x9b'),require(_0x7f19('0x9c')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/zendesk/configurations',require(_0x7f19('0x9d')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/zendesk/fields',require('./api/intZendeskField'));_0x1a3591[_0x7f19('0x5')]('/api/integrations/freshdesk/accounts',require('./api/intFreshdeskAccount'));_0x1a3591[_0x7f19('0x5')]('/api/integrations/freshdesk/configurations',require(_0x7f19('0x9e')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x9f'),require(_0x7f19('0xa0')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xa1'),require(_0x7f19('0xa2')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/vtiger/configurations',require('./api/intVtigerConfiguration'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xa3'),require(_0x7f19('0xa4')));_0x1a3591['use'](_0x7f19('0xa5'),require(_0x7f19('0xa6')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/servicenow/configurations',require(_0x7f19('0xa7')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xa8'),require(_0x7f19('0xa9')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xaa'),require('./api/intDynamics365Account'));_0x1a3591['use'](_0x7f19('0xab'),require(_0x7f19('0xac')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xad'),require(_0x7f19('0xae')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xaf'),require(_0x7f19('0xb0')));_0x1a3591[_0x7f19('0x5')]('/api/integrations/freshsales/configurations',require('./api/intFreshsalesConfiguration'));_0x1a3591['use'](_0x7f19('0xb1'),require(_0x7f19('0xb2')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xb3'),require(_0x7f19('0xb4')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xb5'),require(_0x7f19('0xb6')));_0x1a3591[_0x7f19('0x5')]('/api/chat/internal/messages',require(_0x7f19('0xb7')));_0x1a3591['use'](_0x7f19('0xb8'),require(_0x7f19('0xb9')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xba'),require(_0x7f19('0xbb')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xbc'),require(_0x7f19('0xbd')));_0x1a3591[_0x7f19('0x5')]('/api/sms/reports/queue',require('./api/smsQueueReport'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xbe'),require(_0x7f19('0xbf')));_0x1a3591[_0x7f19('0x5')]('/api/square/details/reports',require(_0x7f19('0xc0')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xc1'),require(_0x7f19('0xc2')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xc3'),require(_0x7f19('0xc4')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xc5'),require(_0x7f19('0xc6')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xc7'),require(_0x7f19('0xc8')));_0x1a3591[_0x7f19('0x5')]('/api/square/recordings',require(_0x7f19('0xc9')));_0x1a3591['use']('/api/square/messages',require(_0x7f19('0xca')));_0x1a3591[_0x7f19('0x5')]('/api/teams',require(_0x7f19('0xcb')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xcc'),require(_0x7f19('0xcd')));_0x1a3591[_0x7f19('0x5')]('/api/campaigns',require(_0x7f19('0xce')));_0x1a3591['use'](_0x7f19('0xcf'),require('./api/migration'));_0x1a3591[_0x7f19('0x5')]('/api/attachments',require(_0x7f19('0xd0')));_0x1a3591['use']('/api/plugins',require(_0x7f19('0xd1')));_0x1a3591[_0x7f19('0x5')]('/api/mail/reports/transfer',require(_0x7f19('0xd2')));_0x1a3591['use'](_0x7f19('0xd3'),require(_0x7f19('0xd4')));_0x1a3591['use'](_0x7f19('0xd5'),require(_0x7f19('0xd6')));_0x1a3591['use']('/api/openchannel/reports/transfer',require(_0x7f19('0xd7')));_0x1a3591[_0x7f19('0x5')]('/api/sms/reports/transfer',require('./api/smsTransferReport'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xd8'),require('./api/cmList'));_0x1a3591[_0x7f19('0x5')]('/api/voice/prefixes',require('./api/voicePrefix'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xd9'),require(_0x7f19('0xda')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xdb'),require(_0x7f19('0xdc')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xdd'),require(_0x7f19('0xde')));_0x1a3591['use'](_0x7f19('0xdf'),require(_0x7f19('0xe0')));_0x1a3591[_0x7f19('0x5')]('/api/userNotifications',require('./api/userNotification'));_0x1a3591[_0x7f19('0x5')]('/api/whatsapp/accounts',require(_0x7f19('0xe1')));_0x1a3591['use']('/api/whatsapp/applications',require('./api/whatsappApplication'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xe2'),require(_0x7f19('0xe3')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xe4'),require('./api/whatsappMessage'));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xe5'),require(_0x7f19('0xe6')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xe7'),require(_0x7f19('0xe8')));_0x1a3591[_0x7f19('0x5')]('/api/whatsapp/queues',require(_0x7f19('0xe9')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xea'),require(_0x7f19('0xeb')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xec'),require(_0x7f19('0xed')));_0x1a3591['use']('/api/auth/google',require(_0x7f19('0xee')));_0x1a3591['use'](_0x7f19('0xef'),require(_0x7f19('0xf0')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xf1'),require(_0x7f19('0xf2')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xf3'),require(_0x7f19('0xf4')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xf5'),require(_0x7f19('0xf6')));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xf7'),require(_0x7f19('0xf8')));_0x1a3591[_0x7f19('0x5')]('/api/webbar',require(_0x7f19('0xf9')));_0x1a3591[_0x7f19('0x5')]('/apidoc',express[_0x7f19('0xfa')](path[_0x7f19('0xfb')](config['root'],_0x7f19('0xfc'))));_0x1a3591[_0x7f19('0x5')]('/www',express['static'](path[_0x7f19('0xfb')](config[_0x7f19('0xfd')],'/www')));_0x1a3591['use'](_0x7f19('0xfe'),express['static'](path[_0x7f19('0xfb')](config[_0x7f19('0xfd')],_0x7f19('0xfe'))));_0x1a3591[_0x7f19('0x5')](_0x7f19('0xff'),express[_0x7f19('0xfa')](path[_0x7f19('0xfb')](config[_0x7f19('0xfd')],_0x7f19('0x100'),_0x7f19('0x101'))));_0x1a3591[_0x7f19('0x5')](_0x7f19('0x102'),express['static'](path[_0x7f19('0xfb')](config[_0x7f19('0xfd')],_0x7f19('0x103'))));_0x1a3591[_0x7f19('0x104')](_0x7f19('0x105'))[_0x7f19('0x106')](errors[0x194]);_0x1a3591[_0x7f19('0x104')]('/*')[_0x7f19('0x106')](function(_0x44ab45,_0xf0273e){_0xf0273e['sendFile'](path['resolve'](_0x1a3591[_0x7f19('0x106')](_0x7f19('0x107'))+_0x7f19('0x108')));});};var sensitiveFields=[_0x7f19('0x109'),_0x7f19('0x10a'),_0x7f19('0x10b'),_0x7f19('0x10c'),_0x7f19('0x10d'),_0x7f19('0x10e'),_0x7f19('0x10f'),_0x7f19('0x110'),_0x7f19('0x111'),'fax',_0x7f19('0x112'),_0x7f19('0x113'),_0x7f19('0x114'),'securityToken',_0x7f19('0x115'),'accessKey',_0x7f19('0x116'),_0x7f19('0x117'),_0x7f19('0x118'),_0x7f19('0x119'),_0x7f19('0x11a'),_0x7f19('0x11b'),'consumerKey',_0x7f19('0x11c'),'membername',_0x7f19('0x11d'),_0x7f19('0x11e'),_0x7f19('0x11f'),_0x7f19('0x120'),_0x7f19('0x121'),'privateKey','accesskeyid',_0x7f19('0x122'),'key','user',_0x7f19('0x123'),_0x7f19('0x124'),_0x7f19('0x125'),_0x7f19('0x126'),_0x7f19('0x127'),_0x7f19('0x128'),'oldPassword'];function maskSensitiveData(_0x97add7){var _0x4e4ddc=/(?!^)[\s\S](?!$)/g;if(!_[_0x7f19('0x129')](_0x97add7))return;for(var _0x5bb7bd in _0x97add7){if(_[_0x7f19('0x12a')](_0x97add7[_0x5bb7bd])){for(var _0x3b1428=0x0;_0x3b1428<_0x97add7[_0x5bb7bd]['length'];_0x3b1428++){maskSensitiveData(_0x97add7[_0x5bb7bd][_0x3b1428]);}}else if(_[_0x7f19('0x129')](_0x97add7[_0x5bb7bd])){maskSensitiveData(_0x97add7[_0x5bb7bd]);}else if(_[_0x7f19('0x12b')](_0x97add7[_0x5bb7bd])){_0x97add7[_0x5bb7bd]=_0x97add7[_0x5bb7bd][_0x7f19('0x12c')](/{{{/g,_0x7f19('0x12d'))[_0x7f19('0x12c')](/}}}/g,_0x7f19('0x12e'))[_0x7f19('0x12c')](/{{/g,'@{')['replace'](/}}/g,'}@');if(_[_0x7f19('0x12f')](sensitiveFields,_0x5bb7bd)){_0x97add7[_0x5bb7bd]=_0x97add7[_0x5bb7bd][_0x7f19('0x12c')](_0x4e4ddc,'*');}}}} \ No newline at end of file diff --git a/server/rpc/index.js b/server/rpc/index.js index 1b36858..3c0d85c 100644 --- a/server/rpc/index.js +++ b/server/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf414=['../api/voiceDialReport/voiceDialReport.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxAccount/faxAccount.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsInteraction/smsInteraction.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/sound/sound.rpc','../api/template/template.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','http','rpc','port','localhost','error','log','../config/triggers','default','RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','../config/environment','listen','merge','../api/user/user.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceCallReport/voiceCallReport.rpc'];(function(_0xe5f10c,_0x1549ce){var _0x519f93=function(_0x149b04){while(--_0x149b04){_0xe5f10c['push'](_0xe5f10c['shift']());}};_0x519f93(++_0x1549ce);}(_0xf414,0xd7));var _0x4f41=function(_0x350343,_0x256f69){_0x350343=_0x350343-0x0;var _0x9afc1c=_0xf414[_0x350343];return _0x9afc1c;};'use strict';var jayson=require(_0x4f41('0x0'));var BPromise=require(_0x4f41('0x1'));var _=require(_0x4f41('0x2'));var config=require(_0x4f41('0x3'));exports[_0x4f41('0x4')]=function(){return new BPromise(function(_0x32fdc9,_0x5576df){var _0x1a856d={};_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x6')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/voiceExtension/voiceExtension.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x7')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x8')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x9')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0xa')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0xb')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0xc')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0xd')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0xe')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0xf')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x10')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x11')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x12')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/mailQueue/mailQueue.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/mailInteraction/mailInteraction.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x13')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x14')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x15')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x16')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/faxApplication/faxApplication.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x17')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x18')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x19')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x1a')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/smsAccount/smsAccount.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x1b')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/smsMessage/smsMessage.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/smsQueue/smsQueue.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x1c')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/openchannelInteraction/openchannelInteraction.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x1d')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x1e')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x1f')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x20')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x21')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x22')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x23')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x24')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x25')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x26')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/cmHopperHistory/cmHopperHistory.rpc'));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x27')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x28')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/pause/pause.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x29')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x2a')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x2b')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x2c')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x2d')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/intSugarcrmAccount/intSugarcrmAccount.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/intDeskAccount/intDeskAccount.rpc'));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x2e')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x2f')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/intFreshdeskAccount/intFreshdeskAccount.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x30')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x31')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x32')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x33')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x34')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/smsQueueReport/smsQueueReport.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x35')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require('../api/squareReportDetail/squareReportDetail.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x36')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x37')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x38')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x39')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x3a')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x3b')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x3c')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x3d')));_0x1a856d=_['merge'](_0x1a856d,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x3e')));_0x1a856d=_['merge'](_0x1a856d,require(_0x4f41('0x3f')));_0x1a856d=_[_0x4f41('0x5')](_0x1a856d,require(_0x4f41('0x40')));var _0x4f1224=jayson[_0x4f41('0x41')](_0x1a856d)[_0x4f41('0x42')]();var _0x5b62a8=config[_0x4f41('0x43')][_0x4f41('0x44')]||config[_0x4f41('0x44')]+0x1;var _0x39a779=config[_0x4f41('0x43')]['ip']||_0x4f41('0x45');_0x4f1224['on'](_0x4f41('0x46'),function(_0x10060d){return _0x5576df(_0x10060d);});_0x4f1224[_0x4f41('0x4')](_0x5b62a8,_0x39a779,function(){console[_0x4f41('0x47')]('Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!',_0x39a779,_0x5b62a8);require(_0x4f41('0x48'))[_0x4f41('0x49')]();return _0x32fdc9(_0x4f41('0x4a')+_0x39a779+':'+_0x5b62a8);});});}; \ No newline at end of file +var _0x8c87=['../api/trigger/trigger.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappInteraction/whatsappInteraction.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','server','http','rpc','port','localhost','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','listen','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatQueue/chatQueue.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/template/template.rpc'];(function(_0x53c68,_0x375dc8){var _0x7b161f=function(_0x28e8a3){while(--_0x28e8a3){_0x53c68['push'](_0x53c68['shift']());}};_0x7b161f(++_0x375dc8);}(_0x8c87,0x1e3));var _0x78c8=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0x8c87[_0xf50820];return _0x2a9b10;};'use strict';var jayson=require(_0x78c8('0x0'));var BPromise=require(_0x78c8('0x1'));var _=require(_0x78c8('0x2'));var config=require('../config/environment');exports[_0x78c8('0x3')]=function(){return new BPromise(function(_0x28fec8,_0x4f9235){var _0xe15709={};_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x5')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x6')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x7')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x8')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x9')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/voiceDialReport/voiceDialReport.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0xa')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0xb')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0xc')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0xd')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0xe')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0xf')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x10')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x11')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x12')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/mailInteraction/mailInteraction.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x13')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x14')));_0xe15709=_['merge'](_0xe15709,require('../api/mailQueueReport/mailQueueReport.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x15')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x16')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x17')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x18')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x19')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/faxQueueReport/faxQueueReport.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x1a')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x1b')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x1c')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/smsQueue/smsQueue.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x1d')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x1e')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x1f')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x20')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x21')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/chatInteraction/chatInteraction.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/chatMessage/chatMessage.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x22')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/cmContact/cmContact.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x23')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/cmHopperFinal/cmHopperFinal.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x24')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x25')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x26')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x27')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x28')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x29')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x2a')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/variable/variable.rpc'));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x2b')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x2c')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x2d')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x2e')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x2f')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x30')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x31')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x32')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x33')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x34')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x35')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x36')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x37')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/squareReportDetail/squareReportDetail.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x38')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x39')));_0xe15709=_['merge'](_0xe15709,require('../api/squareRecording/squareRecording.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x3a')));_0xe15709=_['merge'](_0xe15709,require(_0x78c8('0x3b')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x3c')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x3d')));_0xe15709=_['merge'](_0xe15709,require('../api/whatsappAccount/whatsappAccount.rpc'));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x3e')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x3f')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require(_0x78c8('0x40')));_0xe15709=_[_0x78c8('0x4')](_0xe15709,require('../api/whatsappQueue/whatsappQueue.rpc'));var _0x885d7f=jayson[_0x78c8('0x41')](_0xe15709)[_0x78c8('0x42')]();var _0xc9c7cc=config[_0x78c8('0x43')]['port']||config[_0x78c8('0x44')]+0x1;var _0x178dcc=config[_0x78c8('0x43')]['ip']||_0x78c8('0x45');_0x885d7f['on']('error',function(_0x39e3cb){return _0x4f9235(_0x39e3cb);});_0x885d7f[_0x78c8('0x3')](_0xc9c7cc,_0x178dcc,function(){console[_0x78c8('0x46')](_0x78c8('0x47'),_0x178dcc,_0xc9c7cc);require(_0x78c8('0x48'))[_0x78c8('0x49')]();return _0x28fec8(_0x78c8('0x4a')+_0x178dcc+':'+_0xc9c7cc);});});}; \ No newline at end of file diff --git a/server/services/agi/channel.js b/server/services/agi/channel.js index 17a3bf9..dba4db9 100644 --- a/server/services/agi/channel.js +++ b/server/services/agi/channel.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['no\x20code','replace','result=','indexOf','substr','startsWith','length','match','error','E_AGI_SOCKET_ERROR','code','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command','inherits','prototype','sendRequest','sync','ANSWER','getData','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','setContext','SET\x20CONTEXT\x20%s','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','isNumber','SET\x20VARIABLE\x20%s\x20\x22%s\x22','toString','SAY\x20NUMBER\x20%s\x20%s','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','setExtension','noop','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22','wav','BEEP','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','agi','AGI','wait','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','exports','events','EventEmitter','./reply','./error','setEncoding','utf8','setTimeout','emit','ready','toLowerCase','hangup','substring','520\x20End\x20of\x20proper','function'];(function(_0x5cbf0e,_0x4cd140){var _0x1c76f8=function(_0xcc9be4){while(--_0xcc9be4){_0x5cbf0e['push'](_0x5cbf0e['shift']());}};_0x1c76f8(++_0x4cd140);}(_0x9c44,0x178));var _0x49c4=function(_0x273c39,_0x1052e6){_0x273c39=_0x273c39-0x0;var _0x46d6b5=_0x9c44[_0x273c39];return _0x46d6b5;};'use strict';var util=require('util');var _=require('lodash');var EventEmitter=require(_0x49c4('0x0'))[_0x49c4('0x1')];var AGIReply=require(_0x49c4('0x2'));var AGIError=require(_0x49c4('0x3'));function AGIChannel(_0x455700){var _0x2ad237=this,_0x4e0313=new AGIReply(),_0x4941f1=![],_0x41a183={};EventEmitter['call'](_0x2ad237);_0x455700[_0x49c4('0x4')](_0x49c4('0x5'));_0x455700[_0x49c4('0x6')](0x8*0x3c*0x3c*0x3e8);_0x4e0313[_0x49c4('0x4')](_0x49c4('0x5'));_0x4e0313['on']('headers',function(_0x11c586){for(var _0x42e4f8 in _0x11c586){_0x2ad237[_0x42e4f8]=_0x11c586[_0x42e4f8];}_0x2ad237[_0x49c4('0x7')](_0x49c4('0x8'));});_0x4e0313['on']('line',function(_0x5ab4a3){if(_0x5ab4a3[_0x49c4('0x9')]()==_0x49c4('0xa')){_0x2ad237['emit'](_0x49c4('0xa'));return;}if(_0x5ab4a3[_0x49c4('0xb')](0x0,0xb)=='520-Invalid'){_0x4941f1=!![];}if(_0x4941f1){_0x41a183['rx']+=_0x5ab4a3+'\x0a';if(_0x5ab4a3['search'](_0x49c4('0xc'))!=-0x1){_0x4941f1=![];}}else{_0x41a183['rx']=_0x5ab4a3;}if(_0x4941f1){return;}if(typeof _0x41a183['cb']==_0x49c4('0xd')){var _0x5487cd=_0x41a183['rx']['substring'](0x0,0x3),_0x7df3a9=null,_0x403bfb=null;_0x5487cd=parseInt(_0x5487cd);if(isNaN(_0x5487cd)){_0x41a183['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x49c4('0xe')});return;}if(_0x5487cd!=0xc8){_0x41a183['cb'](null,{'code':_0x5487cd,'result':-0x1,'extra':'KO'});return;}_0x7df3a9=_0x41a183['rx'][_0x49c4('0xb')](0x4)[_0x49c4('0xf')](_0x49c4('0x10'),'');if(_0x7df3a9[_0x49c4('0x11')]('\x20')!=-0x1){_0x7df3a9=_0x7df3a9[_0x49c4('0x12')](0x0,_0x7df3a9[_0x49c4('0x11')]('\x20'));}if(_[_0x49c4('0x13')](_0x7df3a9,'-1')){_0x7df3a9=parseInt(_0x7df3a9);}_0x403bfb=_0x41a183['rx']['split']('\x20');if(_0x403bfb[_0x49c4('0x14')]==0x3){_0x403bfb=_0x403bfb[0x2][_0x49c4('0xb')](0x1,_0x403bfb[0x2][_0x49c4('0x14')]-0x1);}else if(_0x403bfb[_0x49c4('0x14')]>0x3){var _0x2abc78=/\((.+)\)/;var _0x53e3a2=_0x41a183['rx'][_0x49c4('0x15')](_0x2abc78);if(_0x53e3a2){_0x403bfb=_0x53e3a2[0x1];}else{_0x403bfb=null;}}else{_0x403bfb=null;}_0x41a183['cb'](null,{'code':_0x5487cd,'result':_0x7df3a9,'extra':_0x403bfb});}});_0x455700['on'](_0x49c4('0x16'),function(_0x4c3253){_0x2ad237['emit'](_0x49c4('0x16'),new AGIError(_0x49c4('0x17'),_0x4c3253[_0x49c4('0x18')]));});_0x455700['on']('close',function(){_0x2ad237[_0x49c4('0x7')]('close',new AGIError(_0x49c4('0x19')));});_0x455700['on'](_0x49c4('0x1a'),function(){_0x2ad237[_0x49c4('0x7')](_0x49c4('0x1a'),new AGIError(_0x49c4('0x1b')));_0x455700[_0x49c4('0x1c')]();});_0x455700[_0x49c4('0x1d')](_0x4e0313);this[_0x49c4('0x1e')]=function(_0x2197d2,_0x578447){var _0x2197d2=_0x2197d2||'',_0x578447=typeof _0x578447==_0x49c4('0xd')?_0x578447:new Function();_0x41a183={'tx':_0x2197d2,'rx':'','cb':_0x578447};_0x455700['write'](_0x2197d2+'\x0a');},this['close']=function(){_0x455700[_0x49c4('0x1c')]();};}util[_0x49c4('0x1f')](AGIChannel,EventEmitter);AGIChannel[_0x49c4('0x20')][_0x49c4('0x21')]=function(_0x4811c4){return this['command'][_0x49c4('0x22')](this,_0x4811c4);};AGIChannel[_0x49c4('0x20')]['answer']=function(){return this[_0x49c4('0x21')](_0x49c4('0x23'));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x24')]=function(_0x531d92,_0x543ea2,_0x449960){_0x531d92=_0x531d92===undefined?'beep':_0x531d92;_0x543ea2=_0x543ea2===undefined?'5':_0x543ea2;_0x449960=_0x449960===undefined?'1':_0x449960;return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x26'),_0x531d92,_0x543ea2*0x3e8,_0x449960));};AGIChannel[_0x49c4('0x20')]['noop']=function(_0x889909){_0x889909=_0x889909||_0x49c4('0x27');return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x28'),_0x889909));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x29')]=function(_0x427b26,_0x17b50f){if(_[_0x49c4('0x2a')](_0x17b50f)){return this[_0x49c4('0x21')](util['format']('EXEC\x20%s\x20%s',_0x427b26,_0x17b50f['join'](',')));}return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x2b'),_0x427b26,_0x17b50f));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x2c')]=function(_0x574fd3){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x2d'),_0x574fd3));};AGIChannel[_0x49c4('0x20')]['setExtension']=function(_0x57a29c){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x2e'),_0x57a29c));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x2f')]=function(_0x4a0c7a){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x30'),_0x4a0c7a));};AGIChannel['prototype']['hangup']=function(){return this[_0x49c4('0x21')](_0x49c4('0x31'));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x32')]=function(_0x2b45a1,_0x2cf897){var _0x1d1557=_[_0x49c4('0x33')](_0x2cf897)||_[_0x49c4('0x34')](_0x2cf897)?_0x2cf897['toString']():_0x2cf897;return this[_0x49c4('0x21')](util['format'](_0x49c4('0x35'),_0x2b45a1,_0x1d1557?_0x1d1557[_0x49c4('0x36')]()[_0x49c4('0xf')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x49c4('0x20')]['sayNumber']=function(_0x335f0c,_0x31f3ff){return this[_0x49c4('0x21')](util['format'](_0x49c4('0x37'),_0x335f0c,_0x31f3ff));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x38')]=function(_0x5e5366,_0x1ba7a0){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x39'),_0x5e5366,_0x1ba7a0));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x3a')]=function(_0x1e506a,_0x4e0663){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x3b'),_0x1e506a,_0x4e0663));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x3c')]=function(_0x29dd5d,_0x1be62d,_0xc9722b){_0x1be62d=_0x1be62d||this[_0x49c4('0x3d')];_0xc9722b=_0xc9722b||0x1;this[_0x49c4('0x2c')](_0x29dd5d);this[_0x49c4('0x3e')](_0x1be62d);this[_0x49c4('0x2f')](_0xc9722b);return this[_0x49c4('0x3f')](util['format'](_0x49c4('0x40'),_0x29dd5d,_0x1be62d,_0xc9722b));};AGIChannel['prototype'][_0x49c4('0x41')]=function(_0x4915bc){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x42'),_0x4915bc));};AGIChannel[_0x49c4('0x20')]['recordFile']=function(_0x4d628a,_0x20490b,_0x1e7bdc,_0x38349b,_0x117151,_0x490823){_0x20490b=_0x20490b||_0x49c4('0x43');_0x1e7bdc=_0x1e7bdc||'';_0x38349b=_0x38349b===undefined?-0x1:_0x38349b==='-1'?-0x1:_0x38349b*0x3e8;_0x117151=_0x117151===undefined?'':'s='+_0x117151;_0x490823=_0x490823?_0x49c4('0x44'):'';return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x45'),_0x4d628a,_0x20490b,_0x1e7bdc,_0x38349b,_0x490823,_0x117151));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x46')]=function(_0x3351c1,_0x3c4a1d){_0x3c4a1d=_0x3c4a1d||'';return this['sendRequest'](util[_0x49c4('0x25')]('STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22',_0x3351c1,_0x3c4a1d));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x47')]=function(_0x301def){return this[_0x49c4('0x29')](_0x49c4('0x48'),_0x301def);};AGIChannel['prototype'][_0x49c4('0x49')]=function(_0x15b674){return this[_0x49c4('0x29')](_0x49c4('0x4a'),_0x15b674);};AGIChannel[_0x49c4('0x20')][_0x49c4('0x16')]=function(_0x9779ef,_0x4d89e0){this[_0x49c4('0x3f')](util['format'](_0x49c4('0x4b'),_0x9779ef['id'],_0x9779ef[_0x49c4('0x4c')],_0x4d89e0));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x49c4('0x4d')]=AGIChannel; \ No newline at end of file +var _0x9c44=['no\x20code','replace','result=','indexOf','substr','startsWith','length','match','error','E_AGI_SOCKET_ERROR','code','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command','inherits','prototype','sendRequest','sync','ANSWER','getData','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','setContext','SET\x20CONTEXT\x20%s','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','isNumber','SET\x20VARIABLE\x20%s\x20\x22%s\x22','toString','SAY\x20NUMBER\x20%s\x20%s','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','setExtension','noop','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22','wav','BEEP','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','agi','AGI','wait','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','exports','events','EventEmitter','./reply','./error','setEncoding','utf8','setTimeout','emit','ready','toLowerCase','hangup','substring','520\x20End\x20of\x20proper','function'];(function(_0x54edc9,_0x345f01){var _0x2ae7a9=function(_0x24a545){while(--_0x24a545){_0x54edc9['push'](_0x54edc9['shift']());}};_0x2ae7a9(++_0x345f01);}(_0x9c44,0x178));var _0x49c4=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x9c44[_0x2d7f0e];return _0x110b07;};'use strict';var util=require('util');var _=require('lodash');var EventEmitter=require(_0x49c4('0x0'))[_0x49c4('0x1')];var AGIReply=require(_0x49c4('0x2'));var AGIError=require(_0x49c4('0x3'));function AGIChannel(_0x455700){var _0x2ad237=this,_0x4e0313=new AGIReply(),_0x4941f1=![],_0x41a183={};EventEmitter['call'](_0x2ad237);_0x455700[_0x49c4('0x4')](_0x49c4('0x5'));_0x455700[_0x49c4('0x6')](0x8*0x3c*0x3c*0x3e8);_0x4e0313[_0x49c4('0x4')](_0x49c4('0x5'));_0x4e0313['on']('headers',function(_0x11c586){for(var _0x42e4f8 in _0x11c586){_0x2ad237[_0x42e4f8]=_0x11c586[_0x42e4f8];}_0x2ad237[_0x49c4('0x7')](_0x49c4('0x8'));});_0x4e0313['on']('line',function(_0x5ab4a3){if(_0x5ab4a3[_0x49c4('0x9')]()==_0x49c4('0xa')){_0x2ad237['emit'](_0x49c4('0xa'));return;}if(_0x5ab4a3[_0x49c4('0xb')](0x0,0xb)=='520-Invalid'){_0x4941f1=!![];}if(_0x4941f1){_0x41a183['rx']+=_0x5ab4a3+'\x0a';if(_0x5ab4a3['search'](_0x49c4('0xc'))!=-0x1){_0x4941f1=![];}}else{_0x41a183['rx']=_0x5ab4a3;}if(_0x4941f1){return;}if(typeof _0x41a183['cb']==_0x49c4('0xd')){var _0x5487cd=_0x41a183['rx']['substring'](0x0,0x3),_0x7df3a9=null,_0x403bfb=null;_0x5487cd=parseInt(_0x5487cd);if(isNaN(_0x5487cd)){_0x41a183['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x49c4('0xe')});return;}if(_0x5487cd!=0xc8){_0x41a183['cb'](null,{'code':_0x5487cd,'result':-0x1,'extra':'KO'});return;}_0x7df3a9=_0x41a183['rx'][_0x49c4('0xb')](0x4)[_0x49c4('0xf')](_0x49c4('0x10'),'');if(_0x7df3a9[_0x49c4('0x11')]('\x20')!=-0x1){_0x7df3a9=_0x7df3a9[_0x49c4('0x12')](0x0,_0x7df3a9[_0x49c4('0x11')]('\x20'));}if(_[_0x49c4('0x13')](_0x7df3a9,'-1')){_0x7df3a9=parseInt(_0x7df3a9);}_0x403bfb=_0x41a183['rx']['split']('\x20');if(_0x403bfb[_0x49c4('0x14')]==0x3){_0x403bfb=_0x403bfb[0x2][_0x49c4('0xb')](0x1,_0x403bfb[0x2][_0x49c4('0x14')]-0x1);}else if(_0x403bfb[_0x49c4('0x14')]>0x3){var _0x2abc78=/\((.+)\)/;var _0x53e3a2=_0x41a183['rx'][_0x49c4('0x15')](_0x2abc78);if(_0x53e3a2){_0x403bfb=_0x53e3a2[0x1];}else{_0x403bfb=null;}}else{_0x403bfb=null;}_0x41a183['cb'](null,{'code':_0x5487cd,'result':_0x7df3a9,'extra':_0x403bfb});}});_0x455700['on'](_0x49c4('0x16'),function(_0x4c3253){_0x2ad237['emit'](_0x49c4('0x16'),new AGIError(_0x49c4('0x17'),_0x4c3253[_0x49c4('0x18')]));});_0x455700['on']('close',function(){_0x2ad237[_0x49c4('0x7')]('close',new AGIError(_0x49c4('0x19')));});_0x455700['on'](_0x49c4('0x1a'),function(){_0x2ad237[_0x49c4('0x7')](_0x49c4('0x1a'),new AGIError(_0x49c4('0x1b')));_0x455700[_0x49c4('0x1c')]();});_0x455700[_0x49c4('0x1d')](_0x4e0313);this[_0x49c4('0x1e')]=function(_0x2197d2,_0x578447){var _0x2197d2=_0x2197d2||'',_0x578447=typeof _0x578447==_0x49c4('0xd')?_0x578447:new Function();_0x41a183={'tx':_0x2197d2,'rx':'','cb':_0x578447};_0x455700['write'](_0x2197d2+'\x0a');},this['close']=function(){_0x455700[_0x49c4('0x1c')]();};}util[_0x49c4('0x1f')](AGIChannel,EventEmitter);AGIChannel[_0x49c4('0x20')][_0x49c4('0x21')]=function(_0x4811c4){return this['command'][_0x49c4('0x22')](this,_0x4811c4);};AGIChannel[_0x49c4('0x20')]['answer']=function(){return this[_0x49c4('0x21')](_0x49c4('0x23'));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x24')]=function(_0x531d92,_0x543ea2,_0x449960){_0x531d92=_0x531d92===undefined?'beep':_0x531d92;_0x543ea2=_0x543ea2===undefined?'5':_0x543ea2;_0x449960=_0x449960===undefined?'1':_0x449960;return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x26'),_0x531d92,_0x543ea2*0x3e8,_0x449960));};AGIChannel[_0x49c4('0x20')]['noop']=function(_0x889909){_0x889909=_0x889909||_0x49c4('0x27');return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x28'),_0x889909));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x29')]=function(_0x427b26,_0x17b50f){if(_[_0x49c4('0x2a')](_0x17b50f)){return this[_0x49c4('0x21')](util['format']('EXEC\x20%s\x20%s',_0x427b26,_0x17b50f['join'](',')));}return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x2b'),_0x427b26,_0x17b50f));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x2c')]=function(_0x574fd3){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x2d'),_0x574fd3));};AGIChannel[_0x49c4('0x20')]['setExtension']=function(_0x57a29c){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x2e'),_0x57a29c));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x2f')]=function(_0x4a0c7a){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x30'),_0x4a0c7a));};AGIChannel['prototype']['hangup']=function(){return this[_0x49c4('0x21')](_0x49c4('0x31'));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x32')]=function(_0x2b45a1,_0x2cf897){var _0x1d1557=_[_0x49c4('0x33')](_0x2cf897)||_[_0x49c4('0x34')](_0x2cf897)?_0x2cf897['toString']():_0x2cf897;return this[_0x49c4('0x21')](util['format'](_0x49c4('0x35'),_0x2b45a1,_0x1d1557?_0x1d1557[_0x49c4('0x36')]()[_0x49c4('0xf')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x49c4('0x20')]['sayNumber']=function(_0x335f0c,_0x31f3ff){return this[_0x49c4('0x21')](util['format'](_0x49c4('0x37'),_0x335f0c,_0x31f3ff));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x38')]=function(_0x5e5366,_0x1ba7a0){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x39'),_0x5e5366,_0x1ba7a0));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x3a')]=function(_0x1e506a,_0x4e0663){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x3b'),_0x1e506a,_0x4e0663));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x3c')]=function(_0x29dd5d,_0x1be62d,_0xc9722b){_0x1be62d=_0x1be62d||this[_0x49c4('0x3d')];_0xc9722b=_0xc9722b||0x1;this[_0x49c4('0x2c')](_0x29dd5d);this[_0x49c4('0x3e')](_0x1be62d);this[_0x49c4('0x2f')](_0xc9722b);return this[_0x49c4('0x3f')](util['format'](_0x49c4('0x40'),_0x29dd5d,_0x1be62d,_0xc9722b));};AGIChannel['prototype'][_0x49c4('0x41')]=function(_0x4915bc){return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x42'),_0x4915bc));};AGIChannel[_0x49c4('0x20')]['recordFile']=function(_0x4d628a,_0x20490b,_0x1e7bdc,_0x38349b,_0x117151,_0x490823){_0x20490b=_0x20490b||_0x49c4('0x43');_0x1e7bdc=_0x1e7bdc||'';_0x38349b=_0x38349b===undefined?-0x1:_0x38349b==='-1'?-0x1:_0x38349b*0x3e8;_0x117151=_0x117151===undefined?'':'s='+_0x117151;_0x490823=_0x490823?_0x49c4('0x44'):'';return this[_0x49c4('0x21')](util[_0x49c4('0x25')](_0x49c4('0x45'),_0x4d628a,_0x20490b,_0x1e7bdc,_0x38349b,_0x490823,_0x117151));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x46')]=function(_0x3351c1,_0x3c4a1d){_0x3c4a1d=_0x3c4a1d||'';return this['sendRequest'](util[_0x49c4('0x25')]('STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22',_0x3351c1,_0x3c4a1d));};AGIChannel[_0x49c4('0x20')][_0x49c4('0x47')]=function(_0x301def){return this[_0x49c4('0x29')](_0x49c4('0x48'),_0x301def);};AGIChannel['prototype'][_0x49c4('0x49')]=function(_0x15b674){return this[_0x49c4('0x29')](_0x49c4('0x4a'),_0x15b674);};AGIChannel[_0x49c4('0x20')][_0x49c4('0x16')]=function(_0x9779ef,_0x4d89e0){this[_0x49c4('0x3f')](util['format'](_0x49c4('0x4b'),_0x9779ef['id'],_0x9779ef[_0x49c4('0x4c')],_0x4d89e0));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x49c4('0x4d')]=AGIChannel; \ No newline at end of file diff --git a/server/services/agi/error.js b/server/services/agi/error.js index fe6ace3..7de274f 100644 --- a/server/services/agi/error.js +++ b/server/services/agi/error.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd58c=['apply','name','util','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20closed.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','format'];(function(_0x188ede,_0x157bd5){var _0x2792c8=function(_0x182b61){while(--_0x182b61){_0x188ede['push'](_0x188ede['shift']());}};_0x2792c8(++_0x157bd5);}(_0xd58c,0xb6));var _0xcd58=function(_0x4bc21e,_0x54a1a){_0x4bc21e=_0x4bc21e-0x0;var _0x110e93=_0xd58c[_0x4bc21e];return _0x110e93;};'use strict';var util=require(_0xcd58('0x0'));var error={'E_AGI_UNDEFINED':_0xcd58('0x1'),'E_AGI_ARGUMENT_PORT':_0xcd58('0x2'),'E_AGI_SERVER_ERROR':'Server\x20error.\x20Code:\x20%s.','E_AGI_SERVER_CLOSE':_0xcd58('0x3'),'E_AGI_SERVER_MAXCONNECTION':'[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','E_AGI_SERVER_VOICE_DISABLED':_0xcd58('0x4'),'E_AGI_SOCKET_ERROR':'Socket\x20error.\x20Code:\x20%s.','E_AGI_SOCKET_CLOSE':_0xcd58('0x5'),'E_AGI_SOCKET_TIMEOUT':_0xcd58('0x6'),'E_AGI_COMMAND_EMPTY':_0xcd58('0x7'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0xcd58('0x8'),'E_AGI_IVR_ENTRY':_0xcd58('0x9')};function AGIError(_0x599c02){var _0x599c02=_0x599c02||null,_0x3f2c97=_0x3f2c97||[],_0x31bf4e=0x1,_0x43a501='';if(!error[_0x599c02]){_0x599c02=_0xcd58('0xa');}_0x3f2c97[_0xcd58('0xb')](error[_0x599c02]);while(arguments[_0x31bf4e]){_0x3f2c97['push'](arguments[_0x31bf4e]);_0x31bf4e++;}_0x43a501=util[_0xcd58('0xc')][_0xcd58('0xd')](util,_0x3f2c97);this['message']=_0x43a501;this[_0xcd58('0xe')]=_0x599c02;}module['exports']=AGIError; \ No newline at end of file +var _0x7884=['Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','format','message','exports','util'];(function(_0x42235f,_0x5dabfd){var _0x3f5fab=function(_0x358fd7){while(--_0x358fd7){_0x42235f['push'](_0x42235f['shift']());}};_0x3f5fab(++_0x5dabfd);}(_0x7884,0x10d));var _0x4788=function(_0x4fbb3e,_0x55785f){_0x4fbb3e=_0x4fbb3e-0x0;var _0x1eb197=_0x7884[_0x4fbb3e];return _0x1eb197;};'use strict';var util=require(_0x4788('0x0'));var error={'E_AGI_UNDEFINED':_0x4788('0x1'),'E_AGI_ARGUMENT_PORT':_0x4788('0x2'),'E_AGI_SERVER_ERROR':'Server\x20error.\x20Code:\x20%s.','E_AGI_SERVER_CLOSE':'Server\x20closed.','E_AGI_SERVER_MAXCONNECTION':_0x4788('0x3'),'E_AGI_SERVER_VOICE_DISABLED':_0x4788('0x4'),'E_AGI_SOCKET_ERROR':_0x4788('0x5'),'E_AGI_SOCKET_CLOSE':_0x4788('0x6'),'E_AGI_SOCKET_TIMEOUT':_0x4788('0x7'),'E_AGI_COMMAND_EMPTY':'Empty\x20command.','E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x4788('0x8'),'E_AGI_IVR_ENTRY':_0x4788('0x9')};function AGIError(_0xaf9370){var _0xaf9370=_0xaf9370||null,_0x47916e=_0x47916e||[],_0x796e6f=0x1,_0x4e910b='';if(!error[_0xaf9370]){_0xaf9370=_0x4788('0xa');}_0x47916e[_0x4788('0xb')](error[_0xaf9370]);while(arguments[_0x796e6f]){_0x47916e['push'](arguments[_0x796e6f]);_0x796e6f++;}_0x4e910b=util[_0x4788('0xc')]['apply'](util,_0x47916e);this[_0x4788('0xd')]=_0x4e910b;this['name']=_0xaf9370;}module[_0x4788('0xe')]=AGIError; \ No newline at end of file diff --git a/server/services/agi/graph/index.js b/server/services/agi/graph/index.js index f444d00..099a589 100644 --- a/server/services/agi/graph/index.js +++ b/server/services/agi/graph/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb78e=['numberOfEdges','prototype','addVertex','addEdge','push','size','relations','getVertex','traverseBFS','info','no\x20vertex\x20found','condition','split','agicommand','target','default','length','vswitch','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','../../../config/logger','menu','getdigits','getsecretdigits','vertices','edges'];(function(_0x2cb7ef,_0x4dd339){var _0x5ce2e6=function(_0x3ff1b2){while(--_0x3ff1b2){_0x2cb7ef['push'](_0x2cb7ef['shift']());}};_0x5ce2e6(++_0x4dd339);}(_0xb78e,0x1c9));var _0xeb78=function(_0x5646b8,_0xdac36){_0x5646b8=_0x5646b8-0x0;var _0x5f2776=_0xb78e[_0x5646b8];return _0x5f2776;};'use strict';var _=require(_0xeb78('0x0'));var logger=require(_0xeb78('0x1'))('agi');var verticesWithRetry=[_0xeb78('0x2'),_0xeb78('0x3'),_0xeb78('0x4')];var Graph=function(){this[_0xeb78('0x5')]={};this[_0xeb78('0x6')]={};this[_0xeb78('0x7')]=0x0;};Graph[_0xeb78('0x8')][_0xeb78('0x9')]=function(_0x57ec6b){this[_0xeb78('0x5')][_0x57ec6b['id']]=_0x57ec6b;this[_0xeb78('0x6')][_0x57ec6b['id']]=[];};Graph[_0xeb78('0x8')][_0xeb78('0xa')]=function(_0x2b7925,_0x36963f,_0x5259aa){this['edges'][_0x2b7925][_0xeb78('0xb')]({'target':_0x36963f,'condition':_0x5259aa});this[_0xeb78('0x7')]+=0x1;};Graph[_0xeb78('0x8')][_0xeb78('0xc')]=function(){return _[_0xeb78('0xc')](this[_0xeb78('0x5')]);};Graph[_0xeb78('0x8')][_0xeb78('0xd')]=function(){return this[_0xeb78('0x7')];};Graph['prototype'][_0xeb78('0xe')]=function(_0x32a8d0){return this[_0xeb78('0x5')][_0x32a8d0];};Graph[_0xeb78('0x8')][_0xeb78('0xf')]=function(_0x28c58c,_0x1b6a87){if(!this[_0xeb78('0x5')][_0x28c58c]){return logger[_0xeb78('0x10')](_0xeb78('0x11'));}var _0x5d50cf=_0x1b6a87(this[_0xeb78('0x5')][_0x28c58c]);if(!_0x5d50cf){return logger[_0xeb78('0x10')]('stop\x20traverse');}if(this['edges'][_0x28c58c]['length']===0x0){return logger[_0xeb78('0x10')]('no\x20edge/s\x20available');}for(var _0xa28d5e=0x0,_0x247cb1=[],_0x49123d=![];_0xa28d5e\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','callerid','dnid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','uniqueid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','evtHangup','toJson','mxGraphModel','agicommand','hasOwnProperty','retry','maxRetry','addVertex','omit','mxCell','isArray','length','source','target','then','createSquareReport','indexOf','agi_','substring','inspect','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','timeout','hangup','sync','production','root','YYYY-MM-DD\x20HH:mm:ss','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','traverseBFS','start','clear','vertex','context','extension','priority','response','isUndefined','result','toString','finally','agicommand\x20not\x20found','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','Project\x20%s\x20not\x20published','continueAt','Project\x20%s\x20not\x20found','callysquare','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','connection','xml2json','syncho','util','../../config/environment','agi','./rpc','./graph','defaults','127.0.0.1','nextTick','error','stack','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','message','[%s]\x20%s'];(function(_0x54180a,_0x5c4772){var _0x3f1418=function(_0x463709){while(--_0x463709){_0x54180a['push'](_0x54180a['shift']());}};_0x3f1418(++_0x5c4772);}(_0x7f42,0x1dd));var _0x27f4=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0x7f42[_0x46e363];return _0x3fb059;};'use strict';var parser=require(_0x27f4('0x0'));var _=require('lodash');var syncho=require(_0x27f4('0x1'));var util=require(_0x27f4('0x2'));var moment=require('moment');var config=require(_0x27f4('0x3'));var logger=require('../../config/logger')(_0x27f4('0x4'));var utilLicense=require('../../config/license/util');var rpc=require(_0x27f4('0x5'));var mailRpc=require('./mailRpc');var Graph=require(_0x27f4('0x6'));var Vertices=require('./vertices');var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config[_0x27f4('0x4')]=_[_0x27f4('0x7')](config[_0x27f4('0x4')],{'ip':_0x27f4('0x8'),'port':0x11dd});function connectionHandler(_0x2a4b6f){process[_0x27f4('0x9')](function(){syncho(function(){try{setChannelVariables(_0x2a4b6f);agiHandler(_0x2a4b6f);}catch(_0x458687){logger[_0x27f4('0xa')](_0x458687[_0x27f4('0xb')]);}});});}function listeningHandler(){console[_0x27f4('0xc')](_0x27f4('0xd'),config[_0x27f4('0x4')][_0x27f4('0xe')]);logger[_0x27f4('0xf')](util[_0x27f4('0x10')](_0x27f4('0x11'),config[_0x27f4('0x4')]['ip'],config[_0x27f4('0x4')]['port']));}function errorHandler(_0x523255){if(_0x523255&&_0x523255[_0x27f4('0x12')]&&_0x523255[_0x27f4('0x13')]){logger[_0x27f4('0xa')](util[_0x27f4('0x10')](_0x27f4('0x14'),_0x523255[_0x27f4('0x12')],_0x523255[_0x27f4('0x13')]));}else{logger[_0x27f4('0xa')](util['format']('[ERROR]\x20%s',_0x523255[_0x27f4('0xb')]));}}function closeHandler(){logger[_0x27f4('0xf')](util[_0x27f4('0x10')](_0x27f4('0x15'),this['arg_1'],this[_0x27f4('0x16')],this[_0x27f4('0x17')],this[_0x27f4('0x18')],this['uniqueid']));try{createSquareReport(this);}catch(_0x3203af){logger[_0x27f4('0xa')](_0x3203af[_0x27f4('0xb')]);}}function timeoutHandler(){logger['info'](util[_0x27f4('0x10')](_0x27f4('0x19'),this['arg_1'],this['calleridname'],this[_0x27f4('0x17')],this[_0x27f4('0x18')],this[_0x27f4('0x1a')]));}function hangupHandler(){logger[_0x27f4('0xf')](util[_0x27f4('0x10')](_0x27f4('0x1b'),this[_0x27f4('0x1c')],this[_0x27f4('0x16')],this[_0x27f4('0x17')],this[_0x27f4('0x18')],this[_0x27f4('0x1a')]));this[_0x27f4('0x1d')]=!![];}function getRoot(_0x22f794){return parser[_0x27f4('0x1e')](_0x22f794,{'object':!![]})[_0x27f4('0x1f')]['root'];}function addVertex(_0xe69de0,_0x112803,_0x202e8f){_0x112803[_0x27f4('0x20')]=_0x202e8f;if(_0x112803[_0x27f4('0x21')](_0x27f4('0x22'))){_0x112803[_0x27f4('0x23')]=parseInt(_0x112803[_0x27f4('0x22')],0xa);}_0xe69de0[_0x27f4('0x24')](_[_0x27f4('0x25')](_0x112803,_0x27f4('0x26')));}function initGraph(_0x1e24c3,_0x167574){var _0x400d8d=new Graph();for(var _0x2b9e38 in _0x1e24c3){if(_0x1e24c3[_0x27f4('0x21')](_0x2b9e38)){if(_[_0x27f4('0x27')](_0x1e24c3[_0x2b9e38])){for(var _0x56b2c6=0x0;_0x56b2c6<_0x1e24c3[_0x2b9e38][_0x27f4('0x28')];_0x56b2c6+=0x1){addVertex(_0x400d8d,_0x1e24c3[_0x2b9e38][_0x56b2c6],_0x2b9e38);}}else{addVertex(_0x400d8d,_0x1e24c3[_0x2b9e38],_0x2b9e38);}}}for(var _0x566d28=0x0;_0x566d28<_0x167574[_0x27f4('0x28')];_0x566d28+=0x1){if(_0x167574[_0x566d28][_0x27f4('0x29')]&&_0x167574[_0x566d28][_0x27f4('0x2a')]){_0x400d8d['addEdge'](_0x167574[_0x566d28][_0x27f4('0x29')],_0x167574[_0x566d28][_0x27f4('0x2a')],_0x167574[_0x566d28]['value']);}}return _0x400d8d;}function getSquareProject(_0x350767,_0x26a2c2){rpc['getSquareProject'](_0x350767)[_0x27f4('0x2b')](function(_0x2079fb){_0x26a2c2(null,_0x2079fb);})['catch'](function(_0x37f6a3){_0x26a2c2(null,_0x37f6a3);});}function createSquareReport(_0x11b1c2,_0x4ed387){rpc[_0x27f4('0x2c')](_0x11b1c2)[_0x27f4('0x2b')](function(_0x1f2f16){if(_0x4ed387){_0x4ed387(null,_0x1f2f16);}})['catch'](function(_0x5d3bc6){if(_0x4ed387){_0x4ed387(null,_0x5d3bc6);}});}function setChannelVariables(_0x50e6be){for(var _0x522bc8 in _0x50e6be){if(_0x50e6be[_0x27f4('0x21')](_0x522bc8)){if(_0x522bc8[_0x27f4('0x2d')](_0x27f4('0x2e'))===0x0){_0x50e6be[_0x522bc8[_0x27f4('0x2f')](0x4)]=_0x50e6be[_0x522bc8];delete _0x50e6be[_0x522bc8];}}}}function getLogFromObject(_0x2ce23e){return util[_0x27f4('0x30')](_0x2ce23e,{'showHidden':![],'depth':null});}function agiHandler(_0x237f44){var _0x1b3beb,_0x34b875,_0x3d0865,_0x280b2a,_0x4b32fa;logger[_0x27f4('0x31')](_0x27f4('0x32'),JSON[_0x27f4('0x33')](_0x237f44,null,0x2));logger['info'](util[_0x27f4('0x10')](_0x27f4('0x34'),_0x237f44[_0x27f4('0x1c')],_0x237f44[_0x27f4('0x16')],_0x237f44[_0x27f4('0x17')],_0x237f44[_0x27f4('0x18')],_0x237f44[_0x27f4('0x1a')]));_0x237f44['on'](_0x27f4('0xa'),errorHandler);_0x237f44['on'](_0x27f4('0x35'),closeHandler);_0x237f44['on'](_0x27f4('0x36'),timeoutHandler);_0x237f44[_0x27f4('0x1d')]=![];_0x237f44['on'](_0x27f4('0x37'),hangupHandler);var _0x63c4f2=getSquareProject[_0x27f4('0x38')](null,_0x237f44[_0x27f4('0x1c')]);if(_0x63c4f2){if(_0x63c4f2[_0x27f4('0x39')]){_0x1b3beb=getRoot(_0x63c4f2['production']);if(_0x1b3beb&&_0x1b3beb['start']){logger[_0x27f4('0x31')](_0x27f4('0x3a'),JSON[_0x27f4('0x33')](_0x1b3beb,null,0x2));_0x237f44['joinAt']=moment()[_0x27f4('0x10')](_0x27f4('0x3b'));_0x34b875=initGraph(_[_0x27f4('0x25')](_0x1b3beb,'mxCell'),_0x1b3beb[_0x27f4('0x26')]);_0x3d0865=new Vertices(_0x237f44,rpc,mailRpc);logger[_0x27f4('0xf')](util['format'](_0x27f4('0x3c'),_0x237f44[_0x27f4('0x1c')],_0x237f44[_0x27f4('0x16')],_0x237f44[_0x27f4('0x17')],_0x237f44[_0x27f4('0x18')],_0x237f44['uniqueid']));_0x34b875[_0x27f4('0x3d')](_0x1b3beb[_0x27f4('0x3e')]['id'],function(_0x441a1b){try{_0x441a1b=_0x3d0865[_0x27f4('0x3f')](_0x441a1b);logger['debug'](_0x27f4('0x40'),JSON[_0x27f4('0x33')](_0x441a1b,null,0x2));if(_0x441a1b[_0x27f4('0x20')]==='gotoc'){logger[_0x27f4('0xf')]('gotoc\x20block\x20stop\x20traverse\x20BFS');_0x237f44[_0x27f4('0x41')]=_0x441a1b[_0x27f4('0x41')]||_0x237f44[_0x27f4('0x41')];_0x237f44[_0x27f4('0x42')]=_0x441a1b['extension'];_0x237f44[_0x27f4('0x43')]=_0x441a1b[_0x27f4('0x43')]?_0x441a1b[_0x27f4('0x43')]-0x1:0x1;return null;}else if(_0x441a1b&&_0x3d0865[_0x441a1b[_0x27f4('0x20')]]){_0x4b32fa=_0x3d0865[_0x441a1b[_0x27f4('0x20')]](_0x441a1b);logger['info'](_0x27f4('0x44'),JSON['stringify'](_0x4b32fa,null,0x2));if(_0x4b32fa&&_0x4b32fa['code']===AGI_CODE_SUCCESS&&_0x4b32fa['result']!==AGI_RESULT_ERROR&&!_0x237f44[_0x27f4('0x1d')]){logger[_0x27f4('0x31')](_0x27f4('0x44'),getLogFromObject(_0x4b32fa));return _[_0x27f4('0x45')](_0x4b32fa['result'])?null:_0x4b32fa[_0x27f4('0x46')][_0x27f4('0x47')]();}else{logger[_0x27f4('0xa')](_0x27f4('0x44'),getLogFromObject(_0x4b32fa));return null;}}else{logger['error']('agicommand\x20not\x20found');return null;}}catch(_0x19e3b8){logger[_0x27f4('0xa')](_0x19e3b8[_0x27f4('0xb')]);return null;}});if(_0x1b3beb[_0x27f4('0x48')]){logger['info'](util[_0x27f4('0x10')]('[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x237f44['arg_1'],_0x237f44['calleridname'],_0x237f44[_0x27f4('0x17')],_0x237f44['dnid'],_0x237f44[_0x27f4('0x1a')]));_0x34b875[_0x27f4('0x3d')](_0x1b3beb['finally']['id'],function(_0x1c35fc){try{_0x1c35fc=_0x3d0865[_0x27f4('0x3f')](_0x1c35fc);logger['debug'](_0x27f4('0x40'),JSON[_0x27f4('0x33')](_0x1c35fc,null,0x2));if(_0x1c35fc&&_0x3d0865[_0x1c35fc[_0x27f4('0x20')]]){_0x4b32fa=_0x3d0865[_0x1c35fc[_0x27f4('0x20')]](_0x1c35fc);if(_0x4b32fa){logger[_0x27f4('0x31')](_0x27f4('0x44'),getLogFromObject(_0x4b32fa));return _[_0x27f4('0x45')](_0x4b32fa[_0x27f4('0x46')])?null:_0x4b32fa['result'][_0x27f4('0x47')]();}else{logger['error'](_0x27f4('0x44'),getLogFromObject(_0x4b32fa));return null;}}else{logger[_0x27f4('0xa')](_0x27f4('0x49'));return null;}}catch(_0x5b4da8){logger['error'](_0x5b4da8[_0x27f4('0xb')]);return null;}});}logger[_0x27f4('0xf')](util['format'](_0x27f4('0x4a'),_0x237f44['arg_1'],_0x237f44[_0x27f4('0x16')],_0x237f44[_0x27f4('0x17')],_0x237f44[_0x27f4('0x18')],_0x237f44[_0x27f4('0x1a')]));logger[_0x27f4('0xf')](util[_0x27f4('0x10')](_0x27f4('0x4b'),_0x237f44['context'],_0x237f44['extension'],parseInt(_0x237f44[_0x27f4('0x43')],0xa)+0x1));_0x237f44['continueAt'](_0x237f44[_0x27f4('0x41')],_0x237f44[_0x27f4('0x42')],parseInt(_0x237f44['priority'],0xa)+0x1);_0x237f44[_0x27f4('0x35')]();}}else{logger[_0x27f4('0xa')](util[_0x27f4('0x10')](_0x27f4('0x4c'),_0x237f44[_0x27f4('0x1c')]));_0x237f44[_0x27f4('0x4d')](_0x237f44[_0x27f4('0x41')],_0x237f44[_0x27f4('0x42')],parseInt(_0x237f44[_0x27f4('0x43')],0xa)+0x1);_0x237f44[_0x27f4('0x35')]();}}else{logger[_0x27f4('0xa')](util[_0x27f4('0x10')](_0x27f4('0x4e'),_0x237f44[_0x27f4('0x1c')]));_0x237f44[_0x27f4('0x4d')](_0x237f44['context'],_0x237f44[_0x27f4('0x42')],parseInt(_0x237f44[_0x27f4('0x43')],0xa)+0x1);_0x237f44['close']();}}function main(){var _0x46b658;return utilLicense['getLicense']()['then'](function(_0x2de7ac){if(_0x2de7ac){if(_0x2de7ac['voice']){if(_0x2de7ac['callysquare']&&_0x2de7ac['callysquare']>0x0){logger['info'](util[_0x27f4('0x10')]('[LICENSE]\x20CHANNELS:\x20%s',_0x2de7ac[_0x27f4('0x4f')]));_0x46b658=_0x2de7ac['callysquare'];}else{logger[_0x27f4('0xf')](_0x27f4('0x50'));}}else{logger[_0x27f4('0xf')](_0x27f4('0x51'));_0x46b658=-0x1;}}})['catch'](function(_0xcf003d){logger[_0x27f4('0xa')]('[LICENSE]',_0xcf003d[_0x27f4('0xb')]);})[_0x27f4('0x48')](function(){var _0x4a3bcb=require('./server')(config[_0x27f4('0x4')][_0x27f4('0xe')],config['agi']['ip'],_0x46b658);_0x4a3bcb['on'](_0x27f4('0xa'),errorHandler);_0x4a3bcb['on']('listening',listeningHandler);_0x4a3bcb['on'](_0x27f4('0x52'),connectionHandler);_0x4a3bcb['on'](_0x27f4('0x35'),closeHandler);});}main(); \ No newline at end of file +var _0x84e7=['traverseBFS','clear','agicommand','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','isUndefined','result','agicommand\x20not\x20found','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','finally','vertex','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','continueAt','close','Project\x20%s\x20not\x20published','Project\x20%s\x20not\x20found','getLicense','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]','./server','listening','connection','lodash','syncho','moment','../../config/environment','agi','../../config/license/util','./rpc','./mailRpc','./graph','./vertices','defaults','127.0.0.1','error','stack','log','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','message','[%s]\x20%s','[ERROR]\x20%s','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','dnid','uniqueid','calleridname','callerid','toJson','mxGraphModel','root','hasOwnProperty','retry','omit','isArray','length','source','target','value','getSquareProject','then','catch','createSquareReport','indexOf','agi_','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','evtHangup','hangup','sync','production','start','debug','joinAt','mxCell','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0x84e7,0x122));var _0x784e=function(_0x161450,_0x62612){_0x161450=_0x161450-0x0;var _0x222835=_0x84e7[_0x161450];return _0x222835;};'use strict';var parser=require('xml2json');var _=require(_0x784e('0x0'));var syncho=require(_0x784e('0x1'));var util=require('util');var moment=require(_0x784e('0x2'));var config=require(_0x784e('0x3'));var logger=require('../../config/logger')(_0x784e('0x4'));var utilLicense=require(_0x784e('0x5'));var rpc=require(_0x784e('0x6'));var mailRpc=require(_0x784e('0x7'));var Graph=require(_0x784e('0x8'));var Vertices=require(_0x784e('0x9'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config['agi']=_[_0x784e('0xa')](config['agi'],{'ip':_0x784e('0xb'),'port':0x11dd});function connectionHandler(_0x24654d){process['nextTick'](function(){syncho(function(){try{setChannelVariables(_0x24654d);agiHandler(_0x24654d);}catch(_0x18be55){logger[_0x784e('0xc')](_0x18be55[_0x784e('0xd')]);}});});}function listeningHandler(){console[_0x784e('0xe')]('Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!',config['agi'][_0x784e('0xf')]);logger[_0x784e('0x10')](util[_0x784e('0x11')](_0x784e('0x12'),config['agi']['ip'],config[_0x784e('0x4')][_0x784e('0xf')]));}function errorHandler(_0x37ec58){if(_0x37ec58&&_0x37ec58[_0x784e('0x13')]&&_0x37ec58[_0x784e('0x14')]){logger[_0x784e('0xc')](util['format'](_0x784e('0x15'),_0x37ec58['name'],_0x37ec58[_0x784e('0x14')]));}else{logger[_0x784e('0xc')](util[_0x784e('0x11')](_0x784e('0x16'),_0x37ec58[_0x784e('0xd')]));}}function closeHandler(){logger[_0x784e('0x10')](util[_0x784e('0x11')](_0x784e('0x17'),this[_0x784e('0x18')],this['calleridname'],this['callerid'],this[_0x784e('0x19')],this[_0x784e('0x1a')]));try{createSquareReport(this);}catch(_0x3b7d6a){logger[_0x784e('0xc')](_0x3b7d6a[_0x784e('0xd')]);}}function timeoutHandler(){logger[_0x784e('0x10')](util[_0x784e('0x11')]('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x784e('0x18')],this[_0x784e('0x1b')],this[_0x784e('0x1c')],this[_0x784e('0x19')],this[_0x784e('0x1a')]));}function hangupHandler(){logger[_0x784e('0x10')](util[_0x784e('0x11')]('[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this['arg_1'],this[_0x784e('0x1b')],this['callerid'],this[_0x784e('0x19')],this[_0x784e('0x1a')]));this['evtHangup']=!![];}function getRoot(_0x544a1b){return parser[_0x784e('0x1d')](_0x544a1b,{'object':!![]})[_0x784e('0x1e')][_0x784e('0x1f')];}function addVertex(_0xfc37fb,_0x51f452,_0x4fab06){_0x51f452['agicommand']=_0x4fab06;if(_0x51f452[_0x784e('0x20')](_0x784e('0x21'))){_0x51f452['maxRetry']=parseInt(_0x51f452[_0x784e('0x21')],0xa);}_0xfc37fb['addVertex'](_[_0x784e('0x22')](_0x51f452,'mxCell'));}function initGraph(_0x94a91b,_0x103a90){var _0x277101=new Graph();for(var _0x7de85b in _0x94a91b){if(_0x94a91b['hasOwnProperty'](_0x7de85b)){if(_[_0x784e('0x23')](_0x94a91b[_0x7de85b])){for(var _0x2242e6=0x0;_0x2242e6<_0x94a91b[_0x7de85b][_0x784e('0x24')];_0x2242e6+=0x1){addVertex(_0x277101,_0x94a91b[_0x7de85b][_0x2242e6],_0x7de85b);}}else{addVertex(_0x277101,_0x94a91b[_0x7de85b],_0x7de85b);}}}for(var _0x2def08=0x0;_0x2def08<_0x103a90['length'];_0x2def08+=0x1){if(_0x103a90[_0x2def08][_0x784e('0x25')]&&_0x103a90[_0x2def08][_0x784e('0x26')]){_0x277101['addEdge'](_0x103a90[_0x2def08]['source'],_0x103a90[_0x2def08][_0x784e('0x26')],_0x103a90[_0x2def08][_0x784e('0x27')]);}}return _0x277101;}function getSquareProject(_0x17a278,_0x296b12){rpc[_0x784e('0x28')](_0x17a278)[_0x784e('0x29')](function(_0x150757){_0x296b12(null,_0x150757);})[_0x784e('0x2a')](function(_0x42bdfb){_0x296b12(null,_0x42bdfb);});}function createSquareReport(_0x2e18d6,_0x328b70){rpc[_0x784e('0x2b')](_0x2e18d6)[_0x784e('0x29')](function(_0x30fdc6){if(_0x328b70){_0x328b70(null,_0x30fdc6);}})[_0x784e('0x2a')](function(_0x5348e7){if(_0x328b70){_0x328b70(null,_0x5348e7);}});}function setChannelVariables(_0x32e399){for(var _0x4ea50b in _0x32e399){if(_0x32e399[_0x784e('0x20')](_0x4ea50b)){if(_0x4ea50b[_0x784e('0x2c')](_0x784e('0x2d'))===0x0){_0x32e399[_0x4ea50b['substring'](0x4)]=_0x32e399[_0x4ea50b];delete _0x32e399[_0x4ea50b];}}}}function getLogFromObject(_0x18d8f4){return util['inspect'](_0x18d8f4,{'showHidden':![],'depth':null});}function agiHandler(_0x1fa9e2){var _0x3525d6,_0x4fc7b3,_0x23b3b0,_0x287f3e,_0x4ffad7;logger['debug'](_0x784e('0x2e'),JSON[_0x784e('0x2f')](_0x1fa9e2,null,0x2));logger[_0x784e('0x10')](util[_0x784e('0x11')](_0x784e('0x30'),_0x1fa9e2['arg_1'],_0x1fa9e2[_0x784e('0x1b')],_0x1fa9e2[_0x784e('0x1c')],_0x1fa9e2['dnid'],_0x1fa9e2[_0x784e('0x1a')]));_0x1fa9e2['on']('error',errorHandler);_0x1fa9e2['on']('close',closeHandler);_0x1fa9e2['on']('timeout',timeoutHandler);_0x1fa9e2[_0x784e('0x31')]=![];_0x1fa9e2['on'](_0x784e('0x32'),hangupHandler);var _0x5aa239=getSquareProject[_0x784e('0x33')](null,_0x1fa9e2[_0x784e('0x18')]);if(_0x5aa239){if(_0x5aa239[_0x784e('0x34')]){_0x3525d6=getRoot(_0x5aa239[_0x784e('0x34')]);if(_0x3525d6&&_0x3525d6[_0x784e('0x35')]){logger[_0x784e('0x36')]('root',JSON['stringify'](_0x3525d6,null,0x2));_0x1fa9e2[_0x784e('0x37')]=moment()[_0x784e('0x11')]('YYYY-MM-DD\x20HH:mm:ss');_0x4fc7b3=initGraph(_['omit'](_0x3525d6,'mxCell'),_0x3525d6[_0x784e('0x38')]);_0x23b3b0=new Vertices(_0x1fa9e2,rpc,mailRpc);logger[_0x784e('0x10')](util['format'](_0x784e('0x39'),_0x1fa9e2[_0x784e('0x18')],_0x1fa9e2[_0x784e('0x1b')],_0x1fa9e2['callerid'],_0x1fa9e2[_0x784e('0x19')],_0x1fa9e2['uniqueid']));_0x4fc7b3[_0x784e('0x3a')](_0x3525d6['start']['id'],function(_0x412ef4){try{_0x412ef4=_0x23b3b0[_0x784e('0x3b')](_0x412ef4);logger['debug']('vertex',JSON[_0x784e('0x2f')](_0x412ef4,null,0x2));if(_0x412ef4[_0x784e('0x3c')]===_0x784e('0x3d')){logger['info'](_0x784e('0x3e'));_0x1fa9e2[_0x784e('0x3f')]=_0x412ef4[_0x784e('0x3f')]||_0x1fa9e2[_0x784e('0x3f')];_0x1fa9e2['extension']=_0x412ef4[_0x784e('0x40')];_0x1fa9e2[_0x784e('0x41')]=_0x412ef4['priority']?_0x412ef4['priority']-0x1:0x1;return null;}else if(_0x412ef4&&_0x23b3b0[_0x412ef4[_0x784e('0x3c')]]){_0x4ffad7=_0x23b3b0[_0x412ef4[_0x784e('0x3c')]](_0x412ef4);logger[_0x784e('0x10')](_0x784e('0x42'),JSON[_0x784e('0x2f')](_0x4ffad7,null,0x2));if(_0x4ffad7&&_0x4ffad7['code']===AGI_CODE_SUCCESS&&_0x4ffad7['result']!==AGI_RESULT_ERROR&&!_0x1fa9e2['evtHangup']){logger[_0x784e('0x36')](_0x784e('0x42'),getLogFromObject(_0x4ffad7));return _[_0x784e('0x43')](_0x4ffad7[_0x784e('0x44')])?null:_0x4ffad7[_0x784e('0x44')]['toString']();}else{logger['error']('response',getLogFromObject(_0x4ffad7));return null;}}else{logger[_0x784e('0xc')](_0x784e('0x45'));return null;}}catch(_0x4c637a){logger[_0x784e('0xc')](_0x4c637a[_0x784e('0xd')]);return null;}});if(_0x3525d6['finally']){logger[_0x784e('0x10')](util[_0x784e('0x11')](_0x784e('0x46'),_0x1fa9e2[_0x784e('0x18')],_0x1fa9e2[_0x784e('0x1b')],_0x1fa9e2[_0x784e('0x1c')],_0x1fa9e2[_0x784e('0x19')],_0x1fa9e2[_0x784e('0x1a')]));_0x4fc7b3['traverseBFS'](_0x3525d6[_0x784e('0x47')]['id'],function(_0x1a4969){try{_0x1a4969=_0x23b3b0['clear'](_0x1a4969);logger[_0x784e('0x36')](_0x784e('0x48'),JSON[_0x784e('0x2f')](_0x1a4969,null,0x2));if(_0x1a4969&&_0x23b3b0[_0x1a4969[_0x784e('0x3c')]]){_0x4ffad7=_0x23b3b0[_0x1a4969[_0x784e('0x3c')]](_0x1a4969);if(_0x4ffad7){logger[_0x784e('0x36')](_0x784e('0x42'),getLogFromObject(_0x4ffad7));return _[_0x784e('0x43')](_0x4ffad7[_0x784e('0x44')])?null:_0x4ffad7[_0x784e('0x44')]['toString']();}else{logger[_0x784e('0xc')](_0x784e('0x42'),getLogFromObject(_0x4ffad7));return null;}}else{logger['error']('agicommand\x20not\x20found');return null;}}catch(_0xdc779c){logger['error'](_0xdc779c[_0x784e('0xd')]);return null;}});}logger['info'](util[_0x784e('0x11')](_0x784e('0x49'),_0x1fa9e2[_0x784e('0x18')],_0x1fa9e2[_0x784e('0x1b')],_0x1fa9e2['callerid'],_0x1fa9e2['dnid'],_0x1fa9e2[_0x784e('0x1a')]));logger[_0x784e('0x10')](util[_0x784e('0x11')](_0x784e('0x4a'),_0x1fa9e2[_0x784e('0x3f')],_0x1fa9e2['extension'],parseInt(_0x1fa9e2['priority'],0xa)+0x1));_0x1fa9e2[_0x784e('0x4b')](_0x1fa9e2[_0x784e('0x3f')],_0x1fa9e2['extension'],parseInt(_0x1fa9e2[_0x784e('0x41')],0xa)+0x1);_0x1fa9e2[_0x784e('0x4c')]();}}else{logger['error'](util[_0x784e('0x11')](_0x784e('0x4d'),_0x1fa9e2[_0x784e('0x18')]));_0x1fa9e2[_0x784e('0x4b')](_0x1fa9e2['context'],_0x1fa9e2['extension'],parseInt(_0x1fa9e2[_0x784e('0x41')],0xa)+0x1);_0x1fa9e2['close']();}}else{logger['error'](util[_0x784e('0x11')](_0x784e('0x4e'),_0x1fa9e2[_0x784e('0x18')]));_0x1fa9e2[_0x784e('0x4b')](_0x1fa9e2[_0x784e('0x3f')],_0x1fa9e2[_0x784e('0x40')],parseInt(_0x1fa9e2[_0x784e('0x41')],0xa)+0x1);_0x1fa9e2['close']();}}function main(){var _0x3b79ee;return utilLicense[_0x784e('0x4f')]()['then'](function(_0x52b19f){if(_0x52b19f){if(_0x52b19f['voice']){if(_0x52b19f[_0x784e('0x50')]&&_0x52b19f[_0x784e('0x50')]>0x0){logger[_0x784e('0x10')](util[_0x784e('0x11')](_0x784e('0x51'),_0x52b19f['callysquare']));_0x3b79ee=_0x52b19f[_0x784e('0x50')];}else{logger[_0x784e('0x10')](_0x784e('0x52'));}}else{logger[_0x784e('0x10')]('[LICENSE]\x20VOICE\x20IS\x20DISABLED');_0x3b79ee=-0x1;}}})[_0x784e('0x2a')](function(_0x5bccc1){logger[_0x784e('0xc')](_0x784e('0x53'),_0x5bccc1[_0x784e('0xd')]);})[_0x784e('0x47')](function(){var _0x4e143a=require(_0x784e('0x54'))(config['agi'][_0x784e('0xf')],config['agi']['ip'],_0x3b79ee);_0x4e143a['on'](_0x784e('0xc'),errorHandler);_0x4e143a['on'](_0x784e('0x55'),listeningHandler);_0x4e143a['on'](_0x784e('0x56'),connectionHandler);_0x4e143a['on'](_0x784e('0x4c'),closeHandler);});}main(); \ No newline at end of file diff --git a/server/services/agi/mailRpc/index.js b/server/services/agi/mailRpc/index.js index 294dee9..fdcba15 100644 --- a/server/services/agi/mailRpc/index.js +++ b/server/services/agi/mailRpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['result','catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','error','message'];(function(_0x44a819,_0x5dee54){var _0x20af93=function(_0x255331){while(--_0x255331){_0x44a819['push'](_0x44a819['shift']());}};_0x20af93(++_0x5dee54);}(_0x9957,0x93));var _0x7995=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x9957[_0x1ac595];return _0x455fff;};'use strict';var BPromise=require(_0x7995('0x0'));var jayson=require(_0x7995('0x1'));var client=jayson[_0x7995('0x2')][_0x7995('0x3')]({'port':0x232b});function request(_0x5b96eb,_0x86c128){return new BPromise(function(_0x3c58eb,_0x1902b4){return client[_0x7995('0x4')](_0x5b96eb,_0x86c128)['then'](function(_0x744bea){if(_0x744bea[_0x7995('0x5')]){return _0x1902b4(_0x744bea[_0x7995('0x5')][_0x7995('0x6')]);}else{return _0x3c58eb(_0x744bea[_0x7995('0x7')]);}})[_0x7995('0x8')](function(_0x4996ca){return _0x1902b4(_0x4996ca);});});}exports[_0x7995('0x9')]=function(_0x1cad37,_0x4a64f7){return request(_0x7995('0xa'),{'account':_0x1cad37,'message':_0x4a64f7});}; \ No newline at end of file +var _0x34e8=['catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','then','error','message'];(function(_0x3334eb,_0xfdfe3e){var _0x17e0ea=function(_0x52917b){while(--_0x52917b){_0x3334eb['push'](_0x3334eb['shift']());}};_0x17e0ea(++_0xfdfe3e);}(_0x34e8,0x12c));var _0x834e=function(_0x2ece31,_0x52a10a){_0x2ece31=_0x2ece31-0x0;var _0x53e51c=_0x34e8[_0x2ece31];return _0x53e51c;};'use strict';var BPromise=require(_0x834e('0x0'));var jayson=require(_0x834e('0x1'));var client=jayson[_0x834e('0x2')][_0x834e('0x3')]({'port':0x232b});function request(_0x530939,_0x832422){return new BPromise(function(_0x21e2e0,_0x472111){return client[_0x834e('0x4')](_0x530939,_0x832422)[_0x834e('0x5')](function(_0x19a3e0){if(_0x19a3e0[_0x834e('0x6')]){return _0x472111(_0x19a3e0['error'][_0x834e('0x7')]);}else{return _0x21e2e0(_0x19a3e0['result']);}})[_0x834e('0x8')](function(_0x3cc2e3){return _0x472111(_0x3cc2e3);});});}exports[_0x834e('0x9')]=function(_0x2e69e2,_0x33ea05){return request(_0x834e('0xa'),{'account':_0x2e69e2,'message':_0x33ea05});}; \ No newline at end of file diff --git a/server/services/agi/reply.js b/server/services/agi/reply.js index f8ce01a..7af88bb 100644 --- a/server/services/agi/reply.js +++ b/server/services/agi/reply.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['call','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','_localBuffer','toString','indexOf','substring','split','trim','slice','length','emit','headers','line','exports','util','Transform'];(function(_0x19159d,_0x3d05c8){var _0x35884a=function(_0xe419f8){while(--_0xe419f8){_0x19159d['push'](_0x19159d['shift']());}};_0x35884a(++_0x3d05c8);}(_0xb10b,0x12a));var _0xbb10=function(_0x131bb1,_0x5c91cc){_0x131bb1=_0x131bb1-0x0;var _0x4b006b=_0xb10b[_0x131bb1];return _0x4b006b;};'use strict';var util=require(_0xbb10('0x0'));var Transform=require('stream')[_0xbb10('0x1')];function AGIReply(_0x35bc5f){Transform[_0xbb10('0x2')](this,_0x35bc5f);this['_localBuffer']='';this[_0xbb10('0x3')]=![];}util[_0xbb10('0x4')](AGIReply,Transform);AGIReply[_0xbb10('0x5')][_0xbb10('0x6')]=function(_0x49baf4,_0x312b72,_0x481979){var _0x328583='\x0a',_0x3cdd53=['\x0a\x0a',_0xbb10('0x7')],_0x513741=-0x1,_0x1b9e94=-0x1,_0x3fb675='',_0x21370f=0x0,_0x1c3ee5='',_0x2353ef='';this[_0xbb10('0x8')]+=_0x49baf4[_0xbb10('0x9')]();_0x1c3ee5=this['_localBuffer'];if(!this['_inBody']){_0x21370f=0x0;while(_0x3cdd53[_0x21370f]){while((_0x1b9e94=_0x1c3ee5[_0xbb10('0xa')](_0x3cdd53[_0x21370f]))!=-0x1){_0x3fb675=_0x3cdd53[_0x21370f];_0x2353ef=_0x1c3ee5[_0xbb10('0xb')](0x0,_0x1b9e94);_0x1c3ee5=_0x1c3ee5[_0xbb10('0xb')](_0x1b9e94+_0x3fb675['length']);var _0x408248=_0x2353ef[_0xbb10('0xc')](_0x328583),_0x5be7e0=0x0,_0x44fb19={},_0x916a32='',_0x285009='',_0x193a27=-0x1;while(_0x408248[_0x5be7e0]){_0x193a27=_0x408248[_0x5be7e0][_0xbb10('0xa')](':');if(_0x193a27!=-0x1){_0x916a32=_0x408248[_0x5be7e0]['slice'](0x0,_0x193a27)[_0xbb10('0xd')]();_0x285009=_0x408248[_0x5be7e0][_0xbb10('0xe')](_0x193a27+0x1)[_0xbb10('0xd')]();if(_0x916a32[_0xbb10('0xf')]>0x0){_0x44fb19[_0x916a32]=_0x285009;}}else{}_0x5be7e0++;}this[_0xbb10('0x10')](_0xbb10('0x11'),_0x44fb19);this[_0xbb10('0x3')]=!![];}_0x21370f++;}this[_0xbb10('0x8')]=_0x1c3ee5;}else{while((_0x513741=_0x1c3ee5[_0xbb10('0xa')](_0x328583))!=-0x1){_0x2353ef=_0x1c3ee5[_0xbb10('0xb')](0x0,_0x513741);this['emit'](_0xbb10('0x12'),_0x2353ef);_0x1c3ee5=_0x1c3ee5[_0xbb10('0xb')](_0x513741+_0x328583[_0xbb10('0xf')]);}this[_0xbb10('0x8')]=_0x1c3ee5;}_0x481979();};module[_0xbb10('0x13')]=AGIReply; \ No newline at end of file +var _0x5f2f=['exports','util','stream','Transform','call','_localBuffer','_inBody','inherits','\x0d\x0a\x0d\x0a','toString','substring','length','split','slice','trim','headers','indexOf','emit','line'];(function(_0x2676d7,_0x376226){var _0x49f258=function(_0x57c9fd){while(--_0x57c9fd){_0x2676d7['push'](_0x2676d7['shift']());}};_0x49f258(++_0x376226);}(_0x5f2f,0x73));var _0xf5f2=function(_0x430380,_0x2181fe){_0x430380=_0x430380-0x0;var _0x52e751=_0x5f2f[_0x430380];return _0x52e751;};'use strict';var util=require(_0xf5f2('0x0'));var Transform=require(_0xf5f2('0x1'))[_0xf5f2('0x2')];function AGIReply(_0x1a7be1){Transform[_0xf5f2('0x3')](this,_0x1a7be1);this[_0xf5f2('0x4')]='';this[_0xf5f2('0x5')]=![];}util[_0xf5f2('0x6')](AGIReply,Transform);AGIReply['prototype']['_transform']=function(_0x1665c7,_0x192215,_0xad7f65){var _0x3eebf6='\x0a',_0x3133bc=['\x0a\x0a',_0xf5f2('0x7')],_0x473100=-0x1,_0x5907aa=-0x1,_0x466882='',_0x46cd9c=0x0,_0x2ec345='',_0x56a69f='';this[_0xf5f2('0x4')]+=_0x1665c7[_0xf5f2('0x8')]();_0x2ec345=this['_localBuffer'];if(!this[_0xf5f2('0x5')]){_0x46cd9c=0x0;while(_0x3133bc[_0x46cd9c]){while((_0x5907aa=_0x2ec345['indexOf'](_0x3133bc[_0x46cd9c]))!=-0x1){_0x466882=_0x3133bc[_0x46cd9c];_0x56a69f=_0x2ec345['substring'](0x0,_0x5907aa);_0x2ec345=_0x2ec345[_0xf5f2('0x9')](_0x5907aa+_0x466882[_0xf5f2('0xa')]);var _0x4b78cd=_0x56a69f[_0xf5f2('0xb')](_0x3eebf6),_0x336f6b=0x0,_0x14b51f={},_0x331482='',_0x3f2997='',_0x59bb6c=-0x1;while(_0x4b78cd[_0x336f6b]){_0x59bb6c=_0x4b78cd[_0x336f6b]['indexOf'](':');if(_0x59bb6c!=-0x1){_0x331482=_0x4b78cd[_0x336f6b][_0xf5f2('0xc')](0x0,_0x59bb6c)[_0xf5f2('0xd')]();_0x3f2997=_0x4b78cd[_0x336f6b][_0xf5f2('0xc')](_0x59bb6c+0x1)[_0xf5f2('0xd')]();if(_0x331482[_0xf5f2('0xa')]>0x0){_0x14b51f[_0x331482]=_0x3f2997;}}else{}_0x336f6b++;}this['emit'](_0xf5f2('0xe'),_0x14b51f);this[_0xf5f2('0x5')]=!![];}_0x46cd9c++;}this[_0xf5f2('0x4')]=_0x2ec345;}else{while((_0x473100=_0x2ec345[_0xf5f2('0xf')](_0x3eebf6))!=-0x1){_0x56a69f=_0x2ec345[_0xf5f2('0x9')](0x0,_0x473100);this[_0xf5f2('0x10')](_0xf5f2('0x11'),_0x56a69f);_0x2ec345=_0x2ec345[_0xf5f2('0x9')](_0x473100+_0x3eebf6[_0xf5f2('0xa')]);}this[_0xf5f2('0x4')]=_0x2ec345;}_0xad7f65();};module[_0xf5f2('0x12')]=AGIReply; \ No newline at end of file diff --git a/server/services/agi/rpc/index.js b/server/services/agi/rpc/index.js index 372c6a4..6263497 100644 --- a/server/services/agi/rpc/index.js +++ b/server/services/agi/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2c15=['error','message','result','catch','getSquareProject','ShowSquareProject','production','getMailAccountById','MailServerOut','Smtp','name','email','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getTrunkById','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','moment','lodash','util','jayson/promise','client','http','request','then'];(function(_0x296754,_0x5befe9){var _0x1d9f1d=function(_0x3f033e){while(--_0x3f033e){_0x296754['push'](_0x296754['shift']());}};_0x1d9f1d(++_0x5befe9);}(_0x2c15,0x6e));var _0x52c1=function(_0x2e2ddf,_0x11a7f2){_0x2e2ddf=_0x2e2ddf-0x0;var _0x2bccf1=_0x2c15[_0x2e2ddf];return _0x2bccf1;};'use strict';var BPromise=require('bluebird');var moment=require(_0x52c1('0x0'));var _=require(_0x52c1('0x1'));var util=require(_0x52c1('0x2'));var jayson=require(_0x52c1('0x3'));var client=jayson[_0x52c1('0x4')][_0x52c1('0x5')]({'port':0x2329});function request(_0x2562fd,_0x388ed5){return new BPromise(function(_0x4a4537,_0x230cd5){return client[_0x52c1('0x6')](_0x2562fd,_0x388ed5)[_0x52c1('0x7')](function(_0x3ab776){if(_0x3ab776[_0x52c1('0x8')]){return _0x230cd5(_0x3ab776[_0x52c1('0x8')][_0x52c1('0x9')]);}else{return _0x4a4537(_0x3ab776[_0x52c1('0xa')]);}})[_0x52c1('0xb')](function(_0x473297){return _0x230cd5(_0x473297);});});}exports[_0x52c1('0xc')]=function(_0x4935e8){return request(_0x52c1('0xd'),{'options':{'raw':![],'where':{'name':_0x4935e8},'attributes':[_0x52c1('0xe')]}});};exports[_0x52c1('0xf')]=function(_0x3d2109){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x3d2109},'include':[{'model':_0x52c1('0x10'),'as':_0x52c1('0x11')}],'attributes':['id',_0x52c1('0x12'),_0x52c1('0x13')]}});};exports['getSquareProjectById']=function(_0x231d58){return request(_0x52c1('0xd'),{'options':{'where':{'id':_0x231d58},'attributes':[_0x52c1('0x12')]}});};exports[_0x52c1('0x14')]=function(_0x12a41b){return request(_0x52c1('0x15'),{'options':{'where':{'id':_0x12a41b},'attributes':[_0x52c1('0x12')]}});};exports[_0x52c1('0x16')]=function(_0x1fb667){return request('ShowVariable',{'options':{'where':{'id':_0x1fb667},'attributes':[_0x52c1('0x12')]}});};exports[_0x52c1('0x17')]=function(_0x1bc77f){return request(_0x52c1('0x18'),{'options':{'where':{'id':_0x1bc77f},'attributes':[_0x52c1('0x19')]}});};exports[_0x52c1('0x1a')]=function(_0x1bd9ca){return request(_0x52c1('0x1b'),{'options':{'where':{'id':_0x1bd9ca},'attributes':[_0x52c1('0x12')]}});};exports[_0x52c1('0x1c')]=function(_0x1aad5e){return request('ShowTrunk',{'options':{'where':{'id':_0x1aad5e},'attributes':[_0x52c1('0x12')]}});};exports[_0x52c1('0x1d')]=function(_0x388bc9){return request(_0x52c1('0x1e'),{'options':{'where':{'id':_0x388bc9},'attributes':[_0x52c1('0x1f')]}});};exports[_0x52c1('0x20')]=function(_0x2d5524){return request(_0x52c1('0x21'),{'options':{'raw':![],'where':{'id':_0x2d5524},'include':[{'model':_0x52c1('0x22'),'as':_0x52c1('0x23')}]}});};exports['getSmsAccountById']=function(_0x1af4ea){return request(_0x52c1('0x24'),{'options':{'where':{'id':_0x1af4ea},'attributes':['id',_0x52c1('0x12')]}});};exports[_0x52c1('0x25')]=function(_0x1b2840){return request('CreateSmsMessage',{'body':_0x1b2840});};exports[_0x52c1('0x26')]=function(_0x387550){return request('CreateSquareDetailsReport',{'body':_0x387550});};exports[_0x52c1('0x27')]=function(_0x34b385){return request(_0x52c1('0x28'),{'body':_[_0x52c1('0x29')](_0x34b385,{'project_name':_0x34b385['arg_1'],'prev_project_name':_0x34b385['arg_2']||'','is_subproject':_0x34b385[_0x52c1('0x2a')]?!![]:![],'leaveAt':moment()[_0x52c1('0x2b')](_0x52c1('0x2c'))})});};exports[_0x52c1('0x2d')]=function(_0x413df9){return request(_0x52c1('0x2e'),{'body':_0x413df9});};exports[_0x52c1('0x2f')]=function(_0x241e32){return request(_0x52c1('0x30'),{'body':_0x241e32});};exports[_0x52c1('0x31')]=function(_0x485ab7){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x485ab7['phone'],'ListId':_0x485ab7['ListId']}}})[_0x52c1('0x7')](function(_0x44bf23){if(_0x44bf23){return _0x44bf23;}return request('CreateCmContact',{'body':_0x485ab7});});};exports['getPauseById']=function(_0x3d1aed){return request(_0x52c1('0x32'),{'options':{'where':{'id':_0x3d1aed},'attributes':[_0x52c1('0x12')]}});};exports[_0x52c1('0x33')]=function(_0x145fca,_0x1cd33a){return request(_0x52c1('0x34'),{'body':{'interface':_0x1cd33a},'options':{'where':_0x145fca}});};exports[_0x52c1('0x35')]=function(_0x14190c,_0x398c93,_0x389ea4){return request(_0x52c1('0x36'),{'body':{'type':_0x398c93,'uniqueid':_0x389ea4},'options':{'where':_0x14190c}});};exports[_0x52c1('0x37')]=function(_0x374be4){return request(_0x52c1('0x38'),{'body':{},'options':{'where':_0x374be4}});};exports[_0x52c1('0x39')]=function(_0x190b26){return request(_0x52c1('0x3a'),{'body':{},'options':{'where':_0x190b26}});}; \ No newline at end of file +var _0x87d6=['CreateSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','phone','CreateCmContact','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','moment','lodash','util','client','http','then','error','message','result','catch','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','name','email','getSquareProjectById','getVoiceQueueById','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getTrunkById','ShowTrunk','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x87d6,0xce));var _0x687d=function(_0x3b5ad9,_0x223867){_0x3b5ad9=_0x3b5ad9-0x0;var _0x611ae9=_0x87d6[_0x3b5ad9];return _0x611ae9;};'use strict';var BPromise=require('bluebird');var moment=require(_0x687d('0x0'));var _=require(_0x687d('0x1'));var util=require(_0x687d('0x2'));var jayson=require('jayson/promise');var client=jayson[_0x687d('0x3')][_0x687d('0x4')]({'port':0x2329});function request(_0x286c58,_0x4170ad){return new BPromise(function(_0x43156b,_0x3daca5){return client['request'](_0x286c58,_0x4170ad)[_0x687d('0x5')](function(_0x1c33b2){if(_0x1c33b2[_0x687d('0x6')]){return _0x3daca5(_0x1c33b2[_0x687d('0x6')][_0x687d('0x7')]);}else{return _0x43156b(_0x1c33b2[_0x687d('0x8')]);}})[_0x687d('0x9')](function(_0x333ccc){return _0x3daca5(_0x333ccc);});});}exports[_0x687d('0xa')]=function(_0x5e0fb5){return request(_0x687d('0xb'),{'options':{'raw':![],'where':{'name':_0x5e0fb5},'attributes':['production']}});};exports[_0x687d('0xc')]=function(_0x40ec05){return request(_0x687d('0xd'),{'options':{'raw':![],'where':{'id':_0x40ec05},'include':[{'model':_0x687d('0xe'),'as':'Smtp'}],'attributes':['id',_0x687d('0xf'),_0x687d('0x10')]}});};exports[_0x687d('0x11')]=function(_0xfa1824){return request(_0x687d('0xb'),{'options':{'where':{'id':_0xfa1824},'attributes':[_0x687d('0xf')]}});};exports[_0x687d('0x12')]=function(_0x3fbf87){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x3fbf87},'attributes':[_0x687d('0xf')]}});};exports[_0x687d('0x13')]=function(_0x834024){return request(_0x687d('0x14'),{'options':{'where':{'id':_0x834024},'attributes':[_0x687d('0xf')]}});};exports[_0x687d('0x15')]=function(_0x14cf39){return request(_0x687d('0x16'),{'options':{'where':{'id':_0x14cf39},'attributes':[_0x687d('0x17')]}});};exports['getUserById']=function(_0x29041c){return request('ShowUser',{'options':{'where':{'id':_0x29041c},'attributes':[_0x687d('0xf')]}});};exports[_0x687d('0x18')]=function(_0x4ee265){return request(_0x687d('0x19'),{'options':{'where':{'id':_0x4ee265},'attributes':[_0x687d('0xf')]}});};exports['getSoundById']=function(_0x129cca){return request(_0x687d('0x1a'),{'options':{'where':{'id':_0x129cca},'attributes':[_0x687d('0x1b')]}});};exports[_0x687d('0x1c')]=function(_0xb96a64){return request(_0x687d('0x1d'),{'options':{'raw':![],'where':{'id':_0xb96a64},'include':[{'model':_0x687d('0x1e'),'as':_0x687d('0x1f')}]}});};exports[_0x687d('0x20')]=function(_0x5b4c7b){return request(_0x687d('0x21'),{'options':{'where':{'id':_0x5b4c7b},'attributes':['id',_0x687d('0xf')]}});};exports['createSmsMessage']=function(_0x2d1fa9){return request(_0x687d('0x22'),{'body':_0x2d1fa9});};exports['createSquareDetailsReport']=function(_0x41f89c){return request(_0x687d('0x23'),{'body':_0x41f89c});};exports[_0x687d('0x24')]=function(_0x22f9b0){return request(_0x687d('0x25'),{'body':_[_0x687d('0x26')](_0x22f9b0,{'project_name':_0x22f9b0[_0x687d('0x27')],'prev_project_name':_0x22f9b0[_0x687d('0x28')]||'','is_subproject':_0x22f9b0[_0x687d('0x28')]?!![]:![],'leaveAt':moment()[_0x687d('0x29')](_0x687d('0x2a'))})});};exports[_0x687d('0x2b')]=function(_0x1be7cd){return request('CreateSquareRecording',{'body':_0x1be7cd});};exports[_0x687d('0x2c')]=function(_0x13eb44){return request(_0x687d('0x2d'),{'body':_0x13eb44});};exports[_0x687d('0x2e')]=function(_0x2b34c0){return request(_0x687d('0x2f'),{'options':{'raw':![],'where':{'phone':_0x2b34c0[_0x687d('0x30')],'ListId':_0x2b34c0['ListId']}}})[_0x687d('0x5')](function(_0x3e5002){if(_0x3e5002){return _0x3e5002;}return request(_0x687d('0x31'),{'body':_0x2b34c0});});};exports[_0x687d('0x32')]=function(_0x1a8ffb){return request(_0x687d('0x33'),{'options':{'where':{'id':_0x1a8ffb},'attributes':['name']}});};exports[_0x687d('0x34')]=function(_0x230a83,_0x4c14d4){return request(_0x687d('0x35'),{'body':{'interface':_0x4c14d4},'options':{'where':_0x230a83}});};exports[_0x687d('0x36')]=function(_0x202dab,_0x12863a,_0x4f2c64){return request(_0x687d('0x37'),{'body':{'type':_0x12863a,'uniqueid':_0x4f2c64},'options':{'where':_0x202dab}});};exports[_0x687d('0x38')]=function(_0x120e9c){return request(_0x687d('0x39'),{'body':{},'options':{'where':_0x120e9c}});};exports[_0x687d('0x3a')]=function(_0x38611f){return request(_0x687d('0x3b'),{'body':{},'options':{'where':_0x38611f}});}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/index.js b/server/services/agi/scripts/aws/index.js index c2ecd7a..a06f030 100644 --- a/server/services/agi/scripts/aws/index.js +++ b/server/services/agi/scripts/aws/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['./lex','exports'];(function(_0xa2d42e,_0x174142){var _0x5a3cc7=function(_0x4ad8e7){while(--_0x4ad8e7){_0xa2d42e['push'](_0xa2d42e['shift']());}};_0x5a3cc7(++_0x174142);}(_0xedd9,0xfc));var _0x9edd=function(_0xb53f83,_0x39d004){_0xb53f83=_0xb53f83-0x0;var _0x52cf5=_0xedd9[_0xb53f83];return _0x52cf5;};var polly=require('./polly');var lex=require(_0x9edd('0x0'));module[_0x9edd('0x1')]={'polly':polly,'lex':lex}; \ No newline at end of file +var _0x1cc7=['exports','./polly','./lex'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1cc7,0x15a));var _0x71cc=function(_0x2ca602,_0x2ce12d){_0x2ca602=_0x2ca602-0x0;var _0x44b1d6=_0x1cc7[_0x2ca602];return _0x44b1d6;};var polly=require(_0x71cc('0x0'));var lex=require(_0x71cc('0x1'));module[_0x71cc('0x2')]={'polly':polly,'lex':lex}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/lex/index.js b/server/services/agi/scripts/aws/lex/index.js index 19249a0..eaf7565 100644 --- a/server/services/agi/scripts/aws/lex/index.js +++ b/server/services/agi/scripts/aws/lex/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x32ef=['exports','./lib/api'];(function(_0x488b52,_0x1d0575){var _0x48acb9=function(_0x4069e5){while(--_0x4069e5){_0x488b52['push'](_0x488b52['shift']());}};_0x48acb9(++_0x1d0575);}(_0x32ef,0xf9));var _0xf32e=function(_0x47381a,_0xd1e1f9){_0x47381a=_0x47381a-0x0;var _0x416b80=_0x32ef[_0x47381a];return _0x416b80;};'use strict';var lex=require(_0xf32e('0x0'));module[_0xf32e('0x1')]=function(_0x1ec4de,_0x2aaadd,_0x286041,_0x82113b,_0x5da060,_0x232ead){return lex(_0x1ec4de,_0x2aaadd,_0x286041,_0x82113b,_0x5da060,_0x232ead);}; \ No newline at end of file +var _0x032a=['exports'];(function(_0x2596db,_0x523f12){var _0x591a65=function(_0x4b4a5c){while(--_0x4b4a5c){_0x2596db['push'](_0x2596db['shift']());}};_0x591a65(++_0x523f12);}(_0x032a,0xf0));var _0xa032=function(_0x4e4519,_0x392ae){_0x4e4519=_0x4e4519-0x0;var _0x340044=_0x032a[_0x4e4519];return _0x340044;};'use strict';var lex=require('./lib/api');module[_0xa032('0x0')]=function(_0x591b65,_0xb3b072,_0x39053e,_0x40e5b5,_0x2ee4ef,_0x185934){return lex(_0x591b65,_0xb3b072,_0x39053e,_0x40e5b5,_0x2ee4ef,_0x185934);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/lex/lib/api.js b/server/services/agi/scripts/aws/lex/lib/api.js index efff01e..74aeae1 100644 --- a/server/services/agi/scripts/aws/lex/lib/api.js +++ b/server/services/agi/scripts/aws/lex/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0228=['LexRuntime','$LATEST','bluebird','aws-sdk','postText','slots','hasOwnProperty','slot_'];(function(_0x5e3b04,_0xbb6795){var _0x1fc44d=function(_0x3472a1){while(--_0x3472a1){_0x5e3b04['push'](_0x5e3b04['shift']());}};_0x1fc44d(++_0xbb6795);}(_0x0228,0xf2));var _0x8022=function(_0x32062c,_0x43ee1f){_0x32062c=_0x32062c-0x0;var _0xa8ccf1=_0x0228[_0x32062c];return _0xa8ccf1;};'use strict';var BPromise=require(_0x8022('0x0'));var AWS=require(_0x8022('0x1'));function lexResult(_0x149a05,_0x4dc5af){return new BPromise(function(_0x45e3f9,_0x39572c){_0x149a05[_0x8022('0x2')](_0x4dc5af,function(_0x4a0a32,_0x14c120){if(_0x4a0a32){_0x39572c(_0x4a0a32);}if(_0x14c120[_0x8022('0x3')]){for(const _0x4959f7 in _0x14c120[_0x8022('0x3')]){if(_0x14c120[_0x8022('0x3')][_0x8022('0x4')](_0x4959f7)){var _0x15008d=_0x14c120[_0x8022('0x3')][_0x4959f7];_0x14c120[_0x8022('0x5')+_0x4959f7]=_0x15008d;}}}_0x45e3f9(_0x14c120);});});}module['exports']=function(_0x399ceb,_0x2b9f9b,_0x372b2f,_0x5498af,_0x259080,_0x434762){var _0x5970fe=new AWS[(_0x8022('0x6'))]({'accessKeyId':_0x2b9f9b,'secretAccessKey':_0x372b2f,'region':_0x5498af});var _0x43eac3={'botAlias':_0x8022('0x7'),'botName':_0x434762,'inputText':_0x259080,'userId':_0x399ceb};return lexResult(_0x5970fe,_0x43eac3);}; \ No newline at end of file +var _0x4fd6=['slot_','exports','LexRuntime','$LATEST','bluebird','postText','slots','hasOwnProperty'];(function(_0x589adc,_0x189976){var _0x24b572=function(_0x5b463b){while(--_0x5b463b){_0x589adc['push'](_0x589adc['shift']());}};_0x24b572(++_0x189976);}(_0x4fd6,0x13c));var _0x64fd=function(_0x1b2cf0,_0x3e1559){_0x1b2cf0=_0x1b2cf0-0x0;var _0x566935=_0x4fd6[_0x1b2cf0];return _0x566935;};'use strict';var BPromise=require(_0x64fd('0x0'));var AWS=require('aws-sdk');function lexResult(_0x3d716e,_0x57c344){return new BPromise(function(_0x2d1772,_0x15ed72){_0x3d716e[_0x64fd('0x1')](_0x57c344,function(_0x2f7eb3,_0x282d13){if(_0x2f7eb3){_0x15ed72(_0x2f7eb3);}if(_0x282d13[_0x64fd('0x2')]){for(const _0x2ab9f9 in _0x282d13[_0x64fd('0x2')]){if(_0x282d13[_0x64fd('0x2')][_0x64fd('0x3')](_0x2ab9f9)){var _0xd7fa0b=_0x282d13['slots'][_0x2ab9f9];_0x282d13[_0x64fd('0x4')+_0x2ab9f9]=_0xd7fa0b;}}}_0x2d1772(_0x282d13);});});}module[_0x64fd('0x5')]=function(_0x3f6585,_0x18bf6e,_0xa37643,_0x2be826,_0x458a03,_0x1192f3){var _0x3d1055=new AWS[(_0x64fd('0x6'))]({'accessKeyId':_0x18bf6e,'secretAccessKey':_0xa37643,'region':_0x2be826});var _0x1a4494={'botAlias':_0x64fd('0x7'),'botName':_0x1192f3,'inputText':_0x458a03,'userId':_0x3f6585};return lexResult(_0x3d1055,_0x1a4494);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/polly/index.js b/server/services/agi/scripts/aws/polly/index.js index 94e561e..9aea141 100644 --- a/server/services/agi/scripts/aws/polly/index.js +++ b/server/services/agi/scripts/aws/polly/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x865b=['./lib/api'];(function(_0x587f88,_0x299a03){var _0x306efa=function(_0x20f319){while(--_0x20f319){_0x587f88['push'](_0x587f88['shift']());}};_0x306efa(++_0x299a03);}(_0x865b,0xae));var _0xb865=function(_0x12feee,_0x59315d){_0x12feee=_0x12feee-0x0;var _0x3ad092=_0x865b[_0x12feee];return _0x3ad092;};'use strict';var polly=require(_0xb865('0x0'));module['exports']=function(_0x52ee21,_0x55b855,_0x3ec3bd,_0x37fc85,_0x378d1a,_0x490c99,_0xc12220){return polly(_0x52ee21,_0x55b855,_0x3ec3bd,_0x37fc85,_0x378d1a,_0x490c99,_0xc12220);}; \ No newline at end of file +var _0x2951=['exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2951,0xbf));var _0x1295=function(_0x44e00a,_0x248bbc){_0x44e00a=_0x44e00a-0x0;var _0x2bdfba=_0x2951[_0x44e00a];return _0x2bdfba;};'use strict';var polly=require('./lib/api');module[_0x1295('0x0')]=function(_0x74fb30,_0x3982a3,_0x1a9995,_0x298178,_0x40f81d,_0x327791,_0x27466a){return polly(_0x74fb30,_0x3982a3,_0x1a9995,_0x298178,_0x40f81d,_0x327791,_0x27466a);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/polly/lib/api.js b/server/services/agi/scripts/aws/polly/lib/api.js index a1afcc3..a21753b 100644 --- a/server/services/agi/scripts/aws/polly/lib/api.js +++ b/server/services/agi/scripts/aws/polly/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x982e=['aws-sdk','writeFile','AudioStream','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','exports','text','mp3','path','bluebird','randomstring'];(function(_0x211bc3,_0x5860c8){var _0x34c9a2=function(_0x4bfa37){while(--_0x4bfa37){_0x211bc3['push'](_0x211bc3['shift']());}};_0x34c9a2(++_0x5860c8);}(_0x982e,0x197));var _0xe982=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x982e[_0x321bb2];return _0x9c12ed;};'use strict';var fs=require('fs');var path=require(_0xe982('0x0'));var BPromise=require(_0xe982('0x1'));var rs=require(_0xe982('0x2'));var AWS=require(_0xe982('0x3'));function pollyResult(_0x4abafc,_0x5dc795,_0x1de930){return new BPromise(function(_0x5e6838,_0x5cca1a){_0x4abafc['synthesizeSpeech'](_0x5dc795,function(_0x3bee30,_0x2159cc){if(_0x3bee30){_0x5cca1a(_0x3bee30);}else if(_0x2159cc){if(_0x2159cc['AudioStream']instanceof Buffer){fs[_0xe982('0x4')](_0x1de930,_0x2159cc[_0xe982('0x5')],function(_0x55705e){if(_0x55705e){_0x5cca1a(_0x55705e);}else{_0x5e6838();}});}else{_0x5cca1a(new Error(_0xe982('0x6')));}}else{_0x5cca1a(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module[_0xe982('0x7')]=function(_0x423b5b,_0x16be39,_0x57f885,_0x3ed60f,_0x26af1e,_0xde58c4,_0x52e405){var _0x10070a=new AWS['Polly']({'accessKeyId':_0x423b5b,'secretAccessKey':_0x16be39,'region':_0x57f885});var _0xa280b={'Text':_0x26af1e,'TextType':_0xde58c4||_0xe982('0x8'),'OutputFormat':_0xe982('0x9'),'VoiceId':_0x3ed60f};return pollyResult(_0x10070a,_0xa280b,_0x52e405);}; \ No newline at end of file +var _0xf1a6=['mp3','randomstring','aws-sdk','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly'];(function(_0x5117cb,_0x1da3ae){var _0x4e8f9a=function(_0x5e43c1){while(--_0x5e43c1){_0x5117cb['push'](_0x5117cb['shift']());}};_0x4e8f9a(++_0x1da3ae);}(_0xf1a6,0xf4));var _0x6f1a=function(_0x27c941,_0x2e018a){_0x27c941=_0x27c941-0x0;var _0x5d0732=_0xf1a6[_0x27c941];return _0x5d0732;};'use strict';var fs=require('fs');var path=require('path');var BPromise=require('bluebird');var rs=require(_0x6f1a('0x0'));var AWS=require(_0x6f1a('0x1'));function pollyResult(_0x57a25f,_0x7ee37c,_0x4fde39){return new BPromise(function(_0x5e959f,_0x258cc9){_0x57a25f[_0x6f1a('0x2')](_0x7ee37c,function(_0x425488,_0xfbeab5){if(_0x425488){_0x258cc9(_0x425488);}else if(_0xfbeab5){if(_0xfbeab5[_0x6f1a('0x3')]instanceof Buffer){fs[_0x6f1a('0x4')](_0x4fde39,_0xfbeab5[_0x6f1a('0x3')],function(_0x139199){if(_0x139199){_0x258cc9(_0x139199);}else{_0x5e959f();}});}else{_0x258cc9(new Error(_0x6f1a('0x5')));}}else{_0x258cc9(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module[_0x6f1a('0x6')]=function(_0x1caec2,_0x15dfe2,_0x188003,_0x5bb5c2,_0x3f2ef5,_0x2a2361,_0x34e418){var _0x289a81=new AWS[(_0x6f1a('0x7'))]({'accessKeyId':_0x1caec2,'secretAccessKey':_0x15dfe2,'region':_0x188003});var _0xfe6245={'Text':_0x3f2ef5,'TextType':_0x2a2361||'text','OutputFormat':_0x6f1a('0x8'),'VoiceId':_0x5bb5c2};return pollyResult(_0x289a81,_0xfe6245,_0x34e418);}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/asr/index.js b/server/services/agi/scripts/google/asr/index.js index 6adbb55..52a8283 100644 --- a/server/services/agi/scripts/google/asr/index.js +++ b/server/services/agi/scripts/google/asr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf09e=['exports','./lib/api'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0xf09e,0x8b));var _0xef09=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xf09e[_0x2be8c2];return _0x97f531;};'use strict';var asr=require(_0xef09('0x0'));module[_0xef09('0x1')]=function(_0x3425b2,_0x3464b3,_0x134aeb,_0x116e74){return asr(_0x3425b2,_0x3464b3,_0x134aeb);}; \ No newline at end of file +var _0x9cd0=['./lib/api','exports'];(function(_0x574ce3,_0x59eef4){var _0x3447a0=function(_0x27f8cb){while(--_0x27f8cb){_0x574ce3['push'](_0x574ce3['shift']());}};_0x3447a0(++_0x59eef4);}(_0x9cd0,0x19e));var _0x09cd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9cd0[_0x3dd15e];return _0x231fd0;};'use strict';var asr=require(_0x09cd('0x0'));module[_0x09cd('0x1')]=function(_0x11b7d4,_0x5d91ce,_0x1cb4dd,_0x1b2fbc){return asr(_0x11b7d4,_0x5d91ce,_0x1cb4dd);}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/asr/lib/api.js b/server/services/agi/scripts/google/asr/lib/api.js index c56b167..36cfdab 100644 --- a/server/services/agi/scripts/google/asr/lib/api.js +++ b/server/services/agi/scripts/google/asr/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x85f2=['length','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','base64','POST','/v1/speech:recognize?key=','url','bluebird','https://speech.googleapis.com','exports','string'];(function(_0x450311,_0x525cc3){var _0x3921e4=function(_0x521cb8){while(--_0x521cb8){_0x450311['push'](_0x450311['shift']());}};_0x3921e4(++_0x525cc3);}(_0x85f2,0x11b));var _0x285f=function(_0x2a18b7,_0x5041c8){_0x2a18b7=_0x2a18b7-0x0;var _0x45e74e=_0x85f2[_0x2a18b7];return _0x45e74e;};'use strict';var url=require(_0x285f('0x0'));var BPromise=require(_0x285f('0x1'));var fs=require('fs');var host=_0x285f('0x2');module[_0x285f('0x3')]=function(_0x2739dc,_0x30f6c1,_0x546dd3){return new BPromise(function(_0x311f69,_0x4fc976){var _0x492ea6;if(typeof _0x2739dc!==_0x285f('0x4')||_0x2739dc[_0x285f('0x5')]===0x0){return _0x4fc976('filepath\x20should\x20be\x20a\x20string');}if(typeof _0x30f6c1!=='string'||_0x30f6c1[_0x285f('0x5')]===0x0){return _0x4fc976(_0x285f('0x6'));}if(typeof _0x546dd3!==_0x285f('0x7')&&(typeof _0x546dd3!==_0x285f('0x4')||_0x546dd3[_0x285f('0x5')]===0x0)){return _0x4fc976(_0x285f('0x8'));}try{_0x492ea6=fs['readFileSync'](_0x2739dc)['toString'](_0x285f('0x9'));}catch(_0x38eeec){return _0x4fc976(_0x38eeec);}return _0x311f69({'method':_0x285f('0xa'),'uri':host+_0x285f('0xb')+_0x30f6c1,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':'8000','languageCode':_0x546dd3},'audio':{'content':_0x492ea6}},'json':!![]});});}; \ No newline at end of file +var _0x3643=['https://speech.googleapis.com','exports','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','/v1/speech:recognize?key=','LINEAR16','8000','url','bluebird'];(function(_0x4b5887,_0x2e163b){var _0x49eea7=function(_0x28485c){while(--_0x28485c){_0x4b5887['push'](_0x4b5887['shift']());}};_0x49eea7(++_0x2e163b);}(_0x3643,0xfa));var _0x3364=function(_0x24ec59,_0x3bbeec){_0x24ec59=_0x24ec59-0x0;var _0x5eaeb7=_0x3643[_0x24ec59];return _0x5eaeb7;};'use strict';var url=require(_0x3364('0x0'));var BPromise=require(_0x3364('0x1'));var fs=require('fs');var host=_0x3364('0x2');module[_0x3364('0x3')]=function(_0x50f281,_0x5aa048,_0x281071){return new BPromise(function(_0x17b171,_0x24cf68){var _0x4f357d;if(typeof _0x50f281!==_0x3364('0x4')||_0x50f281[_0x3364('0x5')]===0x0){return _0x24cf68(_0x3364('0x6'));}if(typeof _0x5aa048!=='string'||_0x5aa048[_0x3364('0x5')]===0x0){return _0x24cf68(_0x3364('0x7'));}if(typeof _0x281071!==_0x3364('0x8')&&(typeof _0x281071!==_0x3364('0x4')||_0x281071[_0x3364('0x5')]===0x0)){return _0x24cf68(_0x3364('0x9'));}try{_0x4f357d=fs[_0x3364('0xa')](_0x50f281)['toString']('base64');}catch(_0x18a865){return _0x24cf68(_0x18a865);}return _0x17b171({'method':'POST','uri':host+_0x3364('0xb')+_0x5aa048,'body':{'config':{'encoding':_0x3364('0xc'),'sampleRateHertz':_0x3364('0xd'),'languageCode':_0x281071},'audio':{'content':_0x4f357d}},'json':!![]});});}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/index.js b/server/services/agi/scripts/google/index.js index 4f4fa2d..fa9919e 100644 --- a/server/services/agi/scripts/google/index.js +++ b/server/services/agi/scripts/google/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x742b=['./asr','exports'];(function(_0x5bed5e,_0x27d338){var _0x8020e7=function(_0x57fc8c){while(--_0x57fc8c){_0x5bed5e['push'](_0x5bed5e['shift']());}};_0x8020e7(++_0x27d338);}(_0x742b,0xb4));var _0xb742=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x742b[_0x13d07a];return _0x5ee0ee;};var asr=require(_0xb742('0x0'));module[_0xb742('0x1')]={'asr':asr}; \ No newline at end of file +var _0xa182=['./asr','exports'];(function(_0x1d02b9,_0x5a2dc7){var _0x5261f3=function(_0x48abc5){while(--_0x48abc5){_0x1d02b9['push'](_0x1d02b9['shift']());}};_0x5261f3(++_0x5a2dc7);}(_0xa182,0x122));var _0x2a18=function(_0x1aa42f,_0x4ddd0d){_0x1aa42f=_0x1aa42f-0x0;var _0x4dba40=_0xa182[_0x1aa42f];return _0x4dba40;};var asr=require(_0x2a18('0x0'));module[_0x2a18('0x1')]={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/scripts/index.js b/server/services/agi/scripts/index.js index 7a81e51..d4340bf 100644 --- a/server/services/agi/scripts/index.js +++ b/server/services/agi/scripts/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5b10=['parse\x20response\x20failed:\x0a','lang\x20\x22','goggleTTS\x20path','googleASR','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','[%s]\x20%s:%s','message','googleDialogflow','textRequest','stringify','result','source','resolvedQuery','actionIncomplete','speech','score','status','code','metadata','isFallbackIntent','replace','SessionsClient','detectIntent','length','Dialogflow\x20V2\x20response:','queryResult','allRequiredParamsPresent','diagnosticInfo','fields','end_conversation','intent','name','displayName','isFallback','languageCode','queryText','responseId','fulfillmentText','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','polly','lex','ispeechTTS','format','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','freeform=3','parse','sestekNDA','nda','channelData','CustomAction','CustomActionData','Data','audiofile','apiai-promise','bluebird','dialogflow','http','querystring','request-promise','sox','url','util','./google','./sestek','./tilde','../../../config/logger','https://api.ispeech.org/api/rest','protocol','host','WHAT_EVER','get','statusCode','error','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','finish','info','finish\x20download\x20file','unlink','pipe','https:','path','request\x20to\x20','data','end','transcode','wav','start','resolve','tmp','generate','.wav','writeFileSync','base64','chmodSync','777','split','readFileSync','toString','https://texttospeech.googleapis.com/v1/','?key=','ssml','input','voice','audioConfig','MP3','text:synthesize','POST','then','.mp3','from','writeFile','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','application/x-www-form-urlencoded','f.req=','jQ1olc','en-US','null','generic','slice'];(function(_0x46460e,_0x4a6c5e){var _0x4c36a3=function(_0x676dfe){while(--_0x676dfe){_0x46460e['push'](_0x46460e['shift']());}};_0x4c36a3(++_0x4a6c5e);}(_0x5b10,0x155));var _0x05b1=function(_0x140492,_0x1c9dbe){_0x140492=_0x140492-0x0;var _0x480a36=_0x5b10[_0x140492];return _0x480a36;};'use strict';var apiai=require(_0x05b1('0x0'));var BPromise=require(_0x05b1('0x1'));var dialogflow=require(_0x05b1('0x2'));var fs=require('fs');var http=require(_0x05b1('0x3'));var https=require('https');var md5=require('md5');var path=require('path');var querystring=require(_0x05b1('0x4'));var rp=require(_0x05b1('0x5'));var rs=require('randomstring');var sox=require(_0x05b1('0x6'));var tts=require('google-tts-api');var urlParse=require(_0x05b1('0x7'))['parse'];var util=require(_0x05b1('0x8'));var aws=require('./aws');var google=require(_0x05b1('0x9'));var sestek=require(_0x05b1('0xa'));var tilde=require(_0x05b1('0xb'));var logger=require(_0x05b1('0xc'))('agi');var ISPEECH_API=_0x05b1('0xd');function downloadFile(_0x454a62,_0x500f7d){return new BPromise(function(_0x53484a,_0x5aa025){var _0x46f689=urlParse(_0x454a62);var _0x435af0=_0x46f689[_0x05b1('0xe')]==='https:'?https:http;var _0x72b1e1={'host':_0x46f689[_0x05b1('0xf')],'path':_0x46f689['path'],'headers':{'user-agent':_0x05b1('0x10')}};_0x435af0[_0x05b1('0x11')](_0x72b1e1,function(_0x203055){if(_0x203055[_0x05b1('0x12')]!==0xc8){logger[_0x05b1('0x13')]('request\x20to\x20'+_0x454a62+'\x20failed,\x20status\x20code\x20=\x20'+_0x203055[_0x05b1('0x12')]+'\x20('+_0x203055['statusMessage']+')');_0x5aa025(new Error('request\x20to\x20'+_0x454a62+_0x05b1('0x14')+_0x203055[_0x05b1('0x12')]+'\x20('+_0x203055[_0x05b1('0x15')]+')'));return;}var _0x344ebf=fs[_0x05b1('0x16')](_0x500f7d);_0x344ebf['on'](_0x05b1('0x17'),function(){logger[_0x05b1('0x18')](_0x05b1('0x19'));_0x344ebf['close'](_0x53484a);});_0x344ebf['on'](_0x05b1('0x13'),function(_0x197458){fs[_0x05b1('0x1a')](_0x500f7d);logger[_0x05b1('0x13')]('download\x20error',_0x197458);_0x5aa025(_0x197458);});_0x203055[_0x05b1('0x1b')](_0x344ebf);})['on']('error',function(_0x4da891){logger[_0x05b1('0x13')](_0x4da891);_0x5aa025(_0x4da891);})['end']();});}function uploadFile(_0x3982bb){return new BPromise(function(_0x833f02,_0x1fbf3e){var _0x7d12ca=urlParse(_0x3982bb);var _0xffe600=_0x7d12ca[_0x05b1('0xe')]===_0x05b1('0x1c')?https:http;var _0xc5926c={'host':_0x7d12ca[_0x05b1('0xf')],'path':_0x7d12ca[_0x05b1('0x1d')],'headers':{'user-agent':_0x05b1('0x10')}};_0xffe600[_0x05b1('0x11')](_0xc5926c,function(_0x1e6ece){if(_0x1e6ece[_0x05b1('0x12')]!==0xc8){_0x1fbf3e(new Error(_0x05b1('0x1e')+_0x3982bb+_0x05b1('0x14')+_0x1e6ece[_0x05b1('0x12')]+'\x20('+_0x1e6ece['statusMessage']+')'));return;}var _0x44593c='';_0x1e6ece['on'](_0x05b1('0x1f'),function(_0x16a44f){_0x44593c+=_0x16a44f;});_0x1e6ece['on'](_0x05b1('0x20'),function(){_0x833f02(_0x44593c);});})['on'](_0x05b1('0x13'),function(_0x227815){_0x1fbf3e(_0x227815);})[_0x05b1('0x20')]();});}function convertFile(_0x35e874,_0xdeda63){return new BPromise(function(_0x4f3b0a,_0x4ae06a){var _0x499856=sox[_0x05b1('0x21')](_0x35e874,_0xdeda63,{'sampleRate':0x1f40,'format':_0x05b1('0x22'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x499856['on'](_0x05b1('0x13'),function(_0x2c36e8){logger['error']('error\x20convert',_0x2c36e8);_0x4ae06a(_0x2c36e8);});_0x499856['on'](_0x05b1('0x20'),function(){logger['info']('finish\x20to\x20convert');_0x4f3b0a();});_0x499856[_0x05b1('0x23')]();});}function base64Decode(_0xa26dbb,_0x39e89c){var _0x45a3fe=path[_0x05b1('0x24')](__dirname,_0x05b1('0x25'),rs[_0x05b1('0x26')](0x4)+_0x05b1('0x27'));fs[_0x05b1('0x28')](_0x45a3fe,_0xa26dbb,_0x05b1('0x29'));return convertFile(_0x45a3fe,_0x39e89c)['then'](function(){try{fs[_0x05b1('0x1a')](_0x45a3fe);fs[_0x05b1('0x2a')](_0x39e89c,_0x05b1('0x2b'));}catch(_0x354ce1){logger['error'](_0x354ce1);}return _0x39e89c[_0x05b1('0x2c')]('.')[0x0];});}function base64Encode(_0x53d819){var _0x3a0f1c=fs[_0x05b1('0x2d')](_0x53d819);return new Buffer(_0x3a0f1c)[_0x05b1('0x2e')]('base64');}exports['googleCloudTTS']=function(_0x3e4ab9,_0xf6d7f7,_0x488da2,_0xd3d12f,_0x12e358,_0x414c1e){var _0x4ec3b0,_0x3143c6;var _0x20d5f7=_0x05b1('0x2f');var _0x5ad9b6=_0x05b1('0x30')+_0x3e4ab9;var _0x2d0917={};if(_0xf6d7f7===_0x05b1('0x31')){_0x2d0917[_0x05b1('0x32')]={'ssml':_0x488da2};}else{_0x2d0917[_0x05b1('0x32')]={'text':_0x488da2};};_0x2d0917[_0x05b1('0x33')]={'languageCode':_0xd3d12f,'ssmlGender':_0x12e358};_0x2d0917[_0x05b1('0x34')]={'audioEncoding':_0x05b1('0x35'),'sampleRateHertz':0x1f40};var _0x3f575d={'url':_0x20d5f7+_0x05b1('0x36')+_0x5ad9b6,'method':_0x05b1('0x37'),'json':!![],'body':_0x2d0917};return rp(_0x3f575d)[_0x05b1('0x38')](function(_0x2570d8){return new BPromise(function(_0x292dca,_0x37729b){_0x4ec3b0=path[_0x05b1('0x24')](__dirname,'tmp',rs[_0x05b1('0x26')](0x4)+_0x05b1('0x39'));var _0x528798=Buffer[_0x05b1('0x3a')](_0x2570d8['audioContent'],_0x05b1('0x29'));return fs[_0x05b1('0x3b')](_0x4ec3b0,_0x528798,function(_0x291563){_0x37729b(_0x291563);},function(_0x5d94e5){fs['chmodSync'](_0x4ec3b0,_0x05b1('0x2b'));_0x292dca(_0x5d94e5);});});})[_0x05b1('0x38')](function(_0x23d029){_0x3143c6=path['resolve'](__dirname,_0x05b1('0x25'),rs['generate'](0x4)+'.wav');return convertFile(_0x4ec3b0,_0x3143c6);})[_0x05b1('0x38')](function(){try{fs[_0x05b1('0x1a')](_0x4ec3b0);fs[_0x05b1('0x2a')](_0x3143c6,_0x05b1('0x2b'));}catch(_0x409308){logger[_0x05b1('0x13')](_0x409308);}logger[_0x05b1('0x18')](_0x05b1('0x3c'),_0x3143c6[_0x05b1('0x2c')]('.')[0x0]);return _0x3143c6[_0x05b1('0x2c')]('.')[0x0];});};exports[_0x05b1('0x3d')]=function(_0x216e2d,_0x5f0f79){var _0x519d06=_0x05b1('0x3e');var _0x4829f8,_0xe93c61;var _0x42008f;var _0x5e351e={'encoding':'utf8','method':_0x05b1('0x37'),'timeout':0x2710,'url':_0x519d06,'headers':{'Content-Type':_0x05b1('0x3f')},'body':_0x05b1('0x40')+encodeURIComponent(JSON['stringify']([[[_0x05b1('0x41'),JSON['stringify']([_0x216e2d,_0x5f0f79||_0x05b1('0x42'),![],_0x05b1('0x43')]),null,_0x05b1('0x44')]]]))};return rp(_0x5e351e)[_0x05b1('0x38')](function(_0x1bd012){try{_0x42008f=eval(_0x1bd012[_0x05b1('0x45')](0x5))[0x0][0x2];}catch(_0x53a26a){throw new Error(_0x05b1('0x46')+res[_0x05b1('0x1f')]);}if(!_0x42008f){throw new Error(_0x05b1('0x47')+lang+'\x22\x20might\x20not\x20exist');}try{_0x42008f=eval(_0x42008f)[0x0];}catch(_0x2fabe2){throw new Error('parse\x20response\x20failed:\x0a'+res['data']);}const _0x2fd836=_0x42008f;_0x4829f8=path[_0x05b1('0x24')](__dirname,_0x05b1('0x25'),rs['generate'](0x4)+_0x05b1('0x39'));fs[_0x05b1('0x28')](_0x4829f8,_0x42008f,{'encoding':_0x05b1('0x29')});_0xe93c61=path[_0x05b1('0x24')](__dirname,_0x05b1('0x25'),rs[_0x05b1('0x26')](0x4)+'.wav');return convertFile(_0x4829f8,_0xe93c61);})[_0x05b1('0x38')](function(){try{fs[_0x05b1('0x1a')](_0x4829f8);fs[_0x05b1('0x2a')](_0xe93c61,_0x05b1('0x2b'));}catch(_0x22c396){logger[_0x05b1('0x13')](_0x22c396);}logger[_0x05b1('0x18')](_0x05b1('0x48'),_0xe93c61[_0x05b1('0x2c')]('.')[0x0]);return _0xe93c61[_0x05b1('0x2c')]('.')[0x0];});};exports[_0x05b1('0x49')]=function(_0x122e96,_0x34ff5a,_0xa6708){return google[_0x05b1('0x4a')](_0x122e96,_0x34ff5a,_0xa6708)[_0x05b1('0x38')](function(_0x13eace){logger[_0x05b1('0x18')](_0x13eace[_0x05b1('0x4b')]);return rp(_0x13eace);})[_0x05b1('0x38')](function(_0x588736){var _0x4e4abe='';var _0x6b06e5=0x0;try{fs['unlink'](_0x122e96);}catch(_0x2ba1a3){logger['error'](_0x2ba1a3);}if(_0x588736&&_0x588736[_0x05b1('0x4c')]){_0x4e4abe=_0x588736[_0x05b1('0x4c')][_0x05b1('0x4d')](function(_0x411ded){return _0x411ded&&_0x411ded[_0x05b1('0x4e')][0x0]&&_0x411ded['alternatives'][0x0]['transcript']?_0x411ded['alternatives'][0x0][_0x05b1('0x4f')]:'';})[_0x05b1('0x50')]('\x0a');_0x6b06e5=_0x588736['results']['map'](function(_0x55a79a){return _0x55a79a&&_0x55a79a[_0x05b1('0x4e')][0x0]&&_0x55a79a['alternatives'][0x0][_0x05b1('0x51')]?_0x55a79a[_0x05b1('0x4e')][0x0]['confidence']:0x0;})[_0x05b1('0x50')]('\x0a');}logger[_0x05b1('0x18')](_0x05b1('0x52'),_0x4e4abe);logger['info'](_0x05b1('0x53'),_0x6b06e5);return{'transcript':_0x4e4abe,'confidence':_0x6b06e5};})['catch'](function(_0x2735e2){logger[_0x05b1('0x13')](_0x05b1('0x54'),_0x2735e2[_0x05b1('0x12')],_0x2735e2['name'],_0x2735e2[_0x05b1('0x55')]);});};exports[_0x05b1('0x56')]=function(_0xbfbbb6,_0x152790,_0x9fb014,_0x174efe){var _0x104d0c=apiai(_0x152790,{'language':_0x174efe||'en'});return _0x104d0c[_0x05b1('0x57')](_0x9fb014,{'sessionId':md5(_0xbfbbb6)})[_0x05b1('0x38')](function(_0x5c8949){logger['info'](JSON[_0x05b1('0x58')](_0x5c8949));return{'source':_0x5c8949[_0x05b1('0x59')][_0x05b1('0x5a')],'resolvedQuery':_0x5c8949['result'][_0x05b1('0x5b')],'action':_0x5c8949['result']['action'],'actionIncomplete':_0x5c8949[_0x05b1('0x59')][_0x05b1('0x5c')],'speech':_0x5c8949[_0x05b1('0x59')]['fulfillment'][_0x05b1('0x5d')],'score':_0x5c8949[_0x05b1('0x59')][_0x05b1('0x5e')],'statusCode':_0x5c8949[_0x05b1('0x5f')][_0x05b1('0x60')],'endConversation':_0x5c8949[_0x05b1('0x59')][_0x05b1('0x61')]['endConversation']||![],'isFallbackIntent':_0x5c8949[_0x05b1('0x59')][_0x05b1('0x61')][_0x05b1('0x62')]};});};exports['googleDialogflowV2']=function(_0xaccbfa,_0x5e8e04,_0x86a6fb,_0x41da7b,_0x4db816,_0x28414e){var _0x45f9eb=_0x41da7b[_0x05b1('0x63')](/\\n/g,'\x0a');var _0x3df998={'credentials':{'private_key':_0x45f9eb,'client_email':_0x86a6fb}};var _0x28b117=new dialogflow[(_0x05b1('0x64'))](_0x3df998);var _0x4c2e69=_0x28b117['sessionPath'](_0x5e8e04,md5(_0xaccbfa));var _0x31dc81={'session':_0x4c2e69,'queryInput':{'text':{'text':_0x4db816,'languageCode':_0x28414e}}};return _0x28b117[_0x05b1('0x65')](_0x31dc81)[_0x05b1('0x38')](function(_0x5b616e){if(_0x5b616e&&_0x5b616e[_0x05b1('0x66')]){logger[_0x05b1('0x18')](_0x05b1('0x67'),JSON['stringify'](_0x5b616e));var _0x3ba86c=_0x5b616e[0x0];if(_0x3ba86c){var _0x10ce08={'action':_0x3ba86c[_0x05b1('0x68')]['action'],'allRequiredParamsPresent':_0x3ba86c[_0x05b1('0x68')][_0x05b1('0x69')],'endConversation':_0x3ba86c[_0x05b1('0x68')][_0x05b1('0x6a')]&&_0x3ba86c[_0x05b1('0x68')]['diagnosticInfo'][_0x05b1('0x6b')]?_0x3ba86c[_0x05b1('0x68')]['diagnosticInfo'][_0x05b1('0x6b')][_0x05b1('0x6c')]['boolValue']:![],'fulfillmentText':_0x3ba86c['queryResult']['fulfillmentText'],'intentName':_0x3ba86c[_0x05b1('0x68')][_0x05b1('0x6d')][_0x05b1('0x6e')],'intentDisplayName':_0x3ba86c['queryResult'][_0x05b1('0x6d')][_0x05b1('0x6f')],'isFallbackIntent':_0x3ba86c[_0x05b1('0x68')]['intent'][_0x05b1('0x70')],'languageCode':_0x3ba86c[_0x05b1('0x68')][_0x05b1('0x71')],'queryText':_0x3ba86c[_0x05b1('0x68')][_0x05b1('0x72')],'responseId':_0x3ba86c[_0x05b1('0x73')],'score':_0x3ba86c['queryResult']['intentDetectionConfidence'],'speech':_0x3ba86c[_0x05b1('0x68')][_0x05b1('0x74')],'providerResponse':JSON[_0x05b1('0x58')](_0x5b616e)};return _0x10ce08;}}});};exports[_0x05b1('0x75')]=function(_0x287d86,_0x483fb6,_0x54d976,_0x5bc551){return tilde[_0x05b1('0x4a')](_0x287d86,_0x483fb6,_0x54d976,_0x5bc551)[_0x05b1('0x38')](function(_0x4e3580){try{fs[_0x05b1('0x1a')](_0x287d86);}catch(_0x3fd299){logger[_0x05b1('0x13')](_0x3fd299);}logger[_0x05b1('0x18')](_0x05b1('0x76'),_0x4e3580[_0x05b1('0x4f')]);logger[_0x05b1('0x18')](_0x05b1('0x77'),_0x4e3580[_0x05b1('0x51')]);return _0x4e3580;});};exports[_0x05b1('0x78')]=function(_0x3a0ae1,_0x14af00,_0x1a5183,_0x226186,_0x596b44,_0x306a30){var _0x1e9211=path['resolve'](__dirname,'tmp',rs['generate'](0x4)+_0x05b1('0x39'));var _0x4b0a76;return aws[_0x05b1('0x79')](_0x3a0ae1,_0x14af00,_0x1a5183,_0x226186,_0x596b44,_0x306a30,_0x1e9211)['then'](function(){_0x4b0a76=path[_0x05b1('0x24')](__dirname,'tmp',rs[_0x05b1('0x26')](0x4)+_0x05b1('0x27'));return convertFile(_0x1e9211,_0x4b0a76);})['then'](function(){try{fs[_0x05b1('0x1a')](_0x1e9211);fs[_0x05b1('0x2a')](_0x4b0a76,_0x05b1('0x2b'));}catch(_0x7ef2b6){logger[_0x05b1('0x13')](_0x7ef2b6);}return _0x4b0a76[_0x05b1('0x2c')]('.')[0x0];});};exports['awsLex']=function(_0x324885,_0x2a31f7,_0xf0e470,_0x5d4514,_0x14862f,_0x426e3f){return aws[_0x05b1('0x7a')](_0x324885,_0x2a31f7,_0xf0e470,_0x5d4514,_0x14862f,_0x426e3f)[_0x05b1('0x38')](function(_0xfc7047){logger['info'](JSON['stringify'](_0xfc7047));return _0xfc7047;});};exports[_0x05b1('0x7b')]=function(_0x192554,_0x284d53,_0x5c4c28,_0x32653e){var _0x1b42d9=util[_0x05b1('0x7c')]('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x192554,encodeURIComponent(_0x284d53),_0x5c4c28,_0x32653e);var _0x3f8c67=path[_0x05b1('0x24')](__dirname,_0x05b1('0x25'),rs[_0x05b1('0x26')](0x4)+_0x05b1('0x39'));var _0x1d584c;return downloadFile(_0x1b42d9,_0x3f8c67)[_0x05b1('0x38')](function(){_0x1d584c=path[_0x05b1('0x24')](__dirname,'tmp',rs['generate'](0x4)+_0x05b1('0x27'));return convertFile(_0x3f8c67,_0x1d584c);})[_0x05b1('0x38')](function(){try{fs[_0x05b1('0x1a')](_0x3f8c67);fs[_0x05b1('0x2a')](_0x1d584c,'777');}catch(_0x1f4ee9){logger[_0x05b1('0x13')](_0x1f4ee9);}return _0x1d584c[_0x05b1('0x2c')]('.')[0x0];});};exports[_0x05b1('0x7d')]=function(_0x46d7b1,_0x5b1218,_0x106a68,_0x20225e){var _0xcd621b=util[_0x05b1('0x7c')](_0x05b1('0x7e'),ISPEECH_API,_0x5b1218,_0x106a68,base64Encode(_0x46d7b1),_0x20225e?util['format'](_0x05b1('0x7f'),encodeURIComponent(_0x20225e)):_0x05b1('0x80'));return uploadFile(_0xcd621b)['then'](function(_0x57871d){return querystring[_0x05b1('0x81')](_0x57871d);});};exports[_0x05b1('0x82')]=function(_0x515c27,_0x5c679a){return sestek[_0x05b1('0x83')](_0x515c27,_0x5c679a)[_0x05b1('0x38')](function(_0x285c6d){logger['info'](JSON['stringify'](_0x285c6d));var _0x3bcbf6={'speech':_0x285c6d['text'],'action':_0x285c6d[_0x05b1('0x84')]?_0x285c6d[_0x05b1('0x84')][_0x05b1('0x85')]:undefined,'actiondata':_0x285c6d[_0x05b1('0x84')]?_0x285c6d[_0x05b1('0x84')][_0x05b1('0x86')]:undefined};if(_0x285c6d[_0x05b1('0x84')]&&_0x285c6d[_0x05b1('0x84')]['AudioFromTts']){return base64Decode(_0x285c6d['channelData']['AudioFromTts'][_0x05b1('0x87')],path[_0x05b1('0x24')](__dirname,'tmp',rs['generate'](0x4)+_0x05b1('0x27')))[_0x05b1('0x38')](function(_0x436a2e){_0x3bcbf6[_0x05b1('0x88')]=_0x436a2e;return _0x3bcbf6;});}return _0x3bcbf6;});};exports['dirName']=function(){return __dirname;}; \ No newline at end of file +var _0x5af1=['queryText','responseId','asr','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','polly','lex','ispeechTTS','format','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','freeform=3','text','channelData','CustomAction','AudioFromTts','Data','audiofile','dirName','apiai-promise','bluebird','dialogflow','http','https','path','querystring','request-promise','randomstring','sox','url','parse','util','./aws','./google','./sestek','./tilde','../../../config/logger','agi','https://api.ispeech.org/api/rest','protocol','https:','WHAT_EVER','error','statusCode','statusMessage','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','createWriteStream','finish','info','finish\x20download\x20file','close','unlink','pipe','end','host','get','data','transcode','wav','error\x20convert','finish\x20to\x20convert','tmp','generate','.wav','writeFileSync','then','chmodSync','777','split','toString','googleCloudTTS','?key=','input','voice','audioConfig','MP3','text:synthesize','POST','resolve','.mp3','from','audioContent','base64','writeFile','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','stringify','jQ1olc','generic','slice','parse\x20response\x20failed:\x0a','length','text\x20length\x20limit\x20reached','\x22\x20might\x20not\x20exist','goggleTTS\x20path','googleASR','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','message','googleDialogflow','textRequest','result','resolvedQuery','action','actionIncomplete','score','status','metadata','endConversation','googleDialogflowV2','SessionsClient','sessionPath','detectIntent','Dialogflow\x20V2\x20response:','queryResult','allRequiredParamsPresent','diagnosticInfo','fields','boolValue','fulfillmentText','name','intent','displayName','isFallback','languageCode'];(function(_0x45346d,_0xffd56b){var _0x5ce7ca=function(_0x27ce87){while(--_0x27ce87){_0x45346d['push'](_0x45346d['shift']());}};_0x5ce7ca(++_0xffd56b);}(_0x5af1,0x128));var _0x15af=function(_0x3ab9ee,_0x4a74b8){_0x3ab9ee=_0x3ab9ee-0x0;var _0x82ee88=_0x5af1[_0x3ab9ee];return _0x82ee88;};'use strict';var apiai=require(_0x15af('0x0'));var BPromise=require(_0x15af('0x1'));var dialogflow=require(_0x15af('0x2'));var fs=require('fs');var http=require(_0x15af('0x3'));var https=require(_0x15af('0x4'));var md5=require('md5');var path=require(_0x15af('0x5'));var querystring=require(_0x15af('0x6'));var rp=require(_0x15af('0x7'));var rs=require(_0x15af('0x8'));var sox=require(_0x15af('0x9'));var tts=require('google-tts-api');var urlParse=require(_0x15af('0xa'))[_0x15af('0xb')];var util=require(_0x15af('0xc'));var aws=require(_0x15af('0xd'));var google=require(_0x15af('0xe'));var sestek=require(_0x15af('0xf'));var tilde=require(_0x15af('0x10'));var logger=require(_0x15af('0x11'))(_0x15af('0x12'));var ISPEECH_API=_0x15af('0x13');function downloadFile(_0x22e959,_0x4acee4){return new BPromise(function(_0x2802e9,_0x3db28b){var _0x3693e7=urlParse(_0x22e959);var _0x9f7e8c=_0x3693e7[_0x15af('0x14')]===_0x15af('0x15')?https:http;var _0x2b5c60={'host':_0x3693e7['host'],'path':_0x3693e7[_0x15af('0x5')],'headers':{'user-agent':_0x15af('0x16')}};_0x9f7e8c['get'](_0x2b5c60,function(_0x2d1209){if(_0x2d1209['statusCode']!==0xc8){logger[_0x15af('0x17')]('request\x20to\x20'+_0x22e959+'\x20failed,\x20status\x20code\x20=\x20'+_0x2d1209[_0x15af('0x18')]+'\x20('+_0x2d1209[_0x15af('0x19')]+')');_0x3db28b(new Error(_0x15af('0x1a')+_0x22e959+_0x15af('0x1b')+_0x2d1209[_0x15af('0x18')]+'\x20('+_0x2d1209[_0x15af('0x19')]+')'));return;}var _0x51df2f=fs[_0x15af('0x1c')](_0x4acee4);_0x51df2f['on'](_0x15af('0x1d'),function(){logger[_0x15af('0x1e')](_0x15af('0x1f'));_0x51df2f[_0x15af('0x20')](_0x2802e9);});_0x51df2f['on']('error',function(_0x3b604d){fs[_0x15af('0x21')](_0x4acee4);logger[_0x15af('0x17')]('download\x20error',_0x3b604d);_0x3db28b(_0x3b604d);});_0x2d1209[_0x15af('0x22')](_0x51df2f);})['on']('error',function(_0x5676e6){logger['error'](_0x5676e6);_0x3db28b(_0x5676e6);})[_0x15af('0x23')]();});}function uploadFile(_0xc9bbc7){return new BPromise(function(_0x535d21,_0x7f2aff){var _0x3e3ce8=urlParse(_0xc9bbc7);var _0x37ffbc=_0x3e3ce8['protocol']===_0x15af('0x15')?https:http;var _0x47c8a5={'host':_0x3e3ce8[_0x15af('0x24')],'path':_0x3e3ce8[_0x15af('0x5')],'headers':{'user-agent':'WHAT_EVER'}};_0x37ffbc[_0x15af('0x25')](_0x47c8a5,function(_0x237dae){if(_0x237dae[_0x15af('0x18')]!==0xc8){_0x7f2aff(new Error(_0x15af('0x1a')+_0xc9bbc7+'\x20failed,\x20status\x20code\x20=\x20'+_0x237dae['statusCode']+'\x20('+_0x237dae[_0x15af('0x19')]+')'));return;}var _0x4b77b9='';_0x237dae['on'](_0x15af('0x26'),function(_0x597cba){_0x4b77b9+=_0x597cba;});_0x237dae['on']('end',function(){_0x535d21(_0x4b77b9);});})['on'](_0x15af('0x17'),function(_0x30bb43){_0x7f2aff(_0x30bb43);})[_0x15af('0x23')]();});}function convertFile(_0x4acc3c,_0x56809d){return new BPromise(function(_0x1af20b,_0x1527c7){var _0x2d057c=sox[_0x15af('0x27')](_0x4acc3c,_0x56809d,{'sampleRate':0x1f40,'format':_0x15af('0x28'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x2d057c['on'](_0x15af('0x17'),function(_0x3bed61){logger[_0x15af('0x17')](_0x15af('0x29'),_0x3bed61);_0x1527c7(_0x3bed61);});_0x2d057c['on'](_0x15af('0x23'),function(){logger['info'](_0x15af('0x2a'));_0x1af20b();});_0x2d057c['start']();});}function base64Decode(_0x603b98,_0x272056){var _0x22801b=path['resolve'](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+_0x15af('0x2d'));fs[_0x15af('0x2e')](_0x22801b,_0x603b98,'base64');return convertFile(_0x22801b,_0x272056)[_0x15af('0x2f')](function(){try{fs[_0x15af('0x21')](_0x22801b);fs[_0x15af('0x30')](_0x272056,_0x15af('0x31'));}catch(_0x410374){logger[_0x15af('0x17')](_0x410374);}return _0x272056[_0x15af('0x32')]('.')[0x0];});}function base64Encode(_0x584646){var _0x59b049=fs['readFileSync'](_0x584646);return new Buffer(_0x59b049)[_0x15af('0x33')]('base64');}exports[_0x15af('0x34')]=function(_0x5f102a,_0x388d4f,_0x1aa9fb,_0x3163d9,_0x1596c4,_0x3c64ae){var _0x10ee35,_0x275380;var _0x555e9d='https://texttospeech.googleapis.com/v1/';var _0x373f57=_0x15af('0x35')+_0x5f102a;var _0x2440ac={};if(_0x388d4f==='ssml'){_0x2440ac['input']={'ssml':_0x1aa9fb};}else{_0x2440ac[_0x15af('0x36')]={'text':_0x1aa9fb};};_0x2440ac[_0x15af('0x37')]={'languageCode':_0x3163d9,'ssmlGender':_0x1596c4};_0x2440ac[_0x15af('0x38')]={'audioEncoding':_0x15af('0x39'),'sampleRateHertz':0x1f40};var _0x1c3a89={'url':_0x555e9d+_0x15af('0x3a')+_0x373f57,'method':_0x15af('0x3b'),'json':!![],'body':_0x2440ac};return rp(_0x1c3a89)['then'](function(_0x5973e6){return new BPromise(function(_0x5d0573,_0x45d642){_0x10ee35=path[_0x15af('0x3c')](__dirname,'tmp',rs[_0x15af('0x2c')](0x4)+_0x15af('0x3d'));var _0x5b508f=Buffer[_0x15af('0x3e')](_0x5973e6[_0x15af('0x3f')],_0x15af('0x40'));return fs[_0x15af('0x41')](_0x10ee35,_0x5b508f,function(_0x56361f){_0x45d642(_0x56361f);},function(_0x171a52){fs[_0x15af('0x30')](_0x10ee35,'777');_0x5d0573(_0x171a52);});});})[_0x15af('0x2f')](function(_0x171ce1){_0x275380=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+_0x15af('0x2d'));return convertFile(_0x10ee35,_0x275380);})['then'](function(){try{fs[_0x15af('0x21')](_0x10ee35);fs[_0x15af('0x30')](_0x275380,_0x15af('0x31'));}catch(_0x4d2704){logger[_0x15af('0x17')](_0x4d2704);}logger[_0x15af('0x1e')](_0x15af('0x42'),_0x275380[_0x15af('0x32')]('.')[0x0]);return _0x275380['split']('.')[0x0];});};exports[_0x15af('0x43')]=function(_0xfe9d03,_0x3eb7ff){var _0x1a2504=_0x15af('0x44');var _0x47342c,_0x46296c;var _0x3d642f;var _0x1eeff0={'encoding':'utf8','method':'POST','timeout':0x2710,'url':_0x1a2504,'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':'f.req='+encodeURIComponent(JSON[_0x15af('0x45')]([[[_0x15af('0x46'),JSON[_0x15af('0x45')]([_0xfe9d03,_0x3eb7ff||'en',![],'null']),null,_0x15af('0x47')]]]))};return rp(_0x1eeff0)[_0x15af('0x2f')](function(_0x3b389f){try{_0x3d642f=eval(_0x3b389f[_0x15af('0x48')](0x5))[0x0][0x2];}catch(_0x4267e6){throw new Error(_0x15af('0x49')+_0x3b389f['data']);}if(!_0x3d642f){if(_0xfe9d03[_0x15af('0x4a')]>0xc8){throw new Error(_0x15af('0x4b'));}else{throw new Error('lang\x20\x22'+_0x3eb7ff+_0x15af('0x4c'));}}try{_0x3d642f=eval(_0x3d642f)[0x0];}catch(_0x819beb){throw new Error(_0x15af('0x49')+res[_0x15af('0x26')]);}const _0x32eb63=_0x3d642f;_0x47342c=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+'.mp3');fs[_0x15af('0x2e')](_0x47342c,_0x3d642f,{'encoding':'base64'});_0x46296c=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+'.wav');return convertFile(_0x47342c,_0x46296c);})[_0x15af('0x2f')](function(){try{fs['unlink'](_0x47342c);fs[_0x15af('0x30')](_0x46296c,'777');}catch(_0x2dafa7){logger[_0x15af('0x17')](_0x2dafa7);}logger[_0x15af('0x1e')](_0x15af('0x4d'),_0x46296c[_0x15af('0x32')]('.')[0x0]);return _0x46296c[_0x15af('0x32')]('.')[0x0];});};exports[_0x15af('0x4e')]=function(_0x18820b,_0xb0cc7d,_0x300c87){return google['asr'](_0x18820b,_0xb0cc7d,_0x300c87)['then'](function(_0x1ed4ac){logger[_0x15af('0x1e')](_0x1ed4ac[_0x15af('0x4f')]);return rp(_0x1ed4ac);})[_0x15af('0x2f')](function(_0x5b993c){var _0x225f90='';var _0x23fbad=0x0;try{fs['unlink'](_0x18820b);}catch(_0x17aedd){logger[_0x15af('0x17')](_0x17aedd);}if(_0x5b993c&&_0x5b993c[_0x15af('0x50')]){_0x225f90=_0x5b993c[_0x15af('0x50')][_0x15af('0x51')](function(_0x1f4188){return _0x1f4188&&_0x1f4188['alternatives'][0x0]&&_0x1f4188[_0x15af('0x52')][0x0][_0x15af('0x53')]?_0x1f4188[_0x15af('0x52')][0x0][_0x15af('0x53')]:'';})[_0x15af('0x54')]('\x0a');_0x23fbad=_0x5b993c[_0x15af('0x50')][_0x15af('0x51')](function(_0x5cfa2f){return _0x5cfa2f&&_0x5cfa2f[_0x15af('0x52')][0x0]&&_0x5cfa2f[_0x15af('0x52')][0x0]['confidence']?_0x5cfa2f[_0x15af('0x52')][0x0][_0x15af('0x55')]:0x0;})[_0x15af('0x54')]('\x0a');}logger[_0x15af('0x1e')](_0x15af('0x56'),_0x225f90);logger[_0x15af('0x1e')](_0x15af('0x57'),_0x23fbad);return{'transcript':_0x225f90,'confidence':_0x23fbad};})['catch'](function(_0x25d7bf){logger['error']('[%s]\x20%s:%s',_0x25d7bf['statusCode'],_0x25d7bf['name'],_0x25d7bf[_0x15af('0x58')]);});};exports[_0x15af('0x59')]=function(_0x1bc2ae,_0x3cf963,_0x13ed8d,_0x143f88){var _0x6a4d75=apiai(_0x3cf963,{'language':_0x143f88||'en'});return _0x6a4d75[_0x15af('0x5a')](_0x13ed8d,{'sessionId':md5(_0x1bc2ae)})[_0x15af('0x2f')](function(_0x5dc01c){logger['info'](JSON[_0x15af('0x45')](_0x5dc01c));return{'source':_0x5dc01c[_0x15af('0x5b')]['source'],'resolvedQuery':_0x5dc01c[_0x15af('0x5b')][_0x15af('0x5c')],'action':_0x5dc01c[_0x15af('0x5b')][_0x15af('0x5d')],'actionIncomplete':_0x5dc01c[_0x15af('0x5b')][_0x15af('0x5e')],'speech':_0x5dc01c[_0x15af('0x5b')]['fulfillment']['speech'],'score':_0x5dc01c[_0x15af('0x5b')][_0x15af('0x5f')],'statusCode':_0x5dc01c[_0x15af('0x60')]['code'],'endConversation':_0x5dc01c[_0x15af('0x5b')][_0x15af('0x61')][_0x15af('0x62')]||![],'isFallbackIntent':_0x5dc01c[_0x15af('0x5b')][_0x15af('0x61')]['isFallbackIntent']};});};exports[_0x15af('0x63')]=function(_0x2af1d2,_0x495fde,_0x2010ff,_0x3fb1f0,_0x4fb393,_0x11e758){var _0x185bd2=_0x3fb1f0['replace'](/\\n/g,'\x0a');var _0x531bc7={'credentials':{'private_key':_0x185bd2,'client_email':_0x2010ff}};var _0x4f28f3=new dialogflow[(_0x15af('0x64'))](_0x531bc7);var _0x14ccc3=_0x4f28f3[_0x15af('0x65')](_0x495fde,md5(_0x2af1d2));var _0x418be0={'session':_0x14ccc3,'queryInput':{'text':{'text':_0x4fb393,'languageCode':_0x11e758}}};return _0x4f28f3[_0x15af('0x66')](_0x418be0)['then'](function(_0x155a74){if(_0x155a74&&_0x155a74[_0x15af('0x4a')]){logger['info'](_0x15af('0x67'),JSON[_0x15af('0x45')](_0x155a74));var _0x2f1a8d=_0x155a74[0x0];if(_0x2f1a8d){var _0x2010d6={'action':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x5d')],'allRequiredParamsPresent':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x69')],'endConversation':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6a')]&&_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6a')][_0x15af('0x6b')]?_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6a')][_0x15af('0x6b')]['end_conversation'][_0x15af('0x6c')]:![],'fulfillmentText':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6d')],'intentName':_0x2f1a8d[_0x15af('0x68')]['intent'][_0x15af('0x6e')],'intentDisplayName':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6f')][_0x15af('0x70')],'isFallbackIntent':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6f')][_0x15af('0x71')],'languageCode':_0x2f1a8d['queryResult'][_0x15af('0x72')],'queryText':_0x2f1a8d['queryResult'][_0x15af('0x73')],'responseId':_0x2f1a8d[_0x15af('0x74')],'score':_0x2f1a8d[_0x15af('0x68')]['intentDetectionConfidence'],'speech':_0x2f1a8d[_0x15af('0x68')][_0x15af('0x6d')],'providerResponse':JSON['stringify'](_0x155a74)};return _0x2010d6;}}});};exports['tildeASR']=function(_0x31f75d,_0x4e3dec,_0x3257e0,_0x47d8d0){return tilde[_0x15af('0x75')](_0x31f75d,_0x4e3dec,_0x3257e0,_0x47d8d0)[_0x15af('0x2f')](function(_0x51d8f8){try{fs[_0x15af('0x21')](_0x31f75d);}catch(_0x29f2f9){logger['error'](_0x29f2f9);}logger[_0x15af('0x1e')](_0x15af('0x76'),_0x51d8f8['transcript']);logger['info'](_0x15af('0x77'),_0x51d8f8[_0x15af('0x55')]);return _0x51d8f8;});};exports[_0x15af('0x78')]=function(_0x5909fa,_0x54a03c,_0xde009b,_0x136b26,_0x605c3a,_0x284286){var _0x268059=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+_0x15af('0x3d'));var _0x352979;return aws[_0x15af('0x79')](_0x5909fa,_0x54a03c,_0xde009b,_0x136b26,_0x605c3a,_0x284286,_0x268059)[_0x15af('0x2f')](function(){_0x352979=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+_0x15af('0x2d'));return convertFile(_0x268059,_0x352979);})[_0x15af('0x2f')](function(){try{fs[_0x15af('0x21')](_0x268059);fs[_0x15af('0x30')](_0x352979,_0x15af('0x31'));}catch(_0x4f0271){logger[_0x15af('0x17')](_0x4f0271);}return _0x352979[_0x15af('0x32')]('.')[0x0];});};exports['awsLex']=function(_0x260c74,_0x48d451,_0x3600c8,_0x362904,_0x2b8bea,_0x48629c){return aws[_0x15af('0x7a')](_0x260c74,_0x48d451,_0x3600c8,_0x362904,_0x2b8bea,_0x48629c)[_0x15af('0x2f')](function(_0x925bca){logger['info'](JSON[_0x15af('0x45')](_0x925bca));return _0x925bca;});};exports[_0x15af('0x7b')]=function(_0x5b8c1b,_0x303273,_0x2d0298,_0x439689){var _0x1d6a1f=util[_0x15af('0x7c')](_0x15af('0x7d'),ISPEECH_API,_0x5b8c1b,encodeURIComponent(_0x303273),_0x2d0298,_0x439689);var _0x49bf1b=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+_0x15af('0x3d'));var _0xc26e49;return downloadFile(_0x1d6a1f,_0x49bf1b)['then'](function(){_0xc26e49=path[_0x15af('0x3c')](__dirname,_0x15af('0x2b'),rs[_0x15af('0x2c')](0x4)+_0x15af('0x2d'));return convertFile(_0x49bf1b,_0xc26e49);})[_0x15af('0x2f')](function(){try{fs['unlink'](_0x49bf1b);fs[_0x15af('0x30')](_0xc26e49,_0x15af('0x31'));}catch(_0x298e1f){logger['error'](_0x298e1f);}return _0xc26e49['split']('.')[0x0];});};exports[_0x15af('0x7e')]=function(_0x447f14,_0x5abb8f,_0x4e8b88,_0x4a1a13){var _0x4d8312=util[_0x15af('0x7c')](_0x15af('0x7f'),ISPEECH_API,_0x5abb8f,_0x4e8b88,base64Encode(_0x447f14),_0x4a1a13?util[_0x15af('0x7c')](_0x15af('0x80'),encodeURIComponent(_0x4a1a13)):_0x15af('0x81'));return uploadFile(_0x4d8312)['then'](function(_0x5a2877){return querystring[_0x15af('0xb')](_0x5a2877);});};exports['sestekNDA']=function(_0x3615d5,_0x1a14b8){return sestek['nda'](_0x3615d5,_0x1a14b8)[_0x15af('0x2f')](function(_0x5d3705){logger[_0x15af('0x1e')](JSON[_0x15af('0x45')](_0x5d3705));var _0x105a94={'speech':_0x5d3705[_0x15af('0x82')],'action':_0x5d3705[_0x15af('0x83')]?_0x5d3705['channelData'][_0x15af('0x84')]:undefined,'actiondata':_0x5d3705[_0x15af('0x83')]?_0x5d3705[_0x15af('0x83')]['CustomActionData']:undefined};if(_0x5d3705[_0x15af('0x83')]&&_0x5d3705[_0x15af('0x83')]['AudioFromTts']){return base64Decode(_0x5d3705[_0x15af('0x83')][_0x15af('0x85')][_0x15af('0x86')],path[_0x15af('0x3c')](__dirname,'tmp',rs[_0x15af('0x2c')](0x4)+'.wav'))[_0x15af('0x2f')](function(_0x1e24a1){_0x105a94[_0x15af('0x87')]=_0x1e24a1;return _0x105a94;});}return _0x105a94;});};exports[_0x15af('0x88')]=function(){return __dirname;}; \ No newline at end of file diff --git a/server/services/agi/scripts/sestek/index.js b/server/services/agi/scripts/sestek/index.js index 8f34e03..ec30127 100644 --- a/server/services/agi/scripts/sestek/index.js +++ b/server/services/agi/scripts/sestek/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var nda=require('./nda');module['exports']={'nda':nda}; \ No newline at end of file +var _0x53d0=['exports','./nda'];(function(_0x3efe9b,_0x5b41a8){var _0x132073=function(_0x34459e){while(--_0x34459e){_0x3efe9b['push'](_0x3efe9b['shift']());}};_0x132073(++_0x5b41a8);}(_0x53d0,0x1ab));var _0x053d=function(_0x271954,_0x2cad70){_0x271954=_0x271954-0x0;var _0x2fb9f0=_0x53d0[_0x271954];return _0x2fb9f0;};var nda=require(_0x053d('0x0'));module[_0x053d('0x1')]={'nda':nda}; \ No newline at end of file diff --git a/server/services/agi/scripts/sestek/nda/index.js b/server/services/agi/scripts/sestek/nda/index.js index b46aa22..3232a0a 100644 --- a/server/services/agi/scripts/sestek/nda/index.js +++ b/server/services/agi/scripts/sestek/nda/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x840a=['ndaactivity_type','message','uniqueid','calleridname','extension','text','Bearer\x20','project','channelData','ndagenerate_audio','body','custom_action','CustomAction','custom_action_data','info','stringify','request-promise','url','../../../../../config/logger','agi','exports','POST','resolve','ndauth_url','/token','password','username','then','ndassistant_url','/api/NaturalDialogAssistant/v1/Run'];(function(_0x4e6ce7,_0x17a05d){var _0x304c80=function(_0x28afd4){while(--_0x28afd4){_0x4e6ce7['push'](_0x4e6ce7['shift']());}};_0x304c80(++_0x17a05d);}(_0x840a,0x88));var _0xa840=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x840a[_0x2641f9];return _0x585741;};'use strict';var rp=require(_0xa840('0x0'));var url=require(_0xa840('0x1'));var logger=require(_0xa840('0x2'))(_0xa840('0x3'));module[_0xa840('0x4')]=function(_0x3a007e,_0x56445b){var _0x516b46={'method':_0xa840('0x5'),'uri':url[_0xa840('0x6')](_0x56445b[_0xa840('0x7')],_0xa840('0x8')),'form':{'grant_type':_0xa840('0x9'),'username':_0x56445b[_0xa840('0xa')],'password':_0x56445b[_0xa840('0x9')]},'json':!![]};return rp(_0x516b46)[_0xa840('0xb')](function(_0x4eda7d){var _0x4505ff={'method':_0xa840('0x5'),'uri':url['resolve'](_0x56445b[_0xa840('0xc')],_0xa840('0xd')),'body':{'type':_0x56445b[_0xa840('0xe')]||_0xa840('0xf'),'channelId':'Nda','conversation':{'id':_0x3a007e[_0xa840('0x10')]},'from':{'id':_0x3a007e['callerid'],'name':_0x3a007e[_0xa840('0x11')]},'recipient':{'id':_0x3a007e['dnid'],'name':_0x3a007e[_0xa840('0x12')]},'text':_0x56445b[_0xa840('0x13')],'channelData':{}},'headers':{'Authorization':_0xa840('0x14')+_0x4eda7d['access_token']},'json':!![]};if(_0x56445b[_0xa840('0x15')]){_0x4505ff['body'][_0xa840('0x16')]['ProjectName']=_0x56445b[_0xa840('0x15')];}if(_0x56445b[_0xa840('0x17')]=='1'){_0x4505ff[_0xa840('0x18')][_0xa840('0x16')]['AudioOutputSettings']={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':'audio/wav'};}if(_0x56445b[_0xa840('0x19')]){_0x4505ff[_0xa840('0x18')][_0xa840('0x16')][_0xa840('0x1a')]=_0x56445b[_0xa840('0x19')];if(_0x56445b[_0xa840('0x1b')]){_0x4505ff[_0xa840('0x18')][_0xa840('0x16')]['CustomActionData']=_0x56445b['custom_action_data'];}}logger[_0xa840('0x1c')](JSON[_0xa840('0x1d')](_0x4505ff));return rp(_0x4505ff);});}; \ No newline at end of file +var _0x5df5=['custom_action_data','CustomActionData','stringify','request-promise','url','../../../../../config/logger','agi','exports','password','resolve','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','message','uniqueid','dnid','text','Bearer\x20','project','body','channelData','ndagenerate_audio','AudioOutputSettings','audio/wav','custom_action','CustomAction'];(function(_0x2fb511,_0x41cf72){var _0x44d001=function(_0x49f2cb){while(--_0x49f2cb){_0x2fb511['push'](_0x2fb511['shift']());}};_0x44d001(++_0x41cf72);}(_0x5df5,0xb2));var _0x55df=function(_0x406b53,_0x30ade3){_0x406b53=_0x406b53-0x0;var _0x3c83a0=_0x5df5[_0x406b53];return _0x3c83a0;};'use strict';var rp=require(_0x55df('0x0'));var url=require(_0x55df('0x1'));var logger=require(_0x55df('0x2'))(_0x55df('0x3'));module[_0x55df('0x4')]=function(_0x10ac6d,_0x5aa0dc){var _0x194457={'method':'POST','uri':url['resolve'](_0x5aa0dc['ndauth_url'],'/token'),'form':{'grant_type':_0x55df('0x5'),'username':_0x5aa0dc['username'],'password':_0x5aa0dc[_0x55df('0x5')]},'json':!![]};return rp(_0x194457)['then'](function(_0x471645){var _0x36c50f={'method':'POST','uri':url[_0x55df('0x6')](_0x5aa0dc[_0x55df('0x7')],_0x55df('0x8')),'body':{'type':_0x5aa0dc['ndaactivity_type']||_0x55df('0x9'),'channelId':'Nda','conversation':{'id':_0x10ac6d[_0x55df('0xa')]},'from':{'id':_0x10ac6d['callerid'],'name':_0x10ac6d['calleridname']},'recipient':{'id':_0x10ac6d[_0x55df('0xb')],'name':_0x10ac6d['extension']},'text':_0x5aa0dc[_0x55df('0xc')],'channelData':{}},'headers':{'Authorization':_0x55df('0xd')+_0x471645['access_token']},'json':!![]};if(_0x5aa0dc[_0x55df('0xe')]){_0x36c50f[_0x55df('0xf')][_0x55df('0x10')]['ProjectName']=_0x5aa0dc['project'];}if(_0x5aa0dc[_0x55df('0x11')]=='1'){_0x36c50f[_0x55df('0xf')][_0x55df('0x10')][_0x55df('0x12')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x55df('0x13')};}if(_0x5aa0dc[_0x55df('0x14')]){_0x36c50f[_0x55df('0xf')]['channelData'][_0x55df('0x15')]=_0x5aa0dc['custom_action'];if(_0x5aa0dc[_0x55df('0x16')]){_0x36c50f['body'][_0x55df('0x10')][_0x55df('0x17')]=_0x5aa0dc[_0x55df('0x16')];}}logger['info'](JSON[_0x55df('0x18')](_0x36c50f));return rp(_0x36c50f);});}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/asr/index.js b/server/services/agi/scripts/tilde/asr/index.js index f4a57e9..5c0dd2d 100644 --- a/server/services/agi/scripts/tilde/asr/index.js +++ b/server/services/agi/scripts/tilde/asr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb140=['exports','./lib/api'];(function(_0x305b58,_0x5e06e6){var _0x1491a5=function(_0x606b85){while(--_0x606b85){_0x305b58['push'](_0x305b58['shift']());}};_0x1491a5(++_0x5e06e6);}(_0xb140,0xed));var _0x0b14=function(_0x1f0c26,_0x365f93){_0x1f0c26=_0x1f0c26-0x0;var _0x2ebbc6=_0xb140[_0x1f0c26];return _0x2ebbc6;};'use strict';var asr=require(_0x0b14('0x0'));module[_0x0b14('0x1')]=function(_0x5886a2,_0x1e1f9a,_0x5334e9,_0x5efb20){return asr(_0x5886a2,_0x1e1f9a,_0x5334e9,_0x5efb20);}; \ No newline at end of file +var _0xb24e=['./lib/api','exports'];(function(_0x42d33e,_0x194e00){var _0x121a4f=function(_0xbaedca){while(--_0xbaedca){_0x42d33e['push'](_0x42d33e['shift']());}};_0x121a4f(++_0x194e00);}(_0xb24e,0x178));var _0xeb24=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xb24e[_0x40a045];return _0x1a687c;};'use strict';var asr=require(_0xeb24('0x0'));module[_0xeb24('0x1')]=function(_0x12bb83,_0x90488c,_0x5ea7e9,_0x1623a2){return asr(_0x12bb83,_0x90488c,_0x5ea7e9,_0x1623a2);}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/asr/lib/api.js b/server/services/agi/scripts/tilde/asr/lib/api.js index 48bd046..600e063 100644 --- a/server/services/agi/scripts/tilde/asr/lib/api.js +++ b/server/services/agi/scripts/tilde/asr/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xce33=['bluebird','lodash','moment','crypto','../../../../../../config/logger','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','createHash','sha1','update','digest','hex','Open\x20Tilde\x20ASR\x20socket','unix','send','createReadStream','close','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','parse','result','info','Tilde\x20ASR\x20hypoteses','stringify','hypotheses','likelihood','Success.','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isNil','isObject','open','message'];(function(_0x1d25e9,_0x5292e6){var _0x1a348d=function(_0x5b568e){while(--_0x5b568e){_0x1d25e9['push'](_0x1d25e9['shift']());}};_0x1a348d(++_0x5292e6);}(_0xce33,0x171));var _0x3ce3=function(_0x1afa30,_0xc036d5){_0x1afa30=_0x1afa30-0x0;var _0x45e4e6=_0xce33[_0x1afa30];return _0x45e4e6;};'use strict';var BPromise=require(_0x3ce3('0x0'));var _=require(_0x3ce3('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0x3ce3('0x2'));var crypto=require(_0x3ce3('0x3'));var logger=require(_0x3ce3('0x4'))('agi');module['exports']=function(_0x27eb66,_0x3ba47d,_0x2b219e,_0x2af402){return new BPromise(function(_0x43deac,_0x25fcac){logger['info'](_0x3ce3('0x5'),_0x2af402||_0x3ce3('0x6'));var _0x504006=new WebSocket(_0x2af402||_0x3ce3('0x6'),{'perMessageDeflate':![]});var _0x15d4a0='';var _0x3883aa='0';var _0x537cca='1';var _0x361237='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';function _0x3d92b8(_0x3157b6){var _0x5d1d94=crypto[_0x3ce3('0x7')](_0x3ce3('0x8'));_0x5d1d94[_0x3ce3('0x9')](_0x3157b6);return _0x5d1d94[_0x3ce3('0xa')](_0x3ce3('0xb'));}function _0x173b47(){try{logger['info'](_0x3ce3('0xc'));var _0x41ab91=moment()[_0x3ce3('0xd')]();var _0x2ca275=_0x3d92b8(_0x41ab91+_0x3ba47d+_0x2b219e);_0x504006[_0x3ce3('0xe')](JSON['stringify']({'appID':_0x3ba47d,'timestamp':_0x41ab91,'appKey':_0x2ca275}));var _0x46f15d=fs[_0x3ce3('0xf')](_0x27eb66);_0x46f15d['on']('data',function(_0x4c3bee){_0x504006[_0x3ce3('0xe')](_0x4c3bee);});_0x46f15d['on'](_0x3ce3('0x10'),function(){_0x504006[_0x3ce3('0xe')](_0x3ce3('0x11'));});}catch(_0x3403a0){logger[_0x3ce3('0x12')](_0x3ce3('0x13'),JSON['stringify'](_0x3403a0));_0x504006[_0x3ce3('0x14')]();}}function _0xb3146(_0x30d350){try{if(_0x30d350){var _0x5a96e1=JSON[_0x3ce3('0x15')](_0x30d350);switch(_0x5a96e1['status']){case 0x0:if(_0x5a96e1['result']){if(_0x5a96e1[_0x3ce3('0x16')]['final']){logger[_0x3ce3('0x17')](_0x3ce3('0x18'),JSON[_0x3ce3('0x19')](_0x5a96e1['result'][_0x3ce3('0x1a')]));_0x15d4a0=_0x5a96e1['result'][_0x3ce3('0x1a')][0x0]['transcript'];_0x3883aa=_0x5a96e1[_0x3ce3('0x16')][_0x3ce3('0x1a')][0x0][_0x3ce3('0x1b')];_0x537cca='0';_0x361237=_0x3ce3('0x1c');_0x504006[_0x3ce3('0x14')]();}}break;case 0x1:logger['info'](_0x3ce3('0x1d'));_0x537cca='1';_0x361237='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';break;case 0x2:logger[_0x3ce3('0x17')](_0x3ce3('0x1e'));_0x537cca='2';_0x361237=_0x3ce3('0x1e');break;case 0x9:logger[_0x3ce3('0x17')](_0x3ce3('0x1f'));_0x537cca='9';_0x361237=_0x3ce3('0x1f');break;case 0xa:logger['info']('Authentication\x20failed.');_0x537cca='10';_0x361237=_0x3ce3('0x20');break;case 0xb:logger[_0x3ce3('0x17')](_0x3ce3('0x21'));_0x537cca='11';_0x361237=_0x3ce3('0x21');}}}catch(_0x57344d){logger['error'](_0x3ce3('0x22'),JSON['stringify'](_0x57344d));_0x504006['terminate']();}}function _0x138b0b(){logger[_0x3ce3('0x17')](_0x3ce3('0x23'));_0x43deac({'transcript':_0x15d4a0,'confidence':_0x3883aa,'status':_0x537cca,'status_message':_0x361237});}function _0x169914(_0x3cc131){logger['error'](_0x3ce3('0x24'));if(!_[_0x3ce3('0x25')](_0x3cc131)){logger[_0x3ce3('0x12')](_[_0x3ce3('0x26')](_0x3cc131)?JSON[_0x3ce3('0x19')](_0x3cc131):_0x3cc131);}}_0x504006['on'](_0x3ce3('0x27'),_0x173b47);_0x504006['on'](_0x3ce3('0x28'),_0xb3146);_0x504006['on'](_0x3ce3('0x10'),_0x138b0b);_0x504006['on']('error',_0x169914);});}; \ No newline at end of file +var _0xe9a2=['hex','Open\x20Tilde\x20ASR\x20socket','send','stringify','createReadStream','data','close','Tilde\x20ASR\x20send\x20error','terminate','status','result','final','Tilde\x20ASR\x20hypoteses','hypotheses','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','error','Error\x20Tilde\x20ASR\x20socket','isObject','open','message','bluebird','lodash','crypto','../../../../../../config/logger','agi','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','sha1','digest'];(function(_0x1af772,_0xd32696){var _0x172c4d=function(_0x3dd373){while(--_0x3dd373){_0x1af772['push'](_0x1af772['shift']());}};_0x172c4d(++_0xd32696);}(_0xe9a2,0x15c));var _0x2e9a=function(_0x45591a,_0x327a11){_0x45591a=_0x45591a-0x0;var _0x3a033f=_0xe9a2[_0x45591a];return _0x3a033f;};'use strict';var BPromise=require(_0x2e9a('0x0'));var _=require(_0x2e9a('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require('moment');var crypto=require(_0x2e9a('0x2'));var logger=require(_0x2e9a('0x3'))(_0x2e9a('0x4'));module[_0x2e9a('0x5')]=function(_0xbaa982,_0x50e26b,_0x3605a0,_0x5e5adf){return new BPromise(function(_0x28e04b,_0x294902){logger[_0x2e9a('0x6')](_0x2e9a('0x7'),_0x5e5adf||_0x2e9a('0x8'));var _0x5a43f8=new WebSocket(_0x5e5adf||_0x2e9a('0x8'),{'perMessageDeflate':![]});var _0x2a7e2b='';var _0x3c9e91='0';var _0x5b6fbd='1';var _0x1c6e31=_0x2e9a('0x9');function _0x570720(_0x5ca303){var _0x3251d8=crypto['createHash'](_0x2e9a('0xa'));_0x3251d8['update'](_0x5ca303);return _0x3251d8[_0x2e9a('0xb')](_0x2e9a('0xc'));}function _0x4be545(){try{logger['info'](_0x2e9a('0xd'));var _0x2d9642=moment()['unix']();var _0x222922=_0x570720(_0x2d9642+_0x50e26b+_0x3605a0);_0x5a43f8[_0x2e9a('0xe')](JSON[_0x2e9a('0xf')]({'appID':_0x50e26b,'timestamp':_0x2d9642,'appKey':_0x222922}));var _0x2945cb=fs[_0x2e9a('0x10')](_0xbaa982);_0x2945cb['on'](_0x2e9a('0x11'),function(_0x4342fa){_0x5a43f8[_0x2e9a('0xe')](_0x4342fa);});_0x2945cb['on'](_0x2e9a('0x12'),function(){_0x5a43f8['send']('EOS');});}catch(_0x52b1e5){logger['error'](_0x2e9a('0x13'),JSON['stringify'](_0x52b1e5));_0x5a43f8[_0x2e9a('0x14')]();}}function _0x50af1f(_0x463ea6){try{if(_0x463ea6){var _0x52ed24=JSON['parse'](_0x463ea6);switch(_0x52ed24[_0x2e9a('0x15')]){case 0x0:if(_0x52ed24['result']){if(_0x52ed24[_0x2e9a('0x16')][_0x2e9a('0x17')]){logger['info'](_0x2e9a('0x18'),JSON['stringify'](_0x52ed24['result'][_0x2e9a('0x19')]));_0x2a7e2b=_0x52ed24[_0x2e9a('0x16')][_0x2e9a('0x19')][0x0]['transcript'];_0x3c9e91=_0x52ed24[_0x2e9a('0x16')][_0x2e9a('0x19')][0x0][_0x2e9a('0x1a')];_0x5b6fbd='0';_0x1c6e31=_0x2e9a('0x1b');_0x5a43f8['terminate']();}}break;case 0x1:logger[_0x2e9a('0x6')](_0x2e9a('0x9'));_0x5b6fbd='1';_0x1c6e31='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';break;case 0x2:logger[_0x2e9a('0x6')](_0x2e9a('0x1c'));_0x5b6fbd='2';_0x1c6e31=_0x2e9a('0x1c');break;case 0x9:logger[_0x2e9a('0x6')]('Not\x20available.\x20Max\x20load\x20limit\x20reached.');_0x5b6fbd='9';_0x1c6e31='Not\x20available.\x20Max\x20load\x20limit\x20reached.';break;case 0xa:logger[_0x2e9a('0x6')](_0x2e9a('0x1d'));_0x5b6fbd='10';_0x1c6e31='Authentication\x20failed.';break;case 0xb:logger[_0x2e9a('0x6')](_0x2e9a('0x1e'));_0x5b6fbd='11';_0x1c6e31=_0x2e9a('0x1e');}}}catch(_0x568489){logger[_0x2e9a('0x1f')]('Tilde\x20ASR\x20parse\x20error',JSON[_0x2e9a('0xf')](_0x568489));_0x5a43f8[_0x2e9a('0x14')]();}}function _0x289a31(){logger[_0x2e9a('0x6')]('Close\x20Tilde\x20ASR\x20socket');_0x28e04b({'transcript':_0x2a7e2b,'confidence':_0x3c9e91,'status':_0x5b6fbd,'status_message':_0x1c6e31});}function _0x5e6141(_0x5783d1){logger[_0x2e9a('0x1f')](_0x2e9a('0x20'));if(!_['isNil'](_0x5783d1)){logger[_0x2e9a('0x1f')](_[_0x2e9a('0x21')](_0x5783d1)?JSON[_0x2e9a('0xf')](_0x5783d1):_0x5783d1);}}_0x5a43f8['on'](_0x2e9a('0x22'),_0x4be545);_0x5a43f8['on'](_0x2e9a('0x23'),_0x50af1f);_0x5a43f8['on'](_0x2e9a('0x12'),_0x289a31);_0x5a43f8['on'](_0x2e9a('0x1f'),_0x5e6141);});}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/index.js b/server/services/agi/scripts/tilde/index.js index 52f19c7..30ffe12 100644 --- a/server/services/agi/scripts/tilde/index.js +++ b/server/services/agi/scripts/tilde/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ef3=['exports','./asr'];(function(_0x10c630,_0xb36f90){var _0x1af020=function(_0x5cf0ed){while(--_0x5cf0ed){_0x10c630['push'](_0x10c630['shift']());}};_0x1af020(++_0xb36f90);}(_0x8ef3,0xcb));var _0x38ef=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x8ef3[_0x14add3];return _0x4a174f;};var asr=require(_0x38ef('0x0'));module[_0x38ef('0x1')]={'asr':asr}; \ No newline at end of file +var _0xd983=['exports','./asr'];(function(_0x2ecdc9,_0x286cae){var _0x414e5f=function(_0x151046){while(--_0x151046){_0x2ecdc9['push'](_0x2ecdc9['shift']());}};_0x414e5f(++_0x286cae);}(_0xd983,0x1df));var _0x3d98=function(_0x30f737,_0x7b62b6){_0x30f737=_0x30f737-0x0;var _0x5919bf=_0xd983[_0x30f737];return _0x5919bf;};var asr=require(_0x3d98('0x0'));module[_0x3d98('0x1')]={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/server.js b/server/services/agi/server.js index eb1ab7d..d5a5d3d 100644 --- a/server/services/agi/server.js +++ b/server/services/agi/server.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x758e=['getConnections','E_AGI_SERVER_VOICE_DISABLED','destroy','E_AGI_SERVER_MAXCONNECTION','ready','E_AGI_SERVER_ERROR','close','E_AGI_SERVER_CLOSE','nextTick','inherits','exports','util','EventEmitter','./error','./channel','127.0.0.1','call','error','emit','listening','connection'];(function(_0x524e68,_0x22f5f4){var _0x40f99c=function(_0x51d33f){while(--_0x51d33f){_0x524e68['push'](_0x524e68['shift']());}};_0x40f99c(++_0x22f5f4);}(_0x758e,0x1af));var _0xe758=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0x758e[_0x1035c1];return _0x308d67;};'use strict';var util=require(_0xe758('0x0'));var net=require('net');var EventEmitter=require('events')[_0xe758('0x1')];var AGIError=require(_0xe758('0x2'));var AGIChannel=require(_0xe758('0x3'));var AGIServer=function(_0x4b7512,_0x5e7714,_0x31641f){var _0x232ca8=this,_0x4b7512=_0x4b7512||0x11dd,_0x5e7714=_0x5e7714||_0xe758('0x4'),_0x5a2226=null,_0x2cdf89=0x0;EventEmitter[_0xe758('0x5')](_0x232ca8);function _0x5357cf(){if(!_0x4b7512){_0x232ca8['emit'](_0xe758('0x6'),new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x5a2226=net['createServer']();_0x5a2226['listen'](_0x4b7512,_0x5e7714);_0x5a2226['on']('listening',function(){_0x232ca8[_0xe758('0x7')](_0xe758('0x8'));});_0x5a2226['on'](_0xe758('0x9'),function(_0x4cdd20){_0x5a2226[_0xe758('0xa')](function(_0x55e39d,_0x3db28b){if(_0x55e39d){_0x232ca8[_0xe758('0x7')](_0xe758('0x6'),new AGIError('E_AGI_SERVER_ERROR',_0x55e39d));}else if(_0x31641f&&_0x31641f<0x0){_0x232ca8[_0xe758('0x7')]('error',new AGIError(_0xe758('0xb')));_0x4cdd20[_0xe758('0xc')]();}else if(_0x31641f&&_0x31641f>0x0&&_0x31641f<_0x3db28b){_0x2cdf89+=0x1;_0x232ca8[_0xe758('0x7')](_0xe758('0x6'),new AGIError(_0xe758('0xd'),_0x2cdf89));_0x4cdd20[_0xe758('0xc')]();}else{var _0xea5ea3=new AGIChannel(_0x4cdd20);_0xea5ea3['on'](_0xe758('0xe'),function(){_0x232ca8[_0xe758('0x7')]('connection',_0xea5ea3);});}});});_0x5a2226['on'](_0xe758('0x6'),function(_0x551700){_0x232ca8['emit'](_0xe758('0x6'),new AGIError(_0xe758('0xf'),_0x551700['code']));});_0x5a2226['on']('close',function(){_0x232ca8[_0xe758('0x7')](_0xe758('0x10'),new AGIError(_0xe758('0x11')));});}process[_0xe758('0x12')](function(){_0x5357cf();});};util[_0xe758('0x13')](AGIServer,EventEmitter);module[_0xe758('0x14')]=function(_0x5a5674,_0x5aaea2,_0x44a6db){return new AGIServer(_0x5a5674,_0x5aaea2,_0x44a6db);}; \ No newline at end of file +var _0xfc65=['net','events','EventEmitter','./error','./channel','127.0.0.1','call','error','E_AGI_ARGUMENT_PORT','createServer','listening','emit','connection','E_AGI_SERVER_VOICE_DISABLED','destroy','ready','E_AGI_SERVER_ERROR','close','E_AGI_SERVER_CLOSE','nextTick','inherits','exports','util'];(function(_0x16fe6e,_0x4e0559){var _0x428b7d=function(_0x5872e9){while(--_0x5872e9){_0x16fe6e['push'](_0x16fe6e['shift']());}};_0x428b7d(++_0x4e0559);}(_0xfc65,0x1b4));var _0x5fc6=function(_0x2d378e,_0x685d14){_0x2d378e=_0x2d378e-0x0;var _0x1f3ea5=_0xfc65[_0x2d378e];return _0x1f3ea5;};'use strict';var util=require(_0x5fc6('0x0'));var net=require(_0x5fc6('0x1'));var EventEmitter=require(_0x5fc6('0x2'))[_0x5fc6('0x3')];var AGIError=require(_0x5fc6('0x4'));var AGIChannel=require(_0x5fc6('0x5'));var AGIServer=function(_0x355810,_0x15af25,_0xe1ad23){var _0x4e09e0=this,_0x355810=_0x355810||0x11dd,_0x15af25=_0x15af25||_0x5fc6('0x6'),_0x2e1c2b=null,_0x3e9bf3=0x0;EventEmitter[_0x5fc6('0x7')](_0x4e09e0);function _0x5c93f7(){if(!_0x355810){_0x4e09e0['emit'](_0x5fc6('0x8'),new AGIError(_0x5fc6('0x9')));return![];}_0x2e1c2b=net[_0x5fc6('0xa')]();_0x2e1c2b['listen'](_0x355810,_0x15af25);_0x2e1c2b['on'](_0x5fc6('0xb'),function(){_0x4e09e0[_0x5fc6('0xc')]('listening');});_0x2e1c2b['on'](_0x5fc6('0xd'),function(_0x3a0a5c){_0x2e1c2b['getConnections'](function(_0x5b2256,_0x3caadc){if(_0x5b2256){_0x4e09e0[_0x5fc6('0xc')](_0x5fc6('0x8'),new AGIError('E_AGI_SERVER_ERROR',_0x5b2256));}else if(_0xe1ad23&&_0xe1ad23<0x0){_0x4e09e0[_0x5fc6('0xc')](_0x5fc6('0x8'),new AGIError(_0x5fc6('0xe')));_0x3a0a5c[_0x5fc6('0xf')]();}else if(_0xe1ad23&&_0xe1ad23>0x0&&_0xe1ad23<_0x3caadc){_0x3e9bf3+=0x1;_0x4e09e0[_0x5fc6('0xc')](_0x5fc6('0x8'),new AGIError('E_AGI_SERVER_MAXCONNECTION',_0x3e9bf3));_0x3a0a5c[_0x5fc6('0xf')]();}else{var _0x4ee120=new AGIChannel(_0x3a0a5c);_0x4ee120['on'](_0x5fc6('0x10'),function(){_0x4e09e0[_0x5fc6('0xc')](_0x5fc6('0xd'),_0x4ee120);});}});});_0x2e1c2b['on'](_0x5fc6('0x8'),function(_0x5f3eec){_0x4e09e0[_0x5fc6('0xc')]('error',new AGIError(_0x5fc6('0x11'),_0x5f3eec['code']));});_0x2e1c2b['on']('close',function(){_0x4e09e0[_0x5fc6('0xc')](_0x5fc6('0x12'),new AGIError(_0x5fc6('0x13')));});}process[_0x5fc6('0x14')](function(){_0x5c93f7();});};util[_0x5fc6('0x15')](AGIServer,EventEmitter);module[_0x5fc6('0x16')]=function(_0x47c75b,_0x491cc9,_0x299746){return new AGIServer(_0x47c75b,_0x491cc9,_0x299746);}; \ No newline at end of file diff --git a/server/services/agi/vertices.js b/server/services/agi/vertices.js index bf45dbf..00f447a 100644 --- a/server/services/agi/vertices.js +++ b/server/services/agi/vertices.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb40f=['Amy','aws_text_type','awsLex','aws_bot_name','googleASR','google_asr_language','appid','appsecret','clear','agicommand','clone','hasOwnProperty','isString','recursiveNodeIndex','isPlainObject','length','replaceAllVariables','saveRestApiResult','isArray','%s.%s','setVariable','replaceObjectAllVariables','split','replaceAll','getAndSetVariable','result','info','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','extra','maxRetry','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','no\x20text\x20configured','options','noop','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','grammar','no\x20grammar\x20configured','MRCPRecog','RECOG_CONFIDENCE()','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','agi','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','answer','callback','Enter\x20in\x20CALLBACK\x20(%s)\x20block','list_id','no\x20list\x20selected','add','delay','minutes','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','MRCPSynth','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','database','no\x20database\x20selected','no\x20odbc\x20database\x20found','query','variable_id','no\x20variable\x20found','forEach','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','dial','sip_id','no\x20user\x20selected','getUser','no\x20user\x20found','SIP/%s','DIAL','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','speech','out','dialogflowV2','dialogflowV2_project_id','no\x20project_id\x20configured','client_email','no\x20client_email\x20configured','no\x20private_key\x20configured','no\x20anguage\x20configured','bot','providerResponse','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','no\x20ndauth\x20url\x20configured','no\x20username\x20configured','password','no\x20password\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','unlink','.wav','SestekNDA\x20Result\x20%s','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20found','trunk_name','no\x20trunk\x20selected','opts','Executed\x20command\x20%s','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','no\x20variable\x20selected\x20for\x20the\x20result','getData','maxdigit','test','mindigit','hiddendigitsnum','hiddendigitspos','first','substr','generate','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','wav','%s/recordings/%s','beep','recordFile','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','intKey','tildeASR','TildeASR\x20Result\x20%s','continueAt','context','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','false','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','no\x20interval\x20configured','getIntervals','interval_id','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','true','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','NOBEEP','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','Enter\x20in\x20LOGOUT\x20(%s)\x20block','FIND\x20AGENT\x20%s\x20BY\x20%s','math','operation','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','response','digit','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','Enter\x20in\x20QUEUE\x20(%s)\x20block','no\x20queue\x20selected','queue_id','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','url','macro','gosub','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','restAPI','inspect','no\x20variable\x20selected\x20for\x20the\x20response','200','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','number','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','getMailAccount','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','user','bcc','subject','service','host','port','secure','authentication','auth','template_id','debug','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','getSmsAccount','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Answer','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','google_cloud_tts','apiKey','no\x20apiKey\x20configured','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','path','lodash','shelljs','odbc','moment','mustache','request-promise','../../config/logger','./scripts','/var/opt/motion2/server/files','rawHeaders','getdigits','getsecretdigits','channel','rpc','mailRpc','prototype','getVariable','then','name','getVoiceQueue','getVoiceQueueById','catch','getSquareProject','getSquareProjectById','getSquareOdbc','getSquareOdbcById','dsn','getUserById','getTrunk','getSound','getSoundById','getSoundPath','save_name','getMailAccountById','sendMailMessage','map','format','%s/sounds/converted/%s','getQueryOdbc','open','ODBC\x20connection\x20successfully','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','error','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','label','arg_1','callerid','createSquareRecording','calleridname','extension','priority','accountcode','file','createSquareMessage','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','scheduledAt','Callback\x20scheduled\x20at\x20','toString','callback_priority','agentPause','agent','agentUnpause','agentLogout','agentLogin','internal','%s/%s@from-sip/n','shellCommand','exec','trim','replace','googleCloudTTS','text','languageCode','ssmlGender','MP3','googleTTS','google_tts_language','timeout','includes','POST','PUT','method','toUpperCase','body','rawBody','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','sync','uri','render','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','statusMessage','message','500\x20-\x20Internal\x20Server\x20Error','googleDialogflow','dialogflow_language','googleDialogflowV2','dialogflowV2_language','sestekNDA','ispeechTTS','key','ispeechASR','ispeech_asr_language','en-US','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region'];(function(_0x355b24,_0x4e5143){var _0x484649=function(_0x28b191){while(--_0x28b191){_0x355b24['push'](_0x355b24['shift']());}};_0x484649(++_0x4e5143);}(_0xb40f,0x148));var _0xfb40=function(_0x3b150c,_0x2f93f8){_0x3b150c=_0x3b150c-0x0;var _0x5cd414=_0xb40f[_0x3b150c];return _0x5cd414;};'use strict';var fs=require('fs');var path=require(_0xfb40('0x0'));var util=require('util');var _=require(_0xfb40('0x1'));var sh=require(_0xfb40('0x2'));var odbc=require(_0xfb40('0x3'))();var rs=require('randomstring');var moment=require(_0xfb40('0x4'));var Mustache=require(_0xfb40('0x5'));var rp=require(_0xfb40('0x6'));var logger=require(_0xfb40('0x7'))('agi');var config=require('../../config/environment');var scripts=require(_0xfb40('0x8'));var FILES_PATH=_0xfb40('0x9');var recursiveMapAttributes=[_0xfb40('0xa'),'rawBody'];var verticesWithRetry=['menu',_0xfb40('0xb'),_0xfb40('0xc')];var AGIVertices=function(_0x3f3abe,_0x3cf071,_0x4bb087){this[_0xfb40('0xd')]=_0x3f3abe;this[_0xfb40('0xe')]=_0x3cf071;this[_0xfb40('0xf')]=_0x4bb087;};AGIVertices[_0xfb40('0x10')][_0xfb40('0x11')]=function(_0x119f36,_0x154680){this[_0xfb40('0xe')]['getVariableById'](_0x119f36)[_0xfb40('0x12')](function(_0x51ae18){_0x154680(null,_0x51ae18?_0x51ae18[_0xfb40('0x13')]:![]);})['catch'](function(_0x2dc5e7){_0x154680(_0x2dc5e7);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x14')]=function(_0x311cf2,_0x1238c5){this['rpc'][_0xfb40('0x15')](_0x311cf2)[_0xfb40('0x12')](function(_0x1694bb){_0x1238c5(null,_0x1694bb?_0x1694bb[_0xfb40('0x13')]:![]);})[_0xfb40('0x16')](function(_0xc02252){_0x1238c5(_0xc02252);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x17')]=function(_0xb6ab10,_0x6a79d2){this['rpc'][_0xfb40('0x18')](_0xb6ab10)['then'](function(_0x5fcf6d){_0x6a79d2(null,_0x5fcf6d?_0x5fcf6d[_0xfb40('0x13')]:![]);})[_0xfb40('0x16')](function(_0x53a97d){_0x6a79d2(_0x53a97d);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x19')]=function(_0x30a06e,_0x2a5875){this[_0xfb40('0xe')][_0xfb40('0x1a')](_0x30a06e)[_0xfb40('0x12')](function(_0x40bbc9){_0x2a5875(null,_0x40bbc9?_0x40bbc9[_0xfb40('0x1b')]:![]);})[_0xfb40('0x16')](function(_0x20bfe4){_0x2a5875(_0x20bfe4);});};AGIVertices[_0xfb40('0x10')]['getUser']=function(_0x2ca3bb,_0x151764){this[_0xfb40('0xe')][_0xfb40('0x1c')](_0x2ca3bb)[_0xfb40('0x12')](function(_0x566947){_0x151764(null,_0x566947?_0x566947[_0xfb40('0x13')]:![]);})[_0xfb40('0x16')](function(_0x1eff37){_0x151764(_0x1eff37);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1d')]=function(_0x7f1ccb,_0x3a1a8c){this[_0xfb40('0xe')]['getTrunkById'](_0x7f1ccb)[_0xfb40('0x12')](function(_0x114f8f){_0x3a1a8c(null,_0x114f8f?_0x114f8f[_0xfb40('0x13')]:![]);})[_0xfb40('0x16')](function(_0x5bd0a1){_0x3a1a8c(_0x5bd0a1);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1e')]=function(_0x126dc2,_0x23406b){var _0x57c4d8=this;this['rpc'][_0xfb40('0x1f')](_0x126dc2)[_0xfb40('0x12')](function(_0x448e23){_0x23406b(null,_0x448e23?_0x57c4d8[_0xfb40('0x20')](_0x448e23[_0xfb40('0x21')]):![]);})[_0xfb40('0x16')](function(_0x2c1602){_0x23406b(_0x2c1602);});};AGIVertices[_0xfb40('0x10')]['getMailAccount']=function(_0x55053d,_0x534c54){this[_0xfb40('0xe')][_0xfb40('0x22')](_0x55053d)[_0xfb40('0x12')](function(_0x32d255){_0x534c54(null,_0x32d255?_0x32d255:![]);})[_0xfb40('0x16')](function(_0x25e51d){_0x534c54(_0x25e51d);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x23')]=function(_0x4dfb29,_0x278165,_0x2710dc){this[_0xfb40('0xf')]['sendMailMessage'](_0x4dfb29,_0x278165)[_0xfb40('0x12')](function(){_0x2710dc(null);})[_0xfb40('0x16')](function(_0x26f22b){_0x2710dc(_0x26f22b);});};AGIVertices[_0xfb40('0x10')]['getIntervals']=function(_0xa42fb8,_0x906ce7){this[_0xfb40('0xe')]['getIntervalById'](_0xa42fb8)[_0xfb40('0x12')](function(_0x51afd6){if(_0x51afd6){if(_0x51afd6['IntervalId']){_0x906ce7(null,[_0x51afd6['interval']]);}else{_0x906ce7(null,_[_0xfb40('0x24')](_0x51afd6['Intervals'],'interval'));}}else{_0x906ce7(null,![]);}})[_0xfb40('0x16')](function(_0x35fd69){_0x906ce7(_0x35fd69);});};AGIVertices[_0xfb40('0x10')]['getSoundPath']=function(_0x5c284d){return util[_0xfb40('0x25')](_0xfb40('0x26'),FILES_PATH,_0x5c284d);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x27')]=function(_0x25f031,_0x398a2a,_0x41e23c){odbc[_0xfb40('0x28')](_0x25f031,function(_0x13c543){if(_0x13c543){logger['error']('Error\x20getting\x20ODBC\x20connection\x20%s',_0x13c543);_0x41e23c(_0x13c543);}else{logger['info'](_0xfb40('0x29'));odbc['query'](_0x398a2a,function(_0x38d46e,_0x33493e){if(_0x38d46e){logger['info'](_0xfb40('0x2a'),_0x398a2a);_0x41e23c(_0x38d46e);}else{logger['info'](_0xfb40('0x2b'),_0x398a2a);odbc[_0xfb40('0x2c')](function(_0x1deea6){if(_0x1deea6){logger[_0xfb40('0x2d')]('Error\x20closing\x20connection\x20to\x20odbc\x20%s',_0x1deea6);}_0x41e23c(null,_0x33493e);});}});}});};AGIVertices['prototype']['getSmsAccount']=function(_0x9e7b3f,_0x3f7922){this['rpc'][_0xfb40('0x2e')](_0x9e7b3f)[_0xfb40('0x12')](function(_0x369fef){_0x3f7922(null,_0x369fef?_0x369fef:![]);})[_0xfb40('0x16')](function(_0x20ab70){_0x3f7922(_0x20ab70);});};AGIVertices[_0xfb40('0x10')]['createSmsMessage']=function(_0x478de4,_0x1429ed){this[_0xfb40('0xe')][_0xfb40('0x2f')](_0x478de4)[_0xfb40('0x12')](function(_0x2efe93){_0x1429ed(null,_0x2efe93);})['catch'](function(_0x540f49){_0x1429ed(_0x540f49);});};AGIVertices['prototype'][_0xfb40('0x30')]=function(_0x837b4c,_0x19734a,_0xc69fbc){this['rpc'][_0xfb40('0x30')]({'uniqueid':this[_0xfb40('0xd')][_0xfb40('0x31')],'node':_0x837b4c[_0xfb40('0x32')],'application':_0x837b4c['agicommand'],'data':_0x19734a||null,'project_name':this[_0xfb40('0xd')][_0xfb40('0x33')],'callerid':this['channel'][_0xfb40('0x34')]})[_0xfb40('0x12')](function(_0x5d55af){if(_0xc69fbc){_0xc69fbc(null,_0x5d55af);}})[_0xfb40('0x16')](function(_0x52d8c8){if(_0xc69fbc){_0xc69fbc(_0x52d8c8);}});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x35')]=function(_0x24c142,_0x5a25f9,_0x365704,_0x42b9d1){this[_0xfb40('0xe')]['createSquareRecording']({'uniqueid':this[_0xfb40('0xd')][_0xfb40('0x31')],'callerid':this[_0xfb40('0xd')][_0xfb40('0x34')],'calleridname':this[_0xfb40('0xd')][_0xfb40('0x36')],'context':this['channel']['context'],'extension':this[_0xfb40('0xd')][_0xfb40('0x37')],'priority':this[_0xfb40('0xd')][_0xfb40('0x38')],'accountcode':this[_0xfb40('0xd')][_0xfb40('0x39')],'dnid':this[_0xfb40('0xd')]['dnid'],'projectName':this[_0xfb40('0xd')][_0xfb40('0x33')],'saveName':_0x5a25f9,'filename':_0x24c142[_0xfb40('0x3a')]||_0x5a25f9,'savePath':_0x365704})['then'](function(_0x20a0d9){_0x42b9d1(null,_0x20a0d9);})[_0xfb40('0x16')](function(_0x256616){_0x42b9d1(_0x256616);});};AGIVertices[_0xfb40('0x10')]['createSquareMessage']=function(_0x5c141e,_0x35f8e4,_0x1f7805,_0x573dbd,_0x549ecc){this[_0xfb40('0xe')][_0xfb40('0x3b')]({'uniqueid':this[_0xfb40('0xd')][_0xfb40('0x31')],'body':_0x5c141e,'direction':_0x35f8e4,'providerName':_0x1f7805,'providerResponse':_0x573dbd})[_0xfb40('0x12')](function(_0x597e48){if(_0x549ecc){_0x549ecc(null,_0x597e48);}})[_0xfb40('0x16')](function(_0x3e15c7){if(_0x549ecc){_0x549ecc(_0x3e15c7);}});};AGIVertices['prototype'][_0xfb40('0x3c')]=function(_0x4076a4,_0x5b1e4f){this[_0xfb40('0xe')]['createCmContact']({'firstName':_[_0xfb40('0x3d')](_0x4076a4[_0xfb40('0x13')])||_[_0xfb40('0x3e')](_0x4076a4['name'])?_0xfb40('0x3f')+Math[_0xfb40('0x40')]():_0x4076a4[_0xfb40('0x13')],'lastName':_[_0xfb40('0x3d')](_0x4076a4[_0xfb40('0x41')])||_['isNil'](_0x4076a4[_0xfb40('0x41')])?null:_0x4076a4[_0xfb40('0x41')],'phone':_0x4076a4[_0xfb40('0x42')],'ListId':_0x4076a4['list_id'],'scheduledat':_0x4076a4[_0xfb40('0x43')],'callbackUniqueid':this['channel'][_0xfb40('0x31')],'tags':'callback','description':_0xfb40('0x44')+_0x4076a4[_0xfb40('0x43')][_0xfb40('0x45')](),'priority':_0x4076a4[_0xfb40('0x46')]})['then'](function(_0x615c42){_0x5b1e4f(null,_0x615c42);})[_0xfb40('0x16')](function(_0x4a3b05){_0x5b1e4f(_0x4a3b05);});};AGIVertices[_0xfb40('0x10')]['getPause']=function(_0x59df65,_0x4fcbb7){this['rpc']['getPauseById'](_0x59df65)[_0xfb40('0x12')](function(_0x5d0901){_0x4fcbb7(null,_0x5d0901?_0x5d0901[_0xfb40('0x13')]:![]);})[_0xfb40('0x16')](function(_0xfd58ab){_0x4fcbb7(_0xfd58ab);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x47')]=function(_0x553784,_0x4776c5,_0x5ab522){var _0x5e4466={'role':_0xfb40('0x48')};_0x5e4466[_0x553784]=this['channel'][_0xfb40('0x34')];this[_0xfb40('0xe')][_0xfb40('0x47')](_0x5e4466,_0x4776c5,this[_0xfb40('0xd')][_0xfb40('0x31')])[_0xfb40('0x12')](function(_0x58c0dc){_0x5ab522(null,_['isNil'](_0x58c0dc)?![]:!![]);})['catch'](function(_0x36592f){logger[_0xfb40('0x2d')](_0x36592f);_0x5ab522(null,![]);});};AGIVertices['prototype'][_0xfb40('0x49')]=function(_0x22b37a,_0x496bf0){var _0x32e259={'role':_0xfb40('0x48')};_0x32e259[_0x22b37a]=this['channel'][_0xfb40('0x34')];this[_0xfb40('0xe')][_0xfb40('0x49')](_0x32e259)[_0xfb40('0x12')](function(_0x31636e){_0x496bf0(null,_[_0xfb40('0x3e')](_0x31636e)?![]:!![]);})[_0xfb40('0x16')](function(_0x53bdac){logger[_0xfb40('0x2d')](_0x53bdac);_0x496bf0(null,![]);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x4a')]=function(_0xabf719,_0xed560d){var _0x49dbbd={'role':_0xfb40('0x48')};_0x49dbbd[_0xabf719]=this['channel']['callerid'];this[_0xfb40('0xe')][_0xfb40('0x4a')](_0x49dbbd)[_0xfb40('0x12')](function(_0x537e25){_0xed560d(null,_[_0xfb40('0x3e')](_0x537e25)?![]:!![]);})[_0xfb40('0x16')](function(_0x52761b){logger[_0xfb40('0x2d')](_0x52761b);_0xed560d(null,![]);});};AGIVertices['prototype'][_0xfb40('0x4b')]=function(_0x583238,_0x2aed9c){var _0x44e0b1={'role':'agent'};_0x44e0b1[_0x583238]=this[_0xfb40('0xd')][_0xfb40('0x34')];var _0x58663a=_0x583238!=_0xfb40('0x4c')?util[_0xfb40('0x25')](_0xfb40('0x4d'),'LOCAL',this['channel'][_0xfb40('0x34')]):undefined;this[_0xfb40('0xe')][_0xfb40('0x4b')](_0x44e0b1,_0x58663a)[_0xfb40('0x12')](function(_0x407b77){_0x2aed9c(null,_[_0xfb40('0x3e')](_0x407b77)?![]:!![]);})['catch'](function(_0x402c4b){logger['error'](_0x402c4b);_0x2aed9c(null,![]);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x4e')]=function(_0x597316,_0x3c57f2){sh[_0xfb40('0x4f')](_[_0xfb40('0x50')](_0x597316),function(_0x3dc166,_0x37e2e4){var _0x4bbc19=_0x37e2e4[_0xfb40('0x51')](/(\r\n|\n|\r)/gm,'');_0x3c57f2(null,_0x4bbc19);});};AGIVertices[_0xfb40('0x10')]['googleCloudTTS']=function(_0x4d37fc,_0x41e8b7){scripts[_0xfb40('0x52')](_0x4d37fc['apiKey'],_0x4d37fc['google_cloud_tts_text_type']||'text',_0x4d37fc[_0xfb40('0x53')],_0x4d37fc[_0xfb40('0x54')]||'en-US',_0x4d37fc[_0xfb40('0x55')]||'MALE',_0x4d37fc['audioEncoding']||_0xfb40('0x56'))['then'](function(_0x2027be){_0x41e8b7(null,_0x2027be);})[_0xfb40('0x16')](function(_0x41c15e){_0x41e8b7(_0x41c15e);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x57')]=function(_0xfb9a2c,_0x4ee4af){scripts[_0xfb40('0x57')](_0xfb9a2c['text'],_0xfb9a2c[_0xfb40('0x58')]||'en',0x1)[_0xfb40('0x12')](function(_0x5deb7f){_0x4ee4af(null,_0x5deb7f);})['catch'](function(_0x34fe38){_0x4ee4af(_0x34fe38);});};AGIVertices[_0xfb40('0x10')]['restAPI']=function(_0x5a9b56,_0x1c2ac7){var _0x2ac3a7={'uri':_0x5a9b56['url'],'method':_0x5a9b56['method'],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x5a9b56[_0xfb40('0x59')])==='number'&&parseInt(_0x5a9b56[_0xfb40('0x59')])>=0x1?parseInt(_0x5a9b56[_0xfb40('0x59')])*0x3e8:0x5*0x3e8};if(_[_0xfb40('0x5a')]([_0xfb40('0x5b'),_0xfb40('0x5c')],_0x2ac3a7[_0xfb40('0x5d')][_0xfb40('0x5e')]())){try{_0x2ac3a7[_0xfb40('0x5f')]=_0x5a9b56[_0xfb40('0x60')]?JSON[_0xfb40('0x61')](_0x5a9b56[_0xfb40('0x60')]):{};}catch(_0x3d4c6c){logger['error'](_0xfb40('0x62'),_0x3d4c6c);}}try{_0x2ac3a7[_0xfb40('0x63')]=_0x5a9b56[_0xfb40('0xa')]?JSON['parse'](_0x5a9b56[_0xfb40('0xa')]):{};}catch(_0x142565){logger[_0xfb40('0x2d')](_0xfb40('0x64'),_0x142565);}if(_0x5a9b56['computedVariables']){try{var _0x4d622d=require(_0x5a9b56['computedVariables'])[_0xfb40('0x65')](this,_0x2ac3a7);_0x2ac3a7[_0xfb40('0x66')]=Mustache[_0xfb40('0x67')](_0x5a9b56['url'],_0x4d622d,{},['$$','$$']);if(_0x2ac3a7[_0xfb40('0x63')]){_0x2ac3a7[_0xfb40('0x63')]=JSON[_0xfb40('0x61')](Mustache[_0xfb40('0x67')](JSON['stringify'](_0x2ac3a7[_0xfb40('0x63')]),_0x4d622d,{},['$$','$$']));}if(_0x2ac3a7[_0xfb40('0x5f')]){_0x2ac3a7['body']=JSON[_0xfb40('0x61')](Mustache[_0xfb40('0x67')](JSON[_0xfb40('0x68')](_0x2ac3a7[_0xfb40('0x5f')]),_0x4d622d,{},['$$','$$']));}}catch(_0x16c423){logger[_0xfb40('0x2d')](_0xfb40('0x69'),_0x16c423);}}rp(_0x2ac3a7)[_0xfb40('0x12')](function(_0x5a8d3e){var _0x3007d6={'statusCode':_0x5a8d3e[_0xfb40('0x6a')]||0xc8,'statusMessage':_0x5a8d3e[_0xfb40('0x6b')]||'OK','headers':_0x5a8d3e['headers']||{},'body':_0x5a8d3e[_0xfb40('0x5f')]||{}};_0x1c2ac7(null,_0x3007d6);})[_0xfb40('0x16')](function(_0x3a4184){var _0x2a4bed={'statusCode':_0x3a4184[_0xfb40('0x6a')]||0x1f4,'statusMessage':_0x3a4184[_0xfb40('0x6c')]||_0xfb40('0x6d'),'headers':_0x3a4184['options'][_0xfb40('0x63')]||{},'body':_0x3a4184['options'][_0xfb40('0x5f')]||{}};_0x1c2ac7(null,_0x2a4bed);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x6e')]=function(_0x355d9c,_0x447d10){scripts[_0xfb40('0x6e')](this['channel']['uniqueid'],_0x355d9c['key'],_0x355d9c[_0xfb40('0x53')],_0x355d9c[_0xfb40('0x6f')]||'en')[_0xfb40('0x12')](function(_0x12d0b9){_0x447d10(null,_0x12d0b9);})[_0xfb40('0x16')](function(_0x3588ca){_0x447d10(_0x3588ca);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x70')]=function(_0x556ca6,_0x186026){scripts[_0xfb40('0x70')](this[_0xfb40('0xd')][_0xfb40('0x31')],_0x556ca6['dialogflowV2_project_id'],_0x556ca6['client_email'],_0x556ca6['private_key'],_0x556ca6[_0xfb40('0x53')],_0x556ca6[_0xfb40('0x71')]||'en')[_0xfb40('0x12')](function(_0x2b6256){_0x186026(null,_0x2b6256);})[_0xfb40('0x16')](function(_0x3c6a5e){_0x186026(_0x3c6a5e);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x72')]=function(_0x4f1e3d,_0x26db28){scripts[_0xfb40('0x72')](this[_0xfb40('0xd')],_0x4f1e3d)[_0xfb40('0x12')](function(_0x1a9a7a){_0x26db28(null,_0x1a9a7a);})['catch'](function(_0x31ece5){_0x26db28(_0x31ece5);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x73')]=function(_0x341218,_0x5bb8e5){scripts[_0xfb40('0x73')](_0x341218[_0xfb40('0x74')],_0x341218['text'],_0x341218['ispeech_tts_language']||'en-US',_0x341218['speed'])[_0xfb40('0x12')](function(_0x1cafb2){_0x5bb8e5(null,_0x1cafb2);})[_0xfb40('0x16')](function(_0x4b35ef){_0x5bb8e5(_0x4b35ef);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x75')]=function(_0x1d5032,_0x281d1f,_0x5b2610){scripts[_0xfb40('0x75')](_0x281d1f,_0x1d5032['key'],_0x1d5032[_0xfb40('0x76')]||_0xfb40('0x77'),this[_0xfb40('0x78')](_0x1d5032['model'])?_0x1d5032[_0xfb40('0x79')]:undefined)[_0xfb40('0x12')](function(_0x12af30){_0x5b2610(null,_0x12af30);})[_0xfb40('0x16')](function(_0x329a12){_0x5b2610(_0x329a12);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x7a')]=function(_0x505319,_0x38b5bb){scripts['awsPolly'](_0x505319[_0xfb40('0x7b')],_0x505319[_0xfb40('0x7c')],_0x505319[_0xfb40('0x7d')],_0x505319['aws_polly_voice']||_0xfb40('0x7e'),_0x505319[_0xfb40('0x53')],_0x505319[_0xfb40('0x7f')]||_0xfb40('0x53'))[_0xfb40('0x12')](function(_0x1884bf){_0x38b5bb(null,_0x1884bf);})['catch'](function(_0x5e0e0f){_0x38b5bb(_0x5e0e0f);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x80')]=function(_0xc555c,_0x18976c){scripts[_0xfb40('0x80')](this[_0xfb40('0xd')][_0xfb40('0x31')],_0xc555c[_0xfb40('0x7b')],_0xc555c['aws_secret_access_key'],_0xc555c['aws_lex_region'],_0xc555c[_0xfb40('0x53')],_0xc555c[_0xfb40('0x81')])[_0xfb40('0x12')](function(_0x5d1707){_0x18976c(null,_0x5d1707);})[_0xfb40('0x16')](function(_0x54548a){_0x18976c(_0x54548a);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x82')]=function(_0x5d5c66,_0x4a83b3,_0x51e49a){scripts[_0xfb40('0x82')](_0x4a83b3,_0x5d5c66[_0xfb40('0x74')],_0x5d5c66[_0xfb40('0x83')]||'en-US')['then'](function(_0x138b52){_0x51e49a(null,_0x138b52);})[_0xfb40('0x16')](function(_0x6441e0){_0x51e49a(_0x6441e0);});};AGIVertices[_0xfb40('0x10')]['tildeASR']=function(_0x19edcd,_0x208b53,_0xc0bb72){scripts['tildeASR'](_0x208b53,_0x19edcd[_0xfb40('0x84')],_0x19edcd[_0xfb40('0x85')],_0x19edcd[_0xfb40('0x66')])[_0xfb40('0x12')](function(_0x82881e){_0xc0bb72(null,_0x82881e);})['catch'](function(_0x386fdc){_0xc0bb72(_0x386fdc);});};AGIVertices[_0xfb40('0x10')][_0xfb40('0x86')]=function(_0x35101c){var _0x1926f1=_['includes'](verticesWithRetry,_0x35101c[_0xfb40('0x87')])?_0x35101c:_[_0xfb40('0x88')](_0x35101c);for(var _0x554efe in _0x1926f1){if(_0x1926f1[_0xfb40('0x89')](_0x554efe)){if(_0x1926f1[_0x554efe]&&_[_0xfb40('0x8a')](_0x1926f1[_0x554efe])){if(_[_0xfb40('0x5a')](recursiveMapAttributes,_0x554efe)){_0x1926f1[_0x554efe]=this['replaceObjectAllVariables'](_0x1926f1[_0x554efe]);}else{_0x1926f1[_0x554efe]=this['replaceAllVariables'](_0x1926f1[_0x554efe]);}}}}return _0x1926f1;};AGIVertices[_0xfb40('0x10')][_0xfb40('0x8b')]=function(_0x589668){for(var _0x2ef124 in _0x589668){if(_0x589668[_0xfb40('0x89')](_0x2ef124)){if(_[_0xfb40('0x8c')](_0x589668[_0x2ef124])){this[_0xfb40('0x8b')](_0x589668[_0x2ef124]);}else if(_['isArray'](_0x589668[_0x2ef124])){for(var _0x1bc45d=0x0;_0x1bc45d<_0x589668[_0x2ef124][_0xfb40('0x8d')];_0x1bc45d++){this['recursiveNodeIndex'](_0x589668[_0x2ef124][_0x1bc45d]);}}else if(_[_0xfb40('0x8a')](_0x589668[_0x2ef124])){_0x589668[_0x2ef124]=this[_0xfb40('0x8e')](_0x589668[_0x2ef124]);}}}};AGIVertices[_0xfb40('0x10')][_0xfb40('0x8f')]=function(_0x6e3d9d,_0x30943b){for(var _0xa11af8 in _0x6e3d9d){if(_0x6e3d9d[_0xfb40('0x89')](_0xa11af8)){if(_[_0xfb40('0x8c')](_0x6e3d9d[_0xa11af8])){if(!_['isEmpty'](_0x6e3d9d[_0xa11af8])){this[_0xfb40('0x8f')](_0x6e3d9d[_0xa11af8],util[_0xfb40('0x25')]('%s.%s',_0x30943b,_0xa11af8));}}else if(_[_0xfb40('0x90')](_0x6e3d9d[_0xa11af8])){for(var _0x4fc06f=0x0;_0x4fc06f<_0x6e3d9d[_0xa11af8][_0xfb40('0x8d')];_0x4fc06f++){this[_0xfb40('0x8f')](_0x6e3d9d[_0xa11af8][_0x4fc06f],util[_0xfb40('0x25')](_0xfb40('0x91'),_0x30943b,_0xa11af8+'['+_0x4fc06f+']'));}}else{if(!_[_0xfb40('0x3e')](_0x6e3d9d[_0xa11af8])){this[_0xfb40('0xd')][_0xfb40('0x92')](util[_0xfb40('0x25')](_0xfb40('0x91'),_0x30943b,_0xa11af8),_0x6e3d9d[_0xa11af8]);}}}}};AGIVertices[_0xfb40('0x10')][_0xfb40('0x93')]=function(_0x2b3651){try{var _0x2bec7b=JSON[_0xfb40('0x61')](_0x2b3651);this[_0xfb40('0x8b')](_0x2bec7b);return JSON[_0xfb40('0x68')](_0x2bec7b);}catch(_0x5765a1){return this[_0xfb40('0x8e')](_0x2b3651);}};AGIVertices['prototype']['replaceAllVariables']=function(_0x607b17){var _0x140f8d=_0x607b17['split']('{');for(var _0x18e872=0x1;_0x18e872<_0x140f8d[_0xfb40('0x8d')];_0x18e872+=0x1){var _0xff07d8=_0x140f8d[_0x18e872][_0xfb40('0x94')]('}');if(_0xff07d8['length']>0x1){_0x607b17=_0x607b17[_0xfb40('0x95')]('{'+_0xff07d8[0x0]+'}',this[_0xfb40('0xd')][_0xfb40('0x11')](_0xff07d8[0x0])['extra']||_0xff07d8[0x0]);}}if(_0x140f8d['length']===0x1){return _0x607b17['toString']();}return this['replaceAllVariables'](_0x607b17);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x96')]=function(_0xdad582,_0x59973a){var _0x5b35da=this[_0xfb40('0xd')][_0xfb40('0x11')](_0xdad582);if(_0x5b35da[_0xfb40('0x97')]===-0x1){return _0x5b35da;}logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x99'),_0x59973a,_0x5b35da[_0xfb40('0x9a')]));return this[_0xfb40('0xd')]['setVariable'](_0x59973a,_0x5b35da[_0xfb40('0x9a')]);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x78')]=function(_0x1d2d1c){return _0x1d2d1c&&_0x1d2d1c!=='0'&&_0x1d2d1c!=='-1'&&_0x1d2d1c!=='';};AGIVertices['prototype'][_0xfb40('0x9b')]=function(_0x5a940d){this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x5a940d,'-');_0x5a940d[_0xfb40('0x9c')]=_0x5a940d['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices[_0xfb40('0x10')][_0xfb40('0x9d')]=function(_0x390a4c){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x9e'),_0x390a4c['label']));if(!this[_0xfb40('0x78')](_0x390a4c['text'])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x9f'));}var _0x9cef20='\x22'+_0x390a4c[_0xfb40('0x53')]+'\x22';if(this['isConfigured'](_0x390a4c[_0xfb40('0xa0')])){_0x9cef20+=','+_0x390a4c[_0xfb40('0xa0')];}var _0x576988=this[_0xfb40('0xd')][_0xfb40('0x4f')]('MRCPSynth',_0x9cef20);if(_0x576988['result']===-0x1){return _0x576988;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xa2'),_0x9cef20));};AGIVertices['prototype'][_0xfb40('0xa3')]=function(_0x1931ee){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xa4'),_0x1931ee['label']));if(!this[_0xfb40('0x78')](_0x1931ee[_0xfb40('0xa5')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0xa6'));}var _0x1c5141=_0x1931ee[_0xfb40('0xa5')];if(this['isConfigured'](_0x1931ee[_0xfb40('0xa0')])){_0x1c5141+=','+_0x1931ee['options'];}var _0x362493=this[_0xfb40('0xd')]['exec'](_0xfb40('0xa7'),_0x1c5141);if(_0x362493[_0xfb40('0x97')]===-0x1){return _0x362493;}var _0x26ee88=this[_0xfb40('0x96')](_0xfb40('0xa8'),'MRCP_RECOG_CONFIDENCE');if(_0x26ee88[_0xfb40('0x97')]===-0x1){return _0x26ee88;}var _0x3c659c=this['getAndSetVariable'](_0xfb40('0xa9'),_0xfb40('0xaa'));if(_0x3c659c[_0xfb40('0x97')]===-0x1){return _0x3c659c;}var _0x4cb79c=this[_0xfb40('0x96')](_0xfb40('0xab'),'MRCP_RECOG_INSTANCE');if(_0x4cb79c['result']===-0x1){return _0x4cb79c;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0xac'),_0x1c5141));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xad')]=function(_0x4cf807){logger[_0xfb40('0x98')](util['format'](_0xfb40('0xae'),_0x4cf807[_0xfb40('0x32')]));return this[_0xfb40('0xd')][_0xfb40('0xad')]([_0x4cf807[_0xfb40('0xaf')],_0x4cf807[_0xfb40('0xb0')]]);};AGIVertices['prototype']['answer']=function(_0x479296){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xb1'),_0x479296['label']));if(this[_0xfb40('0x78')](_0x479296['timeout'])){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xb2'),_0x479296[_0xfb40('0x59')]));var _0x16f9cc=this['channel'][_0xfb40('0xb3')](_0x479296[_0xfb40('0x59')]);if(_0x16f9cc['result']===-0x1){return _0x16f9cc;}}return this[_0xfb40('0xd')][_0xfb40('0xb4')]();};AGIVertices[_0xfb40('0x10')][_0xfb40('0xb5')]=function(_0x5bb8e7){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xb6'),_0x5bb8e7[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x5bb8e7[_0xfb40('0xb7')])){return this[_0xfb40('0xd')]['error'](_0x5bb8e7,_0xfb40('0xb8'));}_0x5bb8e7['scheduledAt']=moment();if(this[_0xfb40('0x78')](_0x5bb8e7['delay'])){_0x5bb8e7['scheduledAt']=moment()[_0xfb40('0xb9')](_0x5bb8e7[_0xfb40('0xba')],_0xfb40('0xbb'));}if(!this['isConfigured'](_0x5bb8e7[_0xfb40('0x46')])){_0x5bb8e7[_0xfb40('0x46')]=0x2;}this[_0xfb40('0x3c')][_0xfb40('0x65')](this,_0x5bb8e7);return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0xbc'),_0x5bb8e7['phone'],_0x5bb8e7[_0xfb40('0xb7')],_0x5bb8e7['scheduledAt']));};AGIVertices['prototype'][_0xfb40('0xbd')]=function(_0x8ec533){logger[_0xfb40('0x98')](util['format'](_0xfb40('0xbe'),_0x8ec533[_0xfb40('0x32')]));var _0x161a31=this[_0xfb40('0xd')][_0xfb40('0x4f')](_0x8ec533[_0xfb40('0xbf')],_0x8ec533['options']);if(_0x161a31[_0xfb40('0x97')]===-0x1){return _0x161a31;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xc0'),_0x8ec533['application'],_0x8ec533[_0xfb40('0xa0')]));};AGIVertices['prototype'][_0xfb40('0xc1')]=function(_0x496d98){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xc2'),_0x496d98['label']));if(!this[_0xfb40('0x78')](_0x496d98[_0xfb40('0x53')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')]('no\x20text\x20configured');}var _0x8830a2='\x22'+_0x496d98[_0xfb40('0x53')]+'\x22';if(this[_0xfb40('0x78')](_0x496d98[_0xfb40('0xa0')])){_0x8830a2+=','+_0x496d98['options'];}var _0x18d226=this[_0xfb40('0xd')][_0xfb40('0x4f')]('MRCPSynth',_0x8830a2);if(_0x18d226['result']===-0x1){return _0x18d226;}return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0xa2'),_0x8830a2));};AGIVertices[_0xfb40('0x10')]['sestektts']=function(_0x26c9e0){logger['info'](util['format'](_0xfb40('0xc3'),_0x26c9e0[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x26c9e0[_0xfb40('0x53')])){return this[_0xfb40('0xd')]['noop']('no\x20text\x20configured');}var _0x263137='\x22'+_0x26c9e0[_0xfb40('0x53')]+'\x22';if(this[_0xfb40('0x78')](_0x26c9e0[_0xfb40('0xa0')])){_0x263137+=','+_0x26c9e0[_0xfb40('0xa0')];}var _0x12595f=this[_0xfb40('0xd')][_0xfb40('0x4f')](_0xfb40('0xc4'),_0x263137);if(_0x12595f[_0xfb40('0x97')]===-0x1){return _0x12595f;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xa2'),_0x263137));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xc5')]=function(_0xb826a){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xc6'),_0xb826a[_0xfb40('0x32')]));if(!this['isConfigured'](_0xb826a[_0xfb40('0xa5')])){return this['channel']['noop'](_0xfb40('0xa6'));}var _0x5a7d56=_0xb826a[_0xfb40('0xa5')];if(this[_0xfb40('0x78')](_0xb826a[_0xfb40('0xa0')])){_0x5a7d56+=','+_0xb826a[_0xfb40('0xa0')];}var _0x280d75=this[_0xfb40('0xd')][_0xfb40('0x4f')]('MRCPRecog',_0x5a7d56);if(_0x280d75[_0xfb40('0x97')]===-0x1){return _0x280d75;}var _0x2dfb83=this['getAndSetVariable'](_0xfb40('0xa8'),_0xfb40('0xc7'));if(_0x2dfb83['result']===-0x1){return _0x2dfb83;}var _0x515b7c=this[_0xfb40('0x96')]('RECOG_INPUT()',_0xfb40('0xc8'));if(_0x515b7c[_0xfb40('0x97')]===-0x1){return _0x515b7c;}var _0x9c777=this[_0xfb40('0x96')](_0xfb40('0xab'),'LUMENVOX_ASR_INSTANCE');if(_0x9c777['result']===-0x1){return _0x9c777;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0xac'),_0x5a7d56));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xc9')]=function(_0x930dd8){logger['info'](util[_0xfb40('0x25')](_0xfb40('0xca'),_0x930dd8[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x930dd8[_0xfb40('0xa5')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0xa6'));}var _0x37c7de=_0x930dd8['grammar'];if(this[_0xfb40('0x78')](_0x930dd8[_0xfb40('0xa0')])){_0x37c7de+=','+_0x930dd8[_0xfb40('0xa0')];}var _0x16de4f=this[_0xfb40('0xd')][_0xfb40('0x4f')](_0xfb40('0xa7'),_0x37c7de);if(_0x16de4f[_0xfb40('0x97')]===-0x1){return _0x16de4f;}var _0x23d9ff=this['getAndSetVariable'](_0xfb40('0xa8'),_0xfb40('0xcb'));if(_0x23d9ff[_0xfb40('0x97')]===-0x1){return _0x23d9ff;}var _0x4b8635=this[_0xfb40('0x96')](_0xfb40('0xa9'),'SESTEK_ASR_TRANSCRIPT');if(_0x4b8635[_0xfb40('0x97')]===-0x1){return _0x4b8635;}var _0x36897e=this['getAndSetVariable'](_0xfb40('0xab'),'SESTEK_ASR_INSTANCE');if(_0x36897e[_0xfb40('0x97')]===-0x1){return _0x36897e;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')]('Executed\x20command\x20MRCPRecog\x20%s',_0x37c7de));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xcc')]=function(_0x42a6b3){logger['info'](util[_0xfb40('0x25')]('Enter\x20in\x20DATABASE\x20(%s)\x20block',_0x42a6b3[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x42a6b3['odbc_id'])){return this['channel'][_0xfb40('0x2d')](_0x42a6b3,_0xfb40('0xcd'));}var _0x253574=this[_0xfb40('0x19')]['sync'](this,_0x42a6b3['odbc_id']);if(!_0x253574){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x42a6b3,_0xfb40('0xce'));}if(!this[_0xfb40('0x78')](_0x42a6b3['query'])){return this['channel']['error'](_0x42a6b3,'no\x20query\x20configured');}var _0x529552=_0x42a6b3[_0xfb40('0xcf')][_0xfb40('0x51')](/(\r\n|\n|\r)/gm,'\x20');this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')]('query:\x20%s',_0x529552));var _0xd978f8=this[_0xfb40('0x27')][_0xfb40('0x65')](this,_0x253574,_0x529552);this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x42a6b3,_0x529552);if(!this[_0xfb40('0x78')](_0x42a6b3[_0xfb40('0xd0')])){return this[_0xfb40('0xd')]['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x232534=this[_0xfb40('0x11')][_0xfb40('0x65')](this,_0x42a6b3['variable_id']);if(!_0x232534){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x42a6b3,_0xfb40('0xd1'));}var _0x5a3250=this;_0xd978f8[_0xfb40('0xd2')](function(_0x4e432c,_0x32c46d){Object['keys'](_0x4e432c)[_0xfb40('0xd2')](function(_0x4ccd3f){_0x5a3250[_0xfb40('0xd')][_0xfb40('0x92')](util['format'](_0xfb40('0xd3'),_0x232534,_0x32c46d,_0x4ccd3f),_0x4e432c[_0x4ccd3f]);});});this['channel'][_0xfb40('0x92')](util[_0xfb40('0x25')](_0xfb40('0xd4'),_0x232534),_0xd978f8['length']);return this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0xd5'),_0x232534));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xd6')]=function(_0xc72c00){logger['debug'](util[_0xfb40('0x25')]('Enter\x20in\x20DIAL\x20(%s)\x20block',_0xc72c00[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0xc72c00[_0xfb40('0xd7')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0xc72c00,_0xfb40('0xd8'));}var _0x1619a4=this[_0xfb40('0xd9')][_0xfb40('0x65')](this,_0xc72c00[_0xfb40('0xd7')]);if(!_0x1619a4){return this['channel']['error'](_0xc72c00,_0xfb40('0xda'));}var _0x25f401=this[_0xfb40('0xd')][_0xfb40('0x4f')]('DIAL',[util[_0xfb40('0x25')](_0xfb40('0xdb'),_0x1619a4),_0xc72c00[_0xfb40('0x59')],_0xc72c00['opts'],_0xc72c00['url']]);if(_0x25f401[_0xfb40('0x97')]===-0x1){return _0x25f401;}return this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format']('Executed\x20command\x20%s',_0xfb40('0xdc')));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xdd')]=function(_0x325b50){logger[_0xfb40('0x98')](util['format'](_0xfb40('0xde'),_0x325b50['label']));if(!this['isConfigured'](_0x325b50[_0xfb40('0x74')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0xdf'));}if(!this[_0xfb40('0x78')](_0x325b50['text'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x9f'));}this[_0xfb40('0xd')]['bot']=!![];this[_0xfb40('0x30')](_0x325b50);this[_0xfb40('0x3b')](_0x325b50[_0xfb40('0x53')],'in','','');this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xe0'),_0x325b50[_0xfb40('0x53')]));var _0xa9b4fe=this['googleDialogflow'][_0xfb40('0x65')](this,_0x325b50);if(_0xa9b4fe){for(var _0x4ae86e in _0xa9b4fe){if(_0xa9b4fe['hasOwnProperty'](_0x4ae86e)){this['channel'][_0xfb40('0x92')](util[_0xfb40('0x25')](_0xfb40('0xe1'),_0x4ae86e[_0xfb40('0x5e')]()),_0xa9b4fe[_0x4ae86e]);}}this[_0xfb40('0x3b')](_0xa9b4fe[_0xfb40('0xe2')],_0xfb40('0xe3'),'dialogflow','');return this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format']('Dialogflow\x20Result\x20%s',_0xa9b4fe['speech']));}return this[_0xfb40('0xd')]['error'](_0x325b50,'Dialogflow\x20is\x20unreachable');};AGIVertices[_0xfb40('0x10')][_0xfb40('0xe4')]=function(_0x3a6582){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block',_0x3a6582[_0xfb40('0x32')]));if(!this['isConfigured'](_0x3a6582[_0xfb40('0xe5')])){return this['channel'][_0xfb40('0xa1')](_0xfb40('0xe6'));}if(!this[_0xfb40('0x78')](_0x3a6582[_0xfb40('0xe7')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0xe8'));}if(!this[_0xfb40('0x78')](_0x3a6582['private_key'])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0xe9'));}if(!this[_0xfb40('0x78')](_0x3a6582[_0xfb40('0x71')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0xea'));}if(!this[_0xfb40('0x78')](_0x3a6582['text'])){return this['channel'][_0xfb40('0xa1')](_0xfb40('0x9f'));}this[_0xfb40('0xd')][_0xfb40('0xeb')]=!![];this[_0xfb40('0x30')](_0x3a6582);this[_0xfb40('0x3b')](_0x3a6582['text'],'in','','');this['channel'][_0xfb40('0xa1')](util['format']('Trying\x20DialogflowV2:\x20%s',_0x3a6582['text']));var _0x436fda=this[_0xfb40('0x70')][_0xfb40('0x65')](this,_0x3a6582);if(_0x436fda){for(var _0x597769 in _0x436fda){if(_0x436fda['hasOwnProperty'](_0x597769)){if(_0x597769!==_0xfb40('0xec')){this['channel']['setVariable'](util[_0xfb40('0x25')]('DIALOGFLOW_%s',_0x597769[_0xfb40('0x5e')]()),_0x436fda[_0x597769]);}}}this[_0xfb40('0x3b')](_0x436fda[_0xfb40('0xe2')],_0xfb40('0xe3'),'dialogflowV2',_0x436fda[_0xfb40('0xec')]);return this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xed'),_0x436fda[_0xfb40('0xe2')]));}return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x3a6582,_0xfb40('0xee'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xef')]=function(_0x1646eb){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0xf0'),_0x1646eb[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x1646eb['ndauth_url'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0xf1'));}if(!this[_0xfb40('0x78')](_0x1646eb['username'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0xf2'));}if(!this[_0xfb40('0x78')](_0x1646eb[_0xfb40('0xf3')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0xf4'));}if(!this[_0xfb40('0x78')](_0x1646eb[_0xfb40('0xf5')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x9f'));}this[_0xfb40('0xd')][_0xfb40('0xeb')]=!![];this[_0xfb40('0x30')](_0x1646eb);this[_0xfb40('0x3b')](_0x1646eb[_0xfb40('0x53')],'in','','');this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xf6'),_0x1646eb[_0xfb40('0x53')]));var _0x269096=this[_0xfb40('0x72')][_0xfb40('0x65')](this,_0x1646eb);if(_0x269096){for(var _0x34b2c6 in _0x269096){if(_0x269096[_0xfb40('0x89')](_0x34b2c6)){this[_0xfb40('0xd')][_0xfb40('0x92')](util['format'](_0xfb40('0xf7'),_0x34b2c6[_0xfb40('0x5e')]()),_0x269096[_0x34b2c6]);}}this[_0xfb40('0x3b')](_0x269096[_0xfb40('0xe2')],'out',_0xfb40('0xef'),'');if(_0x269096[_0xfb40('0xf8')]){this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xf9'),_0x269096[_0xfb40('0xf8')]));var _0x14e3c7=this[_0xfb40('0xd')][_0xfb40('0xfa')](_0x269096[_0xfb40('0xf8')]);try{fs[_0xfb40('0xfb')](_0x269096['audiofile']+_0xfb40('0xfc'));}catch(_0x591a90){logger['error'](_0x591a90);}return _0x14e3c7;}else{return this['channel']['noop'](util[_0xfb40('0x25')](_0xfb40('0xfd'),_0x269096[_0xfb40('0xe2')]));}}return this['channel'][_0xfb40('0x2d')](_0x1646eb,'SestekNDA\x20is\x20unreachable');};AGIVertices['prototype'][_0xfb40('0xfe')]=function(_0x232ad7){logger[_0xfb40('0x98')](util['format'](_0xfb40('0xff'),_0x232ad7[_0xfb40('0x32')]));return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0xfe'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x100')]=function(_0x18263a){logger['info'](util[_0xfb40('0x25')](_0xfb40('0x101'),_0x18263a['label']));var _0x17ef91='';if(_0x18263a[_0xfb40('0x102')]){if(!this[_0xfb40('0x78')](_0x18263a[_0xfb40('0x102')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x18263a,'no\x20trunk\x20selected');}else{var _0x49bcaa=parseInt(_0x18263a[_0xfb40('0x102')],0xa);if(isNaN(_0x49bcaa)){_0x17ef91=_0x18263a['trunk_id'];}else{_0x17ef91=this['getTrunk'][_0xfb40('0x65')](this,_0x18263a[_0xfb40('0x102')]);if(!_0x17ef91){return this['channel'][_0xfb40('0x2d')](_0x18263a,_0xfb40('0x103'));}}}}else if(_0x18263a[_0xfb40('0x104')]){_0x17ef91=_0x18263a[_0xfb40('0x104')];}else{return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x18263a,_0xfb40('0x105'));}var _0x1c5daf=this['channel'][_0xfb40('0x4f')]('DIAL',[util[_0xfb40('0x25')]('SIP/%s/%s',_0x17ef91,_0x18263a['phone']),_0x18263a[_0xfb40('0x59')],_0x18263a[_0xfb40('0x106')],_0x18263a['url']]);if(_0x1c5daf[_0xfb40('0x97')]===-0x1){return _0x1c5daf;}return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x107'),_0xfb40('0xdc')));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x108')]=function(_0x1e0cc8){logger['info'](util[_0xfb40('0x25')](_0xfb40('0x109'),_0x1e0cc8[_0xfb40('0x32')]));return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x108'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0xb')]=function(_0x4f3287){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x10a'),_0x4f3287[_0xfb40('0x32')]));if(_0x4f3287[_0xfb40('0x9c')]===0x0){return this[_0xfb40('0x9b')](_0x4f3287);}_0x4f3287[_0xfb40('0x9c')]-=0x1;if(!this[_0xfb40('0x78')](_0x4f3287[_0xfb40('0x10b')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x4f3287,_0xfb40('0x10c'));}var _0x416770=this[_0xfb40('0x1e')]['sync'](this,_0x4f3287[_0xfb40('0x10b')]);if(!_0x416770){return this[_0xfb40('0xd')]['error'](_0x4f3287,_0xfb40('0x10d'));}if(!this[_0xfb40('0x78')](_0x4f3287[_0xfb40('0xd0')])){return this[_0xfb40('0xd')]['error'](_0xfb40('0x10e'));}var _0x1bb14f=this['channel'][_0xfb40('0x10f')](_0x416770,_0x4f3287['response'],_0x4f3287[_0xfb40('0x110')]);var _0x37e9cf=_0x1bb14f['result']?_0x1bb14f[_0xfb40('0x97')][_0xfb40('0x45')]():'';logger[_0xfb40('0x98')](_0xfb40('0x111'),JSON[_0xfb40('0x68')](_0x1bb14f));if(_0x1bb14f[_0xfb40('0x97')]===-0x1){this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x4f3287,_0x37e9cf);return _0x1bb14f;}else if(_0x1bb14f[_0xfb40('0x9a')]===_0xfb40('0x59')){_0x1bb14f[_0xfb40('0x97')]=_0x37e9cf[_0xfb40('0x8d')]>=parseInt(_0x4f3287[_0xfb40('0x112')])?'x':'i';}else{_0x1bb14f[_0xfb40('0x97')]=_0x37e9cf[_0xfb40('0x8d')]>=parseInt(_0x4f3287[_0xfb40('0x112')])&&_0x37e9cf[_0xfb40('0x8d')]<=parseInt(_0x4f3287[_0xfb40('0x110')])?'x':'i';}var _0x4a55fd=this['getVariable']['sync'](this,_0x4f3287[_0xfb40('0xd0')]);if(!_0x4a55fd){return this[_0xfb40('0xd')]['error'](_0x4f3287,_0xfb40('0xd1'));}this[_0xfb40('0xd')][_0xfb40('0x92')](_0x4a55fd,_0x37e9cf);if(this[_0xfb40('0x78')](_0x4f3287[_0xfb40('0x113')])){var _0x4daefa=parseInt(_0x4f3287[_0xfb40('0x113')],0xa);var _0x3f0a25=rs['generate']({'charset':'*','length':_0x4daefa});var _0x2bdf55=_0x37e9cf[_0xfb40('0x8d')];if(_0x2bdf55>0x0){if(_0x2bdf55>_0x4daefa){this['createSquareDetailsReport'][_0xfb40('0x65')](this,_0x4f3287,_0x4f3287[_0xfb40('0x114')]===_0xfb40('0x115')?_0x3f0a25+_0x37e9cf['substr'](_0x4daefa):_0x37e9cf[_0xfb40('0x116')](0x0,_0x2bdf55-_0x4daefa)+_0x3f0a25);}else{this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x4f3287,rs[_0xfb40('0x117')]({'charset':'*','length':_0x2bdf55}));}}else{this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x4f3287,'');}}else{this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x4f3287,_0x37e9cf);}return _0x1bb14f;};AGIVertices[_0xfb40('0x10')][_0xfb40('0xc')]=function(_0x495d51){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x118'),_0x495d51[_0xfb40('0x32')]));return this[_0xfb40('0xb')](_0x495d51);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x119')]=function(_0x4f735e){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x11a'),_0x4f735e[_0xfb40('0x32')]));this['createSquareDetailsReport'][_0xfb40('0x65')](this,_0x4f735e,_0x4f735e[_0xfb40('0x11b')]);return this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x11c'),_0x4f735e['goalname']));};AGIVertices[_0xfb40('0x10')]['awspolly']=function(_0xb3ec70){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x11d'),_0xb3ec70[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0xb3ec70[_0xfb40('0x7b')])||!this['isConfigured'](_0xb3ec70[_0xfb40('0x7c')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x11e'));}if(!this[_0xfb40('0x78')](_0xb3ec70[_0xfb40('0x53')])){return this['channel'][_0xfb40('0xa1')](_0xfb40('0x9f'));}this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0x11f'),_0xb3ec70[_0xfb40('0x53')]));var _0x1a9e2a=this[_0xfb40('0x7a')]['sync'](this,_0xb3ec70);if(_0x1a9e2a){this[_0xfb40('0xd')]['noop'](util['format']('aws\x20Polly\x20%s\x20file\x20created',_0x1a9e2a));var _0x2f24dc=this[_0xfb40('0xd')][_0xfb40('0xfa')](_0x1a9e2a);try{fs[_0xfb40('0xfb')](_0x1a9e2a+'.wav');}catch(_0x3fec95){logger[_0xfb40('0x2d')](_0x3fec95);}return _0x2f24dc;}return this[_0xfb40('0xd')]['error'](_0xb3ec70,'aws\x20Polly\x20is\x20unreachable');};AGIVertices[_0xfb40('0x10')][_0xfb40('0x120')]=function(_0x36c82c){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x121'),_0x36c82c[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x36c82c['aws_access_key_id'])||!this[_0xfb40('0x78')](_0x36c82c[_0xfb40('0x7c')])){return this['channel']['noop']('no\x20valid\x20credentials\x20configured');}if(!this[_0xfb40('0x78')](_0x36c82c[_0xfb40('0x81')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x122'));}if(!this[_0xfb40('0x78')](_0x36c82c[_0xfb40('0x53')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x9f'));}this[_0xfb40('0xd')][_0xfb40('0xeb')]=!![];this[_0xfb40('0x30')](_0x36c82c);this['createSquareMessage'](_0x36c82c[_0xfb40('0x53')],'in','','');this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0x123'),_0x36c82c[_0xfb40('0x53')]));var _0x529f21=this['awsLex'][_0xfb40('0x65')](this,_0x36c82c);if(_0x529f21){for(var _0x418cdb in _0x529f21){if(_0x529f21[_0xfb40('0x89')](_0x418cdb)&&_[_0xfb40('0x8a')](_0x529f21[_0x418cdb])){this[_0xfb40('0xd')][_0xfb40('0x92')](util[_0xfb40('0x25')](_0xfb40('0x124'),_0x418cdb[_0xfb40('0x5e')]()),_0x529f21[_0x418cdb]);}}if(_[_0xfb40('0x3e')](_0x529f21[_0xfb40('0x6c')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x125'));}else{this[_0xfb40('0x3b')](_0x529f21[_0xfb40('0x6c')],_0xfb40('0xe3'),_0xfb40('0x126'),'');return this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x127'),_0x529f21['message']));}}return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x36c82c,_0xfb40('0x128'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x129')]=function(_0xd38b9a){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s',_0xd38b9a[_0xfb40('0x32')],_0xd38b9a[_0xfb40('0x59')]));if(!this[_0xfb40('0x78')](_0xd38b9a[_0xfb40('0x74')])){return this[_0xfb40('0xd')]['noop']('no\x20key\x20configured');}var _0x2bc82c=_0xfb40('0x12a');var _0xfb2e97=util[_0xfb40('0x25')](_0xfb40('0x12b'),FILES_PATH,rs['generate'](0x4));var _0x223f94=util[_0xfb40('0x25')]('%s.%s',_0xfb2e97,_0x2bc82c);var _0x8ac198=!![];if(_0xd38b9a[_0xfb40('0x12c')]==='NOBEEP'){_0x8ac198=![];}var _0x639304=this['channel'][_0xfb40('0x12d')](_0xfb2e97,_0x2bc82c,_0xd38b9a['intKey'],_0xd38b9a[_0xfb40('0x59')],undefined,_0x8ac198);if(_0x639304[_0xfb40('0x97')]!==-0x1){this['channel'][_0xfb40('0xa1')](util['format'](_0xfb40('0x12e'),_0x223f94));var _0x2ded45=this[_0xfb40('0x82')][_0xfb40('0x65')](this,_0xd38b9a,_0x223f94);if(_0x2ded45){for(var _0x283dec in _0x2ded45){if(_0x2ded45['hasOwnProperty'](_0x283dec)){this['channel'][_0xfb40('0x92')](util['format'](_0xfb40('0x12f'),_0x283dec[_0xfb40('0x5e')]()),_0x2ded45[_0x283dec]);}}return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x130'),JSON['stringify'](_0x2ded45)));}}return _0x639304;};AGIVertices[_0xfb40('0x10')]['tildeasr']=function(_0x129f44){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x131'),_0x129f44['label']));if(!this[_0xfb40('0x78')](_0x129f44[_0xfb40('0x84')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x132'));}if(!this[_0xfb40('0x78')](_0x129f44['appsecret'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')]('no\x20appsecret\x20configured');}var _0x40ab4e=_0xfb40('0x12a');var _0x4a7b20=util['format']('%s/recordings/%s',FILES_PATH,rs[_0xfb40('0x117')](0x4));var _0x1e6bc1=util[_0xfb40('0x25')](_0xfb40('0x91'),_0x4a7b20,_0x40ab4e);var _0x40f6ae=!![];if(_0x129f44[_0xfb40('0x12c')]==='NOBEEP'){_0x40f6ae=![];}var _0x444540=this[_0xfb40('0xd')][_0xfb40('0x12d')](_0x4a7b20,_0x40ab4e,_0x129f44[_0xfb40('0x133')],_0x129f44[_0xfb40('0x59')],undefined,_0x40f6ae);if(_0x444540['result']!==-0x1){this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')]('tilde\x20%s\x20file\x20created',_0x1e6bc1));var _0x1c9d0c=this[_0xfb40('0x134')][_0xfb40('0x65')](this,_0x129f44,_0x1e6bc1);if(_0x1c9d0c){for(var _0x5a8925 in _0x1c9d0c){if(_0x1c9d0c[_0xfb40('0x89')](_0x5a8925)){this[_0xfb40('0xd')]['setVariable'](util[_0xfb40('0x25')]('TILDE_ASR_%s',_0x5a8925[_0xfb40('0x5e')]()),_0x1c9d0c[_0x5a8925]);}}return this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x135'),JSON['stringify'](_0x1c9d0c)));}}return _0x444540;};AGIVertices[_0xfb40('0x10')]['gotoc']=function(_0x1a7e43){logger[_0xfb40('0x98')](util['format']('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x1a7e43[_0xfb40('0x32')]));return this[_0xfb40('0xd')][_0xfb40('0x136')](_0x1a7e43[_0xfb40('0x137')],_0x1a7e43[_0xfb40('0x37')],_0x1a7e43[_0xfb40('0x38')]);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x138')]=function(_0xefb892){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x139'),_0xefb892[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0xefb892[_0xfb40('0x13a')])){return this['channel'][_0xfb40('0x2d')](_0xefb892,_0xfb40('0x13b'));}try{var _0x59334e=eval(_0xefb892[_0xfb40('0x13a')])?'true':'false';this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')]('EVAL\x20CONDITION\x20%s\x20%s',_0xefb892[_0xfb40('0x13a')],_0x59334e));return{'code':0xc8,'result':_0x59334e};}catch(_0x97da0d){return{'code':0xc8,'result':_0xfb40('0x13c')};}};AGIVertices[_0xfb40('0x10')][_0xfb40('0x13d')]=function(_0x49474d){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x13e'),_0x49474d[_0xfb40('0x32')]));if(!this['isConfigured'](_0x49474d['interval_id'])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x49474d,_0xfb40('0x13f'));}var _0x761cd4=this[_0xfb40('0x140')][_0xfb40('0x65')](this,_0x49474d[_0xfb40('0x141')]);if(!_0x761cd4){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x49474d,'no\x20intervals\x20found');}for(var _0x1c2688=0x0;_0x1c2688<_0x761cd4[_0xfb40('0x8d')];_0x1c2688+=0x1){var _0x37ae97=this['channel']['getVariable'](util[_0xfb40('0x25')](_0xfb40('0x142'),_0x761cd4[_0x1c2688]));if(_0x37ae97[_0xfb40('0x97')]===-0x1){return _0x37ae97;}logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x143'),_0x761cd4[_0x1c2688],_0x37ae97[_0xfb40('0x9a')]));if(_0x37ae97[_0xfb40('0x9a')]===_0xfb40('0x144')){logger['info'](util[_0xfb40('0x25')](_0xfb40('0x143'),_0x761cd4[_0x1c2688],'true'));this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x143'),_0x761cd4[_0x1c2688],_0xfb40('0x144')));return{'code':0xc8,'result':_0xfb40('0x144')};}else{logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x143'),_0x761cd4[_0x1c2688],_0xfb40('0x13c')));this[_0xfb40('0xd')]['noop'](util['format'](_0xfb40('0x143'),_0x761cd4[_0x1c2688],'false'));}}return{'code':0xc8,'result':_0xfb40('0x13c')};};AGIVertices['prototype'][_0xfb40('0x145')]=function(_0x23be4c){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x146'),_0x23be4c['label']));return this[_0xfb40('0xd')]['hangup']();};AGIVertices['prototype'][_0xfb40('0x147')]=function(_0x38f2cb){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x38f2cb[_0xfb40('0x32')]));if(!this['isConfigured'](_0x38f2cb[_0xfb40('0x74')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0xdf'));}var _0x1f7325=_0xfb40('0x12a');var _0x5388c9=util[_0xfb40('0x25')](_0xfb40('0x12b'),FILES_PATH,rs[_0xfb40('0x117')](0x4));var _0x2f513a=util[_0xfb40('0x25')](_0xfb40('0x91'),_0x5388c9,_0x1f7325);var _0x10ef38=!![];if(_0x38f2cb[_0xfb40('0x12c')]===_0xfb40('0x148')){_0x10ef38=![];}var _0x29a73c=this[_0xfb40('0xd')][_0xfb40('0x12d')](_0x5388c9,_0x1f7325,_0x38f2cb['intKey'],_0x38f2cb[_0xfb40('0x59')],undefined,_0x10ef38);if(_0x29a73c[_0xfb40('0x97')]!==-0x1){this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x149'),_0x2f513a));var _0x509fb0=this[_0xfb40('0x75')][_0xfb40('0x65')](this,_0x38f2cb,_0x2f513a);if(_0x509fb0){for(var _0x29d9d8 in _0x509fb0){if(_0x509fb0[_0xfb40('0x89')](_0x29d9d8)){this[_0xfb40('0xd')]['setVariable'](util[_0xfb40('0x25')](_0xfb40('0x14a'),_0x29d9d8[_0xfb40('0x5e')]()),_0x509fb0[_0x29d9d8]);}}return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x14b'),JSON[_0xfb40('0x68')](_0x509fb0)));}}return _0x29a73c;};AGIVertices[_0xfb40('0x10')][_0xfb40('0x14c')]=function(_0x2b7228){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x14d'),_0x2b7228[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x2b7228[_0xfb40('0x74')])){return this['channel']['noop']('no\x20key\x20configured');}if(!this[_0xfb40('0x78')](_0x2b7228['text'])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x9f'));}this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')]('Trying\x20ispeech\x20TTS\x20%s',_0x2b7228['text']));var _0x11dc86=this['ispeechTTS'][_0xfb40('0x65')](this,_0x2b7228);if(_0x11dc86){this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')]('ispeech\x20%s\x20file\x20created',_0x11dc86));var _0x5190c8=this['channel'][_0xfb40('0xfa')](_0x11dc86,_0x2b7228[_0xfb40('0x133')]);try{fs[_0xfb40('0xfb')](_0x11dc86+_0xfb40('0xfc'));}catch(_0x32a6bd){logger[_0xfb40('0x2d')](_0x32a6bd);}return _0x5190c8;}return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x2b7228,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0xfb40('0x10')]['login']=function(_0x4bd92c){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x14e'),_0x4bd92c[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x4bd92c[_0xfb40('0x14f')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x4bd92c,_0xfb40('0x150'));}logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0xfb40('0x34')],_0x4bd92c['findBy']));var _0x8b05a2=this[_0xfb40('0x4b')][_0xfb40('0x65')](this,_0x4bd92c[_0xfb40('0x14f')]);if(_0x8b05a2){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xfb40('0xd')][_0xfb40('0x34')],_0x4bd92c[_0xfb40('0x14f')]));this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x4bd92c['findBy']));return{'code':0xc8,'result':_0xfb40('0x152')};}else{logger[_0xfb40('0x98')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0xfb40('0x34')],_0x4bd92c[_0xfb40('0x14f')]));this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x153'),this[_0xfb40('0xd')]['callerid'],_0x4bd92c[_0xfb40('0x14f')]));return{'code':0xc8,'result':_0xfb40('0x154')};}};AGIVertices[_0xfb40('0x10')]['logout']=function(_0xac2712){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x155'),_0xac2712[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0xac2712[_0xfb40('0x14f')])){return this['channel']['error'](_0xac2712,_0xfb40('0x150'));}logger[_0xfb40('0x98')](util['format'](_0xfb40('0x156'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0xac2712[_0xfb40('0x14f')]));var _0x311b25=this[_0xfb40('0x4a')][_0xfb40('0x65')](this,_0xac2712[_0xfb40('0x14f')]);if(_0x311b25){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x151'),this[_0xfb40('0xd')]['callerid'],_0xac2712['findBy']));this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0xac2712[_0xfb40('0x14f')]));return{'code':0xc8,'result':_0xfb40('0x152')};}else{logger[_0xfb40('0x98')](util['format'](_0xfb40('0x153'),this[_0xfb40('0xd')]['callerid'],_0xac2712[_0xfb40('0x14f')]));this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x153'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0xac2712[_0xfb40('0x14f')]));return{'code':0xc8,'result':_0xfb40('0x154')};}};AGIVertices[_0xfb40('0x10')][_0xfb40('0x157')]=function(_0x4ac521){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Enter\x20in\x20MATH\x20(%s)\x20block',_0x4ac521[_0xfb40('0x32')]));if(!this['isConfigured'](_0x4ac521['operation'])){return this[_0xfb40('0xd')]['error'](_0x4ac521,'no\x20operation\x20configured');}this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')]('math\x20%s',_0x4ac521[_0xfb40('0x158')]));var _0x7d0f27=eval(_0x4ac521[_0xfb40('0x158')]);if(!this[_0xfb40('0x78')](_0x4ac521['variable_id'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x10e'));}var _0x60806f=this[_0xfb40('0x11')][_0xfb40('0x65')](this,_0x4ac521[_0xfb40('0xd0')]);if(!_0x60806f){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x4ac521,'no\x20variable\x20found');}if(_[_0xfb40('0x90')](_0x7d0f27)){var _0x204f5a=this;_0x7d0f27[_0xfb40('0xd2')](function(_0x288f17,_0x39e084){_0x204f5a[_0xfb40('0xd')][_0xfb40('0x92')](util[_0xfb40('0x25')](_0xfb40('0x159'),_0x60806f,_0x39e084),_0x288f17);});return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x15a'),_0x60806f));}else{return this[_0xfb40('0xd')]['setVariable'](_0x60806f,_0x7d0f27);}};AGIVertices[_0xfb40('0x10')]['menu']=function(_0x38a9e5){logger['info'](util[_0xfb40('0x25')](_0xfb40('0x15b'),_0x38a9e5['label']));if(_0x38a9e5[_0xfb40('0x9c')]===0x0){return this[_0xfb40('0x9b')](_0x38a9e5);}_0x38a9e5[_0xfb40('0x9c')]-=0x1;if(!this[_0xfb40('0x78')](_0x38a9e5[_0xfb40('0x10b')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x38a9e5,_0xfb40('0x10c'));}var _0x22bc09=this['getSound']['sync'](this,_0x38a9e5[_0xfb40('0x10b')]);if(!_0x22bc09){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x38a9e5,_0xfb40('0x10d'));}var _0x2d2a3e=this['channel']['getData'](_0x22bc09,_0x38a9e5[_0xfb40('0x15c')],_0x38a9e5[_0xfb40('0x15d')]);var _0x38ad91=_0x2d2a3e[_0xfb40('0x97')];if(_0x2d2a3e[_0xfb40('0x97')]===-0x1){this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x38a9e5,'-1');return _0x2d2a3e;}else if(_0x2d2a3e[_0xfb40('0x9a')]===_0xfb40('0x59')){_0x2d2a3e[_0xfb40('0x97')]=_0x2d2a3e[_0xfb40('0x97')][_0xfb40('0x8d')]>0x0?_0x2d2a3e[_0xfb40('0x97')]:'t';}else if(_[_0xfb40('0x3d')](_0x2d2a3e[_0xfb40('0x97')])){_0x2d2a3e[_0xfb40('0x97')]='#';_0x38ad91='#';}if(!this[_0xfb40('0x78')](_0x38a9e5[_0xfb40('0xd0')])){this[_0xfb40('0xd')]['noop'](_0xfb40('0x10e'));}else{var _0x5c0863=this['getVariable'][_0xfb40('0x65')](this,_0x38a9e5[_0xfb40('0xd0')]);if(!_0x5c0863){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x38a9e5,'no\x20variable\x20found');}this[_0xfb40('0xd')][_0xfb40('0x92')](_0x5c0863,_0x38ad91);}this[_0xfb40('0x30')]['sync'](this,_0x38a9e5,_0x38ad91);return _0x2d2a3e;};AGIVertices['prototype'][_0xfb40('0xa1')]=function(_0x3e07c6){logger[_0xfb40('0x98')](util['format']('Enter\x20in\x20NOOP\x20(%s)\x20block',_0x3e07c6['label']));return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0x3e07c6['output']||_0x3e07c6['label']);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x15e')]=function(_0x4f5088){logger['info'](util['format'](_0xfb40('0x15f'),_0x4f5088['label']));if(!this['isConfigured'](_0x4f5088[_0xfb40('0x14f')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x4f5088,_0xfb40('0x150'));}logger['info'](util[_0xfb40('0x25')](_0xfb40('0x156'),this['channel'][_0xfb40('0x34')],_0x4f5088['findBy']));var _0xf0ffec=this['getPause']['sync'](this,_0x4f5088[_0xfb40('0x160')]);var _0x28b6b4=this[_0xfb40('0x47')][_0xfb40('0x65')](this,_0x4f5088[_0xfb40('0x14f')],_0xf0ffec);if(_0x28b6b4){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x4f5088['findBy']));this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x4f5088[_0xfb40('0x14f')]));return{'code':0xc8,'result':'success'};}else{logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x153'),this[_0xfb40('0xd')]['callerid'],_0x4f5088['findBy']));this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x4f5088[_0xfb40('0x14f')]));return{'code':0xc8,'result':_0xfb40('0x154')};}};AGIVertices[_0xfb40('0x10')][_0xfb40('0x161')]=function(_0x38531d){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x162'),_0x38531d['label']));if(!this[_0xfb40('0x78')](_0x38531d[_0xfb40('0x10b')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x38531d,_0xfb40('0x10c'));}var _0x3f5068=this[_0xfb40('0x1e')][_0xfb40('0x65')](this,_0x38531d[_0xfb40('0x10b')]);if(!_0x3f5068){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x38531d,_0xfb40('0x10d'));}var _0x21963c=this['channel'][_0xfb40('0x4f')](_0xfb40('0x163'),[_0x3f5068,_0x38531d[_0xfb40('0x106')]]);if(_0x21963c[_0xfb40('0x97')]===-0x1){return _0x21963c;}return this['channel']['noop'](util[_0xfb40('0x25')](_0xfb40('0xc0'),_0xfb40('0x163'),_0x3f5068));};AGIVertices['prototype']['queue']=function(_0x1646f3){logger['info'](util[_0xfb40('0x25')](_0xfb40('0x164'),_0x1646f3[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x1646f3['queue_id'])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x1646f3,_0xfb40('0x165'));}var _0x4755df='';var _0x244fd7=parseInt(_0x1646f3['queue_id'],0xa);if(isNaN(_0x244fd7)){_0x4755df=_0x1646f3[_0xfb40('0x166')];}else{_0x4755df=this['getVoiceQueue'][_0xfb40('0x65')](this,_0x1646f3['queue_id']);if(!_0x4755df){return this['channel'][_0xfb40('0x2d')](_0x1646f3,_0xfb40('0x167'));}}var _0x1411f6='';if(this[_0xfb40('0x78')](_0x1646f3[_0xfb40('0x10b')])){var _0x2663ef=this[_0xfb40('0x1e')][_0xfb40('0x65')](this,_0x1646f3[_0xfb40('0x10b')]);if(_0x2663ef){_0x1411f6=_0x2663ef;}}this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x1646f3,_0x4755df);if(_0x1646f3['opts']['indexOf']('x')<0x0){_0x1646f3[_0xfb40('0x106')]+='x';}if(_0x1646f3['opts'][_0xfb40('0x168')]('X')<0x0){_0x1646f3[_0xfb40('0x106')]+='X';}this['channel']['setVariable'](_0xfb40('0x169'),_0x4755df?_0x4755df[_0xfb40('0x16a')]():'');var _0x518ef0=this['channel'][_0xfb40('0x4f')](_0xfb40('0x16b'),[_0x4755df,_0x1646f3[_0xfb40('0x106')],_0x1646f3[_0xfb40('0x16c')],_0x1411f6,_0x1646f3[_0xfb40('0x59')],_0x1646f3[_0xfb40('0xad')],_0x1646f3[_0xfb40('0x16d')],_0x1646f3[_0xfb40('0x16e')],'',_0x1646f3['position']]);if(_0x518ef0[_0xfb40('0x97')]===-0x1){return _0x518ef0;}return this['channel']['noop'](util[_0xfb40('0x25')](_0xfb40('0xc0'),_0xfb40('0x16b'),_0x4755df));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x16f')]=function(_0x16d4fa){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x170'),_0x16d4fa[_0xfb40('0x32')]));var _0x263707=_0x16d4fa[_0xfb40('0x171')]||'wav';var _0x1cdb73=util[_0xfb40('0x25')](_0xfb40('0x172'),this[_0xfb40('0xd')][_0xfb40('0x31')],rs['generate'](0x5));var _0x52a6a2=util[_0xfb40('0x25')](_0xfb40('0x173'),FILES_PATH,_0x1cdb73,_0x263707);var _0x5d4eb4=util['format'](_0xfb40('0x12b'),FILES_PATH,_0x1cdb73);this['createSquareRecording'][_0xfb40('0x65')](this,_0x16d4fa,_0x1cdb73,_0x52a6a2);this[_0xfb40('0xd')][_0xfb40('0x92')]('RECORDING_SAVENAME',_0x1cdb73);logger[_0xfb40('0x98')](_0xfb40('0x174'),_0x5d4eb4,_0x263707,_0x16d4fa[_0xfb40('0x175')],_0x16d4fa[_0xfb40('0x59')]);return this['channel'][_0xfb40('0x12d')](_0x5d4eb4,_0x263707,_0x16d4fa[_0xfb40('0x175')],_0x16d4fa['timeout'],undefined,!![]);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x176')]=function(_0x923449){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x177'),_0x923449['label']));if(!this[_0xfb40('0x78')](_0x923449[_0xfb40('0x16c')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x178'));}var _0x58385f=this[_0xfb40('0x179')][_0xfb40('0x65')](this,_0x923449);logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Response:',util[_0xfb40('0x17a')](_0x58385f,{'showHidden':![],'depth':null})));if(!this[_0xfb40('0x78')](_0x923449['variable_id'])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x17b'));}var _0x3532d9=this[_0xfb40('0x11')][_0xfb40('0x65')](this,_0x923449[_0xfb40('0xd0')]);if(!_0x3532d9){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x923449,_0xfb40('0xd1'));}this[_0xfb40('0xd')][_0xfb40('0x92')](util[_0xfb40('0x25')]('%s_STATUS_CODE',_0x3532d9),_0x58385f[_0xfb40('0x6a')]?_0x58385f['statusCode']:_0xfb40('0x17c'));this[_0xfb40('0xd')][_0xfb40('0x92')](util[_0xfb40('0x25')]('%s_STATUS_MESSAGE',_0x3532d9),_0x58385f[_0xfb40('0x6b')]?_0x58385f[_0xfb40('0x6b')]:'OK');if(_0x58385f[_0xfb40('0x5f')]){try{this[_0xfb40('0x8f')](_0x58385f[_0xfb40('0x5f')],_0x3532d9);}catch(_0x761d59){logger[_0xfb40('0x2d')](util[_0xfb40('0x25')](_0xfb40('0x17d'),_0x3532d9));}}return this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0xd5'),_0x3532d9));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x17e')]=function(_0xe10e09){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x17f'),_0xe10e09[_0xfb40('0x32')]));return this[_0xfb40('0xd')][_0xfb40('0x180')](_0xe10e09[_0xfb40('0x181')][_0xfb40('0x51')](/\s+/g,''),_0xe10e09[_0xfb40('0x175')]);};AGIVertices[_0xfb40('0x10')]['saynumber']=function(_0x4a2a10){logger['info'](util[_0xfb40('0x25')](_0xfb40('0x182'),_0x4a2a10[_0xfb40('0x32')]));return this['channel']['sayNumber'](_0x4a2a10[_0xfb40('0x183')][_0xfb40('0x51')](/\s+/g,''),_0x4a2a10[_0xfb40('0x175')]);};AGIVertices[_0xfb40('0x10')]['sayphonetic']=function(_0x1f6658){logger['info'](util[_0xfb40('0x25')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x1f6658['label']));return this[_0xfb40('0xd')][_0xfb40('0x184')](_0x1f6658[_0xfb40('0x53')],_0x1f6658[_0xfb40('0x175')]);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x185')]=function(_0x8579b5){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x186'),_0x8579b5[_0xfb40('0x32')]));if(!this['isConfigured'](_0x8579b5[_0xfb40('0x187')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x188'));}var _0x3002b2=this[_0xfb40('0x189')][_0xfb40('0x65')](this,_0x8579b5[_0xfb40('0x187')]);if(!_0x3002b2||!_0x3002b2[_0xfb40('0x18a')]){return this[_0xfb40('0xd')]['error'](_0x8579b5,_0xfb40('0x18b'));}var _0x58b434={'from':util[_0xfb40('0x25')](_0xfb40('0x18c'),_0x3002b2[_0xfb40('0x13')],_0x3002b2['email']||_0x3002b2[_0xfb40('0x18a')][_0xfb40('0x18d')]),'to':_0x8579b5['to']||'','cc':_0x8579b5['cc']||'','bcc':_0x8579b5[_0xfb40('0x18e')]||'','subject':_0x8579b5[_0xfb40('0x18f')],'html':_0x8579b5[_0xfb40('0x53')],'text':_0x8579b5['text']};var _0x43b090={'tls':{'rejectUnauthorized':![]}};if(_0x3002b2[_0xfb40('0x18a')][_0xfb40('0x190')]){_0x43b090[_0xfb40('0x190')]=_0x3002b2[_0xfb40('0x18a')][_0xfb40('0x190')];}else{_0x43b090['host']=_0x3002b2[_0xfb40('0x18a')][_0xfb40('0x191')];_0x43b090[_0xfb40('0x192')]=_0x3002b2['Smtp'][_0xfb40('0x192')];_0x43b090[_0xfb40('0x193')]=_0x3002b2['Smtp'][_0xfb40('0x193')];}if(_0x3002b2['Smtp'][_0xfb40('0x194')]){_0x43b090[_0xfb40('0x195')]={'user':_0x3002b2['Smtp'][_0xfb40('0x18d')],'pass':_0x3002b2[_0xfb40('0x18a')]['pass']};}if(this[_0xfb40('0x78')](_0x8579b5[_0xfb40('0x196')])){}logger[_0xfb40('0x197')](_0xfb40('0x198'),JSON[_0xfb40('0x68')](_0x58b434));this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x8579b5,_0x8579b5[_0xfb40('0x187')]);this[_0xfb40('0xd')]['noop'](util['format'](_0xfb40('0x199'),_0x3002b2[_0xfb40('0x13')]));this['sendMailMessage'][_0xfb40('0x65')](this,_0x43b090,_0x58b434);return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x19a'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x19b')]=function(_0x4de1d8){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x19c'),_0x4de1d8['label']));return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x19d'));};AGIVertices['prototype']['sendSMS']=function(_0xf64363){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x19e'),_0xf64363[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0xf64363[_0xfb40('0x19f')])){return this[_0xfb40('0xd')]['noop'](_0xfb40('0x1a0'));}var _0x5ebdfd=this[_0xfb40('0x1a1')][_0xfb40('0x65')](this,_0xf64363['sms_account_id']);if(!_0x5ebdfd){return this[_0xfb40('0xd')]['error'](_0xf64363,_0xfb40('0x1a2'));}var _0x54529b={'body':_0xf64363[_0xfb40('0x1a3')],'phone':_0xf64363['to']||'','SmsAccountId':_0x5ebdfd['id']};logger[_0xfb40('0x197')](_0xfb40('0x1a4'),JSON[_0xfb40('0x68')](_0x54529b));this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0xf64363,_0xf64363[_0xfb40('0x19f')]);this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x1a5'),_0x5ebdfd[_0xfb40('0x13')]));this[_0xfb40('0x2f')][_0xfb40('0x65')](this,_0x54529b);return this[_0xfb40('0xd')][_0xfb40('0xa1')]('Sms\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices['prototype']['set']=function(_0x5cf10f){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x1a6'),_0x5cf10f[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x5cf10f[_0xfb40('0xd0')])){return this['channel'][_0xfb40('0x2d')](_0x5cf10f,_0xfb40('0x1a7'));}var _0x1cd555=this[_0xfb40('0x11')][_0xfb40('0x65')](this,_0x5cf10f[_0xfb40('0xd0')]);if(!_0x1cd555){return this[_0xfb40('0xd')]['error'](_0x5cf10f,'no\x20variable\x20found');}return this[_0xfb40('0xd')][_0xfb40('0x92')](_0x1cd555,_0x5cf10f[_0xfb40('0x1a8')]);};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1a9')]=function(_0x391be0){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x1aa'),_0x391be0[_0xfb40('0x32')]));this[_0xfb40('0xd')]['noop'](_0xfb40('0x1ab'));if(_0x391be0[_0xfb40('0xb4')]===_0xfb40('0x1ac')){this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x1ad'));return this[_0xfb40('0xd')][_0xfb40('0xb4')]();}return this['channel'][_0xfb40('0xa1')](_0xfb40('0x1ae'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1af')]=function(_0x4b0321){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x1b0'),_0x4b0321[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x4b0321[_0xfb40('0x1b1')])){return this['channel'][_0xfb40('0x2d')](_0x4b0321,'no\x20subproject\x20selected');}var _0x882f97=this['getSquareProject'][_0xfb40('0x65')](this,_0x4b0321[_0xfb40('0x1b1')]);if(!this[_0xfb40('0x78')](_0x882f97)){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x4b0321,util[_0xfb40('0x25')]('no\x20subproject\x20found\x20with\x20id\x20%d',_0x4b0321[_0xfb40('0x1b1')]));}if(_0x882f97===this[_0xfb40('0xd')][_0xfb40('0x33')]){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x4b0321,_0xfb40('0x1b2'));}this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x4b0321,_0x882f97);var _0x1125ff=this[_0xfb40('0xd')]['exec']('AGI',util['format'](_0xfb40('0x1b3'),config['agi']['host']||_0xfb40('0x1b4'),_0x882f97,this['channel'][_0xfb40('0x33')]));if(_0x1125ff['result']===-0x1){return _0x1125ff;}return this['channel']['noop'](util[_0xfb40('0x25')](_0xfb40('0xc0'),'AGI',_0x882f97));};AGIVertices[_0xfb40('0x10')]['system']=function(_0x298226){logger['info'](util[_0xfb40('0x25')]('Enter\x20in\x20SYSTEM\x20(%s)\x20block',_0x298226[_0xfb40('0x32')]));var _0x5cbde3=this['shellCommand']['sync'](this,_0x298226[_0xfb40('0xaf')]);this[_0xfb40('0x30')][_0xfb40('0x65')](this,_0x298226,_0x298226[_0xfb40('0xaf')]);if(this[_0xfb40('0x78')](_0x298226[_0xfb40('0xd0')])){var _0x46019e=this[_0xfb40('0x11')]['sync'](this,_0x298226['variable_id']);if(_0x46019e){this[_0xfb40('0xd')][_0xfb40('0x92')](_0x46019e,_0x5cbde3);return this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')]('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0x298226[_0xfb40('0xaf')],_0x46019e));}}return this[_0xfb40('0xd')]['noop'](util['format']('sh\x20command:\x20%s\x20result\x20no\x20stored',_0x298226[_0xfb40('0xaf')]));};AGIVertices['prototype'][_0xfb40('0x1b5')]=function(_0x3b440c){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x3b440c[_0xfb40('0x32')]));_0x3b440c['text']=_0x3b440c['text'][_0xfb40('0x51')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xfb40('0x78')](_0x3b440c[_0xfb40('0x1b6')])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x1b7'));}if(!this[_0xfb40('0x78')](_0x3b440c['text'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')](_0xfb40('0x9f'));}this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')]('Trying\x20Google\x20Cloud\x20TTS\x20%s',_0x3b440c['text']));var _0x4c5b69=this[_0xfb40('0x52')][_0xfb40('0x65')](this,_0x3b440c);if(_0x4c5b69){this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')]('Google\x20Cloud\x20TTS\x20%s\x20file\x20created',_0x4c5b69));var _0x446943=this['channel']['streamFile'](_0x4c5b69);try{fs[_0xfb40('0xfb')](_0x4c5b69+_0xfb40('0xfc'));}catch(_0x5006b2){logger[_0xfb40('0x2d')](_0x5006b2);}return _0x446943;}return this[_0xfb40('0xd')]['error'](_0x3b440c,'Google\x20Cloud\x20TTS\x20is\x20unreachable');};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1b8')]=function(_0x375989){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x1b9'),_0x375989[_0xfb40('0x32')]));_0x375989[_0xfb40('0x53')]=_0x375989[_0xfb40('0x53')][_0xfb40('0x51')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xfb40('0x78')](_0x375989['text'])){return this[_0xfb40('0xd')][_0xfb40('0xa1')]('no\x20text\x20configured');}this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x1ba'),_0x375989[_0xfb40('0x53')]));var _0x11a823=this[_0xfb40('0x57')][_0xfb40('0x65')](this,_0x375989);if(_0x11a823){this[_0xfb40('0xd')]['noop'](util[_0xfb40('0x25')](_0xfb40('0x1bb'),_0x11a823));var _0x4a83ce=this[_0xfb40('0xd')][_0xfb40('0xfa')](_0x11a823);try{fs[_0xfb40('0xfb')](_0x11a823+'.wav');}catch(_0x4c9179){logger['error'](_0x4c9179);}return _0x4a83ce;}return this['channel'][_0xfb40('0x2d')](_0x375989,_0xfb40('0x1bc'));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1bd')]=function(_0x54fe8f){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x1be'),_0x54fe8f[_0xfb40('0x32')]));if(!this['isConfigured'](_0x54fe8f[_0xfb40('0x14f')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x54fe8f,_0xfb40('0x150'));}logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x156'),this[_0xfb40('0xd')]['callerid'],_0x54fe8f[_0xfb40('0x14f')]));var _0x378455=this[_0xfb40('0x49')][_0xfb40('0x65')](this,_0x54fe8f[_0xfb40('0x14f')]);if(_0x378455){logger[_0xfb40('0x98')](util[_0xfb40('0x25')](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x54fe8f['findBy']));this[_0xfb40('0xd')][_0xfb40('0xa1')](util['format'](_0xfb40('0x151'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x54fe8f[_0xfb40('0x14f')]));return{'code':0xc8,'result':_0xfb40('0x152')};}else{logger['info'](util['format'](_0xfb40('0x153'),this[_0xfb40('0xd')]['callerid'],_0x54fe8f[_0xfb40('0x14f')]));this[_0xfb40('0xd')][_0xfb40('0xa1')](util[_0xfb40('0x25')](_0xfb40('0x153'),this[_0xfb40('0xd')][_0xfb40('0x34')],_0x54fe8f['findBy']));return{'code':0xc8,'result':_0xfb40('0x154')};}};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1bf')]=function(_0x8a97cb){logger[_0xfb40('0x98')](util[_0xfb40('0x25')]('Enter\x20in\x20VOICEMAIL\x20(%s)\x20block',_0x8a97cb[_0xfb40('0x32')]));var _0x3389ed=this[_0xfb40('0xd')][_0xfb40('0x4f')](_0xfb40('0x1c0'),[_0x8a97cb[_0xfb40('0x1c1')],_0x8a97cb[_0xfb40('0xa0')]]);if(_0x3389ed[_0xfb40('0x97')]===-0x1){return _0x3389ed;}return this['channel'][_0xfb40('0xa1')](util[_0xfb40('0x25')]('Executed\x20command\x20%s\x20%s',_0xfb40('0x1c0'),_0x8a97cb[_0xfb40('0x1c1')]));};AGIVertices[_0xfb40('0x10')][_0xfb40('0x1c2')]=function(_0x22225d){logger[_0xfb40('0x98')](util['format'](_0xfb40('0x1c3'),_0x22225d[_0xfb40('0x32')]));if(!this[_0xfb40('0x78')](_0x22225d[_0xfb40('0xd0')])){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x22225d,_0xfb40('0x1a7'));}var _0x112ad6=this[_0xfb40('0x11')][_0xfb40('0x65')](this,_0x22225d[_0xfb40('0xd0')]);if(!_0x112ad6){return this[_0xfb40('0xd')][_0xfb40('0x2d')](_0x22225d,_0xfb40('0xd1'));}var _0x28e3bb=this['channel'][_0xfb40('0x11')](_0x112ad6);return{'code':0xc8,'result':_0x28e3bb[_0xfb40('0x9a')]?_0x28e3bb['extra']:'-'};};String[_0xfb40('0x10')][_0xfb40('0x95')]=function(_0x5c3740,_0x32d050){return this[_0xfb40('0x94')](_0x5c3740)[_0xfb40('0x1c4')](_0x32d050);};module[_0xfb40('0x1c5')]=AGIVertices; \ No newline at end of file +var _0x1672=['saveRestApiResult','isPlainObject','%s.%s','setVariable','split','replaceAll','getVariable','extra','result','isConfigured','maxRetry','sync','retry','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','no\x20text\x20configured','MRCPSynth','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','no\x20grammar\x20configured','grammar','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','getAndSetVariable','RECOG_INSTANCE()','MRCP_RECOG_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','delay','add','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Executed\x20command\x20%s\x20%s','application','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','Executed\x20command\x20MRCPSynth\x20%s','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','RECOG_CONFIDENCE()','LUMENVOX_ASR_INSTANCE','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','MRCPRecog','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20odbc\x20database\x20found','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','keys','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20found','SIP/%s','opts','DIAL','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','bot','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','speech','Dialogflow\x20is\x20unreachable','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','no\x20project_id\x20configured','no\x20anguage\x20configured','Trying\x20DialogflowV2:\x20%s','providerResponse','out','DialogflowV2\x20is\x20unreachable','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','no\x20password\x20configured','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','unlink','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','no\x20trunk\x20selected','trunk_id','getTrunk','no\x20trunk\x20found','trunk_name','SIP/%s/%s','finally','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','getData','response','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','goal','GOAL\x20%s','goalname','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','.wav','awslex','AWS_LEX_%s','amazonlex','Amazon\x20Lex\x20is\x20unreachable','googleasr','wav','recordFile','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','%s/recordings/%s','beep','NOBEEP','intKey','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','extension','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME\x20%s\x20%s','Enter\x20in\x20HANGUP\x20(%s)\x20block','hangup','ispeechasr','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','failure','Enter\x20in\x20LOGOUT\x20(%s)\x20block','AGENT\x20%s\x20NOT\x20FOUND\x20BY','Enter\x20in\x20MATH\x20(%s)\x20block','operation','no\x20operation\x20configured','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','%s_STATUS_MESSAGE','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','sendMail','account_id','no\x20mail\x20account\x20configured','email','Smtp','bcc','service','host','port','secure','auth','template_id','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','sendMailMessage','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','no\x20subproject\x20selected','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','shellCommand','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','apiKey','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','googleCloudTTS','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','streamFile','Google\x20Cloud\x20TTS\x20is\x20unreachable','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','voicemail','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','exports','path','util','lodash','shelljs','randomstring','moment','mustache','request-promise','../../config/logger','agi','../../config/environment','./scripts','/var/opt/motion2/server/files','rawHeaders','rawBody','menu','getdigits','getsecretdigits','channel','rpc','then','name','catch','prototype','getVoiceQueue','getVoiceQueueById','getSquareProject','getSquareOdbc','getSquareOdbcById','dsn','getUser','getUserById','getSound','getSoundPath','getMailAccount','getIntervals','interval','Intervals','format','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','label','arg_1','callerid','createSquareRecording','calleridname','context','priority','accountcode','file','createSquareMessage','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','list_id','callback','Callback\x20scheduled\x20at\x20','scheduledAt','toString','callback_priority','getPause','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','%s/%s@from-sip/n','exec','trim','replace','google_cloud_tts_text_type','text','languageCode','en-US','ssmlGender','MALE','audioEncoding','MP3','googleTTS','google_tts_language','restAPI','method','timeout','number','includes','POST','PUT','toUpperCase','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','uri','render','url','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','dialogflow_language','googleDialogflowV2','dialogflowV2_project_id','client_email','private_key','dialogflowV2_language','sestekNDA','ispeechTTS','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','Amy','aws_text_type','awsLex','aws_lex_region','aws_bot_name','googleASR','google_asr_language','tildeASR','appid','appsecret','clear','agicommand','clone','hasOwnProperty','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isArray','length','isString'];(function(_0x48faf4,_0x2df3c1){var _0x5d2ab0=function(_0x20aae2){while(--_0x20aae2){_0x48faf4['push'](_0x48faf4['shift']());}};_0x5d2ab0(++_0x2df3c1);}(_0x1672,0x126));var _0x2167=function(_0x485635,_0x42a428){_0x485635=_0x485635-0x0;var _0x577a4f=_0x1672[_0x485635];return _0x577a4f;};'use strict';var fs=require('fs');var path=require(_0x2167('0x0'));var util=require(_0x2167('0x1'));var _=require(_0x2167('0x2'));var sh=require(_0x2167('0x3'));var odbc=require('odbc')();var rs=require(_0x2167('0x4'));var moment=require(_0x2167('0x5'));var Mustache=require(_0x2167('0x6'));var rp=require(_0x2167('0x7'));var logger=require(_0x2167('0x8'))(_0x2167('0x9'));var config=require(_0x2167('0xa'));var scripts=require(_0x2167('0xb'));var FILES_PATH=_0x2167('0xc');var recursiveMapAttributes=[_0x2167('0xd'),_0x2167('0xe')];var verticesWithRetry=[_0x2167('0xf'),_0x2167('0x10'),_0x2167('0x11')];var AGIVertices=function(_0x46632b,_0x579557,_0x4b9be9){this[_0x2167('0x12')]=_0x46632b;this[_0x2167('0x13')]=_0x579557;this['mailRpc']=_0x4b9be9;};AGIVertices['prototype']['getVariable']=function(_0x5d383a,_0x2e95d3){this[_0x2167('0x13')]['getVariableById'](_0x5d383a)[_0x2167('0x14')](function(_0x53ca2e){_0x2e95d3(null,_0x53ca2e?_0x53ca2e[_0x2167('0x15')]:![]);})[_0x2167('0x16')](function(_0x19e2f1){_0x2e95d3(_0x19e2f1);});};AGIVertices[_0x2167('0x17')][_0x2167('0x18')]=function(_0x316763,_0x3c3af5){this[_0x2167('0x13')][_0x2167('0x19')](_0x316763)[_0x2167('0x14')](function(_0x506a51){_0x3c3af5(null,_0x506a51?_0x506a51[_0x2167('0x15')]:![]);})[_0x2167('0x16')](function(_0x253374){_0x3c3af5(_0x253374);});};AGIVertices[_0x2167('0x17')][_0x2167('0x1a')]=function(_0x29f12a,_0x3d3e78){this[_0x2167('0x13')]['getSquareProjectById'](_0x29f12a)[_0x2167('0x14')](function(_0x152e01){_0x3d3e78(null,_0x152e01?_0x152e01[_0x2167('0x15')]:![]);})[_0x2167('0x16')](function(_0x531dd7){_0x3d3e78(_0x531dd7);});};AGIVertices[_0x2167('0x17')][_0x2167('0x1b')]=function(_0x408543,_0x200493){this[_0x2167('0x13')][_0x2167('0x1c')](_0x408543)[_0x2167('0x14')](function(_0x4ddae5){_0x200493(null,_0x4ddae5?_0x4ddae5[_0x2167('0x1d')]:![]);})[_0x2167('0x16')](function(_0x4fbd13){_0x200493(_0x4fbd13);});};AGIVertices[_0x2167('0x17')][_0x2167('0x1e')]=function(_0x17e00c,_0x336d9d){this['rpc'][_0x2167('0x1f')](_0x17e00c)[_0x2167('0x14')](function(_0x2d5341){_0x336d9d(null,_0x2d5341?_0x2d5341[_0x2167('0x15')]:![]);})['catch'](function(_0x104d88){_0x336d9d(_0x104d88);});};AGIVertices[_0x2167('0x17')]['getTrunk']=function(_0x1501d0,_0x4b410c){this['rpc']['getTrunkById'](_0x1501d0)[_0x2167('0x14')](function(_0x1b8ec2){_0x4b410c(null,_0x1b8ec2?_0x1b8ec2['name']:![]);})[_0x2167('0x16')](function(_0x367e16){_0x4b410c(_0x367e16);});};AGIVertices[_0x2167('0x17')][_0x2167('0x20')]=function(_0x39b6e7,_0x560aaa){var _0x4cd81b=this;this[_0x2167('0x13')]['getSoundById'](_0x39b6e7)[_0x2167('0x14')](function(_0x1568cd){_0x560aaa(null,_0x1568cd?_0x4cd81b[_0x2167('0x21')](_0x1568cd['save_name']):![]);})[_0x2167('0x16')](function(_0x5a6a2c){_0x560aaa(_0x5a6a2c);});};AGIVertices[_0x2167('0x17')][_0x2167('0x22')]=function(_0x1a2b8c,_0x56011b){this[_0x2167('0x13')]['getMailAccountById'](_0x1a2b8c)['then'](function(_0xdc7045){_0x56011b(null,_0xdc7045?_0xdc7045:![]);})[_0x2167('0x16')](function(_0x3682cb){_0x56011b(_0x3682cb);});};AGIVertices['prototype']['sendMailMessage']=function(_0x130f4d,_0x5a1290,_0x3773bf){this['mailRpc']['sendMailMessage'](_0x130f4d,_0x5a1290)[_0x2167('0x14')](function(){_0x3773bf(null);})[_0x2167('0x16')](function(_0xab9ede){_0x3773bf(_0xab9ede);});};AGIVertices[_0x2167('0x17')][_0x2167('0x23')]=function(_0x4cc458,_0x5060db){this[_0x2167('0x13')]['getIntervalById'](_0x4cc458)[_0x2167('0x14')](function(_0x24feb9){if(_0x24feb9){if(_0x24feb9['IntervalId']){_0x5060db(null,[_0x24feb9[_0x2167('0x24')]]);}else{_0x5060db(null,_['map'](_0x24feb9[_0x2167('0x25')],_0x2167('0x24')));}}else{_0x5060db(null,![]);}})[_0x2167('0x16')](function(_0x41e7cb){_0x5060db(_0x41e7cb);});};AGIVertices[_0x2167('0x17')][_0x2167('0x21')]=function(_0x5cf437){return util[_0x2167('0x26')](_0x2167('0x27'),FILES_PATH,_0x5cf437);};AGIVertices[_0x2167('0x17')][_0x2167('0x28')]=function(_0x106d71,_0x332065,_0x5f2c24){odbc[_0x2167('0x29')](_0x106d71,function(_0x2b8127){if(_0x2b8127){logger[_0x2167('0x2a')](_0x2167('0x2b'),_0x2b8127);_0x5f2c24(_0x2b8127);}else{logger[_0x2167('0x2c')](_0x2167('0x2d'));odbc[_0x2167('0x2e')](_0x332065,function(_0x594778,_0xf55ccd){if(_0x594778){logger['info'](_0x2167('0x2f'),_0x332065);_0x5f2c24(_0x594778);}else{logger[_0x2167('0x2c')](_0x2167('0x30'),_0x332065);odbc[_0x2167('0x31')](function(_0x3f3f87){if(_0x3f3f87){logger['error'](_0x2167('0x32'),_0x3f3f87);}_0x5f2c24(null,_0xf55ccd);});}});}});};AGIVertices[_0x2167('0x17')][_0x2167('0x33')]=function(_0x3ee9a4,_0x7ff9b8){this[_0x2167('0x13')][_0x2167('0x34')](_0x3ee9a4)['then'](function(_0x44b4a4){_0x7ff9b8(null,_0x44b4a4?_0x44b4a4:![]);})[_0x2167('0x16')](function(_0x3c2f64){_0x7ff9b8(_0x3c2f64);});};AGIVertices[_0x2167('0x17')][_0x2167('0x35')]=function(_0x859b03,_0x13fbc0){this['rpc'][_0x2167('0x35')](_0x859b03)[_0x2167('0x14')](function(_0x492c7a){_0x13fbc0(null,_0x492c7a);})['catch'](function(_0x34623e){_0x13fbc0(_0x34623e);});};AGIVertices[_0x2167('0x17')][_0x2167('0x36')]=function(_0x20e7df,_0x2ccf7b,_0x3bf767){this['rpc'][_0x2167('0x36')]({'uniqueid':this[_0x2167('0x12')][_0x2167('0x37')],'node':_0x20e7df[_0x2167('0x38')],'application':_0x20e7df['agicommand'],'data':_0x2ccf7b||null,'project_name':this[_0x2167('0x12')][_0x2167('0x39')],'callerid':this[_0x2167('0x12')][_0x2167('0x3a')]})['then'](function(_0xc3dfa5){if(_0x3bf767){_0x3bf767(null,_0xc3dfa5);}})[_0x2167('0x16')](function(_0x31ee72){if(_0x3bf767){_0x3bf767(_0x31ee72);}});};AGIVertices[_0x2167('0x17')][_0x2167('0x3b')]=function(_0x2a0c73,_0x1e4c2e,_0x47a717,_0xe852c7){this[_0x2167('0x13')][_0x2167('0x3b')]({'uniqueid':this['channel'][_0x2167('0x37')],'callerid':this[_0x2167('0x12')][_0x2167('0x3a')],'calleridname':this[_0x2167('0x12')][_0x2167('0x3c')],'context':this['channel'][_0x2167('0x3d')],'extension':this[_0x2167('0x12')]['extension'],'priority':this[_0x2167('0x12')][_0x2167('0x3e')],'accountcode':this[_0x2167('0x12')][_0x2167('0x3f')],'dnid':this[_0x2167('0x12')]['dnid'],'projectName':this[_0x2167('0x12')]['arg_1'],'saveName':_0x1e4c2e,'filename':_0x2a0c73[_0x2167('0x40')]||_0x1e4c2e,'savePath':_0x47a717})['then'](function(_0x1757fa){_0xe852c7(null,_0x1757fa);})[_0x2167('0x16')](function(_0x1385ab){_0xe852c7(_0x1385ab);});};AGIVertices[_0x2167('0x17')][_0x2167('0x41')]=function(_0x2baa32,_0x5cb429,_0x315e72,_0x4cb63d,_0x93331a){this[_0x2167('0x13')][_0x2167('0x41')]({'uniqueid':this['channel'][_0x2167('0x37')],'body':_0x2baa32,'direction':_0x5cb429,'providerName':_0x315e72,'providerResponse':_0x4cb63d})[_0x2167('0x14')](function(_0x501eee){if(_0x93331a){_0x93331a(null,_0x501eee);}})[_0x2167('0x16')](function(_0x51676a){if(_0x93331a){_0x93331a(_0x51676a);}});};AGIVertices[_0x2167('0x17')]['createCmContact']=function(_0x222771,_0x59e38e){this[_0x2167('0x13')][_0x2167('0x42')]({'firstName':_[_0x2167('0x43')](_0x222771[_0x2167('0x15')])||_[_0x2167('0x44')](_0x222771['name'])?_0x2167('0x45')+Math[_0x2167('0x46')]():_0x222771[_0x2167('0x15')],'lastName':_[_0x2167('0x43')](_0x222771[_0x2167('0x47')])||_[_0x2167('0x44')](_0x222771[_0x2167('0x47')])?null:_0x222771[_0x2167('0x47')],'phone':_0x222771[_0x2167('0x48')],'ListId':_0x222771[_0x2167('0x49')],'scheduledat':_0x222771['scheduledAt'],'callbackUniqueid':this[_0x2167('0x12')][_0x2167('0x37')],'tags':_0x2167('0x4a'),'description':_0x2167('0x4b')+_0x222771[_0x2167('0x4c')][_0x2167('0x4d')](),'priority':_0x222771[_0x2167('0x4e')]})[_0x2167('0x14')](function(_0x5a6087){_0x59e38e(null,_0x5a6087);})['catch'](function(_0x57bd05){_0x59e38e(_0x57bd05);});};AGIVertices[_0x2167('0x17')][_0x2167('0x4f')]=function(_0x274804,_0x169a41){this['rpc'][_0x2167('0x50')](_0x274804)['then'](function(_0x5128e5){_0x169a41(null,_0x5128e5?_0x5128e5[_0x2167('0x15')]:![]);})[_0x2167('0x16')](function(_0x29e5fc){_0x169a41(_0x29e5fc);});};AGIVertices[_0x2167('0x17')][_0x2167('0x51')]=function(_0xe999e2,_0x2cf08f,_0x41cad1){var _0x219858={'role':_0x2167('0x52')};_0x219858[_0xe999e2]=this[_0x2167('0x12')]['callerid'];this[_0x2167('0x13')][_0x2167('0x51')](_0x219858,_0x2cf08f,this[_0x2167('0x12')]['uniqueid'])[_0x2167('0x14')](function(_0x190e51){_0x41cad1(null,_[_0x2167('0x44')](_0x190e51)?![]:!![]);})[_0x2167('0x16')](function(_0x50fa7e){logger[_0x2167('0x2a')](_0x50fa7e);_0x41cad1(null,![]);});};AGIVertices[_0x2167('0x17')][_0x2167('0x53')]=function(_0x412626,_0x88030){var _0x241849={'role':_0x2167('0x52')};_0x241849[_0x412626]=this[_0x2167('0x12')][_0x2167('0x3a')];this[_0x2167('0x13')][_0x2167('0x53')](_0x241849)[_0x2167('0x14')](function(_0x4bea53){_0x88030(null,_[_0x2167('0x44')](_0x4bea53)?![]:!![]);})[_0x2167('0x16')](function(_0x33fe53){logger[_0x2167('0x2a')](_0x33fe53);_0x88030(null,![]);});};AGIVertices[_0x2167('0x17')][_0x2167('0x54')]=function(_0x2fcf35,_0x5fb5d1){var _0x47cba2={'role':'agent'};_0x47cba2[_0x2fcf35]=this['channel'][_0x2167('0x3a')];this['rpc']['agentLogout'](_0x47cba2)['then'](function(_0x2b5436){_0x5fb5d1(null,_[_0x2167('0x44')](_0x2b5436)?![]:!![]);})[_0x2167('0x16')](function(_0x29133a){logger['error'](_0x29133a);_0x5fb5d1(null,![]);});};AGIVertices[_0x2167('0x17')][_0x2167('0x55')]=function(_0x350616,_0x502e12){var _0x363e47={'role':'agent'};_0x363e47[_0x350616]=this[_0x2167('0x12')]['callerid'];var _0x400b6b=_0x350616!='internal'?util['format'](_0x2167('0x56'),'LOCAL',this[_0x2167('0x12')][_0x2167('0x3a')]):undefined;this[_0x2167('0x13')][_0x2167('0x55')](_0x363e47,_0x400b6b)[_0x2167('0x14')](function(_0x3e6a7a){_0x502e12(null,_['isNil'](_0x3e6a7a)?![]:!![]);})['catch'](function(_0x50a81d){logger[_0x2167('0x2a')](_0x50a81d);_0x502e12(null,![]);});};AGIVertices[_0x2167('0x17')]['shellCommand']=function(_0x5aec73,_0x280a75){sh[_0x2167('0x57')](_[_0x2167('0x58')](_0x5aec73),function(_0x5c277c,_0x432d72){var _0x2388f7=_0x432d72[_0x2167('0x59')](/(\r\n|\n|\r)/gm,'');_0x280a75(null,_0x2388f7);});};AGIVertices[_0x2167('0x17')]['googleCloudTTS']=function(_0x1ab928,_0x2f4461){scripts['googleCloudTTS'](_0x1ab928['apiKey'],_0x1ab928[_0x2167('0x5a')]||_0x2167('0x5b'),_0x1ab928['text'],_0x1ab928[_0x2167('0x5c')]||_0x2167('0x5d'),_0x1ab928[_0x2167('0x5e')]||_0x2167('0x5f'),_0x1ab928[_0x2167('0x60')]||_0x2167('0x61'))[_0x2167('0x14')](function(_0x4fb5a5){_0x2f4461(null,_0x4fb5a5);})[_0x2167('0x16')](function(_0x2b930e){_0x2f4461(_0x2b930e);});};AGIVertices['prototype'][_0x2167('0x62')]=function(_0x36b893,_0x332d56){scripts[_0x2167('0x62')](_0x36b893[_0x2167('0x5b')],_0x36b893[_0x2167('0x63')]||'en',0x1)[_0x2167('0x14')](function(_0x317642){_0x332d56(null,_0x317642);})[_0x2167('0x16')](function(_0x2733c2){_0x332d56(_0x2733c2);});};AGIVertices['prototype'][_0x2167('0x64')]=function(_0x3b1bb4,_0x58017a){var _0x54b6b6={'uri':_0x3b1bb4['url'],'method':_0x3b1bb4[_0x2167('0x65')],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x3b1bb4[_0x2167('0x66')])===_0x2167('0x67')&&parseInt(_0x3b1bb4['timeout'])>=0x1?parseInt(_0x3b1bb4[_0x2167('0x66')])*0x3e8:0x5*0x3e8};if(_[_0x2167('0x68')]([_0x2167('0x69'),_0x2167('0x6a')],_0x54b6b6[_0x2167('0x65')][_0x2167('0x6b')]())){try{_0x54b6b6[_0x2167('0x6c')]=_0x3b1bb4[_0x2167('0xe')]?JSON[_0x2167('0x6d')](_0x3b1bb4[_0x2167('0xe')]):{};}catch(_0x17ac77){logger[_0x2167('0x2a')](_0x2167('0x6e'),_0x17ac77);}}try{_0x54b6b6[_0x2167('0x6f')]=_0x3b1bb4[_0x2167('0xd')]?JSON[_0x2167('0x6d')](_0x3b1bb4[_0x2167('0xd')]):{};}catch(_0x7f69b6){logger[_0x2167('0x2a')](_0x2167('0x70'),_0x7f69b6);}if(_0x3b1bb4['computedVariables']){try{var _0x5edc97=require(_0x3b1bb4[_0x2167('0x71')])['sync'](this,_0x54b6b6);_0x54b6b6[_0x2167('0x72')]=Mustache[_0x2167('0x73')](_0x3b1bb4[_0x2167('0x74')],_0x5edc97,{},['$$','$$']);if(_0x54b6b6['headers']){_0x54b6b6['headers']=JSON[_0x2167('0x6d')](Mustache[_0x2167('0x73')](JSON['stringify'](_0x54b6b6[_0x2167('0x6f')]),_0x5edc97,{},['$$','$$']));}if(_0x54b6b6['body']){_0x54b6b6['body']=JSON['parse'](Mustache[_0x2167('0x73')](JSON[_0x2167('0x75')](_0x54b6b6[_0x2167('0x6c')]),_0x5edc97,{},['$$','$$']));}}catch(_0x32cb5a){logger[_0x2167('0x2a')](_0x2167('0x76'),_0x32cb5a);}}rp(_0x54b6b6)['then'](function(_0x102c43){var _0x205c9e={'statusCode':_0x102c43[_0x2167('0x77')]||0xc8,'statusMessage':_0x102c43['statusMessage']||'OK','headers':_0x102c43[_0x2167('0x6f')]||{},'body':_0x102c43[_0x2167('0x6c')]||{}};_0x58017a(null,_0x205c9e);})[_0x2167('0x16')](function(_0x1ab8e8){var _0x58083b={'statusCode':_0x1ab8e8[_0x2167('0x77')]||0x1f4,'statusMessage':_0x1ab8e8[_0x2167('0x78')]||_0x2167('0x79'),'headers':_0x1ab8e8[_0x2167('0x7a')][_0x2167('0x6f')]||{},'body':_0x1ab8e8[_0x2167('0x7a')]['body']||{}};_0x58017a(null,_0x58083b);});};AGIVertices[_0x2167('0x17')][_0x2167('0x7b')]=function(_0x486f37,_0x1fa47b){scripts[_0x2167('0x7b')](this['channel'][_0x2167('0x37')],_0x486f37[_0x2167('0x7c')],_0x486f37[_0x2167('0x5b')],_0x486f37[_0x2167('0x7d')]||'en')[_0x2167('0x14')](function(_0x5b797f){_0x1fa47b(null,_0x5b797f);})[_0x2167('0x16')](function(_0x3aaa81){_0x1fa47b(_0x3aaa81);});};AGIVertices[_0x2167('0x17')][_0x2167('0x7e')]=function(_0x1f4400,_0x32df19){scripts[_0x2167('0x7e')](this[_0x2167('0x12')]['uniqueid'],_0x1f4400[_0x2167('0x7f')],_0x1f4400[_0x2167('0x80')],_0x1f4400[_0x2167('0x81')],_0x1f4400['text'],_0x1f4400[_0x2167('0x82')]||'en')[_0x2167('0x14')](function(_0x4bb81f){_0x32df19(null,_0x4bb81f);})[_0x2167('0x16')](function(_0x34d337){_0x32df19(_0x34d337);});};AGIVertices[_0x2167('0x17')][_0x2167('0x83')]=function(_0x36653d,_0x128e32){scripts[_0x2167('0x83')](this[_0x2167('0x12')],_0x36653d)[_0x2167('0x14')](function(_0x9b543c){_0x128e32(null,_0x9b543c);})[_0x2167('0x16')](function(_0x4a5001){_0x128e32(_0x4a5001);});};AGIVertices['prototype'][_0x2167('0x84')]=function(_0x45ea44,_0x3d3fda){scripts[_0x2167('0x84')](_0x45ea44['key'],_0x45ea44[_0x2167('0x5b')],_0x45ea44['ispeech_tts_language']||_0x2167('0x5d'),_0x45ea44['speed'])[_0x2167('0x14')](function(_0x12a989){_0x3d3fda(null,_0x12a989);})[_0x2167('0x16')](function(_0x448983){_0x3d3fda(_0x448983);});};AGIVertices[_0x2167('0x17')]['ispeechASR']=function(_0x293d2f,_0x20fd3f,_0x2e38c0){scripts['ispeechASR'](_0x20fd3f,_0x293d2f[_0x2167('0x7c')],_0x293d2f['ispeech_asr_language']||_0x2167('0x5d'),this['isConfigured'](_0x293d2f[_0x2167('0x85')])?_0x293d2f['model']:undefined)[_0x2167('0x14')](function(_0x1cb955){_0x2e38c0(null,_0x1cb955);})[_0x2167('0x16')](function(_0x4c67f7){_0x2e38c0(_0x4c67f7);});};AGIVertices['prototype'][_0x2167('0x86')]=function(_0x56b570,_0x31f937){scripts[_0x2167('0x86')](_0x56b570[_0x2167('0x87')],_0x56b570[_0x2167('0x88')],_0x56b570[_0x2167('0x89')],_0x56b570['aws_polly_voice']||_0x2167('0x8a'),_0x56b570['text'],_0x56b570[_0x2167('0x8b')]||_0x2167('0x5b'))[_0x2167('0x14')](function(_0x4cf13d){_0x31f937(null,_0x4cf13d);})[_0x2167('0x16')](function(_0x4c6b0d){_0x31f937(_0x4c6b0d);});};AGIVertices[_0x2167('0x17')][_0x2167('0x8c')]=function(_0x273e2a,_0xb834b9){scripts['awsLex'](this['channel']['uniqueid'],_0x273e2a[_0x2167('0x87')],_0x273e2a['aws_secret_access_key'],_0x273e2a[_0x2167('0x8d')],_0x273e2a['text'],_0x273e2a[_0x2167('0x8e')])[_0x2167('0x14')](function(_0x4e9209){_0xb834b9(null,_0x4e9209);})[_0x2167('0x16')](function(_0x21efca){_0xb834b9(_0x21efca);});};AGIVertices[_0x2167('0x17')]['googleASR']=function(_0xecee8c,_0x45b933,_0x5c067f){scripts[_0x2167('0x8f')](_0x45b933,_0xecee8c['key'],_0xecee8c[_0x2167('0x90')]||_0x2167('0x5d'))[_0x2167('0x14')](function(_0x8dbbb8){_0x5c067f(null,_0x8dbbb8);})[_0x2167('0x16')](function(_0x457da4){_0x5c067f(_0x457da4);});};AGIVertices[_0x2167('0x17')][_0x2167('0x91')]=function(_0x113fab,_0xcb95a4,_0x3e3bab){scripts['tildeASR'](_0xcb95a4,_0x113fab[_0x2167('0x92')],_0x113fab[_0x2167('0x93')],_0x113fab[_0x2167('0x72')])[_0x2167('0x14')](function(_0xf7a390){_0x3e3bab(null,_0xf7a390);})[_0x2167('0x16')](function(_0x320463){_0x3e3bab(_0x320463);});};AGIVertices[_0x2167('0x17')][_0x2167('0x94')]=function(_0x227d8d){var _0x2efed7=_[_0x2167('0x68')](verticesWithRetry,_0x227d8d[_0x2167('0x95')])?_0x227d8d:_[_0x2167('0x96')](_0x227d8d);for(var _0x38fdf3 in _0x2efed7){if(_0x2efed7[_0x2167('0x97')](_0x38fdf3)){if(_0x2efed7[_0x38fdf3]&&_['isString'](_0x2efed7[_0x38fdf3])){if(_[_0x2167('0x68')](recursiveMapAttributes,_0x38fdf3)){_0x2efed7[_0x38fdf3]=this[_0x2167('0x98')](_0x2efed7[_0x38fdf3]);}else{_0x2efed7[_0x38fdf3]=this[_0x2167('0x99')](_0x2efed7[_0x38fdf3]);}}}}return _0x2efed7;};AGIVertices[_0x2167('0x17')][_0x2167('0x9a')]=function(_0x2452c6){for(var _0x1acb6c in _0x2452c6){if(_0x2452c6[_0x2167('0x97')](_0x1acb6c)){if(_['isPlainObject'](_0x2452c6[_0x1acb6c])){this[_0x2167('0x9a')](_0x2452c6[_0x1acb6c]);}else if(_[_0x2167('0x9b')](_0x2452c6[_0x1acb6c])){for(var _0x14df06=0x0;_0x14df06<_0x2452c6[_0x1acb6c][_0x2167('0x9c')];_0x14df06++){this['recursiveNodeIndex'](_0x2452c6[_0x1acb6c][_0x14df06]);}}else if(_[_0x2167('0x9d')](_0x2452c6[_0x1acb6c])){_0x2452c6[_0x1acb6c]=this[_0x2167('0x99')](_0x2452c6[_0x1acb6c]);}}}};AGIVertices[_0x2167('0x17')][_0x2167('0x9e')]=function(_0x19870b,_0x4bf0e9){for(var _0xaa80ca in _0x19870b){if(_0x19870b[_0x2167('0x97')](_0xaa80ca)){if(_[_0x2167('0x9f')](_0x19870b[_0xaa80ca])){if(!_['isEmpty'](_0x19870b[_0xaa80ca])){this[_0x2167('0x9e')](_0x19870b[_0xaa80ca],util[_0x2167('0x26')]('%s.%s',_0x4bf0e9,_0xaa80ca));}}else if(_[_0x2167('0x9b')](_0x19870b[_0xaa80ca])){for(var _0x3a0b33=0x0;_0x3a0b33<_0x19870b[_0xaa80ca][_0x2167('0x9c')];_0x3a0b33++){this['saveRestApiResult'](_0x19870b[_0xaa80ca][_0x3a0b33],util[_0x2167('0x26')](_0x2167('0xa0'),_0x4bf0e9,_0xaa80ca+'['+_0x3a0b33+']'));}}else{if(!_['isNil'](_0x19870b[_0xaa80ca])){this['channel'][_0x2167('0xa1')](util[_0x2167('0x26')]('%s.%s',_0x4bf0e9,_0xaa80ca),_0x19870b[_0xaa80ca]);}}}}};AGIVertices['prototype'][_0x2167('0x98')]=function(_0x11c3cb){try{var _0x5b93f6=JSON[_0x2167('0x6d')](_0x11c3cb);this[_0x2167('0x9a')](_0x5b93f6);return JSON[_0x2167('0x75')](_0x5b93f6);}catch(_0x53a7cb){return this[_0x2167('0x99')](_0x11c3cb);}};AGIVertices[_0x2167('0x17')][_0x2167('0x99')]=function(_0x2a5211){var _0x4d7da5=_0x2a5211[_0x2167('0xa2')]('{');for(var _0x4474c4=0x1;_0x4474c4<_0x4d7da5[_0x2167('0x9c')];_0x4474c4+=0x1){var _0x5d1ea2=_0x4d7da5[_0x4474c4][_0x2167('0xa2')]('}');if(_0x5d1ea2[_0x2167('0x9c')]>0x1){_0x2a5211=_0x2a5211[_0x2167('0xa3')]('{'+_0x5d1ea2[0x0]+'}',this[_0x2167('0x12')][_0x2167('0xa4')](_0x5d1ea2[0x0])[_0x2167('0xa5')]||_0x5d1ea2[0x0]);}}if(_0x4d7da5['length']===0x1){return _0x2a5211['toString']();}return this[_0x2167('0x99')](_0x2a5211);};AGIVertices[_0x2167('0x17')]['getAndSetVariable']=function(_0x5ba0d3,_0x3d159e){var _0x3866a5=this[_0x2167('0x12')]['getVariable'](_0x5ba0d3);if(_0x3866a5[_0x2167('0xa6')]===-0x1){return _0x3866a5;}logger[_0x2167('0x2c')](util[_0x2167('0x26')]('The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s',_0x3d159e,_0x3866a5[_0x2167('0xa5')]));return this[_0x2167('0x12')]['setVariable'](_0x3d159e,_0x3866a5['extra']);};AGIVertices[_0x2167('0x17')][_0x2167('0xa7')]=function(_0xdbe124){return _0xdbe124&&_0xdbe124!=='0'&&_0xdbe124!=='-1'&&_0xdbe124!=='';};AGIVertices['prototype'][_0x2167('0xa8')]=function(_0x5c1d3c){this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x5c1d3c,'-');_0x5c1d3c[_0x2167('0xaa')]=_0x5c1d3c['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices['prototype']['mrcpsynth']=function(_0x47213b){logger['info'](util[_0x2167('0x26')](_0x2167('0xab'),_0x47213b[_0x2167('0x38')]));if(!this['isConfigured'](_0x47213b[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}var _0x357a28='\x22'+_0x47213b[_0x2167('0x5b')]+'\x22';if(this[_0x2167('0xa7')](_0x47213b['options'])){_0x357a28+=','+_0x47213b[_0x2167('0x7a')];}var _0x12bffb=this[_0x2167('0x12')][_0x2167('0x57')](_0x2167('0xae'),_0x357a28);if(_0x12bffb[_0x2167('0xa6')]===-0x1){return _0x12bffb;}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('Executed\x20command\x20MRCPSynth\x20%s',_0x357a28));};AGIVertices[_0x2167('0x17')]['mrcprecog']=function(_0x4b3210){logger['info'](util['format'](_0x2167('0xaf'),_0x4b3210['label']));if(!this[_0x2167('0xa7')](_0x4b3210['grammar'])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xb0'));}var _0x10f60d=_0x4b3210[_0x2167('0xb1')];if(this[_0x2167('0xa7')](_0x4b3210[_0x2167('0x7a')])){_0x10f60d+=','+_0x4b3210[_0x2167('0x7a')];}var _0x2e6eb1=this[_0x2167('0x12')][_0x2167('0x57')]('MRCPRecog',_0x10f60d);if(_0x2e6eb1[_0x2167('0xa6')]===-0x1){return _0x2e6eb1;}var _0x5d3d2d=this['getAndSetVariable']('RECOG_CONFIDENCE()',_0x2167('0xb2'));if(_0x5d3d2d[_0x2167('0xa6')]===-0x1){return _0x5d3d2d;}var _0x323cd0=this['getAndSetVariable'](_0x2167('0xb3'),_0x2167('0xb4'));if(_0x323cd0[_0x2167('0xa6')]===-0x1){return _0x323cd0;}var _0x2d4f61=this[_0x2167('0xb5')](_0x2167('0xb6'),_0x2167('0xb7'));if(_0x2d4f61[_0x2167('0xa6')]===-0x1){return _0x2d4f61;}return this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0xb8'),_0x10f60d));};AGIVertices[_0x2167('0x17')][_0x2167('0x9')]=function(_0x4be900){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20AGI\x20(%s)\x20block',_0x4be900[_0x2167('0x38')]));return this[_0x2167('0x12')][_0x2167('0x9')]([_0x4be900[_0x2167('0xb9')],_0x4be900[_0x2167('0xba')]]);};AGIVertices[_0x2167('0x17')][_0x2167('0xbb')]=function(_0x5548f4){logger['info'](util[_0x2167('0x26')](_0x2167('0xbc'),_0x5548f4[_0x2167('0x38')]));if(this[_0x2167('0xa7')](_0x5548f4[_0x2167('0x66')])){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0xbd'),_0x5548f4[_0x2167('0x66')]));var _0x3d2d39=this[_0x2167('0x12')]['wait'](_0x5548f4[_0x2167('0x66')]);if(_0x3d2d39[_0x2167('0xa6')]===-0x1){return _0x3d2d39;}}return this[_0x2167('0x12')][_0x2167('0xbb')]();};AGIVertices[_0x2167('0x17')]['callback']=function(_0x16d02c){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0xbe'),_0x16d02c['label']));if(!this['isConfigured'](_0x16d02c['list_id'])){return this['channel']['error'](_0x16d02c,_0x2167('0xbf'));}_0x16d02c[_0x2167('0x4c')]=moment();if(this[_0x2167('0xa7')](_0x16d02c[_0x2167('0xc0')])){_0x16d02c[_0x2167('0x4c')]=moment()[_0x2167('0xc1')](_0x16d02c[_0x2167('0xc0')],'minutes');}if(!this['isConfigured'](_0x16d02c[_0x2167('0x4e')])){_0x16d02c['callback_priority']=0x2;}this[_0x2167('0x42')]['sync'](this,_0x16d02c);return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xc2'),_0x16d02c['phone'],_0x16d02c[_0x2167('0x49')],_0x16d02c['scheduledAt']));};AGIVertices[_0x2167('0x17')][_0x2167('0xc3')]=function(_0x31bf25){logger['info'](util[_0x2167('0x26')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0x31bf25[_0x2167('0x38')]));var _0x436045=this[_0x2167('0x12')]['exec'](_0x31bf25['application'],_0x31bf25[_0x2167('0x7a')]);if(_0x436045[_0x2167('0xa6')]===-0x1){return _0x436045;}return this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0xc4'),_0x31bf25[_0x2167('0xc5')],_0x31bf25['options']));};AGIVertices['prototype'][_0x2167('0xc6')]=function(_0x291898){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0xc7'),_0x291898[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x291898['text'])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}var _0x20e758='\x22'+_0x291898[_0x2167('0x5b')]+'\x22';if(this[_0x2167('0xa7')](_0x291898['options'])){_0x20e758+=','+_0x291898[_0x2167('0x7a')];}var _0x2e602e=this[_0x2167('0x12')][_0x2167('0x57')](_0x2167('0xae'),_0x20e758);if(_0x2e602e[_0x2167('0xa6')]===-0x1){return _0x2e602e;}return this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0xc8'),_0x20e758));};AGIVertices[_0x2167('0x17')][_0x2167('0xc9')]=function(_0x5742e5){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0xca'),_0x5742e5[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x5742e5[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}var _0x2064b9='\x22'+_0x5742e5[_0x2167('0x5b')]+'\x22';if(this[_0x2167('0xa7')](_0x5742e5[_0x2167('0x7a')])){_0x2064b9+=','+_0x5742e5[_0x2167('0x7a')];}var _0x40b79e=this[_0x2167('0x12')]['exec'](_0x2167('0xae'),_0x2064b9);if(_0x40b79e['result']===-0x1){return _0x40b79e;}return this['channel'][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xc8'),_0x2064b9));};AGIVertices[_0x2167('0x17')]['lumenvoxasr']=function(_0x4b034c){logger['info'](util['format'](_0x2167('0xcb'),_0x4b034c[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x4b034c[_0x2167('0xb1')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xb0'));}var _0x49867d=_0x4b034c[_0x2167('0xb1')];if(this['isConfigured'](_0x4b034c[_0x2167('0x7a')])){_0x49867d+=','+_0x4b034c[_0x2167('0x7a')];}var _0x1f7a77=this[_0x2167('0x12')]['exec']('MRCPRecog',_0x49867d);if(_0x1f7a77[_0x2167('0xa6')]===-0x1){return _0x1f7a77;}var _0x4e9993=this['getAndSetVariable'](_0x2167('0xcc'),'LUMENVOX_ASR_CONFIDENCE');if(_0x4e9993['result']===-0x1){return _0x4e9993;}var _0x436aef=this[_0x2167('0xb5')](_0x2167('0xb3'),'LUMENVOX_ASR_TRANSCRIPT');if(_0x436aef[_0x2167('0xa6')]===-0x1){return _0x436aef;}var _0xbf7733=this['getAndSetVariable']('RECOG_INSTANCE()',_0x2167('0xcd'));if(_0xbf7733[_0x2167('0xa6')]===-0x1){return _0xbf7733;}return this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0xb8'),_0x49867d));};AGIVertices[_0x2167('0x17')]['sestekasr']=function(_0x43873c){logger['info'](util[_0x2167('0x26')](_0x2167('0xce'),_0x43873c['label']));if(!this[_0x2167('0xa7')](_0x43873c[_0x2167('0xb1')])){return this[_0x2167('0x12')]['noop'](_0x2167('0xb0'));}var _0x163ae8=_0x43873c[_0x2167('0xb1')];if(this[_0x2167('0xa7')](_0x43873c['options'])){_0x163ae8+=','+_0x43873c[_0x2167('0x7a')];}var _0x3a76cf=this[_0x2167('0x12')]['exec'](_0x2167('0xcf'),_0x163ae8);if(_0x3a76cf[_0x2167('0xa6')]===-0x1){return _0x3a76cf;}var _0x4136b1=this[_0x2167('0xb5')](_0x2167('0xcc'),_0x2167('0xd0'));if(_0x4136b1[_0x2167('0xa6')]===-0x1){return _0x4136b1;}var _0x267663=this[_0x2167('0xb5')](_0x2167('0xb3'),_0x2167('0xd1'));if(_0x267663[_0x2167('0xa6')]===-0x1){return _0x267663;}var _0x4c3810=this[_0x2167('0xb5')](_0x2167('0xb6'),_0x2167('0xd2'));if(_0x4c3810[_0x2167('0xa6')]===-0x1){return _0x4c3810;}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xb8'),_0x163ae8));};AGIVertices[_0x2167('0x17')][_0x2167('0xd3')]=function(_0x13127b){logger['info'](util['format'](_0x2167('0xd4'),_0x13127b[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x13127b[_0x2167('0xd5')])){return this[_0x2167('0x12')]['error'](_0x13127b,'no\x20database\x20selected');}var _0x18b595=this[_0x2167('0x1b')][_0x2167('0xa9')](this,_0x13127b[_0x2167('0xd5')]);if(!_0x18b595){return this['channel'][_0x2167('0x2a')](_0x13127b,_0x2167('0xd6'));}if(!this[_0x2167('0xa7')](_0x13127b[_0x2167('0x2e')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x13127b,_0x2167('0xd7'));}var _0x3893d8=_0x13127b[_0x2167('0x2e')][_0x2167('0x59')](/(\r\n|\n|\r)/gm,'\x20');this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0xd8'),_0x3893d8));var _0x26d782=this[_0x2167('0x28')][_0x2167('0xa9')](this,_0x18b595,_0x3893d8);this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x13127b,_0x3893d8);if(!this[_0x2167('0xa7')](_0x13127b[_0x2167('0xd9')])){return this[_0x2167('0x12')]['noop'](_0x2167('0xda'));}var _0xd8e1ac=this[_0x2167('0xa4')][_0x2167('0xa9')](this,_0x13127b[_0x2167('0xd9')]);if(!_0xd8e1ac){return this['channel'][_0x2167('0x2a')](_0x13127b,_0x2167('0xdb'));}var _0x4b49f7=this;_0x26d782[_0x2167('0xdc')](function(_0x3f55ff,_0x42cee0){Object[_0x2167('0xdd')](_0x3f55ff)[_0x2167('0xdc')](function(_0x411412){_0x4b49f7['channel']['setVariable'](util['format'](_0x2167('0xde'),_0xd8e1ac,_0x42cee0,_0x411412),_0x3f55ff[_0x411412]);});});this[_0x2167('0x12')][_0x2167('0xa1')](util['format'](_0x2167('0xdf'),_0xd8e1ac),_0x26d782[_0x2167('0x9c')]);return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xe0'),_0xd8e1ac));};AGIVertices[_0x2167('0x17')]['dial']=function(_0x297292){logger[_0x2167('0xe1')](util[_0x2167('0x26')](_0x2167('0xe2'),_0x297292[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x297292['sip_id'])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x297292,'no\x20user\x20selected');}var _0x3faff4=this[_0x2167('0x1e')][_0x2167('0xa9')](this,_0x297292[_0x2167('0xe3')]);if(!_0x3faff4){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x297292,_0x2167('0xe4'));}var _0x5ac132=this[_0x2167('0x12')][_0x2167('0x57')]('DIAL',[util[_0x2167('0x26')](_0x2167('0xe5'),_0x3faff4),_0x297292[_0x2167('0x66')],_0x297292[_0x2167('0xe6')],_0x297292[_0x2167('0x74')]]);if(_0x5ac132[_0x2167('0xa6')]===-0x1){return _0x5ac132;}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('Executed\x20command\x20%s',_0x2167('0xe7')));};AGIVertices['prototype'][_0x2167('0xe8')]=function(_0x3fd95d){logger[_0x2167('0x2c')](util['format'](_0x2167('0xe9'),_0x3fd95d['label']));if(!this[_0x2167('0xa7')](_0x3fd95d['key'])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xea'));}if(!this[_0x2167('0xa7')](_0x3fd95d[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}this[_0x2167('0x12')][_0x2167('0xeb')]=!![];this[_0x2167('0x36')](_0x3fd95d);this[_0x2167('0x41')](_0x3fd95d[_0x2167('0x5b')],'in','','');this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xec'),_0x3fd95d[_0x2167('0x5b')]));var _0x484e74=this[_0x2167('0x7b')][_0x2167('0xa9')](this,_0x3fd95d);if(_0x484e74){for(var _0x5a7679 in _0x484e74){if(_0x484e74[_0x2167('0x97')](_0x5a7679)){this[_0x2167('0x12')]['setVariable'](util[_0x2167('0x26')](_0x2167('0xed'),_0x5a7679[_0x2167('0x6b')]()),_0x484e74[_0x5a7679]);}}this[_0x2167('0x41')](_0x484e74[_0x2167('0xee')],'out',_0x2167('0xe8'),'');return this[_0x2167('0x12')][_0x2167('0xac')](util['format']('Dialogflow\x20Result\x20%s',_0x484e74['speech']));}return this['channel'][_0x2167('0x2a')](_0x3fd95d,_0x2167('0xef'));};AGIVertices[_0x2167('0x17')][_0x2167('0xf0')]=function(_0x4feacb){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0xf1'),_0x4feacb[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x4feacb[_0x2167('0x7f')])){return this['channel'][_0x2167('0xac')](_0x2167('0xf2'));}if(!this[_0x2167('0xa7')](_0x4feacb[_0x2167('0x80')])){return this[_0x2167('0x12')][_0x2167('0xac')]('no\x20client_email\x20configured');}if(!this[_0x2167('0xa7')](_0x4feacb['private_key'])){return this[_0x2167('0x12')][_0x2167('0xac')]('no\x20private_key\x20configured');}if(!this[_0x2167('0xa7')](_0x4feacb[_0x2167('0x82')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xf3'));}if(!this['isConfigured'](_0x4feacb[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}this['channel']['bot']=!![];this[_0x2167('0x36')](_0x4feacb);this[_0x2167('0x41')](_0x4feacb['text'],'in','','');this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0xf4'),_0x4feacb[_0x2167('0x5b')]));var _0x25b115=this[_0x2167('0x7e')][_0x2167('0xa9')](this,_0x4feacb);if(_0x25b115){for(var _0x110134 in _0x25b115){if(_0x25b115['hasOwnProperty'](_0x110134)){if(_0x110134!==_0x2167('0xf5')){this['channel']['setVariable'](util[_0x2167('0x26')](_0x2167('0xed'),_0x110134['toUpperCase']()),_0x25b115[_0x110134]);}}}this['createSquareMessage'](_0x25b115[_0x2167('0xee')],_0x2167('0xf6'),_0x2167('0xf0'),_0x25b115[_0x2167('0xf5')]);return this['channel'][_0x2167('0xac')](util[_0x2167('0x26')]('DialogflowV2\x20Result\x20%s',_0x25b115['speech']));}return this[_0x2167('0x12')][_0x2167('0x2a')](_0x4feacb,_0x2167('0xf7'));};AGIVertices[_0x2167('0x17')]['sesteknda']=function(_0xb4ff8e){logger[_0x2167('0x2c')](util['format']('Enter\x20in\x20SESTEKNDA\x20(%s)\x20block',_0xb4ff8e['label']));if(!this['isConfigured'](_0xb4ff8e['ndauth_url'])){return this['channel']['noop'](_0x2167('0xf8'));}if(!this['isConfigured'](_0xb4ff8e[_0x2167('0xf9')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xfa'));}if(!this[_0x2167('0xa7')](_0xb4ff8e['password'])){return this['channel'][_0x2167('0xac')](_0x2167('0xfb'));}if(!this['isConfigured'](_0xb4ff8e['ndassistant_url'])){return this[_0x2167('0x12')]['noop'](_0x2167('0xad'));}this[_0x2167('0x12')][_0x2167('0xeb')]=!![];this[_0x2167('0x36')](_0xb4ff8e);this[_0x2167('0x41')](_0xb4ff8e['text'],'in','','');this['channel'][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xfc'),_0xb4ff8e[_0x2167('0x5b')]));var _0xda1fdd=this[_0x2167('0x83')][_0x2167('0xa9')](this,_0xb4ff8e);if(_0xda1fdd){for(var _0x347ce1 in _0xda1fdd){if(_0xda1fdd[_0x2167('0x97')](_0x347ce1)){this[_0x2167('0x12')][_0x2167('0xa1')](util[_0x2167('0x26')](_0x2167('0xfd'),_0x347ce1['toUpperCase']()),_0xda1fdd[_0x347ce1]);}}this[_0x2167('0x41')](_0xda1fdd['speech'],_0x2167('0xf6'),'sesteknda','');if(_0xda1fdd[_0x2167('0xfe')]){this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0xff'),_0xda1fdd[_0x2167('0xfe')]));var _0x5658c4=this[_0x2167('0x12')]['streamFile'](_0xda1fdd[_0x2167('0xfe')]);try{fs[_0x2167('0x100')](_0xda1fdd['audiofile']+'.wav');}catch(_0x4ee6ba){logger['error'](_0x4ee6ba);}return _0x5658c4;}else{return this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0x101'),_0xda1fdd['speech']));}}return this[_0x2167('0x12')]['error'](_0xb4ff8e,_0x2167('0x102'));};AGIVertices['prototype'][_0x2167('0x103')]=function(_0x1d56ee){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20END\x20(%s)\x20block',_0x1d56ee[_0x2167('0x38')]));return this['channel'][_0x2167('0xac')](_0x2167('0x103'));};AGIVertices['prototype'][_0x2167('0x104')]=function(_0xfc66a8){logger['info'](util[_0x2167('0x26')](_0x2167('0x105'),_0xfc66a8[_0x2167('0x38')]));var _0x27113f='';if(_0xfc66a8['trunk_id']){if(!this['isConfigured'](_0xfc66a8['trunk_id'])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0xfc66a8,_0x2167('0x106'));}else{var _0x52f9a4=parseInt(_0xfc66a8[_0x2167('0x107')],0xa);if(isNaN(_0x52f9a4)){_0x27113f=_0xfc66a8[_0x2167('0x107')];}else{_0x27113f=this[_0x2167('0x108')][_0x2167('0xa9')](this,_0xfc66a8[_0x2167('0x107')]);if(!_0x27113f){return this[_0x2167('0x12')][_0x2167('0x2a')](_0xfc66a8,_0x2167('0x109'));}}}}else if(_0xfc66a8[_0x2167('0x10a')]){_0x27113f=_0xfc66a8['trunk_name'];}else{return this[_0x2167('0x12')][_0x2167('0x2a')](_0xfc66a8,_0x2167('0x106'));}var _0x389a57=this['channel']['exec'](_0x2167('0xe7'),[util[_0x2167('0x26')](_0x2167('0x10b'),_0x27113f,_0xfc66a8[_0x2167('0x48')]),_0xfc66a8[_0x2167('0x66')],_0xfc66a8[_0x2167('0xe6')],_0xfc66a8[_0x2167('0x74')]]);if(_0x389a57['result']===-0x1){return _0x389a57;}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('Executed\x20command\x20%s',_0x2167('0xe7')));};AGIVertices['prototype'][_0x2167('0x10c')]=function(_0x3e9d7c){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20FINALLY\x20(%s)\x20block',_0x3e9d7c['label']));return this[_0x2167('0x12')]['noop']('finally');};AGIVertices[_0x2167('0x17')][_0x2167('0x10')]=function(_0x3b55bf){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0x3b55bf[_0x2167('0x38')]));if(_0x3b55bf['retry']===0x0){return this['maxRetry'](_0x3b55bf);}_0x3b55bf[_0x2167('0xaa')]-=0x1;if(!this[_0x2167('0xa7')](_0x3b55bf[_0x2167('0x10d')])){return this[_0x2167('0x12')]['error'](_0x3b55bf,_0x2167('0x10e'));}var _0x289dd4=this[_0x2167('0x20')][_0x2167('0xa9')](this,_0x3b55bf['file_id']);if(!_0x289dd4){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x3b55bf,_0x2167('0x10f'));}if(!this[_0x2167('0xa7')](_0x3b55bf['variable_id'])){return this[_0x2167('0x12')][_0x2167('0x2a')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x3ce317=this[_0x2167('0x12')][_0x2167('0x110')](_0x289dd4,_0x3b55bf[_0x2167('0x111')],_0x3b55bf[_0x2167('0x112')]);var _0x27c7e2=_0x3ce317[_0x2167('0xa6')]?_0x3ce317[_0x2167('0xa6')][_0x2167('0x4d')]():'';logger[_0x2167('0x2c')](_0x2167('0x113'),JSON[_0x2167('0x75')](_0x3ce317));if(_0x3ce317['result']===-0x1){this['createSquareDetailsReport'][_0x2167('0xa9')](this,_0x3b55bf,_0x27c7e2);return _0x3ce317;}else if(_0x3ce317[_0x2167('0xa5')]==='timeout'){_0x3ce317[_0x2167('0xa6')]=_0x27c7e2[_0x2167('0x9c')]>=parseInt(_0x3b55bf['mindigit'])?'x':'i';}else{_0x3ce317[_0x2167('0xa6')]=_0x27c7e2['length']>=parseInt(_0x3b55bf[_0x2167('0x114')])&&_0x27c7e2['length']<=parseInt(_0x3b55bf[_0x2167('0x112')])?'x':'i';}var _0x1e436a=this[_0x2167('0xa4')]['sync'](this,_0x3b55bf[_0x2167('0xd9')]);if(!_0x1e436a){return this[_0x2167('0x12')]['error'](_0x3b55bf,_0x2167('0xdb'));}this[_0x2167('0x12')]['setVariable'](_0x1e436a,_0x27c7e2);if(this[_0x2167('0xa7')](_0x3b55bf[_0x2167('0x115')])){var _0x211086=parseInt(_0x3b55bf[_0x2167('0x115')],0xa);var _0x1a9a7d=rs[_0x2167('0x116')]({'charset':'*','length':_0x211086});var _0x2ade3f=_0x27c7e2['length'];if(_0x2ade3f>0x0){if(_0x2ade3f>_0x211086){this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x3b55bf,_0x3b55bf[_0x2167('0x117')]===_0x2167('0x118')?_0x1a9a7d+_0x27c7e2['substr'](_0x211086):_0x27c7e2[_0x2167('0x119')](0x0,_0x2ade3f-_0x211086)+_0x1a9a7d);}else{this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x3b55bf,rs['generate']({'charset':'*','length':_0x2ade3f}));}}else{this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x3b55bf,'');}}else{this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x3b55bf,_0x27c7e2);}return _0x3ce317;};AGIVertices[_0x2167('0x17')][_0x2167('0x11')]=function(_0x2b7fe5){logger[_0x2167('0x2c')](util['format']('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x2b7fe5[_0x2167('0x38')]));return this[_0x2167('0x10')](_0x2b7fe5);};AGIVertices[_0x2167('0x17')][_0x2167('0x11a')]=function(_0x2ba077){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20GOAL\x20(%s)\x20block',_0x2ba077[_0x2167('0x38')]));this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x2ba077,_0x2ba077['goalname']);return this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0x11b'),_0x2ba077[_0x2167('0x11c')]));};AGIVertices[_0x2167('0x17')][_0x2167('0x11d')]=function(_0x42df13){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x11e'),_0x42df13[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x42df13[_0x2167('0x87')])||!this['isConfigured'](_0x42df13[_0x2167('0x88')])){return this['channel']['noop'](_0x2167('0x11f'));}if(!this[_0x2167('0xa7')](_0x42df13[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x120'),_0x42df13[_0x2167('0x5b')]));var _0x3675c2=this[_0x2167('0x86')][_0x2167('0xa9')](this,_0x42df13);if(_0x3675c2){this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x121'),_0x3675c2));var _0x17decb=this[_0x2167('0x12')]['streamFile'](_0x3675c2);try{fs[_0x2167('0x100')](_0x3675c2+_0x2167('0x122'));}catch(_0x3578ee){logger[_0x2167('0x2a')](_0x3578ee);}return _0x17decb;}return this['channel']['error'](_0x42df13,'aws\x20Polly\x20is\x20unreachable');};AGIVertices[_0x2167('0x17')][_0x2167('0x123')]=function(_0x2f2d04){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block',_0x2f2d04[_0x2167('0x38')]));if(!this['isConfigured'](_0x2f2d04[_0x2167('0x87')])||!this[_0x2167('0xa7')](_0x2f2d04[_0x2167('0x88')])){return this[_0x2167('0x12')][_0x2167('0xac')]('no\x20valid\x20credentials\x20configured');}if(!this['isConfigured'](_0x2f2d04[_0x2167('0x8e')])){return this['channel']['noop']('no\x20bot\x20name\x20configured');}if(!this['isConfigured'](_0x2f2d04[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}this[_0x2167('0x12')][_0x2167('0xeb')]=!![];this['createSquareDetailsReport'](_0x2f2d04);this['createSquareMessage'](_0x2f2d04[_0x2167('0x5b')],'in','','');this[_0x2167('0x12')]['noop'](util['format']('Trying\x20Amazon\x20Lex:\x20%s',_0x2f2d04[_0x2167('0x5b')]));var _0x38ddd6=this[_0x2167('0x8c')]['sync'](this,_0x2f2d04);if(_0x38ddd6){for(var _0x2dc443 in _0x38ddd6){if(_0x38ddd6['hasOwnProperty'](_0x2dc443)&&_[_0x2167('0x9d')](_0x38ddd6[_0x2dc443])){this[_0x2167('0x12')]['setVariable'](util[_0x2167('0x26')](_0x2167('0x124'),_0x2dc443[_0x2167('0x6b')]()),_0x38ddd6[_0x2dc443]);}}if(_[_0x2167('0x44')](_0x38ddd6[_0x2167('0x78')])){return this[_0x2167('0x12')][_0x2167('0xac')]('Amazon\x20Lex\x20ready\x20for\x20fulfillment');}else{this[_0x2167('0x41')](_0x38ddd6[_0x2167('0x78')],'out',_0x2167('0x125'),'');return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('Amazon\x20Lex\x20Result\x20%s',_0x38ddd6[_0x2167('0x78')]));}}return this[_0x2167('0x12')][_0x2167('0x2a')](_0x2f2d04,_0x2167('0x126'));};AGIVertices[_0x2167('0x17')][_0x2167('0x127')]=function(_0x28ef9e){logger['info'](util[_0x2167('0x26')]('Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s',_0x28ef9e[_0x2167('0x38')],_0x28ef9e[_0x2167('0x66')]));if(!this[_0x2167('0xa7')](_0x28ef9e[_0x2167('0x7c')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xea'));}var _0x1e4156=_0x2167('0x128');var _0x4ba42d=util['format']('%s/recordings/%s',FILES_PATH,rs[_0x2167('0x116')](0x4));var _0x11be63=util[_0x2167('0x26')](_0x2167('0xa0'),_0x4ba42d,_0x1e4156);var _0x393a77=!![];if(_0x28ef9e['beep']==='NOBEEP'){_0x393a77=![];}var _0x5c8daa=this['channel'][_0x2167('0x129')](_0x4ba42d,_0x1e4156,_0x28ef9e['intKey'],_0x28ef9e['timeout'],undefined,_0x393a77);if(_0x5c8daa[_0x2167('0xa6')]!==-0x1){this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0x12a'),_0x11be63));var _0x5d350c=this[_0x2167('0x8f')][_0x2167('0xa9')](this,_0x28ef9e,_0x11be63);if(_0x5d350c){for(var _0x9e3ae9 in _0x5d350c){if(_0x5d350c[_0x2167('0x97')](_0x9e3ae9)){this[_0x2167('0x12')]['setVariable'](util[_0x2167('0x26')](_0x2167('0x12b'),_0x9e3ae9['toUpperCase']()),_0x5d350c[_0x9e3ae9]);}}return this['channel'][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x12c'),JSON['stringify'](_0x5d350c)));}}return _0x5c8daa;};AGIVertices[_0x2167('0x17')][_0x2167('0x12d')]=function(_0x347d83){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x12e'),_0x347d83[_0x2167('0x38')]));if(!this['isConfigured'](_0x347d83[_0x2167('0x92')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0x12f'));}if(!this[_0x2167('0xa7')](_0x347d83['appsecret'])){return this[_0x2167('0x12')][_0x2167('0xac')]('no\x20appsecret\x20configured');}var _0x1a7dbc=_0x2167('0x128');var _0x24a50b=util['format'](_0x2167('0x130'),FILES_PATH,rs[_0x2167('0x116')](0x4));var _0x56126e=util['format']('%s.%s',_0x24a50b,_0x1a7dbc);var _0x4c1f20=!![];if(_0x347d83[_0x2167('0x131')]===_0x2167('0x132')){_0x4c1f20=![];}var _0x54c4e2=this[_0x2167('0x12')][_0x2167('0x129')](_0x24a50b,_0x1a7dbc,_0x347d83[_0x2167('0x133')],_0x347d83['timeout'],undefined,_0x4c1f20);if(_0x54c4e2[_0x2167('0xa6')]!==-0x1){this[_0x2167('0x12')]['noop'](util['format'](_0x2167('0x134'),_0x56126e));var _0x5afbda=this[_0x2167('0x91')][_0x2167('0xa9')](this,_0x347d83,_0x56126e);if(_0x5afbda){for(var _0x33f58f in _0x5afbda){if(_0x5afbda[_0x2167('0x97')](_0x33f58f)){this[_0x2167('0x12')][_0x2167('0xa1')](util[_0x2167('0x26')](_0x2167('0x135'),_0x33f58f[_0x2167('0x6b')]()),_0x5afbda[_0x33f58f]);}}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('TildeASR\x20Result\x20%s',JSON[_0x2167('0x75')](_0x5afbda)));}}return _0x54c4e2;};AGIVertices[_0x2167('0x17')]['gotoc']=function(_0x2c6222){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x136'),_0x2c6222[_0x2167('0x38')]));return this[_0x2167('0x12')][_0x2167('0x137')](_0x2c6222['context'],_0x2c6222[_0x2167('0x138')],_0x2c6222[_0x2167('0x3e')]);};AGIVertices[_0x2167('0x17')][_0x2167('0x139')]=function(_0x377834){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x13a'),_0x377834[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x377834[_0x2167('0x13b')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x377834,_0x2167('0x13c'));}try{var _0xe60b04=eval(_0x377834[_0x2167('0x13b')])?_0x2167('0x13d'):_0x2167('0x13e');this['channel'][_0x2167('0xac')](util['format'](_0x2167('0x13f'),_0x377834[_0x2167('0x13b')],_0xe60b04));return{'code':0xc8,'result':_0xe60b04};}catch(_0x2b25fb){return{'code':0xc8,'result':_0x2167('0x13e')};}};AGIVertices[_0x2167('0x17')][_0x2167('0x140')]=function(_0x5d4b7d){logger[_0x2167('0x2c')](util['format'](_0x2167('0x141'),_0x5d4b7d[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x5d4b7d[_0x2167('0x142')])){return this['channel'][_0x2167('0x2a')](_0x5d4b7d,_0x2167('0x143'));}var _0x3f2d77=this[_0x2167('0x23')][_0x2167('0xa9')](this,_0x5d4b7d[_0x2167('0x142')]);if(!_0x3f2d77){return this[_0x2167('0x12')]['error'](_0x5d4b7d,_0x2167('0x144'));}for(var _0x5bd1f8=0x0;_0x5bd1f8<_0x3f2d77[_0x2167('0x9c')];_0x5bd1f8+=0x1){var _0x5bffef=this[_0x2167('0x12')][_0x2167('0xa4')](util['format']('IFTIME(%s?true:false)',_0x3f2d77[_0x5bd1f8]));if(_0x5bffef[_0x2167('0xa6')]===-0x1){return _0x5bffef;}logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x145'),_0x3f2d77[_0x5bd1f8],_0x5bffef[_0x2167('0xa5')]));if(_0x5bffef[_0x2167('0xa5')]===_0x2167('0x13d')){logger[_0x2167('0x2c')](util['format']('IFTIME\x20%s\x20%s',_0x3f2d77[_0x5bd1f8],_0x2167('0x13d')));this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0x145'),_0x3f2d77[_0x5bd1f8],_0x2167('0x13d')));return{'code':0xc8,'result':_0x2167('0x13d')};}else{logger['info'](util[_0x2167('0x26')]('IFTIME\x20%s\x20%s',_0x3f2d77[_0x5bd1f8],'false'));this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0x145'),_0x3f2d77[_0x5bd1f8],_0x2167('0x13e')));}}return{'code':0xc8,'result':'false'};};AGIVertices[_0x2167('0x17')]['hangup']=function(_0x2f4d5e){logger[_0x2167('0x2c')](util['format'](_0x2167('0x146'),_0x2f4d5e[_0x2167('0x38')]));return this['channel'][_0x2167('0x147')]();};AGIVertices['prototype'][_0x2167('0x148')]=function(_0x3408b9){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x3408b9[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x3408b9[_0x2167('0x7c')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xea'));}var _0x763365=_0x2167('0x128');var _0x576b15=util['format']('%s/recordings/%s',FILES_PATH,rs[_0x2167('0x116')](0x4));var _0x525a68=util[_0x2167('0x26')]('%s.%s',_0x576b15,_0x763365);var _0x2829c2=!![];if(_0x3408b9[_0x2167('0x131')]===_0x2167('0x132')){_0x2829c2=![];}var _0xfd4a58=this[_0x2167('0x12')][_0x2167('0x129')](_0x576b15,_0x763365,_0x3408b9[_0x2167('0x133')],_0x3408b9['timeout'],undefined,_0x2829c2);if(_0xfd4a58[_0x2167('0xa6')]!==-0x1){this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x149'),_0x525a68));var _0x21b5a8=this['ispeechASR']['sync'](this,_0x3408b9,_0x525a68);if(_0x21b5a8){for(var _0x1c625a in _0x21b5a8){if(_0x21b5a8[_0x2167('0x97')](_0x1c625a)){this['channel'][_0x2167('0xa1')](util['format'](_0x2167('0x14a'),_0x1c625a[_0x2167('0x6b')]()),_0x21b5a8[_0x1c625a]);}}return this[_0x2167('0x12')]['noop'](util['format'](_0x2167('0x14b'),JSON['stringify'](_0x21b5a8)));}}return _0xfd4a58;};AGIVertices[_0x2167('0x17')][_0x2167('0x14c')]=function(_0x1210da){logger[_0x2167('0x2c')](util['format'](_0x2167('0x14d'),_0x1210da['label']));if(!this['isConfigured'](_0x1210da[_0x2167('0x7c')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xea'));}if(!this[_0x2167('0xa7')](_0x1210da[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xad'));}this['channel'][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x14e'),_0x1210da[_0x2167('0x5b')]));var _0x2fe64b=this['ispeechTTS'][_0x2167('0xa9')](this,_0x1210da);if(_0x2fe64b){this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x149'),_0x2fe64b));var _0xbb2db3=this[_0x2167('0x12')]['streamFile'](_0x2fe64b,_0x1210da[_0x2167('0x133')]);try{fs[_0x2167('0x100')](_0x2fe64b+'.wav');}catch(_0x4a3c71){logger['error'](_0x4a3c71);}return _0xbb2db3;}return this[_0x2167('0x12')]['error'](_0x1210da,_0x2167('0x14f'));};AGIVertices[_0x2167('0x17')]['login']=function(_0x3662ff){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x150'),_0x3662ff[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x3662ff[_0x2167('0x151')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x3662ff,_0x2167('0x152'));}logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x153'),this[_0x2167('0x12')][_0x2167('0x3a')],_0x3662ff[_0x2167('0x151')]));var _0x3a54d6=this[_0x2167('0x55')]['sync'](this,_0x3662ff[_0x2167('0x151')]);if(_0x3a54d6){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x154'),this['channel']['callerid'],_0x3662ff[_0x2167('0x151')]));this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0x154'),this[_0x2167('0x12')][_0x2167('0x3a')],_0x3662ff[_0x2167('0x151')]));return{'code':0xc8,'result':_0x2167('0x155')};}else{logger[_0x2167('0x2c')](util[_0x2167('0x26')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x2167('0x3a')],_0x3662ff[_0x2167('0x151')]));this[_0x2167('0x12')][_0x2167('0xac')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x2167('0x12')]['callerid'],_0x3662ff['findBy']));return{'code':0xc8,'result':_0x2167('0x156')};}};AGIVertices[_0x2167('0x17')]['logout']=function(_0x2cc07a){logger[_0x2167('0x2c')](util['format'](_0x2167('0x157'),_0x2cc07a[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x2cc07a[_0x2167('0x151')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x2cc07a,'no\x20find\x20by\x20configured');}logger['info'](util[_0x2167('0x26')](_0x2167('0x153'),this[_0x2167('0x12')][_0x2167('0x3a')],_0x2cc07a[_0x2167('0x151')]));var _0x4dac9b=this[_0x2167('0x54')][_0x2167('0xa9')](this,_0x2cc07a[_0x2167('0x151')]);if(_0x4dac9b){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x154'),this[_0x2167('0x12')]['callerid'],_0x2cc07a[_0x2167('0x151')]));this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x2167('0x12')][_0x2167('0x3a')],_0x2cc07a['findBy']));return{'code':0xc8,'result':_0x2167('0x155')};}else{logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x158'),this['channel'][_0x2167('0x3a')],_0x2cc07a[_0x2167('0x151')]));this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x2167('0x12')][_0x2167('0x3a')],_0x2cc07a[_0x2167('0x151')]));return{'code':0xc8,'result':_0x2167('0x156')};}};AGIVertices[_0x2167('0x17')]['math']=function(_0x4ce2){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x159'),_0x4ce2[_0x2167('0x38')]));if(!this['isConfigured'](_0x4ce2[_0x2167('0x15a')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x4ce2,_0x2167('0x15b'));}this['channel'][_0x2167('0xac')](util[_0x2167('0x26')]('math\x20%s',_0x4ce2[_0x2167('0x15a')]));var _0x5def45=eval(_0x4ce2['operation']);if(!this[_0x2167('0xa7')](_0x4ce2['variable_id'])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xda'));}var _0x481d22=this[_0x2167('0xa4')]['sync'](this,_0x4ce2[_0x2167('0xd9')]);if(!_0x481d22){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x4ce2,'no\x20variable\x20found');}if(_[_0x2167('0x9b')](_0x5def45)){var _0x3864f7=this;_0x5def45['forEach'](function(_0xc8f72b,_0x36e767){_0x3864f7[_0x2167('0x12')][_0x2167('0xa1')](util[_0x2167('0x26')]('%s[%s]',_0x481d22,_0x36e767),_0xc8f72b);});return this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0x15c'),_0x481d22));}else{return this[_0x2167('0x12')][_0x2167('0xa1')](_0x481d22,_0x5def45);}};AGIVertices['prototype']['menu']=function(_0x9e2352){logger['info'](util['format'](_0x2167('0x15d'),_0x9e2352[_0x2167('0x38')]));if(_0x9e2352[_0x2167('0xaa')]===0x0){return this[_0x2167('0xa8')](_0x9e2352);}_0x9e2352[_0x2167('0xaa')]-=0x1;if(!this[_0x2167('0xa7')](_0x9e2352[_0x2167('0x10d')])){return this[_0x2167('0x12')]['error'](_0x9e2352,_0x2167('0x10e'));}var _0x4374df=this[_0x2167('0x20')][_0x2167('0xa9')](this,_0x9e2352[_0x2167('0x10d')]);if(!_0x4374df){return this[_0x2167('0x12')]['error'](_0x9e2352,'no\x20file\x20audio\x20found');}var _0x5bbaf8=this[_0x2167('0x12')]['getData'](_0x4374df,_0x9e2352['response'],_0x9e2352[_0x2167('0x15e')]);var _0x22feb4=_0x5bbaf8[_0x2167('0xa6')];if(_0x5bbaf8[_0x2167('0xa6')]===-0x1){this['createSquareDetailsReport'][_0x2167('0xa9')](this,_0x9e2352,'-1');return _0x5bbaf8;}else if(_0x5bbaf8[_0x2167('0xa5')]==='timeout'){_0x5bbaf8['result']=_0x5bbaf8[_0x2167('0xa6')][_0x2167('0x9c')]>0x0?_0x5bbaf8['result']:'t';}else if(_[_0x2167('0x43')](_0x5bbaf8[_0x2167('0xa6')])){_0x5bbaf8['result']='#';_0x22feb4='#';}if(!this[_0x2167('0xa7')](_0x9e2352[_0x2167('0xd9')])){this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0xda'));}else{var _0x4ec5aa=this['getVariable']['sync'](this,_0x9e2352['variable_id']);if(!_0x4ec5aa){return this['channel'][_0x2167('0x2a')](_0x9e2352,_0x2167('0xdb'));}this[_0x2167('0x12')][_0x2167('0xa1')](_0x4ec5aa,_0x22feb4);}this['createSquareDetailsReport'][_0x2167('0xa9')](this,_0x9e2352,_0x22feb4);return _0x5bbaf8;};AGIVertices[_0x2167('0x17')]['noop']=function(_0x1846c6){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x15f'),_0x1846c6[_0x2167('0x38')]));return this[_0x2167('0x12')]['noop'](_0x1846c6['output']||_0x1846c6[_0x2167('0x38')]);};AGIVertices[_0x2167('0x17')][_0x2167('0x160')]=function(_0x5801a8){logger['info'](util[_0x2167('0x26')](_0x2167('0x161'),_0x5801a8['label']));if(!this[_0x2167('0xa7')](_0x5801a8[_0x2167('0x151')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x5801a8,_0x2167('0x152'));}logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x153'),this['channel'][_0x2167('0x3a')],_0x5801a8['findBy']));var _0xecaaaf=this[_0x2167('0x4f')][_0x2167('0xa9')](this,_0x5801a8[_0x2167('0x162')]);var _0x57fe32=this[_0x2167('0x51')][_0x2167('0xa9')](this,_0x5801a8[_0x2167('0x151')],_0xecaaaf);if(_0x57fe32){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x154'),this[_0x2167('0x12')][_0x2167('0x3a')],_0x5801a8[_0x2167('0x151')]));this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0x154'),this['channel'][_0x2167('0x3a')],_0x5801a8['findBy']));return{'code':0xc8,'result':_0x2167('0x155')};}else{logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x158'),this[_0x2167('0x12')][_0x2167('0x3a')],_0x5801a8['findBy']));this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x2167('0x12')]['callerid'],_0x5801a8['findBy']));return{'code':0xc8,'result':_0x2167('0x156')};}};AGIVertices[_0x2167('0x17')]['playback']=function(_0x3bf9cb){logger['info'](util[_0x2167('0x26')]('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0x3bf9cb[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x3bf9cb[_0x2167('0x10d')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x3bf9cb,_0x2167('0x10e'));}var _0x50e82b=this['getSound'][_0x2167('0xa9')](this,_0x3bf9cb['file_id']);if(!_0x50e82b){return this['channel']['error'](_0x3bf9cb,'no\x20file\x20audio\x20found');}var _0x3f42fe=this[_0x2167('0x12')]['exec'](_0x2167('0x163'),[_0x50e82b,_0x3bf9cb[_0x2167('0xe6')]]);if(_0x3f42fe[_0x2167('0xa6')]===-0x1){return _0x3f42fe;}return this['channel'][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xc4'),'PLAYBACK',_0x50e82b));};AGIVertices[_0x2167('0x17')][_0x2167('0x164')]=function(_0x3af0ba){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x165'),_0x3af0ba[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x3af0ba[_0x2167('0x166')])){return this[_0x2167('0x12')]['error'](_0x3af0ba,_0x2167('0x167'));}var _0x10d071='';var _0x566fe6=parseInt(_0x3af0ba[_0x2167('0x166')],0xa);if(isNaN(_0x566fe6)){_0x10d071=_0x3af0ba[_0x2167('0x166')];}else{_0x10d071=this['getVoiceQueue'][_0x2167('0xa9')](this,_0x3af0ba[_0x2167('0x166')]);if(!_0x10d071){return this[_0x2167('0x12')]['error'](_0x3af0ba,_0x2167('0x168'));}}var _0x43cfce='';if(this['isConfigured'](_0x3af0ba['file_id'])){var _0x544db1=this['getSound'][_0x2167('0xa9')](this,_0x3af0ba[_0x2167('0x10d')]);if(_0x544db1){_0x43cfce=_0x544db1;}}this[_0x2167('0x36')]['sync'](this,_0x3af0ba,_0x10d071);if(_0x3af0ba[_0x2167('0xe6')]['indexOf']('x')<0x0){_0x3af0ba['opts']+='x';}if(_0x3af0ba[_0x2167('0xe6')][_0x2167('0x169')]('X')<0x0){_0x3af0ba[_0x2167('0xe6')]+='X';}this[_0x2167('0x12')][_0x2167('0xa1')](_0x2167('0x16a'),_0x10d071?_0x10d071[_0x2167('0x16b')]():'');var _0x10ede3=this[_0x2167('0x12')][_0x2167('0x57')](_0x2167('0x16c'),[_0x10d071,_0x3af0ba['opts'],_0x3af0ba[_0x2167('0x74')],_0x43cfce,_0x3af0ba['timeout'],_0x3af0ba[_0x2167('0x9')],_0x3af0ba[_0x2167('0x16d')],_0x3af0ba[_0x2167('0x16e')],'',_0x3af0ba[_0x2167('0x16f')]]);if(_0x10ede3[_0x2167('0xa6')]===-0x1){return _0x10ede3;}return this['channel'][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xc4'),'QUEUE',_0x10d071));};AGIVertices[_0x2167('0x17')][_0x2167('0x170')]=function(_0x7be2e9){logger['info'](util['format'](_0x2167('0x171'),_0x7be2e9[_0x2167('0x38')]));var _0xf704e9=_0x7be2e9[_0x2167('0x172')]||_0x2167('0x128');var _0x46aa9c=util[_0x2167('0x26')]('%s_%s',this[_0x2167('0x12')][_0x2167('0x37')],rs[_0x2167('0x116')](0x5));var _0x2e629e=util[_0x2167('0x26')]('%s/recordings/%s.%s',FILES_PATH,_0x46aa9c,_0xf704e9);var _0x123578=util[_0x2167('0x26')]('%s/recordings/%s',FILES_PATH,_0x46aa9c);this[_0x2167('0x3b')][_0x2167('0xa9')](this,_0x7be2e9,_0x46aa9c,_0x2e629e);this['channel']['setVariable'](_0x2167('0x173'),_0x46aa9c);logger[_0x2167('0x2c')](_0x2167('0x174'),_0x123578,_0xf704e9,_0x7be2e9[_0x2167('0x175')],_0x7be2e9[_0x2167('0x66')]);return this[_0x2167('0x12')][_0x2167('0x129')](_0x123578,_0xf704e9,_0x7be2e9['escape_digits'],_0x7be2e9[_0x2167('0x66')],undefined,!![]);};AGIVertices['prototype'][_0x2167('0x176')]=function(_0x549ef7){logger[_0x2167('0x2c')](util['format'](_0x2167('0x177'),_0x549ef7[_0x2167('0x38')]));if(!this['isConfigured'](_0x549ef7[_0x2167('0x74')])){return this[_0x2167('0x12')]['noop'](_0x2167('0x178'));}var _0x1bd198=this[_0x2167('0x64')][_0x2167('0xa9')](this,_0x549ef7);logger[_0x2167('0x2c')](util['format']('Response:',util[_0x2167('0x179')](_0x1bd198,{'showHidden':![],'depth':null})));if(!this[_0x2167('0xa7')](_0x549ef7[_0x2167('0xd9')])){return this['channel'][_0x2167('0xac')](_0x2167('0x17a'));}var _0xd2ad4e=this[_0x2167('0xa4')][_0x2167('0xa9')](this,_0x549ef7[_0x2167('0xd9')]);if(!_0xd2ad4e){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x549ef7,_0x2167('0xdb'));}this[_0x2167('0x12')]['setVariable'](util['format'](_0x2167('0x17b'),_0xd2ad4e),_0x1bd198[_0x2167('0x77')]?_0x1bd198[_0x2167('0x77')]:'200');this[_0x2167('0x12')]['setVariable'](util[_0x2167('0x26')](_0x2167('0x17c'),_0xd2ad4e),_0x1bd198['statusMessage']?_0x1bd198['statusMessage']:'OK');if(_0x1bd198[_0x2167('0x6c')]){try{this[_0x2167('0x9e')](_0x1bd198[_0x2167('0x6c')],_0xd2ad4e);}catch(_0x210f04){logger[_0x2167('0x2a')](util[_0x2167('0x26')](_0x2167('0x17d'),_0xd2ad4e));}}return this['channel']['noop'](util[_0x2167('0x26')](_0x2167('0xe0'),_0xd2ad4e));};AGIVertices[_0x2167('0x17')]['saydigits']=function(_0x2d513e){logger['info'](util['format'](_0x2167('0x17e'),_0x2d513e[_0x2167('0x38')]));return this[_0x2167('0x12')][_0x2167('0x17f')](_0x2d513e[_0x2167('0x180')]['replace'](/\s+/g,''),_0x2d513e[_0x2167('0x175')]);};AGIVertices[_0x2167('0x17')][_0x2167('0x181')]=function(_0x400cd5){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x182'),_0x400cd5[_0x2167('0x38')]));return this[_0x2167('0x12')][_0x2167('0x183')](_0x400cd5[_0x2167('0x67')][_0x2167('0x59')](/\s+/g,''),_0x400cd5['escape_digits']);};AGIVertices[_0x2167('0x17')][_0x2167('0x184')]=function(_0x22defb){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x22defb[_0x2167('0x38')]));return this[_0x2167('0x12')]['sayPhonetic'](_0x22defb[_0x2167('0x5b')],_0x22defb['escape_digits']);};AGIVertices[_0x2167('0x17')][_0x2167('0x185')]=function(_0x235f02){logger['info'](util[_0x2167('0x26')]('Enter\x20in\x20SENDMAIL\x20(%s)\x20block',_0x235f02[_0x2167('0x38')]));if(!this['isConfigured'](_0x235f02[_0x2167('0x186')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0x187'));}var _0x541c93=this['getMailAccount'][_0x2167('0xa9')](this,_0x235f02[_0x2167('0x186')]);if(!_0x541c93||!_0x541c93['Smtp']){return this['channel']['error'](_0x235f02,'no\x20mail\x20account\x20found');}var _0x3b8171={'from':util['format']('\x22%s\x22\x20<%s>',_0x541c93['name'],_0x541c93[_0x2167('0x188')]||_0x541c93[_0x2167('0x189')]['user']),'to':_0x235f02['to']||'','cc':_0x235f02['cc']||'','bcc':_0x235f02[_0x2167('0x18a')]||'','subject':_0x235f02['subject'],'html':_0x235f02[_0x2167('0x5b')],'text':_0x235f02[_0x2167('0x5b')]};var _0x4e8ed4={'tls':{'rejectUnauthorized':![]}};if(_0x541c93[_0x2167('0x189')][_0x2167('0x18b')]){_0x4e8ed4[_0x2167('0x18b')]=_0x541c93[_0x2167('0x189')][_0x2167('0x18b')];}else{_0x4e8ed4[_0x2167('0x18c')]=_0x541c93[_0x2167('0x189')]['host'];_0x4e8ed4['port']=_0x541c93[_0x2167('0x189')][_0x2167('0x18d')];_0x4e8ed4[_0x2167('0x18e')]=_0x541c93[_0x2167('0x189')][_0x2167('0x18e')];}if(_0x541c93[_0x2167('0x189')]['authentication']){_0x4e8ed4[_0x2167('0x18f')]={'user':_0x541c93[_0x2167('0x189')]['user'],'pass':_0x541c93['Smtp']['pass']};}if(this[_0x2167('0xa7')](_0x235f02[_0x2167('0x190')])){}logger[_0x2167('0xe1')](_0x2167('0x191'),JSON[_0x2167('0x75')](_0x3b8171));this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x235f02,_0x235f02[_0x2167('0x186')]);this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x192'),_0x541c93[_0x2167('0x15')]));this[_0x2167('0x193')][_0x2167('0xa9')](this,_0x4e8ed4,_0x3b8171);return this['channel'][_0x2167('0xac')]('Mail\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices[_0x2167('0x17')][_0x2167('0x194')]=function(_0x4254eb){logger[_0x2167('0x2c')](util['format'](_0x2167('0x195'),_0x4254eb['label']));return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0x196'));};AGIVertices[_0x2167('0x17')][_0x2167('0x197')]=function(_0x6585c){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x198'),_0x6585c[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x6585c[_0x2167('0x199')])){return this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0x19a'));}var _0x244334=this[_0x2167('0x33')]['sync'](this,_0x6585c[_0x2167('0x199')]);if(!_0x244334){return this[_0x2167('0x12')]['error'](_0x6585c,_0x2167('0x19b'));}var _0x2726df={'body':_0x6585c[_0x2167('0x19c')],'phone':_0x6585c['to']||'','SmsAccountId':_0x244334['id']};logger[_0x2167('0xe1')](_0x2167('0x19d'),JSON[_0x2167('0x75')](_0x2726df));this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x6585c,_0x6585c['sms_account_id']);this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')]('Trying\x20SendSMS\x20with\x20account\x20%s',_0x244334['name']));this[_0x2167('0x35')]['sync'](this,_0x2726df);return this['channel'][_0x2167('0xac')](_0x2167('0x19e'));};AGIVertices[_0x2167('0x17')][_0x2167('0x19f')]=function(_0x265fea){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x1a0'),_0x265fea['label']));if(!this[_0x2167('0xa7')](_0x265fea[_0x2167('0xd9')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x265fea,_0x2167('0x1a1'));}var _0x485c6f=this['getVariable'][_0x2167('0xa9')](this,_0x265fea[_0x2167('0xd9')]);if(!_0x485c6f){return this['channel']['error'](_0x265fea,_0x2167('0xdb'));}return this['channel'][_0x2167('0xa1')](_0x485c6f,_0x265fea['variable_value']);};AGIVertices[_0x2167('0x17')][_0x2167('0x1a2')]=function(_0x3f82a8){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x1a3'),_0x3f82a8[_0x2167('0x38')]));this[_0x2167('0x12')][_0x2167('0xac')](_0x2167('0x1a4'));if(_0x3f82a8[_0x2167('0xbb')]===_0x2167('0x1a5')){this[_0x2167('0x12')][_0x2167('0xac')]('Answer');return this[_0x2167('0x12')][_0x2167('0xbb')]();}return this[_0x2167('0x12')]['noop'](_0x2167('0x1a6'));};AGIVertices[_0x2167('0x17')][_0x2167('0x1a7')]=function(_0xc33bd6){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x1a8'),_0xc33bd6['label']));if(!this['isConfigured'](_0xc33bd6['project_id'])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0xc33bd6,_0x2167('0x1a9'));}var _0x2eae3f=this['getSquareProject'][_0x2167('0xa9')](this,_0xc33bd6[_0x2167('0x1aa')]);if(!this[_0x2167('0xa7')](_0x2eae3f)){return this[_0x2167('0x12')]['error'](_0xc33bd6,util['format'](_0x2167('0x1ab'),_0xc33bd6[_0x2167('0x1aa')]));}if(_0x2eae3f===this[_0x2167('0x12')][_0x2167('0x39')]){return this['channel'][_0x2167('0x2a')](_0xc33bd6,_0x2167('0x1ac'));}this['createSquareDetailsReport'][_0x2167('0xa9')](this,_0xc33bd6,_0x2eae3f);var _0x2526cc=this[_0x2167('0x12')][_0x2167('0x57')](_0x2167('0x1ad'),util['format']('agi://%s/square,\x22%s\x22,\x22%s\x22',config[_0x2167('0x9')]['host']||_0x2167('0x1ae'),_0x2eae3f,this[_0x2167('0x12')][_0x2167('0x39')]));if(_0x2526cc[_0x2167('0xa6')]===-0x1){return _0x2526cc;}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xc4'),_0x2167('0x1ad'),_0x2eae3f));};AGIVertices['prototype'][_0x2167('0x1af')]=function(_0x30fd01){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x1b0'),_0x30fd01[_0x2167('0x38')]));var _0x16065b=this[_0x2167('0x1b1')][_0x2167('0xa9')](this,_0x30fd01[_0x2167('0xb9')]);this[_0x2167('0x36')][_0x2167('0xa9')](this,_0x30fd01,_0x30fd01[_0x2167('0xb9')]);if(this[_0x2167('0xa7')](_0x30fd01[_0x2167('0xd9')])){var _0x2d40c7=this['getVariable'][_0x2167('0xa9')](this,_0x30fd01['variable_id']);if(_0x2d40c7){this[_0x2167('0x12')][_0x2167('0xa1')](_0x2d40c7,_0x16065b);return this['channel']['noop'](util['format'](_0x2167('0x1b2'),_0x30fd01[_0x2167('0xb9')],_0x2d40c7));}}return this[_0x2167('0x12')]['noop'](util[_0x2167('0x26')](_0x2167('0x1b3'),_0x30fd01[_0x2167('0xb9')]));};AGIVertices[_0x2167('0x17')]['google_cloud_tts']=function(_0x5104b9){logger['info'](util[_0x2167('0x26')]('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x5104b9[_0x2167('0x38')]));_0x5104b9[_0x2167('0x5b')]=_0x5104b9['text'][_0x2167('0x59')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x5104b9[_0x2167('0x1b4')])){return this[_0x2167('0x12')]['noop'](_0x2167('0x1b5'));}if(!this['isConfigured'](_0x5104b9[_0x2167('0x5b')])){return this[_0x2167('0x12')][_0x2167('0xac')]('no\x20text\x20configured');}this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x1b6'),_0x5104b9[_0x2167('0x5b')]));var _0x1c9668=this[_0x2167('0x1b7')][_0x2167('0xa9')](this,_0x5104b9);if(_0x1c9668){this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0x1b8'),_0x1c9668));var _0x1b2055=this[_0x2167('0x12')][_0x2167('0x1b9')](_0x1c9668);try{fs[_0x2167('0x100')](_0x1c9668+_0x2167('0x122'));}catch(_0x3f83b9){logger[_0x2167('0x2a')](_0x3f83b9);}return _0x1b2055;}return this['channel'][_0x2167('0x2a')](_0x5104b9,_0x2167('0x1ba'));};AGIVertices['prototype']['tts']=function(_0x40d5bd){logger['info'](util[_0x2167('0x26')]('Enter\x20in\x20GOOGLETTS\x20(%s)\x20block',_0x40d5bd[_0x2167('0x38')]));_0x40d5bd[_0x2167('0x5b')]=_0x40d5bd[_0x2167('0x5b')][_0x2167('0x59')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x2167('0xa7')](_0x40d5bd[_0x2167('0x5b')])){return this[_0x2167('0x12')]['noop'](_0x2167('0xad'));}this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0x1bb'),_0x40d5bd[_0x2167('0x5b')]));var _0x3c8a58=this[_0x2167('0x62')]['sync'](this,_0x40d5bd);if(_0x3c8a58){this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0x1bc'),_0x3c8a58));var _0x257688=this[_0x2167('0x12')][_0x2167('0x1b9')](_0x3c8a58);try{fs[_0x2167('0x100')](_0x3c8a58+'.wav');}catch(_0x5935fb){logger[_0x2167('0x2a')](_0x5935fb);}return _0x257688;}return this[_0x2167('0x12')]['error'](_0x40d5bd,_0x2167('0x1bd'));};AGIVertices['prototype']['unpause']=function(_0x28b04c){logger[_0x2167('0x2c')](util[_0x2167('0x26')]('Enter\x20in\x20UNPAUSE\x20(%s)\x20block',_0x28b04c[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x28b04c[_0x2167('0x151')])){return this[_0x2167('0x12')]['error'](_0x28b04c,_0x2167('0x152'));}logger[_0x2167('0x2c')](util[_0x2167('0x26')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x2167('0x12')][_0x2167('0x3a')],_0x28b04c[_0x2167('0x151')]));var _0x4fb2de=this['agentUnpause'][_0x2167('0xa9')](this,_0x28b04c['findBy']);if(_0x4fb2de){logger[_0x2167('0x2c')](util[_0x2167('0x26')](_0x2167('0x154'),this[_0x2167('0x12')][_0x2167('0x3a')],_0x28b04c[_0x2167('0x151')]));this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0x154'),this[_0x2167('0x12')]['callerid'],_0x28b04c[_0x2167('0x151')]));return{'code':0xc8,'result':_0x2167('0x155')};}else{logger[_0x2167('0x2c')](util[_0x2167('0x26')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel']['callerid'],_0x28b04c[_0x2167('0x151')]));this[_0x2167('0x12')][_0x2167('0xac')](util['format'](_0x2167('0x158'),this['channel'][_0x2167('0x3a')],_0x28b04c['findBy']));return{'code':0xc8,'result':_0x2167('0x156')};}};AGIVertices['prototype'][_0x2167('0x1be')]=function(_0x444c32){logger[_0x2167('0x2c')](util['format']('Enter\x20in\x20VOICEMAIL\x20(%s)\x20block',_0x444c32[_0x2167('0x38')]));var _0x4a168a=this['channel'][_0x2167('0x57')](_0x2167('0x1bf'),[_0x444c32[_0x2167('0x1c0')],_0x444c32[_0x2167('0x7a')]]);if(_0x4a168a['result']===-0x1){return _0x4a168a;}return this[_0x2167('0x12')][_0x2167('0xac')](util[_0x2167('0x26')](_0x2167('0xc4'),_0x2167('0x1bf'),_0x444c32['mailbox']));};AGIVertices[_0x2167('0x17')][_0x2167('0x1c1')]=function(_0x1eac4c){logger['info'](util[_0x2167('0x26')](_0x2167('0x1c2'),_0x1eac4c[_0x2167('0x38')]));if(!this[_0x2167('0xa7')](_0x1eac4c[_0x2167('0xd9')])){return this[_0x2167('0x12')][_0x2167('0x2a')](_0x1eac4c,'no\x20variable\x20selected');}var _0x4bf52a=this[_0x2167('0xa4')][_0x2167('0xa9')](this,_0x1eac4c['variable_id']);if(!_0x4bf52a){return this['channel']['error'](_0x1eac4c,_0x2167('0xdb'));}var _0x1abcd4=this[_0x2167('0x12')][_0x2167('0xa4')](_0x4bf52a);return{'code':0xc8,'result':_0x1abcd4[_0x2167('0xa5')]?_0x1abcd4[_0x2167('0xa5')]:'-'};};String[_0x2167('0x17')][_0x2167('0xa3')]=function(_0x3c6ff3,_0x93e87a){return this[_0x2167('0xa2')](_0x3c6ff3)['join'](_0x93e87a);};module[_0x2167('0x1c3')]=AGIVertices; \ No newline at end of file diff --git a/server/services/ami/acw/index.js b/server/services/ami/acw/index.js index 8c561b0..c9a71b9 100644 --- a/server/services/ami/acw/index.js +++ b/server/services/ami/acw/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55ca=['error','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','finally','stopAcw','[TIMER][STOP][AGENT:%s]','[%s][UPDATE][ERRORS:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','stringify','[ACW][STOP]\x20%s','message','destlinkedid','[ACW][syncAgentConnect]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','attended','[%s][HANGUP:UNIQUEID]','startAcw','linkedid','isUndefined','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','[%s][BLINDTRANSFER:LINKEDID]','transfererlinkedid','[ACW][syncBlindTransfer]\x20%s','autopause','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','util','lodash','acw','../rpc/user','voiceQueues','agents','timers','agentconnect','syncAgentConnect','hanguprequest','syncHangupRequest','syncHangup','bind','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','syncAgentConnectPreview','milliseconds','diff','seconds','prototype','channels','interface','queue','ACW','mandatoryDisposition','mandatoryDispositionPause','name','Action','QueuePause','then','getAgent','voicePause','info','[%s][START][AGENT:%s][QUEUE:%s]','savePause','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','timer','format','YYYY-MM-DD\x20HH:mm:ss','uniqueid','updateAcw','lastPauseAt','update','[%s][UPDATE][ACWTIME:%s]','catch'];(function(_0x359c5e,_0x2e7689){var _0xf0e435=function(_0xd0cd88){while(--_0xd0cd88){_0x359c5e['push'](_0x359c5e['shift']());}};_0xf0e435(++_0x2e7689);}(_0x55ca,0x126));var _0xa55c=function(_0x39e4a1,_0x4edcc5){_0x39e4a1=_0x39e4a1-0x0;var _0x55b30e=_0x55ca[_0x39e4a1];return _0x55b30e;};'use strict';var util=require(_0xa55c('0x0'));var _=require(_0xa55c('0x1'));var moment=require('moment');var ami=require('../ami');var logger=require('../../../config/logger')(_0xa55c('0x2'));var RpcUser=require(_0xa55c('0x3'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');function Acw(_0x3b478a){this[_0xa55c('0x4')]=_0x3b478a[_0xa55c('0x4')];this[_0xa55c('0x5')]=_0x3b478a[_0xa55c('0x5')];this[_0xa55c('0x6')]=_0x3b478a[_0xa55c('0x6')];this['channels']={};ami['on'](_0xa55c('0x7'),this[_0xa55c('0x8')]['bind'](this));ami['on'](_0xa55c('0x9'),this[_0xa55c('0xa')]['bind'](this));ami['on']('hangup',this[_0xa55c('0xb')][_0xa55c('0xc')](this));ami['on'](_0xa55c('0xd'),this[_0xa55c('0xe')][_0xa55c('0xc')](this));ami['on'](_0xa55c('0xf'),this[_0xa55c('0x10')][_0xa55c('0xc')](this));ami['on'](_0xa55c('0x11'),this[_0xa55c('0x12')]['bind'](this));ami['on']('custom:agentConnectPreview',this[_0xa55c('0x13')]['bind'](this));}function getDiff(_0x5a3672){var _0x59ea8d=moment()[_0xa55c('0x14')](0x0);var _0x3930e4=moment(_0x5a3672)[_0xa55c('0x14')](0x0);return _0x59ea8d[_0xa55c('0x15')](_0x3930e4,_0xa55c('0x16'));}Acw[_0xa55c('0x17')]['startAcw']=function(_0x3ccf65){try{var _0x3dcf4f=this;var _0x25934f=this[_0xa55c('0x18')][_0x3ccf65][_0xa55c('0x19')];var _0x3ae86b=this[_0xa55c('0x18')][_0x3ccf65][_0xa55c('0x1a')];var _0x24783b=this['voiceQueues'][_0x3ae86b];var _0x3d4c9e=![];var _0x104a99=_0xa55c('0x1b');if(_0x24783b[_0xa55c('0x1c')]){if(_0x24783b[_0xa55c('0x1d')][_0xa55c('0x1e')]){_0x3d4c9e=!![];_0x104a99=_0x24783b['mandatoryDispositionPause']['name'];}}ami[_0xa55c('0x1f')]({'action':_0xa55c('0x20'),'interface':_0x25934f,'paused':!![],'reason':_0x104a99})[_0xa55c('0x21')](function(_0x4cfe10){if(_0x3dcf4f[_0xa55c('0x5')][_0x25934f]){return RpcUser[_0xa55c('0x22')](_0x3dcf4f['agents'][_0x25934f]['id'])[_0xa55c('0x21')](function(_0x133096){if(_0x133096&&!_0x133096[_0xa55c('0x23')]){logger[_0xa55c('0x24')](_0xa55c('0x25'),_0x3ccf65,_0x25934f,_0x3ae86b);var _0x49ed04=_0x3dcf4f[_0xa55c('0x18')][_0x3ccf65]['attended']&&_0x3dcf4f['channels'][_0x3ccf65]['destlinkedid']?_0x3dcf4f[_0xa55c('0x18')][_0x3ccf65]['destlinkedid']:_0x3ccf65;return RpcUser[_0xa55c('0x26')](_0x3dcf4f[_0xa55c('0x5')][_0x25934f],_0x104a99,_0x49ed04)[_0xa55c('0x21')](function(_0xf0e574){if(!_0x3d4c9e){_0x3dcf4f[_0xa55c('0x6')][_0x25934f]={};logger[_0xa55c('0x24')](_0xa55c('0x27'),_0x3ccf65,_0x3dcf4f[_0xa55c('0x4')][_0x3ae86b][_0xa55c('0x28')],_0x25934f,_0x3ae86b);_0x3dcf4f[_0xa55c('0x6')][_0x25934f][_0xa55c('0x29')]=setTimeout(_0x3dcf4f['stopAcw'][_0xa55c('0xc')](_0x3dcf4f,_0x25934f),_0x3dcf4f[_0xa55c('0x4')][_0x3ae86b][_0xa55c('0x28')]*0x3e8);_0x3dcf4f[_0xa55c('0x6')][_0x25934f]['lastPauseAt']=moment()[_0xa55c('0x2a')](_0xa55c('0x2b'));_0x3dcf4f[_0xa55c('0x6')][_0x25934f][_0xa55c('0x2c')]=_0x3ccf65;_0x3dcf4f[_0xa55c('0x6')][_0x25934f][_0xa55c('0x1a')]=_0x3ae86b;_0x3dcf4f['timers'][_0x25934f][_0xa55c('0x2d')]=function(){var _0x490b7d=getDiff(_0x3dcf4f[_0xa55c('0x6')][_0x25934f][_0xa55c('0x2e')]);clearTimeout(_0x3dcf4f[_0xa55c('0x6')][_0x25934f][_0xa55c('0x29')]);_0x3dcf4f['timers'][_0x25934f][_0xa55c('0x29')]=![];RpcVoiceAgentReport[_0xa55c('0x2f')]({'acwtime':_0x490b7d},_0x3dcf4f[_0xa55c('0x6')][_0x25934f][_0xa55c('0x2c')],_0x25934f)[_0xa55c('0x21')](function(_0x1225c3){logger[_0xa55c('0x24')](_0xa55c('0x30'),_0x3ccf65,_0x490b7d,_0x1225c3);})[_0xa55c('0x31')](function(_0xcbaf2e){logger[_0xa55c('0x32')]('[%s][UPDATE][ERRORS:%s]',_0x3ccf65,_0xcbaf2e);});delete _0x3dcf4f['timers'][_0x25934f];};}});}else{logger[_0xa55c('0x24')](_0xa55c('0x33'),_0x3ccf65,_0x25934f,_0x3ae86b);}});}})['catch'](function(_0x30fadd){logger[_0xa55c('0x32')](_0xa55c('0x27'),_0x3ccf65,_0x3dcf4f[_0xa55c('0x4')][_0x3ae86b][_0xa55c('0x28')],_0x25934f,_0x3ae86b);})[_0xa55c('0x34')](function(){delete _0x3dcf4f[_0xa55c('0x18')][_0x3ccf65];});}catch(_0x222d4b){logger[_0xa55c('0x32')]('[ACW][START]\x20%s',_0x222d4b['message']);}};Acw['prototype'][_0xa55c('0x35')]=function(_0x18e00e){try{var _0x2bb4f0=this;if(_0x2bb4f0['timers'][_0x18e00e]){_0x2bb4f0[_0xa55c('0x6')][_0x18e00e]['timer']=![];var _0x119220=_0x2bb4f0['timers'][_0x18e00e][_0xa55c('0x2c')];var _0x39267c=_0x2bb4f0[_0xa55c('0x6')][_0x18e00e]['queue'];var _0x7c4a47=_0x2bb4f0[_0xa55c('0x4')][_0x39267c]['acwTimeout'];logger[_0xa55c('0x24')](_0xa55c('0x36'),_0x18e00e);RpcUser['saveUnpause'](this['agents'][_0x18e00e]);RpcVoiceAgentReport[_0xa55c('0x2f')]({'acwtime':_0x7c4a47,'agentacw':!![]},_0x119220,_0x18e00e)['then'](function(_0x1e75dc){logger[_0xa55c('0x24')]('[%s][UPDATE][ACWTIME:%s]',_0x119220,_0x7c4a47,_0x1e75dc);})['catch'](function(_0x5e50b6){logger['error'](_0xa55c('0x37'),_0x119220,_0x5e50b6);});}else{logger[_0xa55c('0x32')](_0xa55c('0x38'),_0x18e00e);if(_0x2bb4f0[_0xa55c('0x6')]){logger[_0xa55c('0x24')]('[ACW][TIMERS]',JSON[_0xa55c('0x39')](_0x2bb4f0[_0xa55c('0x6')]));}}}catch(_0x77d623){logger[_0xa55c('0x32')](_0xa55c('0x3a'),_0x77d623[_0xa55c('0x3b')]);}};Acw['prototype'][_0xa55c('0x8')]=function(_0x5ee63d){try{if(this['voiceQueues'][_0x5ee63d[_0xa55c('0x1a')]]&&(this[_0xa55c('0x4')][_0x5ee63d['queue']][_0xa55c('0x2')]||this['voiceQueues'][_0x5ee63d['queue']][_0xa55c('0x1c')])){if(this[_0xa55c('0x5')][_0x5ee63d[_0xa55c('0x19')]]){this['channels'][_0x5ee63d[_0xa55c('0x2c')]]={'queue':_0x5ee63d[_0xa55c('0x1a')],'interface':_0x5ee63d['interface'],'destlinkedid':_0x5ee63d[_0xa55c('0x3c')]};}}}catch(_0x514661){logger[_0xa55c('0x32')](_0xa55c('0x3d'),_0x514661['message']);}};Acw[_0xa55c('0x17')][_0xa55c('0x13')]=function(_0x5d834d){try{if(this[_0xa55c('0x4')][_0x5d834d[_0xa55c('0x1a')]]&&(this[_0xa55c('0x4')][_0x5d834d['queue']][_0xa55c('0x2')]||this['voiceQueues'][_0x5d834d[_0xa55c('0x1a')]][_0xa55c('0x1c')])){if(this[_0xa55c('0x5')][_0x5d834d['interface']]){this[_0xa55c('0x18')][_0x5d834d[_0xa55c('0x2c')]]={'queue':_0x5d834d['queue'],'interface':_0x5d834d[_0xa55c('0x19')]};}}}catch(_0x931907){logger['error'](_0xa55c('0x3e'),_0x931907[_0xa55c('0x3b')]);}};Acw['prototype'][_0xa55c('0xa')]=function(_0x81cee8){try{if(this[_0xa55c('0x18')][_0x81cee8[_0xa55c('0x2c')]]&&_['isUndefined'](this[_0xa55c('0x18')][_0x81cee8['uniqueid']][_0xa55c('0x3f')])){logger[_0xa55c('0x24')](_0xa55c('0x40'),_0x81cee8['uniqueid']);this[_0xa55c('0x41')](_0x81cee8[_0xa55c('0x2c')]);}else if(this['channels'][_0x81cee8[_0xa55c('0x42')]]&&_[_0xa55c('0x43')](this[_0xa55c('0x18')][_0x81cee8[_0xa55c('0x42')]][_0xa55c('0x3f')])){logger[_0xa55c('0x24')](_0xa55c('0x44'),_0x81cee8[_0xa55c('0x42')]);this[_0xa55c('0x41')](_0x81cee8[_0xa55c('0x42')]);}}catch(_0x4fc0a9){logger[_0xa55c('0x32')](_0xa55c('0x45'),_0x4fc0a9[_0xa55c('0x3b')]);}};Acw['prototype'][_0xa55c('0xb')]=function(_0x35bf0a){try{if(this['channels'][_0x35bf0a[_0xa55c('0x2c')]]&&this['channels'][_0x35bf0a[_0xa55c('0x2c')]][_0xa55c('0x3f')]){logger[_0xa55c('0x24')](_0xa55c('0x46'),_0x35bf0a[_0xa55c('0x2c')]);this['startAcw'](_0x35bf0a[_0xa55c('0x2c')]);}else if(this[_0xa55c('0x18')][_0x35bf0a['linkedid']]&&this[_0xa55c('0x18')][_0x35bf0a[_0xa55c('0x42')]][_0xa55c('0x3f')]){logger[_0xa55c('0x24')]('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x35bf0a['linkedid']);this[_0xa55c('0x41')](_0x35bf0a[_0xa55c('0x42')]);}}catch(_0x3ca5b8){logger[_0xa55c('0x32')]('[ACW][syncHangup]\x20%s',_0x3ca5b8[_0xa55c('0x3b')]);}};Acw['prototype'][_0xa55c('0x10')]=function(_0x437ced){try{if(!_[_0xa55c('0x47')](this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x48')]])){this['startAcw'](_0x437ced[_0xa55c('0x48')]);if(this['channels'][_0x437ced[_0xa55c('0x49')]]){this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x49')]][_0xa55c('0x3f')]=!![];this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x4a')]]=this[_0xa55c('0x18')][_0x437ced['secondtransfereruniqueid']];delete this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x49')]];}}else if(!_[_0xa55c('0x47')](this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x4a')]])){this['startAcw'](_0x437ced[_0xa55c('0x4a')]);if(this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x4b')]]){this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x4b')]]['attended']=!![];this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x48')]]=this[_0xa55c('0x18')][_0x437ced[_0xa55c('0x4b')]];delete this[_0xa55c('0x18')][_0x437ced['origtransfereruniqueid']];}}}catch(_0x419fc3){logger['error'](_0xa55c('0x4c'),_0x419fc3['message']);}};Acw[_0xa55c('0x17')]['syncBlindTransfer']=function(_0x34edc5){try{if(this[_0xa55c('0x18')][_0x34edc5[_0xa55c('0x4d')]]){logger[_0xa55c('0x24')](_0xa55c('0x4e'),JSON[_0xa55c('0x39')](_0x34edc5[_0xa55c('0x4d')]));this[_0xa55c('0x41')](_0x34edc5[_0xa55c('0x4d')]);}else if(this[_0xa55c('0x18')][_0x34edc5['transfererlinkedid']]){logger[_0xa55c('0x24')](_0xa55c('0x4f'),JSON['stringify'](_0x34edc5[_0xa55c('0x50')]));this[_0xa55c('0x41')](_0x34edc5[_0xa55c('0x50')]);}}catch(_0x9fe234){logger[_0xa55c('0x32')](_0xa55c('0x51'),_0x9fe234[_0xa55c('0x3b')]);}};Acw[_0xa55c('0x17')]['syncAgentRingNoAnswer']=function(_0x1dfaf7){try{if(this[_0xa55c('0x4')][_0x1dfaf7[_0xa55c('0x1a')]]&&this[_0xa55c('0x4')][_0x1dfaf7[_0xa55c('0x1a')]][_0xa55c('0x52')]===_0xa55c('0x53')){if(this[_0xa55c('0x5')][_0x1dfaf7[_0xa55c('0x19')]]){logger['info'](_0xa55c('0x54'),_0x1dfaf7[_0xa55c('0x2c')],_0x1dfaf7[_0xa55c('0x19')],_0x1dfaf7[_0xa55c('0x1a')]);return RpcUser[_0xa55c('0x26')](this[_0xa55c('0x5')][_0x1dfaf7[_0xa55c('0x19')]],_0xa55c('0x55'),_0x1dfaf7[_0xa55c('0x2c')]);}}}catch(_0x3178a6){logger[_0xa55c('0x32')]('[ACW][syncAgentRingNoAnswer]\x20%s',_0x3178a6[_0xa55c('0x3b')]);}};module['exports']=Acw; \ No newline at end of file +var _0x81bd=['YYYY-MM-DD\x20HH:mm:ss','updateAcw','update','[%s][UPDATE][ACWTIME:%s]','catch','error','[%s][UPDATE][ERRORS:%s]','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','finally','[ACW][START]\x20%s','message','uniqueid','[TIMER][STOP][AGENT:%s]','saveUnpause','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','stringify','[ACW][syncAgentConnectPreview]\x20%s','[%s][HANGUP:UNIQUEID]','startAcw','linkedid','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[ACW][syncHangup]\x20%s','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','[ACW][syncBlindTransfer]\x20%s','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','util','lodash','moment','../ami','../../../config/logger','acw','../rpc/user','voiceQueues','agents','timers','syncAgentConnect','hanguprequest','syncHangupRequest','bind','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncAgentConnectPreview','milliseconds','diff','seconds','prototype','channels','interface','queue','ACW','mandatoryDisposition','mandatoryDispositionPause','name','Action','getAgent','then','info','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','timer','stopAcw','format'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x81bd,0x7c));var _0xd81b=function(_0x16a223,_0x31b6e8){_0x16a223=_0x16a223-0x0;var _0x5ded66=_0x81bd[_0x16a223];return _0x5ded66;};'use strict';var util=require(_0xd81b('0x0'));var _=require(_0xd81b('0x1'));var moment=require(_0xd81b('0x2'));var ami=require(_0xd81b('0x3'));var logger=require(_0xd81b('0x4'))(_0xd81b('0x5'));var RpcUser=require(_0xd81b('0x6'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');function Acw(_0x16e8de){this[_0xd81b('0x7')]=_0x16e8de[_0xd81b('0x7')];this['agents']=_0x16e8de[_0xd81b('0x8')];this[_0xd81b('0x9')]=_0x16e8de[_0xd81b('0x9')];this['channels']={};ami['on']('agentconnect',this[_0xd81b('0xa')]['bind'](this));ami['on'](_0xd81b('0xb'),this[_0xd81b('0xc')][_0xd81b('0xd')](this));ami['on'](_0xd81b('0xe'),this[_0xd81b('0xf')][_0xd81b('0xd')](this));ami['on'](_0xd81b('0x10'),this[_0xd81b('0x11')][_0xd81b('0xd')](this));ami['on'](_0xd81b('0x12'),this[_0xd81b('0x13')][_0xd81b('0xd')](this));ami['on'](_0xd81b('0x14'),this['syncBlindTransfer'][_0xd81b('0xd')](this));ami['on']('custom:agentConnectPreview',this[_0xd81b('0x15')][_0xd81b('0xd')](this));}function getDiff(_0x5f0b6b){var _0x35a053=moment()['milliseconds'](0x0);var _0x13dd00=moment(_0x5f0b6b)[_0xd81b('0x16')](0x0);return _0x35a053[_0xd81b('0x17')](_0x13dd00,_0xd81b('0x18'));}Acw[_0xd81b('0x19')]['startAcw']=function(_0x1c620d){try{var _0x27b7a0=this;var _0x5c2863=this[_0xd81b('0x1a')][_0x1c620d][_0xd81b('0x1b')];var _0x4657cf=this[_0xd81b('0x1a')][_0x1c620d][_0xd81b('0x1c')];var _0xc49b8d=this[_0xd81b('0x7')][_0x4657cf];var _0x3d4d34=![];var _0x1c34c5=_0xd81b('0x1d');if(_0xc49b8d[_0xd81b('0x1e')]){if(_0xc49b8d[_0xd81b('0x1f')][_0xd81b('0x20')]){_0x3d4d34=!![];_0x1c34c5=_0xc49b8d[_0xd81b('0x1f')][_0xd81b('0x20')];}}ami[_0xd81b('0x21')]({'action':'QueuePause','interface':_0x5c2863,'paused':!![],'reason':_0x1c34c5})['then'](function(_0xc16ad0){if(_0x27b7a0[_0xd81b('0x8')][_0x5c2863]){return RpcUser[_0xd81b('0x22')](_0x27b7a0['agents'][_0x5c2863]['id'])[_0xd81b('0x23')](function(_0x6571a6){if(_0x6571a6&&!_0x6571a6['voicePause']){logger[_0xd81b('0x24')](_0xd81b('0x25'),_0x1c620d,_0x5c2863,_0x4657cf);var _0x1670cd=_0x27b7a0[_0xd81b('0x1a')][_0x1c620d][_0xd81b('0x26')]&&_0x27b7a0[_0xd81b('0x1a')][_0x1c620d][_0xd81b('0x27')]?_0x27b7a0[_0xd81b('0x1a')][_0x1c620d][_0xd81b('0x27')]:_0x1c620d;return RpcUser[_0xd81b('0x28')](_0x27b7a0[_0xd81b('0x8')][_0x5c2863],_0x1c34c5,_0x1670cd)[_0xd81b('0x23')](function(_0x596389){if(!_0x3d4d34){_0x27b7a0[_0xd81b('0x9')][_0x5c2863]={};logger[_0xd81b('0x24')](_0xd81b('0x29'),_0x1c620d,_0x27b7a0[_0xd81b('0x7')][_0x4657cf][_0xd81b('0x2a')],_0x5c2863,_0x4657cf);_0x27b7a0[_0xd81b('0x9')][_0x5c2863][_0xd81b('0x2b')]=setTimeout(_0x27b7a0[_0xd81b('0x2c')][_0xd81b('0xd')](_0x27b7a0,_0x5c2863),_0x27b7a0['voiceQueues'][_0x4657cf][_0xd81b('0x2a')]*0x3e8);_0x27b7a0['timers'][_0x5c2863]['lastPauseAt']=moment()[_0xd81b('0x2d')](_0xd81b('0x2e'));_0x27b7a0['timers'][_0x5c2863]['uniqueid']=_0x1c620d;_0x27b7a0[_0xd81b('0x9')][_0x5c2863][_0xd81b('0x1c')]=_0x4657cf;_0x27b7a0[_0xd81b('0x9')][_0x5c2863][_0xd81b('0x2f')]=function(){var _0x1a1572=getDiff(_0x27b7a0[_0xd81b('0x9')][_0x5c2863]['lastPauseAt']);clearTimeout(_0x27b7a0[_0xd81b('0x9')][_0x5c2863][_0xd81b('0x2b')]);_0x27b7a0['timers'][_0x5c2863]['timer']=![];RpcVoiceAgentReport[_0xd81b('0x30')]({'acwtime':_0x1a1572},_0x27b7a0[_0xd81b('0x9')][_0x5c2863]['uniqueid'],_0x5c2863)['then'](function(_0x5317b2){logger[_0xd81b('0x24')](_0xd81b('0x31'),_0x1c620d,_0x1a1572,_0x5317b2);})[_0xd81b('0x32')](function(_0x1c4cf7){logger[_0xd81b('0x33')](_0xd81b('0x34'),_0x1c620d,_0x1c4cf7);});delete _0x27b7a0[_0xd81b('0x9')][_0x5c2863];};}});}else{logger['info'](_0xd81b('0x35'),_0x1c620d,_0x5c2863,_0x4657cf);}});}})['catch'](function(_0x34634a){logger[_0xd81b('0x33')](_0xd81b('0x29'),_0x1c620d,_0x27b7a0[_0xd81b('0x7')][_0x4657cf][_0xd81b('0x2a')],_0x5c2863,_0x4657cf);})[_0xd81b('0x36')](function(){delete _0x27b7a0[_0xd81b('0x1a')][_0x1c620d];});}catch(_0x2d23b9){logger[_0xd81b('0x33')](_0xd81b('0x37'),_0x2d23b9[_0xd81b('0x38')]);}};Acw[_0xd81b('0x19')][_0xd81b('0x2c')]=function(_0x57bc0c){try{var _0x49deb8=this;if(_0x49deb8[_0xd81b('0x9')][_0x57bc0c]){_0x49deb8[_0xd81b('0x9')][_0x57bc0c][_0xd81b('0x2b')]=![];var _0x59c066=_0x49deb8[_0xd81b('0x9')][_0x57bc0c][_0xd81b('0x39')];var _0x5a236a=_0x49deb8[_0xd81b('0x9')][_0x57bc0c][_0xd81b('0x1c')];var _0x512e39=_0x49deb8[_0xd81b('0x7')][_0x5a236a]['acwTimeout'];logger[_0xd81b('0x24')](_0xd81b('0x3a'),_0x57bc0c);RpcUser[_0xd81b('0x3b')](this[_0xd81b('0x8')][_0x57bc0c]);RpcVoiceAgentReport['update']({'acwtime':_0x512e39,'agentacw':!![]},_0x59c066,_0x57bc0c)[_0xd81b('0x23')](function(_0x3444d4){logger[_0xd81b('0x24')](_0xd81b('0x31'),_0x59c066,_0x512e39,_0x3444d4);})[_0xd81b('0x32')](function(_0x466e98){logger[_0xd81b('0x33')]('[%s][UPDATE][ERRORS:%s]',_0x59c066,_0x466e98);});}else{logger[_0xd81b('0x33')](_0xd81b('0x3c'),_0x57bc0c);if(_0x49deb8[_0xd81b('0x9')]){logger['info'](_0xd81b('0x3d'),JSON[_0xd81b('0x3e')](_0x49deb8[_0xd81b('0x9')]));}}}catch(_0x1cd745){logger[_0xd81b('0x33')]('[ACW][STOP]\x20%s',_0x1cd745[_0xd81b('0x38')]);}};Acw[_0xd81b('0x19')][_0xd81b('0xa')]=function(_0x43ea38){try{if(this[_0xd81b('0x7')][_0x43ea38[_0xd81b('0x1c')]]&&(this[_0xd81b('0x7')][_0x43ea38[_0xd81b('0x1c')]][_0xd81b('0x5')]||this[_0xd81b('0x7')][_0x43ea38[_0xd81b('0x1c')]]['mandatoryDisposition'])){if(this[_0xd81b('0x8')][_0x43ea38[_0xd81b('0x1b')]]){this[_0xd81b('0x1a')][_0x43ea38[_0xd81b('0x39')]]={'queue':_0x43ea38[_0xd81b('0x1c')],'interface':_0x43ea38[_0xd81b('0x1b')],'destlinkedid':_0x43ea38[_0xd81b('0x27')]};}}}catch(_0x475bcf){logger['error']('[ACW][syncAgentConnect]\x20%s',_0x475bcf[_0xd81b('0x38')]);}};Acw[_0xd81b('0x19')][_0xd81b('0x15')]=function(_0x222c5e){try{if(this[_0xd81b('0x7')][_0x222c5e[_0xd81b('0x1c')]]&&(this[_0xd81b('0x7')][_0x222c5e[_0xd81b('0x1c')]][_0xd81b('0x5')]||this[_0xd81b('0x7')][_0x222c5e[_0xd81b('0x1c')]][_0xd81b('0x1e')])){if(this['agents'][_0x222c5e[_0xd81b('0x1b')]]){this[_0xd81b('0x1a')][_0x222c5e[_0xd81b('0x39')]]={'queue':_0x222c5e[_0xd81b('0x1c')],'interface':_0x222c5e[_0xd81b('0x1b')]};}}}catch(_0x410ef3){logger[_0xd81b('0x33')](_0xd81b('0x3f'),_0x410ef3[_0xd81b('0x38')]);}};Acw['prototype'][_0xd81b('0xc')]=function(_0x2368dd){try{if(this[_0xd81b('0x1a')][_0x2368dd[_0xd81b('0x39')]]&&_['isUndefined'](this[_0xd81b('0x1a')][_0x2368dd[_0xd81b('0x39')]][_0xd81b('0x26')])){logger[_0xd81b('0x24')](_0xd81b('0x40'),_0x2368dd[_0xd81b('0x39')]);this[_0xd81b('0x41')](_0x2368dd[_0xd81b('0x39')]);}else if(this[_0xd81b('0x1a')][_0x2368dd['linkedid']]&&_['isUndefined'](this[_0xd81b('0x1a')][_0x2368dd[_0xd81b('0x42')]][_0xd81b('0x26')])){logger[_0xd81b('0x24')](_0xd81b('0x43'),_0x2368dd[_0xd81b('0x42')]);this[_0xd81b('0x41')](_0x2368dd[_0xd81b('0x42')]);}}catch(_0x4e039e){logger[_0xd81b('0x33')](_0xd81b('0x44'),_0x4e039e[_0xd81b('0x38')]);}};Acw[_0xd81b('0x19')][_0xd81b('0xf')]=function(_0x59b13b){try{if(this[_0xd81b('0x1a')][_0x59b13b[_0xd81b('0x39')]]&&this['channels'][_0x59b13b[_0xd81b('0x39')]][_0xd81b('0x26')]){logger[_0xd81b('0x24')](_0xd81b('0x45'),_0x59b13b[_0xd81b('0x39')]);this[_0xd81b('0x41')](_0x59b13b[_0xd81b('0x39')]);}else if(this[_0xd81b('0x1a')][_0x59b13b[_0xd81b('0x42')]]&&this[_0xd81b('0x1a')][_0x59b13b[_0xd81b('0x42')]]['attended']){logger[_0xd81b('0x24')]('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x59b13b[_0xd81b('0x42')]);this[_0xd81b('0x41')](_0x59b13b[_0xd81b('0x42')]);}}catch(_0x3c2a9f){logger[_0xd81b('0x33')](_0xd81b('0x46'),_0x3c2a9f['message']);}};Acw[_0xd81b('0x19')][_0xd81b('0x13')]=function(_0x51f5a1){try{if(!_['isNil'](this[_0xd81b('0x1a')][_0x51f5a1['transfereeuniqueid']])){this[_0xd81b('0x41')](_0x51f5a1['transfereeuniqueid']);if(this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x47')]]){this[_0xd81b('0x1a')][_0x51f5a1['secondtransfereruniqueid']][_0xd81b('0x26')]=!![];this[_0xd81b('0x1a')][_0x51f5a1['transfertargetuniqueid']]=this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x47')]];delete this['channels'][_0x51f5a1[_0xd81b('0x47')]];}}else if(!_['isNil'](this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x48')]])){this[_0xd81b('0x41')](_0x51f5a1[_0xd81b('0x48')]);if(this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x49')]]){this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x49')]][_0xd81b('0x26')]=!![];this[_0xd81b('0x1a')][_0x51f5a1['transfereeuniqueid']]=this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x49')]];delete this[_0xd81b('0x1a')][_0x51f5a1[_0xd81b('0x49')]];}}}catch(_0x1bdf37){logger[_0xd81b('0x33')](_0xd81b('0x4a'),_0x1bdf37['message']);}};Acw['prototype']['syncBlindTransfer']=function(_0x2afe84){try{if(this[_0xd81b('0x1a')][_0x2afe84[_0xd81b('0x4b')]]){logger[_0xd81b('0x24')](_0xd81b('0x4c'),JSON[_0xd81b('0x3e')](_0x2afe84[_0xd81b('0x4b')]));this['startAcw'](_0x2afe84[_0xd81b('0x4b')]);}else if(this[_0xd81b('0x1a')][_0x2afe84[_0xd81b('0x4d')]]){logger[_0xd81b('0x24')](_0xd81b('0x4e'),JSON[_0xd81b('0x3e')](_0x2afe84[_0xd81b('0x4d')]));this['startAcw'](_0x2afe84[_0xd81b('0x4d')]);}}catch(_0x15f003){logger[_0xd81b('0x33')](_0xd81b('0x4f'),_0x15f003[_0xd81b('0x38')]);}};Acw[_0xd81b('0x19')][_0xd81b('0x11')]=function(_0x19d4f0){try{if(this[_0xd81b('0x7')][_0x19d4f0[_0xd81b('0x1c')]]&&this[_0xd81b('0x7')][_0x19d4f0[_0xd81b('0x1c')]]['autopause']===_0xd81b('0x50')){if(this['agents'][_0x19d4f0[_0xd81b('0x1b')]]){logger[_0xd81b('0x24')](_0xd81b('0x51'),_0x19d4f0[_0xd81b('0x39')],_0x19d4f0[_0xd81b('0x1b')],_0x19d4f0[_0xd81b('0x1c')]);return RpcUser[_0xd81b('0x28')](this[_0xd81b('0x8')][_0x19d4f0[_0xd81b('0x1b')]],_0xd81b('0x52'),_0x19d4f0['uniqueid']);}}}catch(_0xfa2a13){logger[_0xd81b('0x33')](_0xd81b('0x53'),_0xfa2a13[_0xd81b('0x38')]);}};module[_0xd81b('0x54')]=Acw; \ No newline at end of file diff --git a/server/services/ami/ami.js b/server/services/ami/ami.js index 0e85ef7..ce66ab9 100644 --- a/server/services/ami/ami.js +++ b/server/services/ami/ami.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x91dd=['../../config/logger','ami','../../config/environment','asterisk','port','username','password','keepConnected','Action','error','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','sipshowregistry','actionDeviceStateList','actionSipPeerStatus','sippeerstatus','actionQueueSummary','queuesummary','coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','inspect','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','log','close','exports','asterisk-manager','bluebird','util','lodash'];(function(_0x2502e8,_0x4f7dc3){var _0x106d73=function(_0x364060){while(--_0x364060){_0x2502e8['push'](_0x2502e8['shift']());}};_0x106d73(++_0x4f7dc3);}(_0x91dd,0xf8));var _0xd91d=function(_0x5e0a83,_0x8f4ff8){_0x5e0a83=_0x5e0a83-0x0;var _0x4b0c77=_0x91dd[_0x5e0a83];return _0x4b0c77;};'use strict';var Manager=require(_0xd91d('0x0'));var BPromise=require(_0xd91d('0x1'));var moment=require('moment');var util=require(_0xd91d('0x2'));var _=require(_0xd91d('0x3'));var logger=require(_0xd91d('0x4'))(_0xd91d('0x5'));var config=require(_0xd91d('0x6'));var ami=new Manager(config[_0xd91d('0x7')][_0xd91d('0x8')],config[_0xd91d('0x7')]['ip'],config['asterisk'][_0xd91d('0x9')],config['asterisk'][_0xd91d('0xa')],!![]);ami[_0xd91d('0xb')]();ami[_0xd91d('0xc')]=BPromise['promisify'](ami['action']);function error(_0x43dd11){logger[_0xd91d('0xd')](util[_0xd91d('0xe')](_0xd91d('0xf'),config[_0xd91d('0x7')][_0xd91d('0x9')],config['asterisk']['ip'],config[_0xd91d('0x7')][_0xd91d('0x8')],util['inspect'](_0x43dd11,![],null)));}function close(){logger[_0xd91d('0xd')](util[_0xd91d('0xe')](_0xd91d('0x10'),config['asterisk'][_0xd91d('0x9')],config[_0xd91d('0x7')]['ip'],config[_0xd91d('0x7')]['port']));}ami[_0xd91d('0x11')]=function(){return function(){return ami['Action']({'action':_0xd91d('0x12')});};};ami[_0xd91d('0x13')]=function(){return function(){return ami[_0xd91d('0xc')]({'action':'devicestatelist'});};};ami[_0xd91d('0x14')]=function(){return function(){return ami[_0xd91d('0xc')]({'action':_0xd91d('0x15')});};};ami[_0xd91d('0x16')]=function(){return function(){return ami[_0xd91d('0xc')]({'action':_0xd91d('0x17')});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0xd91d('0xc')]({'action':_0xd91d('0x18')});};};function connect(_0x2a9096){logger[_0xd91d('0x19')](util['format'](_0xd91d('0x1a'),config[_0xd91d('0x7')]['username'],config[_0xd91d('0x7')]['ip'],config['asterisk'][_0xd91d('0x8')]));ami[_0xd91d('0x1b')]('error',error);ami[_0xd91d('0x1b')]('close',close);}ami['on']('connect',connect);ami['on']('shutdown',function(_0x5c90db){logger[_0xd91d('0x19')](util[_0xd91d('0xe')](_0xd91d('0x1c'),config[_0xd91d('0x7')]['username'],config[_0xd91d('0x7')]['ip'],config[_0xd91d('0x7')][_0xd91d('0x8')],util[_0xd91d('0x1d')](_0x5c90db,![],null)));});ami['on']('fullybooted',function(_0x8eb8d5){logger['info'](util['format'](_0xd91d('0x1e'),config[_0xd91d('0x7')][_0xd91d('0x9')],config[_0xd91d('0x7')]['ip'],config[_0xd91d('0x7')][_0xd91d('0x8')]));return BPromise[_0xd91d('0x1f')]()[_0xd91d('0x20')](ami[_0xd91d('0x11')]())[_0xd91d('0x20')](ami[_0xd91d('0x13')]())[_0xd91d('0x20')](ami[_0xd91d('0x14')]())['then'](ami[_0xd91d('0x16')]())[_0xd91d('0x20')](ami['actionCoreShowChannels']())['catch'](function(_0x2473e8){console[_0xd91d('0x21')](_0x2473e8);});});ami[_0xd91d('0x1b')](_0xd91d('0xd'),error);ami[_0xd91d('0x1b')](_0xd91d('0x22'),close);module[_0xd91d('0x23')]=ami; \ No newline at end of file +var _0x0fc3=['fullybooted','resolve','then','actionQueueSummary','actionCoreShowChannels','catch','log','exports','asterisk-manager','bluebird','moment','util','lodash','ami','../../config/environment','asterisk','port','username','password','keepConnected','promisify','action','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','error','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','Action','sipshowregistry','actionDeviceStateList','devicestatelist','actionSipPeerStatus','sippeerstatus','queuesummary','coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s'];(function(_0xae7c2f,_0xf31e04){var _0x5d7001=function(_0x4eeadb){while(--_0x4eeadb){_0xae7c2f['push'](_0xae7c2f['shift']());}};_0x5d7001(++_0xf31e04);}(_0x0fc3,0x1d6));var _0x30fc=function(_0x4d28df,_0x3cec2f){_0x4d28df=_0x4d28df-0x0;var _0x15b115=_0x0fc3[_0x4d28df];return _0x15b115;};'use strict';var Manager=require(_0x30fc('0x0'));var BPromise=require(_0x30fc('0x1'));var moment=require(_0x30fc('0x2'));var util=require(_0x30fc('0x3'));var _=require(_0x30fc('0x4'));var logger=require('../../config/logger')(_0x30fc('0x5'));var config=require(_0x30fc('0x6'));var ami=new Manager(config[_0x30fc('0x7')][_0x30fc('0x8')],config['asterisk']['ip'],config[_0x30fc('0x7')][_0x30fc('0x9')],config['asterisk'][_0x30fc('0xa')],!![]);ami[_0x30fc('0xb')]();ami['Action']=BPromise[_0x30fc('0xc')](ami[_0x30fc('0xd')]);function error(_0x133869){logger['error'](util[_0x30fc('0xe')](_0x30fc('0xf'),config[_0x30fc('0x7')]['username'],config[_0x30fc('0x7')]['ip'],config[_0x30fc('0x7')][_0x30fc('0x8')],util[_0x30fc('0x10')](_0x133869,![],null)));}function close(){logger[_0x30fc('0x11')](util[_0x30fc('0xe')](_0x30fc('0x12'),config[_0x30fc('0x7')][_0x30fc('0x9')],config[_0x30fc('0x7')]['ip'],config['asterisk'][_0x30fc('0x8')]));}ami[_0x30fc('0x13')]=function(){return function(){return ami[_0x30fc('0x14')]({'action':_0x30fc('0x15')});};};ami[_0x30fc('0x16')]=function(){return function(){return ami['Action']({'action':_0x30fc('0x17')});};};ami[_0x30fc('0x18')]=function(){return function(){return ami[_0x30fc('0x14')]({'action':_0x30fc('0x19')});};};ami['actionQueueSummary']=function(){return function(){return ami[_0x30fc('0x14')]({'action':_0x30fc('0x1a')});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0x30fc('0x14')]({'action':_0x30fc('0x1b')});};};function connect(_0xf6f99f){logger[_0x30fc('0x1c')](util[_0x30fc('0xe')](_0x30fc('0x1d'),config[_0x30fc('0x7')]['username'],config[_0x30fc('0x7')]['ip'],config[_0x30fc('0x7')][_0x30fc('0x8')]));ami[_0x30fc('0x1e')](_0x30fc('0x11'),error);ami['once'](_0x30fc('0x1f'),close);}ami['on']('connect',connect);ami['on'](_0x30fc('0x20'),function(_0x15ba11){logger[_0x30fc('0x1c')](util[_0x30fc('0xe')](_0x30fc('0x21'),config[_0x30fc('0x7')][_0x30fc('0x9')],config[_0x30fc('0x7')]['ip'],config[_0x30fc('0x7')]['port'],util[_0x30fc('0x10')](_0x15ba11,![],null)));});ami['on'](_0x30fc('0x22'),function(_0x45c7a8){logger[_0x30fc('0x1c')](util[_0x30fc('0xe')]('Fullybooted\x20\x22%s\x22\x20to\x20%s:%s',config['asterisk'][_0x30fc('0x9')],config[_0x30fc('0x7')]['ip'],config[_0x30fc('0x7')][_0x30fc('0x8')]));return BPromise[_0x30fc('0x23')]()[_0x30fc('0x24')](ami[_0x30fc('0x13')]())[_0x30fc('0x24')](ami[_0x30fc('0x16')]())['then'](ami[_0x30fc('0x18')]())[_0x30fc('0x24')](ami[_0x30fc('0x25')]())[_0x30fc('0x24')](ami[_0x30fc('0x26')]())[_0x30fc('0x27')](function(_0xca1f32){console[_0x30fc('0x28')](_0xca1f32);});});ami['once']('error',error);ami['once']('close',close);module[_0x30fc('0x29')]=ami; \ No newline at end of file diff --git a/server/services/ami/client.js b/server/services/ami/client.js index 9ebdb31..b2d48c2 100644 --- a/server/services/ami/client.js +++ b/server/services/ami/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb87f=['client','Request','request','rpc','memberReport','error','message','catch','exports','jayson/promise','bluebird','../../config/logger','ami'];(function(_0x4c7cc9,_0x816b07){var _0x19560b=function(_0x26673e){while(--_0x26673e){_0x4c7cc9['push'](_0x4c7cc9['shift']());}};_0x19560b(++_0x816b07);}(_0xb87f,0x19c));var _0xfb87=function(_0x41e71c,_0x55715c){_0x41e71c=_0x41e71c-0x0;var _0x47e34f=_0xb87f[_0x41e71c];return _0x47e34f;};'use strict';var jayson=require(_0xfb87('0x0'));var BPromise=require(_0xfb87('0x1'));var logger=require(_0xfb87('0x2'))(_0xfb87('0x3'));var client=jayson[_0xfb87('0x4')]['http']({'port':0x2329});client[_0xfb87('0x5')]=function(_0x245859,_0xff8143){return new BPromise(function(_0x32d72e,_0x13bdad){return client[_0xfb87('0x6')](_0x245859,_0xff8143)['then'](function(_0x3e32b2){logger['debug'](_0xfb87('0x7'),_0xfb87('0x8'),_0x245859,_0xff8143,_0x3e32b2);if(_0x3e32b2['error']){logger[_0xfb87('0x9')](_0xfb87('0x7'),'memberReport',_0x245859,_0x3e32b2[_0xfb87('0x9')][_0xfb87('0xa')],_0xff8143);return _0x13bdad(_0x3e32b2[_0xfb87('0x9')][_0xfb87('0xa')]);}else{return _0x32d72e(_0x3e32b2['result']);}})[_0xfb87('0xb')](function(_0x4071d5){logger[_0xfb87('0x9')](_0xfb87('0x7'),_0xfb87('0x8'),_0x245859,_0x4071d5,_0xff8143);return _0x13bdad(_0x4071d5);});});};module[_0xfb87('0xc')]=client; \ No newline at end of file +var _0x57e6=['memberReport','error','message','result','rpc','exports','bluebird','../../config/logger','ami','http','request'];(function(_0x3b8240,_0x4cf6d6){var _0x39edd4=function(_0x165de1){while(--_0x165de1){_0x3b8240['push'](_0x3b8240['shift']());}};_0x39edd4(++_0x4cf6d6);}(_0x57e6,0x119));var _0x657e=function(_0x409deb,_0x2b731){_0x409deb=_0x409deb-0x0;var _0x15a4f7=_0x57e6[_0x409deb];return _0x15a4f7;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0x657e('0x0'));var logger=require(_0x657e('0x1'))(_0x657e('0x2'));var client=jayson['client'][_0x657e('0x3')]({'port':0x2329});client['Request']=function(_0x50e240,_0x514142){return new BPromise(function(_0x14f2c2,_0x19865b){return client[_0x657e('0x4')](_0x50e240,_0x514142)['then'](function(_0x3cb723){logger['debug']('rpc',_0x657e('0x5'),_0x50e240,_0x514142,_0x3cb723);if(_0x3cb723[_0x657e('0x6')]){logger[_0x657e('0x6')]('rpc',_0x657e('0x5'),_0x50e240,_0x3cb723['error'][_0x657e('0x7')],_0x514142);return _0x19865b(_0x3cb723[_0x657e('0x6')][_0x657e('0x7')]);}else{return _0x14f2c2(_0x3cb723[_0x657e('0x8')]);}})['catch'](function(_0x153f5d){logger[_0x657e('0x6')](_0x657e('0x9'),_0x657e('0x5'),_0x50e240,_0x153f5d,_0x514142);return _0x19865b(_0x153f5d);});});};module[_0x657e('0xa')]=client; \ No newline at end of file diff --git a/server/services/ami/dialer/action.js b/server/services/ami/dialer/action.js index a09dff8..133ee96 100644 --- a/server/services/ami/dialer/action.js +++ b/server/services/ami/dialer/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb50d=['countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ListId','UserId','CampaignId','idHopper','ContactFirstName','starttime','format','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','prototype','getCaller','\x22%s\x22\x20<%s>','number','substring','dialCutDigit','getQueue','exports','moment','isNil','string','voiceQueue','uniqueid','name','Contact','firstName','lastName','phone','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0xb50d,0xf5));var _0xdb50=function(_0x3fc774,_0x3de456){_0x3fc774=_0x3fc774-0x0;var _0x3252ad=_0xb50d[_0x3fc774];return _0x3252ad;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0xdb50('0x0'));function checkNameSurname(_0xa37b5a,_0x5042f7,_0x404c57){var _0x12d72e='';if(!_[_0xdb50('0x1')](_0x5042f7)&&_0xdb50('0x2')===typeof _0x5042f7){_0x12d72e+=_0x5042f7;}if(!_[_0xdb50('0x1')](_0x404c57)&&'string'===typeof _0x404c57){_0x12d72e+='\x20'+_0x404c57;}if(_0x12d72e!==''){return _0x12d72e;}return _0xa37b5a;}function Action(_0x48ed37,_0x44bfbc,_0xe3c447){this[_0xdb50('0x3')]=_0x48ed37;this[_0xdb50('0x4')]=_0xe3c447||undefined;this[_0xdb50('0x5')]=checkNameSurname(_0x44bfbc[_0xdb50('0x6')]['phone'],_0x44bfbc[_0xdb50('0x6')][_0xdb50('0x7')],_0x44bfbc[_0xdb50('0x6')][_0xdb50('0x8')]);this['number']=_0x44bfbc[_0xdb50('0x6')][_0xdb50('0x9')];this[_0xdb50('0xa')]=_0x48ed37[_0xdb50('0x5')];this[_0xdb50('0xb')]=_0x44bfbc[_0xdb50('0xb')]||![];this[_0xdb50('0xc')]=_0x48ed37['type'];this[_0xdb50('0xd')]=_0x48ed37[_0xdb50('0xd')]||0x3;this[_0xdb50('0xe')]=_0x44bfbc[_0xdb50('0xe')];this[_0xdb50('0xf')]=_0x44bfbc['countbusyretry'];this[_0xdb50('0x10')]=_0x44bfbc[_0xdb50('0x10')];this[_0xdb50('0x11')]=_0x44bfbc[_0xdb50('0x11')];this['countnosuchnumberretry']=_0x44bfbc[_0xdb50('0x12')];this[_0xdb50('0x13')]=_0x44bfbc[_0xdb50('0x13')];this[_0xdb50('0x14')]=_0x44bfbc[_0xdb50('0x14')];this[_0xdb50('0x15')]=_0x44bfbc['countmachineretry'];this[_0xdb50('0x16')]=_0x44bfbc[_0xdb50('0x16')];this['ContactId']=_0x44bfbc['ContactId'];this[_0xdb50('0x17')]=_0x44bfbc[_0xdb50('0x17')];this[_0xdb50('0x18')]=_0x44bfbc[_0xdb50('0x18')];this['VoiceQueueId']=_0x44bfbc['VoiceQueueId'];this[_0xdb50('0x19')]=_0x44bfbc['CampaignId'];this[_0xdb50('0x1a')]=_0x44bfbc['id'];this[_0xdb50('0x1b')]=_0x44bfbc['Contact'][_0xdb50('0x7')]||'';this[_0xdb50('0x1c')]=moment()[_0xdb50('0x1d')](_0xdb50('0x1e'));this[_0xdb50('0x1f')]=_0x44bfbc['callback'];this[_0xdb50('0x20')]=_0x44bfbc[_0xdb50('0x20')];this[_0xdb50('0x21')]=_0x44bfbc[_0xdb50('0x21')];this[_0xdb50('0x22')]=_0x44bfbc[_0xdb50('0x22')];this[_0xdb50('0x23')]='';this['originatecalleridname']='';}Action[_0xdb50('0x24')][_0xdb50('0x25')]=function(){return util[_0xdb50('0x1d')](_0xdb50('0x26'),this[_0xdb50('0x5')],this['voiceQueue']['dialCutDigit']>0x0?this[_0xdb50('0x27')][_0xdb50('0x28')](this[_0xdb50('0x3')][_0xdb50('0x29')]):this[_0xdb50('0x27')]);};Action['prototype'][_0xdb50('0x2a')]=function(){return this[_0xdb50('0xa')];};module[_0xdb50('0x2b')]=Action; \ No newline at end of file +var _0xe6f1=['ContactFirstName','starttime','format','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','prototype','\x22%s\x22\x20<%s>','substring','voiceQueue','dialCutDigit','getQueue','queue','util','moment','string','isNil','Contact','phone','firstName','lastName','number','name','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','idHopper'];(function(_0x49e584,_0x2886f8){var _0x58b1be=function(_0x40397c){while(--_0x40397c){_0x49e584['push'](_0x49e584['shift']());}};_0x58b1be(++_0x2886f8);}(_0xe6f1,0x19c));var _0x1e6f=function(_0x5124d2,_0x3400cb){_0x5124d2=_0x5124d2-0x0;var _0x361478=_0xe6f1[_0x5124d2];return _0x361478;};'use strict';var util=require(_0x1e6f('0x0'));var _=require('lodash');var moment=require(_0x1e6f('0x1'));function checkNameSurname(_0x5bc0b0,_0x3d42b3,_0x56bb81){var _0x34fcdd='';if(!_['isNil'](_0x3d42b3)&&_0x1e6f('0x2')===typeof _0x3d42b3){_0x34fcdd+=_0x3d42b3;}if(!_[_0x1e6f('0x3')](_0x56bb81)&&_0x1e6f('0x2')===typeof _0x56bb81){_0x34fcdd+='\x20'+_0x56bb81;}if(_0x34fcdd!==''){return _0x34fcdd;}return _0x5bc0b0;}function Action(_0x1d0119,_0x289772,_0x4cecf5){this['voiceQueue']=_0x1d0119;this['uniqueid']=_0x4cecf5||undefined;this['name']=checkNameSurname(_0x289772[_0x1e6f('0x4')][_0x1e6f('0x5')],_0x289772['Contact'][_0x1e6f('0x6')],_0x289772[_0x1e6f('0x4')][_0x1e6f('0x7')]);this[_0x1e6f('0x8')]=_0x289772['Contact'][_0x1e6f('0x5')];this['queue']=_0x1d0119[_0x1e6f('0x9')];this[_0x1e6f('0xa')]=_0x289772[_0x1e6f('0xa')]||![];this[_0x1e6f('0xb')]=_0x1d0119['type'];this[_0x1e6f('0xc')]=_0x1d0119['dialQueueTimeout']||0x3;this[_0x1e6f('0xd')]=_0x289772[_0x1e6f('0xd')];this[_0x1e6f('0xe')]=_0x289772[_0x1e6f('0xe')];this[_0x1e6f('0xf')]=_0x289772['countcongestionretry'];this[_0x1e6f('0x10')]=_0x289772[_0x1e6f('0x10')];this[_0x1e6f('0x11')]=_0x289772[_0x1e6f('0x11')];this[_0x1e6f('0x12')]=_0x289772[_0x1e6f('0x12')];this[_0x1e6f('0x13')]=_0x289772[_0x1e6f('0x13')];this[_0x1e6f('0x14')]=_0x289772[_0x1e6f('0x14')];this['countagentrejectretry']=_0x289772[_0x1e6f('0x15')];this[_0x1e6f('0x16')]=_0x289772[_0x1e6f('0x16')];this[_0x1e6f('0x17')]=_0x289772[_0x1e6f('0x17')];this['UserId']=_0x289772[_0x1e6f('0x18')];this[_0x1e6f('0x19')]=_0x289772[_0x1e6f('0x19')];this[_0x1e6f('0x1a')]=_0x289772[_0x1e6f('0x1a')];this[_0x1e6f('0x1b')]=_0x289772['id'];this[_0x1e6f('0x1c')]=_0x289772[_0x1e6f('0x4')][_0x1e6f('0x6')]||'';this[_0x1e6f('0x1d')]=moment()[_0x1e6f('0x1e')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x1e6f('0x1f')]=_0x289772[_0x1e6f('0x1f')];this[_0x1e6f('0x20')]=_0x289772['callbackuniqueid'];this[_0x1e6f('0x21')]=_0x289772[_0x1e6f('0x21')];this['recallme']=_0x289772[_0x1e6f('0x22')];this[_0x1e6f('0x23')]='';this[_0x1e6f('0x24')]='';}Action[_0x1e6f('0x25')]['getCaller']=function(){return util[_0x1e6f('0x1e')](_0x1e6f('0x26'),this[_0x1e6f('0x9')],this['voiceQueue']['dialCutDigit']>0x0?this[_0x1e6f('0x8')][_0x1e6f('0x27')](this[_0x1e6f('0x28')][_0x1e6f('0x29')]):this[_0x1e6f('0x8')]);};Action[_0x1e6f('0x25')][_0x1e6f('0x2a')]=function(){return this[_0x1e6f('0x2b')];};module['exports']=Action; \ No newline at end of file diff --git a/server/services/ami/dialer/additionalPhone.js b/server/services/ami/dialer/additionalPhone.js index 62e66b0..2b32e4a 100644 --- a/server/services/ami/dialer/additionalPhone.js +++ b/server/services/ami/dialer/additionalPhone.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdda1=['countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','queue','calleridname','starttime','responsetime','endtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xdda1,0x10d));var _0x1dda=function(_0x5de7e6,_0x14af8e){_0x5de7e6=_0x5de7e6-0x0;var _0x503df2=_0xdda1[_0x5de7e6];return _0x503df2;};'use strict';var util=require(_0x1dda('0x0'));var _=require(_0x1dda('0x1'));var moment=require('moment');function getSeconds(_0x1349fe,_0x149ca6){var _0x2b63d6=moment(_0x1349fe)[_0x1dda('0x2')](0x0);var _0x5d8824=moment(_0x149ca6)[_0x1dda('0x2')](0x0);return _0x2b63d6['diff'](_0x5d8824,_0x1dda('0x3'));}function AdditionalPhone(_0x41e0cd){this[_0x1dda('0x4')]=_0x41e0cd[_0x1dda('0x4')];this[_0x1dda('0x5')]=_0x41e0cd[_0x1dda('0x5')]||undefined;this[_0x1dda('0x6')]=_0x41e0cd[_0x1dda('0x6')];this[_0x1dda('0x7')]=_0x41e0cd[_0x1dda('0x6')]===_0x1dda('0x8')?'queue':_0x41e0cd[_0x1dda('0x6')];this[_0x1dda('0x9')]=_0x41e0cd[_0x1dda('0x9')];this[_0x1dda('0xa')]=_0x41e0cd[_0x1dda('0xa')];this[_0x1dda('0xb')]=_0x41e0cd['countnoanswerretry'];this[_0x1dda('0xc')]=_0x41e0cd['countbusyretry']+_0x41e0cd[_0x1dda('0xa')]+_0x41e0cd['countnoanswerretry']+_0x41e0cd['countnosuchnumberretry']+_0x41e0cd[_0x1dda('0xd')]+_0x41e0cd[_0x1dda('0xe')]+_0x41e0cd[_0x1dda('0xf')]+_0x41e0cd[_0x1dda('0x10')];this['countnosuchnumberretry']=_0x41e0cd[_0x1dda('0x11')];this[_0x1dda('0xd')]=_0x41e0cd[_0x1dda('0xd')];this[_0x1dda('0xe')]=_0x41e0cd['countabandonedretry'];this[_0x1dda('0xf')]=_0x41e0cd[_0x1dda('0xf')];this[_0x1dda('0x10')]=_0x41e0cd[_0x1dda('0x10')];this['queue']=_0x41e0cd[_0x1dda('0x12')];this[_0x1dda('0x13')]=_0x41e0cd['name'];this['calleridnum']=_0x41e0cd['number'];this['starttime']=_0x41e0cd[_0x1dda('0x14')];this[_0x1dda('0x15')]=_0x41e0cd['responsetime'];this[_0x1dda('0x16')]=_0x41e0cd[_0x1dda('0x15')];this['ringtime']=getSeconds(_0x41e0cd[_0x1dda('0x15')],_0x41e0cd['starttime']);this[_0x1dda('0x17')]=0x0;this[_0x1dda('0x18')]=0x0;this[_0x1dda('0x19')]=_0x41e0cd[_0x1dda('0x19')];this[_0x1dda('0x1a')]=_0x41e0cd[_0x1dda('0x1a')];this[_0x1dda('0x1b')]=_0x41e0cd['callbackat'];this[_0x1dda('0x1c')]=_0x41e0cd[_0x1dda('0x1c')];this['ContactId']=_0x41e0cd['ContactId'];this['ListId']=_0x41e0cd[_0x1dda('0x1d')];this['UserId']=_0x41e0cd[_0x1dda('0x1e')];this['VoiceQueueId']=_0x41e0cd[_0x1dda('0x1f')];this[_0x1dda('0x20')]=_0x41e0cd[_0x1dda('0x20')];this['originatecalleridnum']=_0x41e0cd[_0x1dda('0x21')]||'';this[_0x1dda('0x22')]=_0x41e0cd[_0x1dda('0x22')]||'';}module['exports']=History; \ No newline at end of file +var _0x9851=['starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','queue','name','calleridnum'];(function(_0x5ca38b,_0xf84298){var _0x2614a4=function(_0x5277f){while(--_0x5277f){_0x5ca38b['push'](_0x5ca38b['shift']());}};_0x2614a4(++_0xf84298);}(_0x9851,0x171));var _0x1985=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9851[_0x321bb2];return _0x9c12ed;};'use strict';var util=require(_0x1985('0x0'));var _=require(_0x1985('0x1'));var moment=require('moment');function getSeconds(_0x44fdc6,_0x17ad74){var _0xff640a=moment(_0x44fdc6)[_0x1985('0x2')](0x0);var _0x525e08=moment(_0x17ad74)['milliseconds'](0x0);return _0xff640a[_0x1985('0x3')](_0x525e08,_0x1985('0x4'));}function AdditionalPhone(_0x443ab2){this[_0x1985('0x5')]=_0x443ab2[_0x1985('0x5')];this[_0x1985('0x6')]=_0x443ab2['scheduledat']||undefined;this[_0x1985('0x7')]=_0x443ab2[_0x1985('0x7')];this[_0x1985('0x8')]=_0x443ab2['type']===_0x1985('0x9')?'queue':_0x443ab2[_0x1985('0x7')];this['countbusyretry']=_0x443ab2[_0x1985('0xa')];this[_0x1985('0xb')]=_0x443ab2['countcongestionretry'];this['countnoanswerretry']=_0x443ab2['countnoanswerretry'];this[_0x1985('0xc')]=_0x443ab2[_0x1985('0xa')]+_0x443ab2[_0x1985('0xb')]+_0x443ab2['countnoanswerretry']+_0x443ab2[_0x1985('0xd')]+_0x443ab2['countdropretry']+_0x443ab2[_0x1985('0xe')]+_0x443ab2[_0x1985('0xf')]+_0x443ab2[_0x1985('0x10')];this[_0x1985('0xd')]=_0x443ab2['countnosuchnumberretry'];this[_0x1985('0x11')]=_0x443ab2['countdropretry'];this[_0x1985('0xe')]=_0x443ab2[_0x1985('0xe')];this[_0x1985('0xf')]=_0x443ab2[_0x1985('0xf')];this['countagentrejectretry']=_0x443ab2['countagentrejectretry'];this[_0x1985('0x12')]=_0x443ab2['queue'];this['calleridname']=_0x443ab2[_0x1985('0x13')];this[_0x1985('0x14')]=_0x443ab2['number'];this[_0x1985('0x15')]=_0x443ab2[_0x1985('0x15')];this[_0x1985('0x16')]=_0x443ab2[_0x1985('0x16')];this[_0x1985('0x17')]=_0x443ab2[_0x1985('0x16')];this[_0x1985('0x18')]=getSeconds(_0x443ab2[_0x1985('0x16')],_0x443ab2[_0x1985('0x15')]);this[_0x1985('0x19')]=0x0;this[_0x1985('0x1a')]=0x0;this[_0x1985('0x1b')]=_0x443ab2[_0x1985('0x1b')];this[_0x1985('0x1c')]=_0x443ab2[_0x1985('0x1c')];this[_0x1985('0x1d')]=_0x443ab2[_0x1985('0x1d')];this['recallme']=_0x443ab2[_0x1985('0x1e')];this['ContactId']=_0x443ab2[_0x1985('0x1f')];this[_0x1985('0x20')]=_0x443ab2[_0x1985('0x20')];this[_0x1985('0x21')]=_0x443ab2[_0x1985('0x21')];this[_0x1985('0x22')]=_0x443ab2['VoiceQueueId'];this[_0x1985('0x23')]=_0x443ab2[_0x1985('0x23')];this['originatecalleridnum']=_0x443ab2[_0x1985('0x24')]||'';this[_0x1985('0x25')]=_0x443ab2[_0x1985('0x25')]||'';}module[_0x1985('0x26')]=History; \ No newline at end of file diff --git a/server/services/ami/dialer/agentComplete.js b/server/services/ami/dialer/agentComplete.js index 3a99723..6e80b1f 100644 --- a/server/services/ami/dialer/agentComplete.js +++ b/server/services/ami/dialer/agentComplete.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4964=['starttime','responsetime','answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','queue','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','diff','statedesc','Answer','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','number'];(function(_0x54e8e7,_0x2a6e03){var _0x3af2c6=function(_0x264c48){while(--_0x264c48){_0x54e8e7['push'](_0x54e8e7['shift']());}};_0x3af2c6(++_0x2a6e03);}(_0x4964,0x9b));var _0x4496=function(_0x4a41d7,_0x50660b){_0x4a41d7=_0x4a41d7-0x0;var _0x345e83=_0x4964[_0x4a41d7];return _0x345e83;};'use strict';var util=require(_0x4496('0x0'));var _=require(_0x4496('0x1'));var moment=require('moment');function getSeconds(_0x2b2bbe,_0x2348b3){var _0x2e3241=moment(_0x2b2bbe)['milliseconds'](0x0);var _0x9747fa=moment(_0x2348b3)['milliseconds'](0x0);return _0x2e3241[_0x4496('0x2')](_0x9747fa,'seconds');}function AgentComplete(_0x468919,_0x342c57){this['state']=0x4;this[_0x4496('0x3')]=_0x4496('0x4');this[_0x4496('0x5')]=_0x468919[_0x4496('0x5')];this[_0x4496('0x6')]=_0x468919[_0x4496('0x6')];this[_0x4496('0x7')]=_0x468919[_0x4496('0x6')]==='outbound'?'queue':_0x468919[_0x4496('0x6')];this['countbusyretry']=_0x468919[_0x4496('0x8')];this[_0x4496('0x9')]=_0x468919[_0x4496('0x9')];this[_0x4496('0xa')]=_0x468919[_0x4496('0xa')];this[_0x4496('0xb')]=_0x468919[_0x4496('0x8')]+_0x468919[_0x4496('0x9')]+_0x468919['countnoanswerretry']+_0x468919[_0x4496('0xc')]+_0x468919[_0x4496('0xd')]+_0x468919[_0x4496('0xe')]+_0x468919[_0x4496('0xf')]+_0x468919['countagentrejectretry'];this[_0x4496('0xc')]=_0x468919[_0x4496('0xc')];this[_0x4496('0xd')]=_0x468919[_0x4496('0xd')];this[_0x4496('0xe')]=_0x468919[_0x4496('0xe')];this[_0x4496('0xf')]=_0x468919[_0x4496('0xf')];this[_0x4496('0x10')]=_0x468919[_0x4496('0x10')];this[_0x4496('0x11')]=_0x342c57[_0x4496('0x11')];this[_0x4496('0x12')]=_0x468919[_0x4496('0x13')];this['calleridnum']=_0x468919[_0x4496('0x14')];this[_0x4496('0x15')]=_0x468919[_0x4496('0x15')];this[_0x4496('0x16')]=_0x468919['responsetime'];this[_0x4496('0x17')]=_0x468919[_0x4496('0x17')];this[_0x4496('0x18')]=moment()[_0x4496('0x19')](_0x4496('0x1a'));this[_0x4496('0x1b')]=getSeconds(_0x468919[_0x4496('0x16')],_0x468919[_0x4496('0x15')]);this[_0x4496('0x1c')]=getSeconds(_0x468919['answertime'],_0x468919['responsetime']);this[_0x4496('0x1d')]=getSeconds(this[_0x4496('0x18')],_0x468919[_0x4496('0x17')]);this[_0x4496('0x1e')]=_0x342c57[_0x4496('0x1e')];this[_0x4496('0x1f')]=_0x342c57['membername'];this[_0x4496('0x20')]=_0x342c57[_0x4496('0x20')];this[_0x4496('0x21')]=_0x468919[_0x4496('0x21')];this['callbackuniqueid']=_0x468919[_0x4496('0x22')];this[_0x4496('0x23')]=_0x468919[_0x4496('0x23')];this[_0x4496('0x24')]=_0x468919['recallme'];this[_0x4496('0x25')]=_0x468919[_0x4496('0x25')];this[_0x4496('0x26')]=_0x468919[_0x4496('0x26')];this[_0x4496('0x27')]=_0x468919[_0x4496('0x27')];this[_0x4496('0x28')]=_0x468919[_0x4496('0x28')];this[_0x4496('0x29')]=_0x468919[_0x4496('0x29')];this[_0x4496('0x2a')]=_0x468919[_0x4496('0x2a')]||'';this['originatecalleridname']=_0x468919[_0x4496('0x2b')]||'';}module['exports']=AgentComplete; \ No newline at end of file +var _0xc65c=['answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridname','exports','util','milliseconds','diff','seconds','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countmachineretry','countagentrejectretry','countdropretry','countabandonedretry','uniqueid','name','calleridnum','number','starttime','responsetime'];(function(_0x413b73,_0x8f6b70){var _0xb830e1=function(_0x2457ca){while(--_0x2457ca){_0x413b73['push'](_0x413b73['shift']());}};_0xb830e1(++_0x8f6b70);}(_0xc65c,0x18c));var _0xcc65=function(_0x3be01c,_0x470941){_0x3be01c=_0x3be01c-0x0;var _0x5de780=_0xc65c[_0x3be01c];return _0x5de780;};'use strict';var util=require(_0xcc65('0x0'));var _=require('lodash');var moment=require('moment');function getSeconds(_0x4f63bb,_0x67e9b4){var _0x1b4f01=moment(_0x4f63bb)[_0xcc65('0x1')](0x0);var _0x52ba81=moment(_0x67e9b4)[_0xcc65('0x1')](0x0);return _0x1b4f01[_0xcc65('0x2')](_0x52ba81,_0xcc65('0x3'));}function AgentComplete(_0x350886,_0x3be348){this[_0xcc65('0x4')]=0x4;this[_0xcc65('0x5')]=_0xcc65('0x6');this[_0xcc65('0x7')]=_0x350886[_0xcc65('0x7')];this[_0xcc65('0x8')]=_0x350886[_0xcc65('0x8')];this[_0xcc65('0x9')]=_0x350886[_0xcc65('0x8')]===_0xcc65('0xa')?_0xcc65('0xb'):_0x350886[_0xcc65('0x8')];this['countbusyretry']=_0x350886[_0xcc65('0xc')];this[_0xcc65('0xd')]=_0x350886['countcongestionretry'];this[_0xcc65('0xe')]=_0x350886[_0xcc65('0xe')];this[_0xcc65('0xf')]=_0x350886[_0xcc65('0xc')]+_0x350886[_0xcc65('0xd')]+_0x350886[_0xcc65('0xe')]+_0x350886[_0xcc65('0x10')]+_0x350886['countdropretry']+_0x350886['countabandonedretry']+_0x350886[_0xcc65('0x11')]+_0x350886[_0xcc65('0x12')];this[_0xcc65('0x10')]=_0x350886[_0xcc65('0x10')];this[_0xcc65('0x13')]=_0x350886[_0xcc65('0x13')];this[_0xcc65('0x14')]=_0x350886[_0xcc65('0x14')];this[_0xcc65('0x11')]=_0x350886[_0xcc65('0x11')];this[_0xcc65('0x12')]=_0x350886[_0xcc65('0x12')];this[_0xcc65('0x15')]=_0x3be348[_0xcc65('0x15')];this['calleridname']=_0x350886[_0xcc65('0x16')];this[_0xcc65('0x17')]=_0x350886[_0xcc65('0x18')];this[_0xcc65('0x19')]=_0x350886[_0xcc65('0x19')];this['responsetime']=_0x350886[_0xcc65('0x1a')];this[_0xcc65('0x1b')]=_0x350886[_0xcc65('0x1b')];this[_0xcc65('0x1c')]=moment()[_0xcc65('0x1d')](_0xcc65('0x1e'));this[_0xcc65('0x1f')]=getSeconds(_0x350886[_0xcc65('0x1a')],_0x350886[_0xcc65('0x19')]);this[_0xcc65('0x20')]=getSeconds(_0x350886[_0xcc65('0x1b')],_0x350886[_0xcc65('0x1a')]);this[_0xcc65('0x21')]=getSeconds(this[_0xcc65('0x1c')],_0x350886[_0xcc65('0x1b')]);this['queue']=_0x3be348[_0xcc65('0xb')];this[_0xcc65('0x22')]=_0x3be348[_0xcc65('0x22')];this[_0xcc65('0x23')]=_0x3be348[_0xcc65('0x23')];this[_0xcc65('0x24')]=_0x350886['callback'];this['callbackuniqueid']=_0x350886[_0xcc65('0x25')];this[_0xcc65('0x26')]=_0x350886[_0xcc65('0x26')];this[_0xcc65('0x27')]=_0x350886[_0xcc65('0x27')];this[_0xcc65('0x28')]=_0x350886[_0xcc65('0x28')];this[_0xcc65('0x29')]=_0x350886[_0xcc65('0x29')];this[_0xcc65('0x2a')]=_0x350886['UserId'];this[_0xcc65('0x2b')]=_0x350886[_0xcc65('0x2b')];this[_0xcc65('0x2c')]=_0x350886['CampaignId'];this['originatecalleridnum']=_0x350886['originatecalleridnum']||'';this[_0xcc65('0x2d')]=_0x350886[_0xcc65('0x2d')]||'';}module[_0xcc65('0x2e')]=AgentComplete; \ No newline at end of file diff --git a/server/services/ami/dialer/final.js b/server/services/ami/dialer/final.js index e8aecf6..81481ea 100644 --- a/server/services/ami/dialer/final.js +++ b/server/services/ami/dialer/final.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9818=['countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry'];(function(_0x1f85fa,_0x197458){var _0x54b9aa=function(_0x23a99d){while(--_0x23a99d){_0x1f85fa['push'](_0x1f85fa['shift']());}};_0x54b9aa(++_0x197458);}(_0x9818,0x92));var _0x8981=function(_0x30c081,_0x4cd0a9){_0x30c081=_0x30c081-0x0;var _0xf9f26d=_0x9818[_0x30c081];return _0xf9f26d;};'use strict';var util=require(_0x8981('0x0'));var _=require(_0x8981('0x1'));var moment=require('moment');function getSeconds(_0x24dad3,_0x39c3ec){var _0x1b39a6=moment(_0x24dad3)[_0x8981('0x2')](0x0);var _0x321920=moment(_0x39c3ec)[_0x8981('0x2')](0x0);return _0x1b39a6[_0x8981('0x3')](_0x321920,_0x8981('0x4'));}function Final(_0x4b1b24){this[_0x8981('0x5')]=_0x4b1b24['uniqueid'];this[_0x8981('0x6')]=_0x4b1b24['scheduledat'];this[_0x8981('0x7')]=_0x4b1b24[_0x8981('0x7')];this[_0x8981('0x8')]=_0x4b1b24[_0x8981('0x7')]===_0x8981('0x9')?_0x8981('0xa'):_0x4b1b24[_0x8981('0x7')];this[_0x8981('0xb')]=_0x4b1b24[_0x8981('0xb')];this[_0x8981('0xc')]=_0x4b1b24[_0x8981('0xc')];this[_0x8981('0xd')]=_0x4b1b24[_0x8981('0xd')];this[_0x8981('0xe')]=_0x4b1b24['countbusyretry']+_0x4b1b24[_0x8981('0xc')]+_0x4b1b24[_0x8981('0xd')]+_0x4b1b24[_0x8981('0xf')]+_0x4b1b24[_0x8981('0x10')]+_0x4b1b24[_0x8981('0x11')]+_0x4b1b24['countmachineretry']+_0x4b1b24[_0x8981('0x12')];this[_0x8981('0xf')]=_0x4b1b24['countnosuchnumberretry'];this[_0x8981('0x10')]=_0x4b1b24[_0x8981('0x10')];this[_0x8981('0x11')]=_0x4b1b24[_0x8981('0x11')];this[_0x8981('0x13')]=_0x4b1b24[_0x8981('0x13')];this[_0x8981('0x12')]=_0x4b1b24[_0x8981('0x12')];this['queue']=_0x4b1b24[_0x8981('0xa')];this['calleridname']=_0x4b1b24[_0x8981('0x14')];this[_0x8981('0x15')]=_0x4b1b24['calleridnum'];this[_0x8981('0x16')]=_0x4b1b24[_0x8981('0x16')];this[_0x8981('0x17')]=_0x4b1b24[_0x8981('0x17')];this[_0x8981('0x18')]=_0x4b1b24[_0x8981('0x17')];this[_0x8981('0x19')]=_0x4b1b24[_0x8981('0x19')]||0x0;this[_0x8981('0x1a')]=_0x4b1b24['holdtime']||0x0;this['talktime']=_0x4b1b24[_0x8981('0x1b')]||0x0;this[_0x8981('0x1c')]=_0x4b1b24['callback'];this[_0x8981('0x1d')]=_0x4b1b24[_0x8981('0x1d')];this[_0x8981('0x1e')]=_0x4b1b24[_0x8981('0x1e')];this[_0x8981('0x1f')]=_0x4b1b24[_0x8981('0x1f')];this[_0x8981('0x20')]=_0x4b1b24[_0x8981('0x20')];this['ListId']=_0x4b1b24[_0x8981('0x21')];this[_0x8981('0x22')]=_0x4b1b24[_0x8981('0x22')];this[_0x8981('0x23')]=_0x4b1b24[_0x8981('0x23')];this[_0x8981('0x24')]=_0x4b1b24[_0x8981('0x24')];this[_0x8981('0x25')]=_0x4b1b24[_0x8981('0x25')]||'';this['originatecalleridname']=_0x4b1b24[_0x8981('0x26')]||'';}module[_0x8981('0x27')]=Final; \ No newline at end of file +var _0xd5d0=['campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','seconds','uniqueid','scheduledat','type'];(function(_0x135487,_0x59564f){var _0x2a768d=function(_0x63024d){while(--_0x63024d){_0x135487['push'](_0x135487['shift']());}};_0x2a768d(++_0x59564f);}(_0xd5d0,0x1cd));var _0x0d5d=function(_0x58622c,_0x10d530){_0x58622c=_0x58622c-0x0;var _0x2479a2=_0xd5d0[_0x58622c];return _0x2479a2;};'use strict';var util=require(_0x0d5d('0x0'));var _=require(_0x0d5d('0x1'));var moment=require('moment');function getSeconds(_0x19871c,_0x14a4ad){var _0x53a971=moment(_0x19871c)[_0x0d5d('0x2')](0x0);var _0x502365=moment(_0x14a4ad)['milliseconds'](0x0);return _0x53a971['diff'](_0x502365,_0x0d5d('0x3'));}function Final(_0x3d18ba){this[_0x0d5d('0x4')]=_0x3d18ba[_0x0d5d('0x4')];this[_0x0d5d('0x5')]=_0x3d18ba['scheduledat'];this['type']=_0x3d18ba[_0x0d5d('0x6')];this[_0x0d5d('0x7')]=_0x3d18ba[_0x0d5d('0x6')]===_0x0d5d('0x8')?'queue':_0x3d18ba[_0x0d5d('0x6')];this[_0x0d5d('0x9')]=_0x3d18ba[_0x0d5d('0x9')];this['countcongestionretry']=_0x3d18ba[_0x0d5d('0xa')];this[_0x0d5d('0xb')]=_0x3d18ba[_0x0d5d('0xb')];this[_0x0d5d('0xc')]=_0x3d18ba[_0x0d5d('0x9')]+_0x3d18ba[_0x0d5d('0xa')]+_0x3d18ba[_0x0d5d('0xb')]+_0x3d18ba[_0x0d5d('0xd')]+_0x3d18ba[_0x0d5d('0xe')]+_0x3d18ba[_0x0d5d('0xf')]+_0x3d18ba['countmachineretry']+_0x3d18ba[_0x0d5d('0x10')];this[_0x0d5d('0xd')]=_0x3d18ba[_0x0d5d('0xd')];this[_0x0d5d('0xe')]=_0x3d18ba[_0x0d5d('0xe')];this[_0x0d5d('0xf')]=_0x3d18ba['countabandonedretry'];this[_0x0d5d('0x11')]=_0x3d18ba[_0x0d5d('0x11')];this['countagentrejectretry']=_0x3d18ba[_0x0d5d('0x10')];this['queue']=_0x3d18ba[_0x0d5d('0x12')];this[_0x0d5d('0x13')]=_0x3d18ba['calleridname'];this[_0x0d5d('0x14')]=_0x3d18ba[_0x0d5d('0x14')];this[_0x0d5d('0x15')]=_0x3d18ba[_0x0d5d('0x15')];this['responsetime']=_0x3d18ba[_0x0d5d('0x16')];this[_0x0d5d('0x17')]=_0x3d18ba['responsetime'];this[_0x0d5d('0x18')]=_0x3d18ba['ringtime']||0x0;this[_0x0d5d('0x19')]=_0x3d18ba['holdtime']||0x0;this[_0x0d5d('0x1a')]=_0x3d18ba[_0x0d5d('0x1a')]||0x0;this['callback']=_0x3d18ba[_0x0d5d('0x1b')];this['callbackuniqueid']=_0x3d18ba[_0x0d5d('0x1c')];this[_0x0d5d('0x1d')]=_0x3d18ba['callbackat'];this[_0x0d5d('0x1e')]=_0x3d18ba[_0x0d5d('0x1e')];this[_0x0d5d('0x1f')]=_0x3d18ba['ContactId'];this['ListId']=_0x3d18ba[_0x0d5d('0x20')];this[_0x0d5d('0x21')]=_0x3d18ba[_0x0d5d('0x21')];this[_0x0d5d('0x22')]=_0x3d18ba['VoiceQueueId'];this[_0x0d5d('0x23')]=_0x3d18ba['CampaignId'];this[_0x0d5d('0x24')]=_0x3d18ba[_0x0d5d('0x24')]||'';this[_0x0d5d('0x25')]=_0x3d18ba[_0x0d5d('0x25')]||'';}module[_0x0d5d('0x26')]=Final; \ No newline at end of file diff --git a/server/services/ami/dialer/hangup.js b/server/services/ami/dialer/hangup.js index 9f52861..1ab9af0 100644 --- a/server/services/ami/dialer/hangup.js +++ b/server/services/ami/dialer/hangup.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2b15=['countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countmachineretry','countdropretry','countabandonedretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','talktime','membername','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','lodash','moment','milliseconds','diff','seconds','state','statedesc','Answer','scheduledat','type','outbound','queue'];(function(_0x1e7563,_0x2ad814){var _0x974cae=function(_0x1041c2){while(--_0x1041c2){_0x1e7563['push'](_0x1e7563['shift']());}};_0x974cae(++_0x2ad814);}(_0x2b15,0xa8));var _0x52b1=function(_0x5f5512,_0x4e17fe){_0x5f5512=_0x5f5512-0x0;var _0x11a869=_0x2b15[_0x5f5512];return _0x11a869;};'use strict';var util=require('util');var _=require(_0x52b1('0x0'));var moment=require(_0x52b1('0x1'));function getSeconds(_0x490317,_0x365310){var _0x397a3c=moment(_0x490317)[_0x52b1('0x2')](0x0);var _0x20fa5c=moment(_0x365310)['milliseconds'](0x0);return _0x397a3c[_0x52b1('0x3')](_0x20fa5c,_0x52b1('0x4'));}function Hangup(_0x8acad6,_0x10961c){this[_0x52b1('0x5')]=0x4;this[_0x52b1('0x6')]=_0x52b1('0x7');this[_0x52b1('0x8')]=_0x8acad6[_0x52b1('0x8')];this[_0x52b1('0x9')]=_0x8acad6[_0x52b1('0x9')];this['campaigntype']=_0x8acad6[_0x52b1('0x9')]===_0x52b1('0xa')?_0x52b1('0xb'):_0x8acad6[_0x52b1('0x9')];this[_0x52b1('0xc')]=_0x8acad6[_0x52b1('0xc')];this[_0x52b1('0xd')]=_0x8acad6['countcongestionretry'];this[_0x52b1('0xe')]=_0x8acad6[_0x52b1('0xe')];this[_0x52b1('0xf')]=_0x8acad6['countbusyretry']+_0x8acad6[_0x52b1('0xd')]+_0x8acad6['countnoanswerretry']+_0x8acad6[_0x52b1('0x10')]+_0x8acad6['countdropretry']+_0x8acad6['countabandonedretry']+_0x8acad6[_0x52b1('0x11')]+_0x8acad6['countagentrejectretry'];this['countnosuchnumberretry']=_0x8acad6[_0x52b1('0x10')];this['countdropretry']=_0x8acad6[_0x52b1('0x12')];this[_0x52b1('0x13')]=_0x8acad6['countabandonedretry'];this[_0x52b1('0x11')]=_0x8acad6[_0x52b1('0x11')];this['countagentrejectretry']=_0x8acad6['countagentrejectretry'];this[_0x52b1('0x14')]=_0x10961c[_0x52b1('0x14')];this[_0x52b1('0x15')]=_0x8acad6[_0x52b1('0x16')];this[_0x52b1('0x17')]=_0x8acad6[_0x52b1('0x18')];this['starttime']=_0x8acad6[_0x52b1('0x19')];this[_0x52b1('0x1a')]=_0x8acad6['responsetime'];this[_0x52b1('0x1b')]=moment()[_0x52b1('0x1c')](_0x52b1('0x1d'));this[_0x52b1('0x1e')]=getSeconds(_0x8acad6[_0x52b1('0x1a')],_0x8acad6[_0x52b1('0x19')]);this['holdtime']=0x0;this[_0x52b1('0x1f')]=getSeconds(this[_0x52b1('0x1b')],_0x8acad6[_0x52b1('0x1a')]);this[_0x52b1('0xb')]=_0x8acad6[_0x52b1('0xb')];this[_0x52b1('0x20')]='IVR';this[_0x52b1('0x21')]=_0x10961c[_0x52b1('0x22')];this[_0x52b1('0x23')]=_0x8acad6[_0x52b1('0x23')];this[_0x52b1('0x24')]=_0x8acad6[_0x52b1('0x24')];this[_0x52b1('0x25')]=_0x8acad6[_0x52b1('0x25')];this['recallme']=_0x8acad6[_0x52b1('0x26')];this[_0x52b1('0x27')]=_0x8acad6[_0x52b1('0x27')];this[_0x52b1('0x28')]=_0x8acad6[_0x52b1('0x28')];this[_0x52b1('0x29')]=_0x8acad6[_0x52b1('0x29')];this[_0x52b1('0x2a')]=_0x8acad6[_0x52b1('0x2a')];this['CampaignId']=_0x8acad6[_0x52b1('0x2b')];}module[_0x52b1('0x2c')]=Hangup; \ No newline at end of file +var _0xa56c=['util','moment','milliseconds','diff','state','statedesc','Answer','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','countabandonedretry','uniqueid','name','calleridnum','number','starttime','responsetime','endtime','format','ringtime','holdtime','talktime','queue','membername','IVR','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports'];(function(_0x2bec40,_0x2830a0){var _0x3ad43f=function(_0x4b4225){while(--_0x4b4225){_0x2bec40['push'](_0x2bec40['shift']());}};_0x3ad43f(++_0x2830a0);}(_0xa56c,0x1b8));var _0xca56=function(_0x45b034,_0x3a57dd){_0x45b034=_0x45b034-0x0;var _0x509cb0=_0xa56c[_0x45b034];return _0x509cb0;};'use strict';var util=require(_0xca56('0x0'));var _=require('lodash');var moment=require(_0xca56('0x1'));function getSeconds(_0x5a181c,_0x1b248e){var _0x4ffb56=moment(_0x5a181c)[_0xca56('0x2')](0x0);var _0x4dd416=moment(_0x1b248e)['milliseconds'](0x0);return _0x4ffb56[_0xca56('0x3')](_0x4dd416,'seconds');}function Hangup(_0x40bd67,_0x48103e){this[_0xca56('0x4')]=0x4;this[_0xca56('0x5')]=_0xca56('0x6');this['scheduledat']=_0x40bd67['scheduledat'];this['type']=_0x40bd67[_0xca56('0x7')];this[_0xca56('0x8')]=_0x40bd67['type']===_0xca56('0x9')?'queue':_0x40bd67[_0xca56('0x7')];this[_0xca56('0xa')]=_0x40bd67[_0xca56('0xa')];this[_0xca56('0xb')]=_0x40bd67[_0xca56('0xb')];this['countnoanswerretry']=_0x40bd67[_0xca56('0xc')];this[_0xca56('0xd')]=_0x40bd67['countbusyretry']+_0x40bd67[_0xca56('0xb')]+_0x40bd67['countnoanswerretry']+_0x40bd67['countnosuchnumberretry']+_0x40bd67['countdropretry']+_0x40bd67['countabandonedretry']+_0x40bd67[_0xca56('0xe')]+_0x40bd67[_0xca56('0xf')];this[_0xca56('0x10')]=_0x40bd67[_0xca56('0x10')];this[_0xca56('0x11')]=_0x40bd67[_0xca56('0x11')];this[_0xca56('0x12')]=_0x40bd67[_0xca56('0x12')];this[_0xca56('0xe')]=_0x40bd67[_0xca56('0xe')];this[_0xca56('0xf')]=_0x40bd67[_0xca56('0xf')];this['uniqueid']=_0x48103e[_0xca56('0x13')];this['calleridname']=_0x40bd67[_0xca56('0x14')];this[_0xca56('0x15')]=_0x40bd67[_0xca56('0x16')];this[_0xca56('0x17')]=_0x40bd67['starttime'];this[_0xca56('0x18')]=_0x40bd67[_0xca56('0x18')];this[_0xca56('0x19')]=moment()[_0xca56('0x1a')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xca56('0x1b')]=getSeconds(_0x40bd67['responsetime'],_0x40bd67[_0xca56('0x17')]);this[_0xca56('0x1c')]=0x0;this[_0xca56('0x1d')]=getSeconds(this[_0xca56('0x19')],_0x40bd67['responsetime']);this[_0xca56('0x1e')]=_0x40bd67[_0xca56('0x1e')];this[_0xca56('0x1f')]=_0xca56('0x20');this['reason']=_0x48103e[_0xca56('0x21')];this[_0xca56('0x22')]=_0x40bd67[_0xca56('0x22')];this[_0xca56('0x23')]=_0x40bd67[_0xca56('0x23')];this[_0xca56('0x24')]=_0x40bd67[_0xca56('0x24')];this[_0xca56('0x25')]=_0x40bd67[_0xca56('0x25')];this[_0xca56('0x26')]=_0x40bd67[_0xca56('0x26')];this[_0xca56('0x27')]=_0x40bd67[_0xca56('0x27')];this[_0xca56('0x28')]=_0x40bd67[_0xca56('0x28')];this[_0xca56('0x29')]=_0x40bd67[_0xca56('0x29')];this[_0xca56('0x2a')]=_0x40bd67['CampaignId'];}module[_0xca56('0x2b')]=Hangup; \ No newline at end of file diff --git a/server/services/ami/dialer/history.js b/server/services/ami/dialer/history.js index 8b152fe..1a9f917 100644 --- a/server/services/ami/dialer/history.js +++ b/server/services/ami/dialer/history.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fd4=['UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','calleridname','number','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId'];(function(_0x22bdd3,_0x552e50){var _0x44d9d9=function(_0x2b4ab9){while(--_0x2b4ab9){_0x22bdd3['push'](_0x22bdd3['shift']());}};_0x44d9d9(++_0x552e50);}(_0x7fd4,0x117));var _0x47fd=function(_0x40822a,_0x582b60){_0x40822a=_0x40822a-0x0;var _0x357420=_0x7fd4[_0x40822a];return _0x357420;};'use strict';var util=require(_0x47fd('0x0'));var _=require(_0x47fd('0x1'));var moment=require('moment');function getSeconds(_0x849953,_0x45f820){var _0xddab3e=moment(_0x849953)[_0x47fd('0x2')](0x0);var _0x1bb7a0=moment(_0x45f820)[_0x47fd('0x2')](0x0);return _0xddab3e['diff'](_0x1bb7a0,_0x47fd('0x3'));}function History(_0x956a04){this[_0x47fd('0x4')]=_0x956a04[_0x47fd('0x4')];this[_0x47fd('0x5')]=_0x956a04[_0x47fd('0x5')]||undefined;this[_0x47fd('0x6')]=_0x956a04[_0x47fd('0x6')];this[_0x47fd('0x7')]=_0x956a04['type']===_0x47fd('0x8')?_0x47fd('0x9'):_0x956a04[_0x47fd('0x6')];this[_0x47fd('0xa')]=_0x956a04[_0x47fd('0xa')];this[_0x47fd('0xb')]=_0x956a04[_0x47fd('0xb')];this[_0x47fd('0xc')]=_0x956a04[_0x47fd('0xc')];this[_0x47fd('0xd')]=_0x956a04['countbusyretry']+_0x956a04[_0x47fd('0xb')]+_0x956a04[_0x47fd('0xc')]+_0x956a04[_0x47fd('0xe')]+_0x956a04['countdropretry']+_0x956a04[_0x47fd('0xf')]+_0x956a04[_0x47fd('0x10')]+_0x956a04[_0x47fd('0x11')];this[_0x47fd('0xe')]=_0x956a04[_0x47fd('0xe')];this[_0x47fd('0x12')]=_0x956a04[_0x47fd('0x12')];this[_0x47fd('0xf')]=_0x956a04[_0x47fd('0xf')];this[_0x47fd('0x10')]=_0x956a04['countmachineretry'];this[_0x47fd('0x11')]=_0x956a04[_0x47fd('0x11')];this[_0x47fd('0x9')]=_0x956a04[_0x47fd('0x9')];this[_0x47fd('0x13')]=_0x956a04['name'];this['calleridnum']=_0x956a04[_0x47fd('0x14')];this['starttime']=_0x956a04[_0x47fd('0x15')];this[_0x47fd('0x16')]=_0x956a04[_0x47fd('0x16')];this[_0x47fd('0x17')]=_0x956a04[_0x47fd('0x16')];this[_0x47fd('0x18')]=getSeconds(_0x956a04['responsetime'],_0x956a04[_0x47fd('0x15')]);this[_0x47fd('0x19')]=0x0;this[_0x47fd('0x1a')]=0x0;this[_0x47fd('0x1b')]=_0x956a04[_0x47fd('0x1b')];this[_0x47fd('0x1c')]=_0x956a04[_0x47fd('0x1c')];this[_0x47fd('0x1d')]=_0x956a04[_0x47fd('0x1d')];this['recallme']=_0x956a04[_0x47fd('0x1e')];this[_0x47fd('0x1f')]=_0x956a04[_0x47fd('0x1f')];this[_0x47fd('0x20')]=_0x956a04[_0x47fd('0x20')];this['UserId']=_0x956a04[_0x47fd('0x21')];this[_0x47fd('0x22')]=_0x956a04[_0x47fd('0x22')];this[_0x47fd('0x23')]=_0x956a04['CampaignId'];this[_0x47fd('0x24')]=_0x956a04[_0x47fd('0x24')]||'';this[_0x47fd('0x25')]=_0x956a04[_0x47fd('0x25')]||'';}module[_0x47fd('0x26')]=History; \ No newline at end of file +var _0xd2b8=['countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','calleridname','name','calleridnum','starttime','responsetime','holdtime','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','moment','diff','seconds','uniqueid','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry'];(function(_0x5cc450,_0xbc6fa8){var _0x781ec6=function(_0x3f772b){while(--_0x3f772b){_0x5cc450['push'](_0x5cc450['shift']());}};_0x781ec6(++_0xbc6fa8);}(_0xd2b8,0x7e));var _0x8d2b=function(_0x4a879e,_0x5b503c){_0x4a879e=_0x4a879e-0x0;var _0x54b31a=_0xd2b8[_0x4a879e];return _0x54b31a;};'use strict';var util=require(_0x8d2b('0x0'));var _=require('lodash');var moment=require(_0x8d2b('0x1'));function getSeconds(_0x35885c,_0x3fc3d3){var _0x35eedb=moment(_0x35885c)['milliseconds'](0x0);var _0x2a6e0e=moment(_0x3fc3d3)['milliseconds'](0x0);return _0x35eedb[_0x8d2b('0x2')](_0x2a6e0e,_0x8d2b('0x3'));}function History(_0x14f0fd){this['uniqueid']=_0x14f0fd[_0x8d2b('0x4')];this[_0x8d2b('0x5')]=_0x14f0fd[_0x8d2b('0x5')]||undefined;this['type']=_0x14f0fd[_0x8d2b('0x6')];this['campaigntype']=_0x14f0fd[_0x8d2b('0x6')]===_0x8d2b('0x7')?_0x8d2b('0x8'):_0x14f0fd[_0x8d2b('0x6')];this[_0x8d2b('0x9')]=_0x14f0fd['countbusyretry'];this[_0x8d2b('0xa')]=_0x14f0fd[_0x8d2b('0xa')];this[_0x8d2b('0xb')]=_0x14f0fd[_0x8d2b('0xb')];this[_0x8d2b('0xc')]=_0x14f0fd['countbusyretry']+_0x14f0fd[_0x8d2b('0xa')]+_0x14f0fd['countnoanswerretry']+_0x14f0fd[_0x8d2b('0xd')]+_0x14f0fd[_0x8d2b('0xe')]+_0x14f0fd[_0x8d2b('0xf')]+_0x14f0fd['countmachineretry']+_0x14f0fd[_0x8d2b('0x10')];this[_0x8d2b('0xd')]=_0x14f0fd['countnosuchnumberretry'];this[_0x8d2b('0xe')]=_0x14f0fd[_0x8d2b('0xe')];this['countabandonedretry']=_0x14f0fd['countabandonedretry'];this[_0x8d2b('0x11')]=_0x14f0fd[_0x8d2b('0x11')];this['countagentrejectretry']=_0x14f0fd[_0x8d2b('0x10')];this[_0x8d2b('0x8')]=_0x14f0fd[_0x8d2b('0x8')];this[_0x8d2b('0x12')]=_0x14f0fd[_0x8d2b('0x13')];this[_0x8d2b('0x14')]=_0x14f0fd['number'];this[_0x8d2b('0x15')]=_0x14f0fd['starttime'];this[_0x8d2b('0x16')]=_0x14f0fd[_0x8d2b('0x16')];this['endtime']=_0x14f0fd[_0x8d2b('0x16')];this['ringtime']=getSeconds(_0x14f0fd[_0x8d2b('0x16')],_0x14f0fd[_0x8d2b('0x15')]);this[_0x8d2b('0x17')]=0x0;this['talktime']=0x0;this[_0x8d2b('0x18')]=_0x14f0fd[_0x8d2b('0x18')];this['callbackuniqueid']=_0x14f0fd[_0x8d2b('0x19')];this[_0x8d2b('0x1a')]=_0x14f0fd['callbackat'];this[_0x8d2b('0x1b')]=_0x14f0fd[_0x8d2b('0x1b')];this[_0x8d2b('0x1c')]=_0x14f0fd['ContactId'];this['ListId']=_0x14f0fd['ListId'];this[_0x8d2b('0x1d')]=_0x14f0fd[_0x8d2b('0x1d')];this[_0x8d2b('0x1e')]=_0x14f0fd[_0x8d2b('0x1e')];this['CampaignId']=_0x14f0fd[_0x8d2b('0x1f')];this[_0x8d2b('0x20')]=_0x14f0fd[_0x8d2b('0x20')]||'';this[_0x8d2b('0x21')]=_0x14f0fd[_0x8d2b('0x21')]||'';}module[_0x8d2b('0x22')]=History; \ No newline at end of file diff --git a/server/services/ami/dialer/index.js b/server/services/ami/dialer/index.js index 0cca549..80f8184 100644 --- a/server/services/ami/dialer/index.js +++ b/server/services/ami/dialer/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8bc9=['dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialDropMaxRetry','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','NoAnswer','custom:agentnoanswer','buildObj','noanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','custom:agentbusy','[syncAgentComplete][createHistory][5]','dialBusyMaxRetry','reason\x205\x20busy','Congestion','congestion','checkRetriveMax','dialCongestionMaxRetry','reason\x208\x20congestion','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','round','predictiveIntervalMaxThreshold','predictiveIntervalAvailable','predictiveIntervalMinThreshold','floor','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','dialPredictiveInterval','startMethodPredictive','recalculate\x20predictive\x20at','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','getDataPredictive','abandonmentRate','agentBusyFactor','dialPredictiveOptimizationPercentage','busyFactor','Unknown\x20Predictive','[getDataPredictive]','check\x20failure','getDataPredictiveOld','outboundQueuePauses','[CatchErlangB]','predictiveIntervalAnsweredCalls','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','scheduledat','Agent','[rescheduleContact][dialRecallInQueue]','RECALLINQUEUE','RecallInQueue','RECALLFAILEDTIMEOUT','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','temp','[getContactCampaign2][Empty]','ivrTotalCallsDays','[actionOriginate]\x20','Contact.phone','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','dialOrderByScheduledAt','ACTIVE','RUNNING','tryOriginatePredictive','not_inuse','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','exports','lodash','uuid','moment','md5','../preview/util/util','../../../config/environment/','dialer','../../../config/logger','booked','predictive','predictiveCalls','syncQueueSummary','../ami','defaults','localhost','redis','../rpc/cmHopperBlack','../rpc/voiceQueueRt','./action','./history','./final','./agentComplete','./queueCallerAbandon','./hangup','env','127.0.0.1','rrmemory','enqueue','tail','finally','sequence','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncOriginateResponse','agentcomplete','hangup','syncHangup','newexten','syncNewExten','syncVarSet','queuemember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','isUndefined','message','AGENTS_NOT_LOGGED','name','NOT_ACTIVE','\x20NOT\x20Active','Interval','\x20INTERVAL_IS_NULL','Intervals','INTERVAL_IS_NULL','isEmpty','[ifTime][Action]','Error','stringify','seconds','emit','type','outbound','strategy','answered','available','loggedIn','pTalking','sumBillable','sumDuration','sumHoldTime','talking','total','abandoned','waiting','loggedInDb','dialActive','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundReCallsDay','outboundRejectCallsDay','predictiveIntervalDroppedCallsTimeout','predictiveIntervalHitRate','predictiveIntervalPauses','predictiveIntervalTotalCalls','originated','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','active','voice:queue:%s','voice_queue:save','ivr','format','campaign:ivr:%s','campaign:save','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','milliseconds','diff','clearing\x20variable\x20start\x20progressive','handlePredictive','clearing\x20variable\x20handle\x20predictive','preview','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','inspect','stack','undefined','[decremetOriginate]\x20is\x20null\x20or\x20undefined','[getContactDialer2][ReScheduled]','contactsRescheduled','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','IS_DISACTIVED','state','endtime','prototype','clearZombieChannels','uniqueId','[uniqueid]','isNil','catch','No\x20such\x20channel','updateOriginated','queue','[Dialer][checkChannel]','countReScheduled','resolve','[countReScheduled]\x20','checkIsBlackList','then','[checkIsBlackList]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','unlockContact','[unlockContact]\x20','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[updateOriginated]\x20object\x20originated\x20is\x20negative','loggerHandler','emptyContact','notFound','saveInDb','ContactId','ListId','UserId','CampaignId','[emptyContact][createHistory]','[emptyContact]','Success','isTrunkReachable','status','reachable','SIP/%s','unmonitored','uniqueid','variable','amdstatus','exten','dialAMDActive','value','HANGUP','statedesc','HangupInAMD','[syncHangupInAMD]','MACHINE','Machine','countmachineretry','countglobal','amd','countbusyretry','countcongestionretry','countdropretry','countabandonedretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','add','dialMachineRetryFrequency','minutes','YYYY-MM-DD\x20HH:mm:ss','[rescheduleContact][Machine]','AMD','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','membername','countnoanswerretry','countnosuchnumberretry','VoiceQueueId','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','cause-txt','Unknow','syncAgentComplete','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','[syncAgentComplete]','answertime','[syncAgentComplete][createHistory]','[syncQueueCallerAbandon]\x20[Drop]','syncQueueCallerAbandon','droptime','dialQueueTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','TIMEOUT','dialDropRetryFrequency','[rescheduleContact][Drop]','starttime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','predictiveIntervalDroppedCallsCallersExit','Abandoned','dropreason','CALLEREXIT','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','[syncAgentComplete][createHistory][11]','channel','syncQueueMember','actionid','roundrobin','locked','paused','stateinterface','push','pick','idHopper','[unlockQueueStatus][undefined]','queueStatusComplete','[booked][unlockQueueStatus]','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','length','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','TrunkBackup','TRUNK_IS_NOT_REACHABLE','checkIfTime','ifTime','checkIfTimeIntervals','Failure','\x20Intervals\x20is\x20null\x20','timezones','\x20Timezone\x20unknow\x20','isArray','Action','command','interval','content','indexOf','true','iftime\x20%s,%s','all','some','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','progressive','handlePower','power','dialPowerLevel','Queue','handleIvr','dialMethod','checkIsTrunkReachable','dialGlobalInterval','dialTimezone','syncCampaigns','launchHandleIvr','pow','match','actionOriginate','object','voiceQueue\x20is\x20undefine','Contact','phone','originate','contact\x20is\x20undefine','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialQueueOptions','getCaller','xcally-motion-dialer','dialAMDInitialSilence','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','tags','createdAt','updatedAt','%s%s','XMD-','toUpper','dialRandomLastDigitCallerIdNumber','callerid','XMD-ORIGINATECALLERIDNAME','originatecalleridname','originatecalleridnum','SIP/%s/%s%s','trim','dialCutDigit','substring','from-sip','outboundOriginateFailureCallsDay','[originate][error]','responsetime','getQueue','response','callProgressDetecting'];(function(_0x11e1b5,_0x170d84){var _0x9bd7c1=function(_0x3f728a){while(--_0x3f728a){_0x11e1b5['push'](_0x11e1b5['shift']());}};_0x9bd7c1(++_0x170d84);}(_0x8bc9,0x89));var _0x98bc=function(_0x57a379,_0x4424d5){_0x57a379=_0x57a379-0x0;var _0x39bb1f=_0x8bc9[_0x57a379];return _0x39bb1f;};'use strict';var util=require('util');var _=require(_0x98bc('0x0'));var BPromise=require('bluebird');var uuid=require(_0x98bc('0x1'));var moment=require(_0x98bc('0x2'));var rr=require('rr');var md5=require(_0x98bc('0x3'));var Redis=require('ioredis');var ut=require(_0x98bc('0x4'));var config=require(_0x98bc('0x5'));var logger=require('../../../config/logger')(_0x98bc('0x6'));var loggerBooked=require(_0x98bc('0x7'))(_0x98bc('0x8'));var loggerPredictive=require(_0x98bc('0x7'))(_0x98bc('0x9'));var loggerPredictiveCalls=require(_0x98bc('0x7'))(_0x98bc('0xa'));var loggerSyncQueueSummary=require('../../../config/logger')(_0x98bc('0xb'));var ami=require(_0x98bc('0xc'));config['redis']=_[_0x98bc('0xd')](config['redis'],{'host':_0x98bc('0xe'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x98bc('0xf')]));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require(_0x98bc('0x10'));var voiceQueueRt=require(_0x98bc('0x11'));var Action=require(_0x98bc('0x12'));var History=require(_0x98bc('0x13'));var Final=require(_0x98bc('0x14'));var AgentComplete=require(_0x98bc('0x15'));var QueueCallerAbandon=require(_0x98bc('0x16'));var Hangup=require(_0x98bc('0x17'));var ipAgi=process[_0x98bc('0x18')]['XCALLY_IP_AGI']||_0x98bc('0x19');var strategy={'rrmemory':_0x98bc('0x1a'),'roundrobin':'roundrobin'};var Sequence=function(){};Sequence['prototype'][_0x98bc('0x1b')]=function(_0x4279b4){this['tail']=this['tail']?this[_0x98bc('0x1c')][_0x98bc('0x1d')](_0x4279b4):_0x4279b4();};function Dialer(_0x2f9595,_0x59b55a){this[_0x98bc('0x1e')]=new Sequence();this['preview']=_0x59b55a;this[_0x98bc('0x1f')]=_0x2f9595[_0x98bc('0x1f')];this[_0x98bc('0x20')]=_0x2f9595['campaigns'];this['agents']=_0x2f9595[_0x98bc('0x21')];this['trunks']=_0x2f9595[_0x98bc('0x22')];this[_0x98bc('0x23')]=config[_0x98bc('0x23')]||0x2;this[_0x98bc('0x24')]={};this[_0x98bc('0x25')]={};this[_0x98bc('0x26')]={};this['uniqueId']={};this[_0x98bc('0x27')]={};this[_0x98bc('0x28')]={};this[_0x98bc('0x29')]={};this[_0x98bc('0x2a')]={};this[_0x98bc('0x2b')]={};this[_0x98bc('0x2c')]={};ami['on'](_0x98bc('0x2d'),this[_0x98bc('0x2e')][_0x98bc('0x2f')](this));ami['on'](_0x98bc('0x30'),this['syncQueueCallerAbandon']['bind'](this));ami['on']('originateresponse',this[_0x98bc('0x31')][_0x98bc('0x2f')](this));ami['on'](_0x98bc('0x32'),this['syncAgentComplete']['bind'](this));ami['on']('custom:queuesummary',this[_0x98bc('0xb')][_0x98bc('0x2f')](this));ami['on'](_0x98bc('0x33'),this[_0x98bc('0x34')]['bind'](this));ami['on'](_0x98bc('0x35'),this[_0x98bc('0x36')][_0x98bc('0x2f')](this));ami['on']('varset',this[_0x98bc('0x37')]['bind'](this));ami['on'](_0x98bc('0x38'),this['syncQueueMember'][_0x98bc('0x2f')](this));ami['on'](_0x98bc('0x39'),this[_0x98bc('0x3a')][_0x98bc('0x2f')](this));this[_0x98bc('0x3b')]();this[_0x98bc('0x3c')]();}function isNotNull(_0x1a2232){return _0x1a2232!==null&&!_[_0x98bc('0x3d')](_0x1a2232);}function checkIsLoggedIn(_0x249967,_0x495a18){return function(){if(_0x495a18<=0x0){_0x249967[_0x98bc('0x3e')]=_0x98bc('0x3f');throw _0x249967[_0x98bc('0x40')]+'\x20AGENTS\x20NOT\x20LOGGED';}};}function isActive(_0x4386bf){return _0x4386bf;}function checkIsActive(_0x329068,_0x11b0ed){return function(){if(!isActive(_0x11b0ed)){_0x329068['message']=_0x98bc('0x41');throw _0x329068['name']+_0x98bc('0x42');}};}function checkInterval(_0x5607cc){return function(){if(!isNotNull(_0x5607cc[_0x98bc('0x43')])){_0x5607cc[_0x98bc('0x3e')]='INTERVAL_IS_NULL';throw _0x5607cc['name']+_0x98bc('0x44');}if(!isNotNull(_0x5607cc[_0x98bc('0x43')][_0x98bc('0x45')])){_0x5607cc[_0x98bc('0x3e')]=_0x98bc('0x46');throw _0x5607cc[_0x98bc('0x40')]+_0x98bc('0x44');}if(!isNotNull(_[_0x98bc('0x47')](_0x5607cc[_0x98bc('0x43')][_0x98bc('0x45')]))){_0x5607cc['message']=_0x98bc('0x46');throw _0x5607cc['name']+_0x98bc('0x44');}};}function msgResponse(_0x23e3ae,_0x21e4eb,_0x28a7e3){return{'action':_0x23e3ae,'response':_0x21e4eb,'message':_0x28a7e3,'stack':_0x28a7e3};}function myreject(_0x2eb670){return function(_0x5adcfb){return _0x2eb670(msgResponse(_0x98bc('0x48'),_0x98bc('0x49'),JSON[_0x98bc('0x4a')](_0x5adcfb)));};}function getSeconds(_0xcfb0fa,_0x46aa5f){var _0x2eb12b=moment(_0xcfb0fa)['milliseconds'](0x0);var _0xa7ef1d=moment(_0x46aa5f)['milliseconds'](0x0);return _0x2eb12b['diff'](_0xa7ef1d,_0x98bc('0x4b'));}function emit(_0x381c13,_0x552e89,_0x22d324){io['to'](_0x381c13)[_0x98bc('0x4c')](_0x552e89,_0x22d324);}function emitVoiceQueueSummary(_0x1096ed){if(_0x1096ed[_0x98bc('0x4d')]===_0x98bc('0x4e')){var _0x2552d7={'id':_0x1096ed['id'],'name':_0x1096ed[_0x98bc('0x40')],'strategy':_0x1096ed[_0x98bc('0x4f')],'answered':_0x1096ed[_0x98bc('0x50')],'available':_0x1096ed[_0x98bc('0x51')],'loggedIn':_0x1096ed[_0x98bc('0x52')],'pTalking':_0x1096ed[_0x98bc('0x53')],'sumBillable':_0x1096ed[_0x98bc('0x54')],'sumDuration':_0x1096ed[_0x98bc('0x55')],'sumHoldTime':_0x1096ed[_0x98bc('0x56')]||0x0,'talking':_0x1096ed[_0x98bc('0x57')],'total':_0x1096ed[_0x98bc('0x58')],'type':_0x1096ed[_0x98bc('0x4d')],'unmanaged':_0x1096ed['unmanaged'],'abandoned':_0x1096ed[_0x98bc('0x59')],'waiting':_0x1096ed[_0x98bc('0x5a')],'loggedInDb':_0x1096ed[_0x98bc('0x5b')],'dialActive':_0x1096ed[_0x98bc('0x5c')],'dialMethod':_0x1096ed['dialMethod'],'dialOriginateCallerIdName':_0x1096ed[_0x98bc('0x5d')],'dialOriginateCallerIdNumber':_0x1096ed[_0x98bc('0x5e')],'dialOriginateTimeout':_0x1096ed[_0x98bc('0x5f')],'dialPrefix':_0x1096ed[_0x98bc('0x60')],'outboundAnswerAgiCallsDay':_0x1096ed[_0x98bc('0x61')],'outboundAnswerCallsDay':_0x1096ed[_0x98bc('0x62')],'outboundBlacklistCallsDay':_0x1096ed[_0x98bc('0x63')],'outboundBusyCallsDay':_0x1096ed['outboundBusyCallsDay'],'outboundCongestionCallsDay':_0x1096ed[_0x98bc('0x64')],'outboundDropCallsDayACS':_0x1096ed[_0x98bc('0x65')],'outboundDropCallsDayCallersExit':_0x1096ed[_0x98bc('0x66')],'outboundDropCallsDayTimeout':_0x1096ed[_0x98bc('0x67')],'outboundNoAnswerCallsDay':_0x1096ed[_0x98bc('0x68')],'outboundNoSuchCallsDay':_0x1096ed['outboundNoSuchCallsDay'],'outboundOriginateFailureCallsDay':_0x1096ed['outboundOriginateFailureCallsDay'],'outboundReCallsDay':_0x1096ed[_0x98bc('0x69')],'outboundRejectCallsDay':_0x1096ed[_0x98bc('0x6a')],'outboundUnknownCallsDay':_0x1096ed['outboundUnknownCallsDay'],'predictiveIntervalAnsweredCalls':_0x1096ed['predictiveIntervalAnsweredCalls'],'predictiveIntervalAvgHoldtime':_0x1096ed['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x1096ed['predictiveIntervalAvgTalktime'],'predictiveIntervalDroppedCallsCallersExit':_0x1096ed['predictiveIntervalDroppedCallsCallersExit'],'predictiveIntervalDroppedCallsTimeout':_0x1096ed[_0x98bc('0x6b')],'predictiveIntervalErlangCalls':_0x1096ed['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x1096ed['predictiveIntervalErlangCallsDroppedCalls'],'predictiveIntervalHitRate':_0x1096ed[_0x98bc('0x6c')],'predictiveIntervalMultiplicativeFactor':_0x1096ed['predictiveIntervalMultiplicativeFactor'],'predictiveIntervalPauses':_0x1096ed[_0x98bc('0x6d')],'predictiveIntervalAvailable':_0x1096ed['predictiveIntervalAvailable'],'predictiveIntervalTotalCalls':_0x1096ed[_0x98bc('0x6e')],'message':_0x1096ed[_0x98bc('0x3e')],'originated':_0x1096ed[_0x98bc('0x6f')],'erlangCalls':_0x1096ed['erlangCalls'],'erlangCallToSecond':_0x1096ed[_0x98bc('0x70')],'erlangAbandonmentRate':_0x1096ed[_0x98bc('0x71')],'erlangBusyFactor':_0x1096ed[_0x98bc('0x72')],'startPredictive':_0x1096ed[_0x98bc('0x28')],'startProgressive':_0x1096ed[_0x98bc('0x29')]};if(_0x1096ed[_0x98bc('0x73')]){_0x2552d7['Trunk']={'id':_0x1096ed['Trunk']['id'],'name':_0x1096ed[_0x98bc('0x73')][_0x98bc('0x40')],'active':_0x1096ed['Trunk'][_0x98bc('0x74')],'callerid':_0x1096ed[_0x98bc('0x73')]['callerid']};}if(_0x1096ed[_0x98bc('0x43')]){_0x2552d7['Interval']={'id':_0x1096ed['Interval']['id'],'name':_0x1096ed['Interval'][_0x98bc('0x40')]};}var _0x22764d=md5(JSON[_0x98bc('0x4a')](_0x2552d7));if(_0x1096ed['md5']!==_0x22764d){_0x1096ed[_0x98bc('0x3')]=_0x22764d;emit(util['format'](_0x98bc('0x75'),_0x2552d7[_0x98bc('0x40')]),_0x98bc('0x76'),_0x2552d7);}}}function emitCampaignSummary(_0x48d42b){if(_0x48d42b[_0x98bc('0x4d')]===_0x98bc('0x77')){emit(util[_0x98bc('0x78')](_0x98bc('0x79'),_0x48d42b[_0x98bc('0x40')]),_0x98bc('0x7a'),_0x48d42b);}}function checkGetDataPredictive(_0xf5e560){if(isNotNull(_0xf5e560)&&!_[_0x98bc('0x47')](_0xf5e560)){loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x7c'));loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x7d'),_0xf5e560[_0x98bc('0x6e')]);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x7e'),_0xf5e560['predictiveIntervalAnsweredCalls']);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x7f'),_0xf5e560['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x98bc('0x7b')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xf5e560['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive[_0x98bc('0x7b')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xf5e560[_0x98bc('0x80')]);loggerPredictive['info'](_0x98bc('0x81'),_0xf5e560[_0x98bc('0x82')]);loggerPredictive['info'](_0x98bc('0x83'));if(_0xf5e560[_0x98bc('0x6e')]>0x0){if(!_[_0x98bc('0x3d')](_0xf5e560['predictiveIntervalAvgTalktime'])&&_0xf5e560[_0x98bc('0x82')]>0x0){return!![];}loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x84'));if(!_[_0x98bc('0x3d')](_0xf5e560['predictiveIntervalAvgHoldtime'])&&_0xf5e560[_0x98bc('0x80')]>0x0){return!![];}loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x85'));}else{loggerPredictive['info'](_0x98bc('0x86'));}}else{loggerPredictive[_0x98bc('0x7b')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x2b998c){return function(_0x272a3c){loggerPredictive['info'](_0x98bc('0x87'));loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x88'),_0x272a3c[_0x98bc('0x89')]);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x8a'),_0x272a3c[_0x98bc('0x70')]);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x8b'),_0x272a3c[_0x98bc('0x71')]);loggerPredictive['info'](_0x98bc('0x8c'),_0x272a3c[_0x98bc('0x72')]);loggerPredictive[_0x98bc('0x7b')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x272a3c[_0x98bc('0x71')]);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x83'));_[_0x98bc('0x8d')](_0x2b998c,_0x272a3c);};}function getDiff(_0x1675df){var _0x4253b9=moment()[_0x98bc('0x8e')](0x0);var _0x314272=moment(_0x1675df)[_0x98bc('0x8e')](0x0);return _0x4253b9[_0x98bc('0x8f')](_0x314272,'seconds');}function ifInterval(_0x21e24a,_0x1aad83){if(_[_0x98bc('0x3d')](_0x1aad83)){return![];}return getDiff(_0x1aad83)<_0x21e24a*0x3c;}function freeVariablesPredictive(_0x22d389){if(isNotNull(_0x22d389)){if(!_[_0x98bc('0x3d')](_0x22d389['startProgressive'])){_0x22d389['startProgressive']=undefined;loggerPredictive[_0x98bc('0x7b')](_0x22d389[_0x98bc('0x40')],_0x98bc('0x90'));}if(!_[_0x98bc('0x3d')](_0x22d389[_0x98bc('0x28')])){_0x22d389[_0x98bc('0x28')]=undefined;loggerPredictive[_0x98bc('0x7b')](_0x22d389[_0x98bc('0x40')],'clearing\x20variable\x20start\x20predictive');}if(!_['isUndefined'](_0x22d389[_0x98bc('0x91')])){clearInterval(_0x22d389[_0x98bc('0x91')]);_0x22d389['handlePredictive']=undefined;loggerPredictive[_0x98bc('0x7b')](_0x22d389[_0x98bc('0x40')],_0x98bc('0x92'));}}}function erlangb(_0x7675e,_0x1ece3a){if(_0x1ece3a===0x0){return 0x0;}var _0x123712=0x1;for(var _0x5301e=0x1;_0x5301e<=_0x1ece3a;_0x5301e+=0x1){_0x123712=0x1+_0x123712*_0x5301e/_0x7675e;}return 0x1/_0x123712;}function isVoiceQueueOutbound(_0x2f2728){return _0x2f2728==='outbound';}function isNotPreview(_0x3de4b3){return _0x3de4b3!==_0x98bc('0x93');}function isCampaignIvr(_0x5a944d){return _0x5a944d===_0x98bc('0x77');}function getCallerId(_0x3ef9f7,_0x26f26c,_0x26ca09){if(!_[_0x98bc('0x3d')](_0x26ca09)&&typeof _0x26ca09==='string'&&!_['isEmpty'](_0x26ca09)){if(!_[_0x98bc('0x3d')](_0x26f26c)&&typeof _0x26f26c===_0x98bc('0x94')&&!_[_0x98bc('0x47')](_0x26f26c)){return util[_0x98bc('0x78')](_0x98bc('0x95'),_0x26f26c,_0x26ca09);}return util[_0x98bc('0x78')](_0x98bc('0x95'),_0x26ca09,_0x26ca09);}if(!_[_0x98bc('0x3d')](_0x3ef9f7)&&typeof _0x3ef9f7===_0x98bc('0x94')&&!_[_0x98bc('0x47')](_0x3ef9f7)){return _0x3ef9f7;}return _0x98bc('0x96');}function loggerCatchQueueSummary(_0x1046f6,_0x3fe852){return function(_0x3947c1){freeVariablesPredictive(_0x3fe852);emitVoiceQueueSummary(_0x3fe852);emitCampaignSummary(_0x3fe852);loggerSyncQueueSummary[_0x98bc('0x97')](_0x1046f6,util[_0x98bc('0x98')](_0x3947c1,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0xed82e6,_0x2dd1db){return function(_0x34c916){loggerPredictive[_0x98bc('0x97')](_0x2dd1db[_0x98bc('0x40')],_0xed82e6);loggerPredictive[_0x98bc('0x97')](_0x34c916[_0x98bc('0x99')]);freeVariablesPredictive(_0x2dd1db);};}function loggerCatch(_0x1f164d){return function(_0x5f3930){logger[_0x98bc('0x97')](_0x1f164d,util['inspect'](_0x5f3930,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x53ff21){return _0x53ff21&&!_[_0x98bc('0x3d')](_0x53ff21)&&_0x53ff21['length']>0x0;}function decremetOriginate(_0x2118f9){if(!_[_0x98bc('0x3d')](_0x2118f9)&&_0x2118f9!==null){if(typeof _0x2118f9[_0x98bc('0x6f')]!==_0x98bc('0x9a')){if(_0x2118f9['originated']>0x0){_0x2118f9[_0x98bc('0x6f')]-=0x1;}else{logger[_0x98bc('0x97')]('[decremetOriginate]\x20object\x20originated\x20is\x20negative');}}}else{logger['error'](_0x98bc('0x9b'));}}function checkContactLowerLimitOriginate(_0x2e7f03,_0x464cab,_0x5e9a6f){if(_0x464cab>_0x5e9a6f){for(var _0x36549d=0x0;_0x36549d<_0x464cab-_0x5e9a6f;_0x36549d+=0x1){decremetOriginate(_0x2e7f03);}}}function loggerGetContactDialer(_0x158b2f,_0x7592aa,_0x32c106){return function(_0xfa8dd9){checkContactLowerLimitOriginate(_0x7592aa,_0x32c106,0x0);logger['error'](_0x158b2f,util[_0x98bc('0x98')](_0xfa8dd9,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x3c565e){return function(_0x4f9399){if(isNotNull(_0x4f9399)&&isNotNull(_0x4f9399[0x0])){if(_0x4f9399[0x0]['contactsRescheduled']>0x0){_0x3c565e[_0x98bc('0x3e')]='RESCHEDULED_CONTACTS';logger[_0x98bc('0x7b')](_0x98bc('0x9c')+_0x3c565e[_0x98bc('0x40')],_0x4f9399[0x0][_0x98bc('0x9d')],'contacts');}else{_0x3c565e[_0x98bc('0x3e')]=_0x98bc('0x9e');logger['info'](_0x98bc('0x9f')+_0x3c565e[_0x98bc('0x40')]);}}};}function notSendMessagesQueue(_0xe8b125){if(_0xe8b125['sendMessageOneNotActive']){freeVariablesPredictive(_0xe8b125);if(_0xe8b125['originated']===0x0&&_0xe8b125[_0x98bc('0x57')]===0x0&&_0xe8b125[_0x98bc('0x5a')]===0x0&&(_0xe8b125['pTalking']||0x0)===0x0){_0xe8b125[_0x98bc('0xa0')]=![];_0xe8b125[_0x98bc('0x51')]=0x0;_0xe8b125['message']=_0x98bc('0x41');loggerSyncQueueSummary['error'](_0x98bc('0xa1'),_0xe8b125[_0x98bc('0x40')],'is\x20not\x20active');}else{_0xe8b125['message']='IS_DISACTIVED';loggerSyncQueueSummary[_0x98bc('0x97')](_0x98bc('0xa1'),_0xe8b125['name'],_0x98bc('0xa2'));}emitVoiceQueueSummary(_0xe8b125);}}function notSendMessagesCampaign(_0x5b0cc4){if(_0x5b0cc4[_0x98bc('0xa0')]){if(_0x5b0cc4[_0x98bc('0x6f')]===0x0){_0x5b0cc4[_0x98bc('0xa0')]=![];_0x5b0cc4[_0x98bc('0x3e')]='NOT_ACTIVE';loggerSyncQueueSummary[_0x98bc('0x97')](_0x98bc('0xa3'),_0x5b0cc4[_0x98bc('0x40')],_0x98bc('0xa4'));}else{_0x5b0cc4['message']=_0x98bc('0xa5');loggerSyncQueueSummary[_0x98bc('0x97')](_0x98bc('0xa3'),_0x5b0cc4[_0x98bc('0x40')],_0x98bc('0xa2'));}emitCampaignSummary(_0x5b0cc4);}}function createObjHistory(_0x33e5b2,_0x2ddbd9,_0x48ad72,_0x1c9ff9,_0xd9357a){_0x33e5b2['message']=_0x48ad72;var _0x2422d9=new Action(_0x33e5b2,_0x2ddbd9);var _0x1fd8bb=new History(_0x2422d9);_0x1fd8bb[_0x98bc('0xa6')]=_0x1c9ff9;_0x1fd8bb['statedesc']=_0xd9357a;_0x1fd8bb[_0x98bc('0xa7')]=_0x2422d9['starttime'];return _0x1fd8bb;}Dialer[_0x98bc('0xa8')][_0x98bc('0x3c')]=function(){var _0x5554da=this;setInterval(function(){_0x5554da[_0x98bc('0xa9')](_0x5554da[_0x98bc('0xaa')],_0x98bc('0xab'));_0x5554da[_0x98bc('0xa9')](_0x5554da[_0x98bc('0x25')],'[actions]');},0x32c8);};Dialer[_0x98bc('0xa8')][_0x98bc('0xa9')]=function(_0x31bace,_0xf1c71b){var _0x3f4091=this;for(var _0x14c4bf in _0x31bace){if(typeof _0x31bace[_0x14c4bf]!==_0x98bc('0x9a')){this['sequence'][_0x98bc('0x1b')](function(){if(!_[_0x98bc('0xac')](_0x31bace[_0x14c4bf])){return ami['Action']({'action':'status','channel':_0x31bace[_0x14c4bf]['channel']})[_0x98bc('0xad')](function(_0x651939){if(_0x651939[_0x98bc('0x3e')]===_0x98bc('0xae')){setTimeout(function(){if(_0x31bace[_0x14c4bf]&&_0x31bace[_0x14c4bf][_0x98bc('0x4d')]!==_0x98bc('0x77')){_0x3f4091[_0x98bc('0xaf')](_0x3f4091['voiceQueues'][_0x31bace[_0x14c4bf][_0x98bc('0xb0')]]);logger[_0x98bc('0x97')](_0x98bc('0xb1'),_0xf1c71b,_0x14c4bf,_0x31bace[_0x14c4bf]['queue']);delete _0x31bace[_0x14c4bf];}if(_0x31bace[_0x14c4bf]&&_0x31bace[_0x14c4bf]['type']===_0x98bc('0x77')){_0x3f4091[_0x98bc('0xaf')](_0x3f4091[_0x98bc('0x20')][_0x31bace[_0x14c4bf][_0x98bc('0xb0')]]);logger[_0x98bc('0x97')]('[Dialer][checkChannel][ivr]',_0xf1c71b,_0x14c4bf,_0x31bace[_0x14c4bf][_0x98bc('0xb0')]);delete _0x31bace[_0x14c4bf];}},0x2328);}});}});}}};Dialer['prototype'][_0x98bc('0xb2')]=function(_0xb9740c){return BPromise[_0x98bc('0xb3')]()['then'](cmHopper[_0x98bc('0xb2')](_0xb9740c))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xb4')));};Dialer[_0x98bc('0xa8')][_0x98bc('0xb5')]=function(_0x28b68b){return BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](cmHopperBlack[_0x98bc('0xb5')](_0x28b68b))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xb7')));};Dialer['prototype']['checkIsBlackListIvr']=function(_0x2e62d6){return BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](cmHopperBlack[_0x98bc('0xb8')](_0x2e62d6))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xb9')));};Dialer[_0x98bc('0xa8')][_0x98bc('0xba')]=function(_0x250843){return BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](cmHopperHistory[_0x98bc('0xbb')](_0x250843))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xbc')));};Dialer['prototype'][_0x98bc('0xbd')]=function(_0x3de2a2){return BPromise[_0x98bc('0xb3')]()['then'](cmHopper[_0x98bc('0xbd')](_0x3de2a2))[_0x98bc('0xad')](loggerCatch('[rescheduleContact]\x20'));};Dialer[_0x98bc('0xa8')]['unlockContact']=function(_0x5da30a,_0x2df147,_0x2515e8){return BPromise['resolve']()[_0x98bc('0xb6')](cmHopper[_0x98bc('0xbe')](_0x5da30a,_0x2df147,_0x2515e8))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xbf')));};Dialer['prototype'][_0x98bc('0xc0')]=function(_0x4bb8fb,_0x51339c,_0x2faf50,_0x240603){return BPromise[_0x98bc('0xb3')]()['then'](cmHopper[_0x98bc('0xc0')](_0x4bb8fb,_0x51339c,_0x2faf50,_0x240603))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xc1')));};Dialer[_0x98bc('0xa8')][_0x98bc('0xc2')]=function(_0x3bb557,_0x21f7ae,_0x42377c){return BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](cmHopper[_0x98bc('0xc2')](_0x3bb557,_0x21f7ae,_0x42377c))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xc1')));};Dialer['prototype'][_0x98bc('0xc3')]=function(_0x37637a){return BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](voiceQueueRt['getVoiceQueueRtPauses'](_0x37637a))['catch'](loggerCatch(_0x98bc('0xc4')));};Dialer[_0x98bc('0xa8')][_0x98bc('0xc5')]=function(_0x3237f0){return BPromise['resolve']()['then'](cmHopper['moveContactManagedDialer'](_0x3237f0))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xc6')));};Dialer[_0x98bc('0xa8')][_0x98bc('0xc7')]=function(_0x1611de){return BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](cmHopperHistory['createHistory'](_0x1611de))[_0x98bc('0xad')](loggerCatch('[createHistory]\x20'));};Dialer[_0x98bc('0xa8')][_0x98bc('0xaf')]=function(_0x5604b4){if(!_[_0x98bc('0x3d')](_0x5604b4)&&_0x5604b4!==null){if(typeof _0x5604b4[_0x98bc('0x6f')]!=='undefined'){if(_0x5604b4[_0x98bc('0x6f')]>0x0){_0x5604b4['originated']-=0x1;}else{logger[_0x98bc('0x97')](_0x98bc('0xc8'));}}}else{logger['error']('[updateOriginated]\x20is\x20null\x20or\x20undefined');}};Dialer[_0x98bc('0xa8')][_0x98bc('0xc9')]=function(_0x59a4b7,_0x292bda){var _0x401dfd=this;return function(_0x236e26){_0x401dfd['updateOriginated'](_0x292bda);logger[_0x98bc('0x97')](_0x59a4b7,util[_0x98bc('0x98')](_0x236e26,{'showHidden':![],'depth':null}));};};Dialer[_0x98bc('0xa8')][_0x98bc('0xca')]=function(_0x338f83,_0x3f0187,_0x1cf24e){var _0x485ed1={'state':0x19,'statedesc':_0x98bc('0xcb')};this[_0x98bc('0xaf')](_0x3f0187);this[_0x98bc('0xcc')](_['merge'](_0x485ed1,_['pick'](_0x1cf24e,[_0x98bc('0xcd'),_0x98bc('0xce'),_0x98bc('0xcf'),'VoiceQueueId',_0x98bc('0xd0')])),_0x98bc('0xd1'),_0x98bc('0xd2'));logger[_0x98bc('0x97')](_0x338f83);};Dialer[_0x98bc('0xa8')]['isSuccess']=function(_0x1da0f8){return _0x1da0f8===_0x98bc('0xd3');};Dialer['prototype'][_0x98bc('0xd4')]=function(_0x49efe0){return!_['isUndefined'](_0x49efe0)&&_0x49efe0&&!_['isUndefined'](_0x49efe0[_0x98bc('0x40')])&&!_[_0x98bc('0x3d')](_0x49efe0[_0x98bc('0x74')])&&_0x49efe0[_0x98bc('0x74')]&&(this[_0x98bc('0x22')][util[_0x98bc('0x78')]('SIP/%s',_0x49efe0[_0x98bc('0x40')])][_0x98bc('0xd5')]===_0x98bc('0xd6')||this['trunks'][util['format'](_0x98bc('0xd7'),_0x49efe0[_0x98bc('0x40')])]['status']===_0x98bc('0xd8'));};Dialer[_0x98bc('0xa8')]['saveInDb']=function(_0xf48ec2,_0x545a9a,_0x169fd7){this['createHistory'](_0xf48ec2)[_0x98bc('0xad')](loggerCatch(_0x545a9a));this[_0x98bc('0xc5')](_0xf48ec2)[_0x98bc('0xad')](loggerCatch(_0x169fd7));};Dialer[_0x98bc('0xa8')][_0x98bc('0x37')]=function(_0x2b7100){var _0x52bd3d=this[_0x98bc('0xaa')][_0x2b7100[_0x98bc('0xd9')]];var _0x18cac;if(!_['isNil'](_0x2b7100)&&!_[_0x98bc('0xac')](_0x2b7100[_0x98bc('0xda')])&&!_[_0x98bc('0xac')](_0x2b7100[_0x98bc('0xda')][_0x98bc('0xdb')])&&_0x2b7100[_0x98bc('0xdc')]==='xcally-motion-dialer'&&_0x52bd3d){if(_0x52bd3d['type']!==_0x98bc('0x77')&&this[_0x98bc('0x1f')][_0x52bd3d['queue']][_0x98bc('0xdd')]&&_0x2b7100[_0x98bc('0xde')]===_0x98bc('0xdf')){delete this[_0x98bc('0xaa')][_0x2b7100[_0x98bc('0xd9')]];this[_0x98bc('0xaf')](this[_0x98bc('0x1f')][_0x52bd3d[_0x98bc('0xb0')]]);this['voiceQueues'][_0x52bd3d['queue']][_0x98bc('0x62')]+=0x1;this[_0x98bc('0x1f')][_0x52bd3d[_0x98bc('0xb0')]][_0x98bc('0x61')]+=0x1;_0x18cac=new Hangup(_0x52bd3d,_0x2b7100);_0x18cac[_0x98bc('0xa6')]=0x12;_0x18cac[_0x98bc('0xe0')]=_0x98bc('0xe1');_0x18cac['membername']='AMD';this[_0x98bc('0xcc')](_0x18cac,'[syncHangupInAMD][createHistory]',_0x98bc('0xe2'));}if(_0x52bd3d['type']!=='ivr'&&this['voiceQueues'][_0x52bd3d[_0x98bc('0xb0')]][_0x98bc('0xdd')]&&_0x2b7100[_0x98bc('0xde')]===_0x98bc('0xe3')){var _0x59dae9=this;return new BPromise(function(_0x567f8a,_0x28d338){delete _0x59dae9[_0x98bc('0xaa')][_0x2b7100[_0x98bc('0xd9')]];_0x59dae9[_0x98bc('0xaf')](_0x59dae9[_0x98bc('0x1f')][_0x52bd3d[_0x98bc('0xb0')]]);_0x59dae9[_0x98bc('0x1f')][_0x52bd3d['queue']][_0x98bc('0x62')]+=0x1;_0x59dae9[_0x98bc('0x1f')][_0x52bd3d[_0x98bc('0xb0')]][_0x98bc('0x61')]+=0x1;var _0x59c81c=_0x59dae9[_0x98bc('0x1f')][_0x52bd3d[_0x98bc('0xb0')]];var _0x16fd50=new Hangup(_0x52bd3d,_0x2b7100);_0x16fd50[_0x98bc('0xa6')]=0x13;_0x16fd50[_0x98bc('0xe0')]=_0x98bc('0xe4');_0x16fd50['membername']='AMD';_0x16fd50[_0x98bc('0xe5')]+=0x1;_0x16fd50[_0x98bc('0xe6')]+=0x1;_0x16fd50[_0x98bc('0xe7')]=!![];_0x59dae9[_0x98bc('0xc7')](_0x16fd50)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x16fd50[_0x98bc('0xe8')]+_0x16fd50[_0x98bc('0xe9')]+_0x16fd50['countnoanswerretry']+_0x16fd50['countnosuchnumberretry']+_0x16fd50[_0x98bc('0xea')]+_0x16fd50[_0x98bc('0xeb')]+_0x16fd50[_0x98bc('0xe5')]+_0x16fd50[_0x98bc('0xec')]>=_0x59c81c[_0x98bc('0xed')]){_0x59dae9[_0x98bc('0xee')](_0x16fd50,_0x567f8a,_0x28d338,_0x98bc('0xef'));}else{if(_0x16fd50[_0x98bc('0xe5')]>=_0x59c81c[_0x98bc('0xf0')]){_0x59dae9[_0x98bc('0xf1')](_0x16fd50,_0x567f8a,_0x28d338,'reason\x2019\x20machine....');}else{_0x59dae9[_0x98bc('0xbd')]({'active':![],'countmachineretry':_0x16fd50[_0x98bc('0xe5')],'scheduledat':moment()[_0x98bc('0xf2')](_0x59c81c[_0x98bc('0xf3')],_0x98bc('0xf4'))[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0x16fd50['ContactId'],'ListId':_0x16fd50[_0x98bc('0xce')],'VoiceQueueId':_0x16fd50['VoiceQueueId']||undefined,'CampaignId':_0x16fd50['CampaignId']||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0xf6')));_0x567f8a({'reschedule':0x1});}}});}if(_0x52bd3d[_0x98bc('0x4d')]===_0x98bc('0x77')&&this[_0x98bc('0x20')][_0x52bd3d[_0x98bc('0xb0')]][_0x98bc('0xdd')]&&_0x2b7100['value']===_0x98bc('0xdf')){delete this['uniqueId'][_0x2b7100['uniqueid']];this[_0x98bc('0xaf')](this[_0x98bc('0x20')][_0x52bd3d[_0x98bc('0xb0')]]);_0x18cac=new Hangup(_0x52bd3d,_0x2b7100);_0x18cac['state']=0x12;_0x18cac['statedesc']=_0x98bc('0xe1');_0x18cac['membername']=_0x98bc('0xf7');this['saveInDb'](_0x18cac,_0x98bc('0xf8'),_0x98bc('0xf9'));}if(_0x52bd3d[_0x98bc('0x4d')]===_0x98bc('0x77')&&this[_0x98bc('0x20')][_0x52bd3d['queue']][_0x98bc('0xdd')]&&_0x2b7100[_0x98bc('0xde')]===_0x98bc('0xe3')){var _0x59dae9=this;return new BPromise(function(_0x186f74,_0x1aba6e){delete _0x59dae9[_0x98bc('0xaa')][_0x2b7100[_0x98bc('0xd9')]];_0x59dae9['updateOriginated'](_0x59dae9['campaigns'][_0x52bd3d[_0x98bc('0xb0')]]);_0x59dae9[_0x98bc('0x20')][_0x52bd3d[_0x98bc('0xb0')]][_0x98bc('0x62')]+=0x1;_0x59dae9[_0x98bc('0x20')][_0x52bd3d[_0x98bc('0xb0')]]['outboundAnswerAgiCallsDay']+=0x1;var _0xec57b6=_0x59dae9[_0x98bc('0x20')][_0x52bd3d['queue']];var _0x22af67=new Hangup(_0x52bd3d,_0x2b7100);_0x22af67[_0x98bc('0xa6')]=0x13;_0x22af67[_0x98bc('0xe0')]='Machine';_0x22af67[_0x98bc('0xfa')]=_0x98bc('0xf7');_0x22af67[_0x98bc('0xe5')]+=0x1;_0x22af67[_0x98bc('0xe6')]+=0x1;_0x22af67['amd']=!![];_0x59dae9['createHistory'](_0x22af67)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x22af67[_0x98bc('0xe8')]+_0x22af67[_0x98bc('0xe9')]+_0x22af67[_0x98bc('0xfb')]+_0x22af67[_0x98bc('0xfc')]+_0x22af67['countdropretry']+_0x22af67['countabandonedretry']+_0x22af67[_0x98bc('0xe5')]+_0x22af67[_0x98bc('0xec')]>=_0xec57b6[_0x98bc('0xed')]){_0x59dae9['stateGlobal'](_0x22af67,_0x186f74,_0x1aba6e,'reason19\x20machine....');}else{if(_0x22af67['countmachineretry']>=_0xec57b6[_0x98bc('0xf0')]){_0x59dae9['createStateFinal'](_0x22af67,_0x186f74,_0x1aba6e,'reason\x2019\x20machine....');}else{_0x59dae9[_0x98bc('0xbd')]({'active':![],'countmachineretry':_0x22af67[_0x98bc('0xe5')],'scheduledat':moment()[_0x98bc('0xf2')](_0xec57b6[_0x98bc('0xf3')],_0x98bc('0xf4'))['format'](_0x98bc('0xf5')),'ContactId':_0x22af67[_0x98bc('0xcd')],'ListId':_0x22af67[_0x98bc('0xce')],'VoiceQueueId':_0x22af67[_0x98bc('0xfd')]||undefined,'CampaignId':_0x22af67['CampaignId']||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0xf6')));_0x186f74({'reschedule':0x1});}}});}}};Dialer[_0x98bc('0xa8')][_0x98bc('0x34')]=function(_0xc4ffff){var _0x4d876e=this['uniqueId'][_0xc4ffff['uniqueid']];var _0x30ae5e=this;var _0x19ae17;if(_0x4d876e&&_0x4d876e[_0x98bc('0x4d')]===_0x98bc('0x77')){delete this[_0x98bc('0xaa')][_0xc4ffff[_0x98bc('0xd9')]];this[_0x98bc('0xaf')](this[_0x98bc('0x20')][_0x4d876e[_0x98bc('0xb0')]]);this['campaigns'][_0x4d876e[_0x98bc('0xb0')]][_0x98bc('0xfe')]+=0x1;_0x19ae17=new Hangup(_0x4d876e,_0xc4ffff);this[_0x98bc('0xc7')](_0x19ae17)['catch'](loggerCatch(_0x98bc('0xff')));this[_0x98bc('0xc5')](_0x19ae17)['catch'](loggerCatch(_0x98bc('0x100')));}if(_0x4d876e&&_0x4d876e[_0x98bc('0x4d')]!==_0x98bc('0x77')&&isNotNull(this[_0x98bc('0x1f')][_0x4d876e['queue']][_0x98bc('0x101')])){delete this[_0x98bc('0xaa')][_0xc4ffff[_0x98bc('0xd9')]];this[_0x98bc('0xaf')](this[_0x98bc('0x1f')][_0x4d876e[_0x98bc('0xb0')]]);this[_0x98bc('0x1f')][_0x4d876e[_0x98bc('0xb0')]][_0x98bc('0x62')]+=0x1;this[_0x98bc('0x1f')][_0x4d876e['queue']]['outboundAnswerAgiCallsDay']+=0x1;_0x19ae17=new Hangup(_0x4d876e,_0xc4ffff);_0x19ae17['state']=0x10;_0x19ae17[_0x98bc('0xe0')]=_0x98bc('0x102');_0x19ae17[_0x98bc('0xfa')]=_0x98bc('0x103');this['createHistory'](_0x19ae17)['catch'](loggerCatch(_0x98bc('0xff')));this[_0x98bc('0xc5')](_0x19ae17)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x100')));}if(_0x4d876e&&_0x4d876e[_0x98bc('0x4d')]!==_0x98bc('0x77')&&!isNotNull(this['voiceQueues'][_0x4d876e['queue']][_0x98bc('0x101')])){delete this[_0x98bc('0xaa')][_0xc4ffff[_0x98bc('0xd9')]];this[_0x98bc('0xaf')](this[_0x98bc('0x1f')][_0x4d876e[_0x98bc('0xb0')]]);this[_0x98bc('0x1f')][_0x4d876e[_0x98bc('0xb0')]]['outboundUnknownCallsDay']+=0x1;_0x19ae17=new Hangup(_0x4d876e,_0xc4ffff);_0x19ae17[_0x98bc('0xa6')]=0xc;_0x19ae17[_0x98bc('0xe0')]=_0xc4ffff[_0x98bc('0x104')];_0x19ae17[_0x98bc('0xfa')]=_0x98bc('0x105');this[_0x98bc('0xc7')](_0x19ae17)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));this[_0x98bc('0xc5')](_0x19ae17)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x100')));}};Dialer[_0x98bc('0xa8')][_0x98bc('0x106')]=function(_0x45d3ff){var _0x113857=this[_0x98bc('0xaa')][_0x45d3ff['uniqueid']];var _0x12c472=this;if(this[_0x98bc('0x1f')][_0x45d3ff[_0x98bc('0xb0')]]){if(_0x113857&&_0x113857[_0x98bc('0x4d')]!=='ivr'){delete this['uniqueId'][_0x45d3ff[_0x98bc('0xd9')]];this['voiceQueues'][_0x45d3ff[_0x98bc('0xb0')]]['outboundAnswerCallsDay']+=0x1;var _0x148f62=new AgentComplete(_0x113857,_0x45d3ff);if(_0x45d3ff[_0x98bc('0x107')]===_0x98bc('0x108')){_0x148f62[_0x98bc('0x109')]=this[_0x98bc('0x1f')][_0x45d3ff[_0x98bc('0xb0')]][_0x98bc('0x10a')]&&this[_0x98bc('0x1f')][_0x45d3ff[_0x98bc('0xb0')]][_0x98bc('0x10b')]?moment()[_0x98bc('0x78')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;}this[_0x98bc('0xc7')](_0x148f62)[_0x98bc('0xad')](loggerCatch('[syncAgentComplete][createHistory]'));this[_0x98bc('0xc5')](_0x148f62)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x10c')));}}};Dialer[_0x98bc('0xa8')][_0x98bc('0x2e')]=function(_0x56bf62){if(this[_0x98bc('0x1f')][_0x56bf62[_0x98bc('0xb0')]]){if(this[_0x98bc('0xaa')][_0x56bf62[_0x98bc('0xd9')]]&&this[_0x98bc('0xaa')][_0x56bf62[_0x98bc('0xd9')]][_0x98bc('0x4d')]!=='ivr'){this[_0x98bc('0xaf')](this[_0x98bc('0x1f')][_0x56bf62[_0x98bc('0xb0')]]);this[_0x98bc('0xaa')][_0x56bf62['uniqueid']][_0x98bc('0x10d')]=moment()[_0x98bc('0x78')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer[_0x98bc('0xa8')]['queueCallerAbandonCreateState']=function(_0x2c21f7){this[_0x98bc('0xc7')](_0x2c21f7)['catch'](loggerCatch(_0x98bc('0x10e')));this[_0x98bc('0xc5')](_0x2c21f7)['catch'](loggerCatch(_0x98bc('0x10f')));};Dialer[_0x98bc('0xa8')][_0x98bc('0x110')]=function(_0x2baf35){var _0xadc83f=this[_0x98bc('0xaa')][_0x2baf35['uniqueid']];var _0x50c378=this;if(this[_0x98bc('0x1f')][_0x2baf35[_0x98bc('0xb0')]]){if(_0xadc83f&&_0xadc83f[_0x98bc('0x4d')]!=='ivr'){delete this[_0x98bc('0xaa')][_0x2baf35['uniqueid']];this[_0x98bc('0xaf')](this[_0x98bc('0x1f')][_0x2baf35[_0x98bc('0xb0')]]);_0xadc83f[_0x98bc('0x111')]=moment()[_0x98bc('0x78')](_0x98bc('0xf5'));var _0x18fc52=new QueueCallerAbandon(_0xadc83f,_0x2baf35);if(getSeconds(_0xadc83f[_0x98bc('0x111')],_0xadc83f['responsetime'])>=_0xadc83f[_0x98bc('0x112')]){this['voiceQueues'][_0x2baf35['queue']][_0x98bc('0x6b')]+=0x1;this[_0x98bc('0x1f')][_0x2baf35['queue']]['outboundDropCallsDayTimeout']+=0x1;this[_0x98bc('0x1f')][_0x2baf35[_0x98bc('0xb0')]][_0x98bc('0x113')]+=0x1;_0x18fc52[_0x98bc('0xa6')]=0xa;_0x18fc52[_0x98bc('0xe0')]=_0x98bc('0x114');_0x18fc52['dropreason']=_0x98bc('0x115');_0x18fc52[_0x98bc('0x109')]=this['voiceQueues'][_0x2baf35[_0x98bc('0xb0')]][_0x98bc('0x10a')]?moment()[_0x98bc('0x78')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x18fc52[_0x98bc('0xea')]+=0x1;_0x18fc52[_0x98bc('0xe6')]+=0x1;if(_0x18fc52['countdropretry']>=this[_0x98bc('0x1f')][_0x2baf35['queue']]['dialDropMaxRetry']){this['queueCallerAbandonCreateState'](_0x18fc52);}else{this['rescheduleContact']({'active':![],'countdropretry':_0x18fc52[_0x98bc('0xea')],'scheduledat':moment()['add'](this[_0x98bc('0x1f')][_0x2baf35['queue']][_0x98bc('0x116')],'minutes')[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0xadc83f['ContactId'],'ListId':_0xadc83f[_0x98bc('0xce')],'VoiceQueueId':_0xadc83f[_0x98bc('0xfd')]||undefined,'CampaignId':_0xadc83f[_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x117')));var _0x14d27e=new History(_0x18fc52);_0x14d27e['state']=0xa;_0x14d27e['statedesc']=_0x98bc('0x114');_0x14d27e[_0x98bc('0x118')]=moment()['format'](_0x98bc('0xf5'));_0x14d27e['endtime']=_0x14d27e[_0x98bc('0x118')];_0x14d27e[_0x98bc('0x119')]=_0x18fc52[_0x98bc('0x119')];_0x14d27e['calleridnum']=_0x18fc52[_0x98bc('0x11a')];this['createHistory'](_0x14d27e)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x11b')));}}else{this['voiceQueues'][_0x2baf35[_0x98bc('0xb0')]][_0x98bc('0x11c')]+=0x1;this[_0x98bc('0x1f')][_0x2baf35['queue']][_0x98bc('0x66')]+=0x1;_0x18fc52['state']=0xb;_0x18fc52[_0x98bc('0xe0')]=_0x98bc('0x11d');_0x18fc52[_0x98bc('0x11e')]=_0x98bc('0x11f');_0x18fc52[_0x98bc('0xeb')]+=0x1;_0x18fc52[_0x98bc('0xe6')]+=0x1;if(_0x18fc52[_0x98bc('0xeb')]>=this[_0x98bc('0x1f')][_0x2baf35[_0x98bc('0xb0')]][_0x98bc('0x120')]){this['queueCallerAbandonCreateState'](_0x18fc52);}else{this[_0x98bc('0xbd')]({'active':![],'countabandonedretry':_0x18fc52[_0x98bc('0xeb')],'scheduledat':moment()['add'](this[_0x98bc('0x1f')][_0x2baf35['queue']][_0x98bc('0x121')],_0x98bc('0xf4'))[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0xadc83f[_0x98bc('0xcd')],'ListId':_0xadc83f[_0x98bc('0xce')],'VoiceQueueId':_0xadc83f[_0x98bc('0xfd')]||undefined,'CampaignId':_0xadc83f[_0x98bc('0xd0')]||undefined})['catch'](loggerCatch('[rescheduleContact][Abandoned]'));var _0x14d27e=new History(_0x18fc52);_0x14d27e[_0x98bc('0xa6')]=0xb;_0x14d27e[_0x98bc('0xe0')]=_0x98bc('0x11d');_0x14d27e[_0x98bc('0x118')]=moment()[_0x98bc('0x78')](_0x98bc('0xf5'));_0x14d27e[_0x98bc('0xa7')]=_0x14d27e[_0x98bc('0x118')];_0x14d27e['calleridname']=_0x18fc52[_0x98bc('0x119')];_0x14d27e[_0x98bc('0x11a')]=_0x18fc52[_0x98bc('0x11a')];this[_0x98bc('0xc7')](_0x14d27e)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x122')));}}}}};Dialer[_0x98bc('0xa8')][_0x98bc('0x36')]=function(_0x59578c){if(this[_0x98bc('0x25')][_0x59578c['uniqueid']]){this[_0x98bc('0x25')][_0x59578c['uniqueid']]['channel']=_0x59578c[_0x98bc('0x123')];}if(this['uniqueId'][_0x59578c[_0x98bc('0xd9')]]){this['uniqueId'][_0x59578c[_0x98bc('0xd9')]][_0x98bc('0x123')]=_0x59578c[_0x98bc('0x123')];}};Dialer[_0x98bc('0xa8')][_0x98bc('0x124')]=function(_0xb50017){if(strategy[this[_0x98bc('0x1f')][this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]]['queue']][_0x98bc('0x4f')]]===_0x98bc('0x126')){if(this['actions'][_0xb50017[_0x98bc('0x125')]]&&_[_0x98bc('0xac')](this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]][_0x98bc('0x127')])&&_0xb50017['status']==='1'&&_0xb50017[_0x98bc('0x128')]==='0'){if(this['agents'][_0xb50017['stateinterface']]){if(!this[_0x98bc('0x21')][_0xb50017['stateinterface']]['locked']){this[_0x98bc('0x21')][_0xb50017['stateinterface']][_0x98bc('0x127')]=!![];this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]][_0x98bc('0x127')]=!![];this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]][_0x98bc('0x129')]=_0xb50017[_0x98bc('0x129')];}}}}else if((strategy[this[_0x98bc('0x1f')][this['actions'][_0xb50017[_0x98bc('0x125')]][_0x98bc('0xb0')]][_0x98bc('0x4f')]]||_0x98bc('0x1a'))===_0x98bc('0x1a')){if(this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]]){if(this[_0x98bc('0x21')][_0xb50017['stateinterface']]){this['actions'][_0xb50017[_0x98bc('0x125')]][_0x98bc('0x129')]=_0xb50017[_0x98bc('0x129')];if(_[_0x98bc('0xac')](this['queueBooked'][this['actions'][_0xb50017[_0x98bc('0x125')]][_0x98bc('0xb0')]])){this[_0x98bc('0x2b')][this['actions'][_0xb50017[_0x98bc('0x125')]][_0x98bc('0xb0')]]=[];}this[_0x98bc('0x2b')][this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]][_0x98bc('0xb0')]][_0x98bc('0x12a')](_[_0x98bc('0x8d')](_[_0x98bc('0x12b')](this[_0x98bc('0x25')][_0xb50017[_0x98bc('0x125')]],[_0x98bc('0x12c'),_0x98bc('0x129')]),{'status':_0xb50017[_0x98bc('0xd5')],'paused':_0xb50017[_0x98bc('0x128')]}));}}}};function unlockQueueStatus(_0xaaaa61,_0x52bb0a){setTimeout(function(){if(_['isUndefined'](_0xaaaa61['queueStatusComplete'])){loggerBooked['error'](_0x98bc('0x12d'),_0x52bb0a);}_0xaaaa61[_0x98bc('0x12e')]=!![];loggerBooked[_0x98bc('0x7b')](_0x98bc('0x12f'),_0x52bb0a,JSON[_0x98bc('0x4a')](_[_0x98bc('0x12b')](_0xaaaa61,['name',_0x98bc('0x12e')])));},0x1f3);}Dialer[_0x98bc('0xa8')]['syncQueueStatusComplete']=function(_0x2d79ff){var _0xa5c4c5=this;var _0x5422c9=_0xa5c4c5['voiceQueues'][_0xa5c4c5[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]['queue']];if(strategy[this[_0x98bc('0x1f')][this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]['queue']][_0x98bc('0x4f')]]===_0x98bc('0x126')){if(this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]&&this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0x129')]){this[_0x98bc('0x93')][_0x98bc('0x130')](this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]['idHopper'],this['actions'][_0x2d79ff['actionid']][_0x98bc('0x129')])[_0x98bc('0xad')](function(_0x426fae){logger[_0x98bc('0x97')](_0x98bc('0x131'),util[_0x98bc('0x98')](_0x426fae,{'showHidden':![],'depth':null}));})[_0x98bc('0x1d')](function(){_0xa5c4c5[_0x98bc('0xaf')](_0xa5c4c5[_0x98bc('0x1f')][_0xa5c4c5[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]['queue']]);_0xa5c4c5['agents'][_0xa5c4c5[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0x129')]]['locked']=![];delete _0xa5c4c5['actions'][_0x2d79ff[_0x98bc('0x125')]];unlockQueueStatus(_0x5422c9);});}else{this['updateOriginated'](this['voiceQueues'][this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xb0')]]);this[_0x98bc('0xbd')]({'active':![],'ContactId':this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xcd')],'ListId':this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xce')],'VoiceQueueId':this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xfd')]||undefined,'CampaignId':this[_0x98bc('0x25')][_0x2d79ff['actionid']][_0x98bc('0xd0')]||undefined})['catch'](loggerCatch(_0x98bc('0x132')));delete this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]];unlockQueueStatus(_0x5422c9);}}else if((strategy[this[_0x98bc('0x1f')][this[_0x98bc('0x25')][_0x2d79ff['actionid']][_0x98bc('0xb0')]][_0x98bc('0x4f')]]||_0x98bc('0x1a'))===_0x98bc('0x1a')){var _0x2a40c2;if(this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]&&!_['isEmpty'](this[_0x98bc('0x2b')][this[_0x98bc('0x25')][_0x2d79ff['actionid']][_0x98bc('0xb0')]])){if(this[_0x98bc('0x2c')][_0xa5c4c5[_0x98bc('0x25')][_0x2d79ff['actionid']]['queue']]){this[_0x98bc('0x2c')][_0xa5c4c5[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xb0')]]=this[_0x98bc('0x2c')][this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xb0')]]?this[_0x98bc('0x2c')][this[_0x98bc('0x25')][_0x2d79ff['actionid']]['queue']]:this[_0x98bc('0x2b')][this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xb0')]]?this[_0x98bc('0x2b')][this['actions'][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xb0')]][_0x98bc('0x133')]||0x0:0x0;}this[_0x98bc('0x2b')][this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]]['queue']][_0x98bc('0x133')]=this['queueBookedRR'][this[_0x98bc('0x25')][_0x2d79ff[_0x98bc('0x125')]][_0x98bc('0xb0')]];for(var _0x1e4682=0x0;_0x1e4682=0x0;})[_0x98bc('0xad')](myreject(_0x253d27)));}}else{_0x4c3172[_0x98bc('0x12a')](ami[_0x98bc('0x149')]({'action':_0x98bc('0x14a'),'command':util[_0x98bc('0x78')](_0x98bc('0x14f'),_0x45296c,!_[_0x98bc('0x3d')](config[_0x98bc('0x146')][_0x3a39b7])?_0x3a39b7:'')})[_0x98bc('0xb6')](function(_0x4f2be5){return _0x4f2be5[_0x98bc('0x14c')][_0x98bc('0x14d')](_0x98bc('0x14e'))>=0x0;})['catch'](myreject(_0x253d27)));}BPromise[_0x98bc('0x150')](_0x4c3172)[_0x98bc('0xb6')](function(_0xee406c){var _0x569c13=_[_0x98bc('0x151')](_0xee406c);if(_0x569c13){return _0xdbf2d5(_0x569c13);}else{_0x26d900[_0x98bc('0x3e')]=_0x14089d?_0x98bc('0x152'):_0x98bc('0x153');return _0x253d27(msgResponse(_0x98bc('0x154'),_0x98bc('0x144'),_0x98bc('0x155')+_0x14089d+'\x20'+_0x364dfa+_0x98bc('0x156')+util[_0x98bc('0x98')](_0x45296c,{'showHidden':![],'depth':null})+_0x98bc('0x157')+_0x3a39b7));}})['catch'](function(_0x19df2d){return _0x253d27(msgResponse('ifTime','Failure',JSON[_0x98bc('0x4a')](_0x19df2d)));});});};Dialer[_0x98bc('0xa8')]['checkDialMethod']=function(_0x70c6f0){var _0x25b93b=this;return function(){switch(_0x70c6f0['dialMethod']){case _0x98bc('0x158'):freeVariablesPredictive(_0x70c6f0);_0x25b93b[_0x98bc('0x159')](_0x70c6f0,0x1);break;case _0x98bc('0x15a'):freeVariablesPredictive(_0x70c6f0);_0x25b93b['handlePower'](_0x70c6f0,_0x70c6f0[_0x98bc('0x15b')]);break;case _0x98bc('0x9'):_0x25b93b[_0x98bc('0x9')](_0x70c6f0);break;case _0x98bc('0x8'):freeVariablesPredictive(_0x70c6f0);_0x25b93b[_0x98bc('0x159')](_0x70c6f0,0x1);break;default:freeVariablesPredictive(_0x70c6f0);logger[_0x98bc('0x97')](_0x98bc('0x15c'),_0x70c6f0[_0x98bc('0x40')],'method\x20not\x20recognized');}};};Dialer[_0x98bc('0xa8')]['launchHandleIvr']=function(_0x2e2ec5){var _0x1154cd=this;return function(){_0x1154cd[_0x98bc('0x15d')](_0x2e2ec5);};};Dialer[_0x98bc('0xa8')][_0x98bc('0xb')]=function(_0x56acc2){var _0x28762d=this;if(isNotPreview(_0x56acc2[_0x98bc('0x15e')])){if(isVoiceQueueOutbound(_0x56acc2[_0x98bc('0x4d')])&&isActive(_0x56acc2['dialActive'])){_0x56acc2[_0x98bc('0xa0')]=!![];BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](checkIsLoggedIn(_0x56acc2,_0x56acc2['loggedIn']))['then'](checkIsActive(_0x56acc2,_0x56acc2[_0x98bc('0x5c')]))['then'](checkInterval(_0x56acc2))[_0x98bc('0xb6')](_0x28762d[_0x98bc('0x15f')](_0x56acc2))[_0x98bc('0xb6')](_0x28762d[_0x98bc('0x141')](_0x56acc2[_0x98bc('0x160')],_0x56acc2[_0x98bc('0x161')],_0x56acc2[_0x98bc('0x40')],_0x56acc2))[_0x98bc('0xb6')](_0x28762d[_0x98bc('0x143')](_0x56acc2[_0x98bc('0x43')],_0x56acc2[_0x98bc('0x161')],_0x56acc2['name'],_0x56acc2))[_0x98bc('0xb6')](_0x28762d['checkDialMethod'](_0x56acc2))[_0x98bc('0xad')](loggerCatchQueueSummary('[syncQueueSummary]',_0x56acc2));}else{notSendMessagesQueue(_0x56acc2);}}else{freeVariablesPredictive(_0x56acc2);}};Dialer[_0x98bc('0xa8')][_0x98bc('0x162')]=function(){var _0x26a4ee=this;var _0x1fc09c;for(var _0x597eb9 in this[_0x98bc('0x20')]){if(typeof this['campaigns'][_0x597eb9]!==_0x98bc('0x9a')){_0x1fc09c=this[_0x98bc('0x20')][_0x597eb9];if(isCampaignIvr(_0x1fc09c[_0x98bc('0x4d')])&&isActive(_0x1fc09c[_0x98bc('0x74')])){_0x1fc09c['sendMessageOneNotActive']=!![];BPromise[_0x98bc('0xb3')]()[_0x98bc('0xb6')](checkIsActive(_0x1fc09c,_0x1fc09c[_0x98bc('0x74')]))['then'](checkInterval(_0x1fc09c))[_0x98bc('0xb6')](_0x26a4ee[_0x98bc('0x15f')](_0x1fc09c))[_0x98bc('0xb6')](_0x26a4ee[_0x98bc('0x141')](_0x1fc09c[_0x98bc('0x160')],_0x1fc09c[_0x98bc('0x161')],_0x1fc09c['name'],_0x1fc09c))['then'](_0x26a4ee[_0x98bc('0x143')](_0x1fc09c[_0x98bc('0x43')],_0x1fc09c['dialTimezone'],_0x1fc09c[_0x98bc('0x40')],_0x1fc09c))['then'](_0x26a4ee[_0x98bc('0x163')](_0x1fc09c))[_0x98bc('0xad')](loggerCatchQueueSummary('[syncCampaigns]',_0x1fc09c));}else{notSendMessagesCampaign(_0x1fc09c);}}}};function getCallerIdRandom(_0x3e7a2d,_0x40d9dd){var _0x8aa905;var _0x5ee06b;var _0x36180a;if(_0x40d9dd<=0x0){_0x40d9dd=0x1;}_0x8aa905=new RegExp('\x5cw{0,'+_0x40d9dd+'}$');_0x5ee06b=Math[_0x98bc('0x164')](0xa,_0x40d9dd-0x1);_0x36180a=Math['pow'](0xa,_0x40d9dd)-0x1;return util[_0x98bc('0x78')]('%s',_['replace'](_0x3e7a2d,_0x8aa905,_['random'](_0x5ee06b,_0x36180a)));}function extractCalleridName(_0x207423){var _0x331d88=_0x207423[_0x98bc('0x165')](/"(.*?)"/);return _0x331d88?_0x331d88[0x1]:_0x207423;}function extractCalleridNumber(_0x7b3844){var _0x2ec225=_0x7b3844[_0x98bc('0x165')](/<(.*?)>/);return _0x2ec225?_0x2ec225[0x1]:_0x7b3844;}Dialer[_0x98bc('0xa8')][_0x98bc('0x166')]=function(_0xc4990c,_0x184ff1){var _0x263138=this;var _0x756549=uuid['v4']();this['actions'][_0x756549]=new Action(_0xc4990c,_0x184ff1,_0x756549);return new BPromise(function(_0x1d290b,_0x4f1348){if(_[_0x98bc('0x3d')](_0xc4990c)&&typeof _0xc4990c!==_0x98bc('0x167')){return _0x4f1348(msgResponse('originate','Failure',_0x98bc('0x168')));}if(_['isUndefined'](_0x184ff1[_0x98bc('0x169')][_0x98bc('0x16a')])||_0x184ff1[_0x98bc('0x169')]['phone']===null){return _0x4f1348(msgResponse(_0x98bc('0x16b'),_0x98bc('0x144'),_0x98bc('0x16c')));}var _0x1c767a={'XMD-CALLERID':_0x263138[_0x98bc('0x25')][_0x756549]['getCaller'](),'XMD-AGI':_0xc4990c[_0x98bc('0x101')]?util[_0x98bc('0x78')](_0x98bc('0x16d'),ipAgi,_0xc4990c[_0x98bc('0x101')]):'NONE','XMD-AGIAFTER':_0xc4990c[_0x98bc('0x10a')]?util[_0x98bc('0x78')]('\x22agi://%s/square,%s\x22',ipAgi,_0xc4990c[_0x98bc('0x10a')]):_0x98bc('0x16e'),'XMD-QUEUE':_0xc4990c[_0x98bc('0x4d')]==='outbound'?util['format'](_0x98bc('0x16f'),_0xc4990c[_0x98bc('0x40')],_0xc4990c[_0x98bc('0x170')]||'',_0xc4990c[_0x98bc('0x10b')]?'c':'',_0xc4990c[_0x98bc('0x112')]||0x3):_0x98bc('0x16e'),'XMD-CONTACTID':_0x184ff1[_0x98bc('0xcd')],'XMD-CDRTYPE':_0x98bc('0x6'),'CALLERID(all)':_0x263138[_0x98bc('0x25')][_0x756549][_0x98bc('0x171')](),'XMD-AMD':_0xc4990c[_0x98bc('0xdd')]?'ACTIVE':_0x98bc('0x16e'),'XMD-DESTINATION':_0x98bc('0x172')};if(_0xc4990c[_0x98bc('0xdd')]){_0x1c767a['XMD-AMDINITIALSILENCE']=_0xc4990c[_0x98bc('0x173')]||0x9c4;_0x1c767a['XMD-AMDGREETING']=_0xc4990c[_0x98bc('0x174')]||0x5dc;_0x1c767a[_0x98bc('0x175')]=_0xc4990c[_0x98bc('0x176')]||0x320;_0x1c767a[_0x98bc('0x177')]=_0xc4990c[_0x98bc('0x178')]||0x1388;_0x1c767a[_0x98bc('0x179')]=_0xc4990c[_0x98bc('0x17a')]||0x64;_0x1c767a['XMD-AMDBETWEENWORDSSILENCE']=_0xc4990c[_0x98bc('0x17b')]||0x32;_0x1c767a[_0x98bc('0x17c')]=_0xc4990c[_0x98bc('0x17d')]||0x3;_0x1c767a[_0x98bc('0x17e')]=_0xc4990c[_0x98bc('0x17f')]||0x100;_0x1c767a['XMD-AMDMAXIMUMWORDLENGTH']=_0xc4990c[_0x98bc('0x180')]||0x1388;}if(_0xc4990c[_0x98bc('0x4d')]===_0x98bc('0x4e')){_0x1c767a[_0x98bc('0x181')]=_0x184ff1[_0x98bc('0xfd')];}else{_0x1c767a[_0x98bc('0x182')]=_0x184ff1[_0x98bc('0xd0')];}for(var _0x21fd7b in _0x184ff1[_0x98bc('0x169')]){if(typeof _0x184ff1[_0x98bc('0x169')][_0x21fd7b]!==_0x98bc('0x9a')){if(isNotNull(_0x184ff1[_0x98bc('0x169')][_0x21fd7b])&&_0x21fd7b!=='id'&&_0x21fd7b!==_0x98bc('0x183')&&_0x21fd7b!==_0x98bc('0x184')&&_0x21fd7b!==_0x98bc('0x185')){_0x1c767a[util[_0x98bc('0x78')](_0x98bc('0x186'),_0x98bc('0x187'),_[_0x98bc('0x188')](_0x21fd7b))]=_0x184ff1['Contact'][_0x21fd7b];}}}var _0x31dd69=_0x263138[_0x98bc('0xd4')](_0xc4990c['Trunk'])?getCallerId(_0xc4990c['Trunk']['callerid'],_0xc4990c['dialOriginateCallerIdName'],_0xc4990c[_0x98bc('0x189')]>0x0?getCallerIdRandom(_0xc4990c['dialOriginateCallerIdNumber'],_0xc4990c[_0x98bc('0x189')]):_0xc4990c['dialOriginateCallerIdNumber']):getCallerId(_[_0x98bc('0xac')](_0xc4990c[_0x98bc('0x13f')])?_0xc4990c[_0x98bc('0x73')][_0x98bc('0x18a')]:_0xc4990c[_0x98bc('0x13f')][_0x98bc('0x18a')],_0xc4990c[_0x98bc('0x5d')],_0xc4990c[_0x98bc('0x189')]>0x0?getCallerIdRandom(_0xc4990c[_0x98bc('0x5e')],_0xc4990c['dialRandomLastDigitCallerIdNumber']):_0xc4990c[_0x98bc('0x5e')]);if(_0x31dd69){_0x1c767a[_0x98bc('0x18b')]=_0x263138[_0x98bc('0x25')][_0x756549][_0x98bc('0x18c')]=extractCalleridName(_0x31dd69);_0x1c767a['XMD-ORIGINATECALLERIDNUM']=_0x263138[_0x98bc('0x25')][_0x756549][_0x98bc('0x18d')]=extractCalleridNumber(_0x31dd69);}return ami[_0x98bc('0x149')]({'actionid':_0x756549,'action':_0x98bc('0x16b'),'channel':_0x263138[_0x98bc('0xd4')](_0xc4990c[_0x98bc('0x73')])?util[_0x98bc('0x78')](_0x98bc('0x18e'),_0xc4990c[_0x98bc('0x73')][_0x98bc('0x40')],isNotNull(_0xc4990c['dialPrefix'])?_0xc4990c[_0x98bc('0x60')][_0x98bc('0x18f')]()||'':'',_0xc4990c[_0x98bc('0x190')]>0x0?_0x184ff1['Contact'][_0x98bc('0x16a')][_0x98bc('0x191')](_0xc4990c[_0x98bc('0x190')]):_0x184ff1[_0x98bc('0x169')][_0x98bc('0x16a')]):util[_0x98bc('0x78')](_0x98bc('0x18e'),_[_0x98bc('0xac')](_0xc4990c[_0x98bc('0x13f')])?_0xc4990c[_0x98bc('0x73')][_0x98bc('0x40')]:_0xc4990c['TrunkBackup'][_0x98bc('0x40')],isNotNull(_0xc4990c[_0x98bc('0x60')])?_0xc4990c[_0x98bc('0x60')]['trim']()||'':'',_0xc4990c[_0x98bc('0x190')]>0x0?_0x184ff1['Contact'][_0x98bc('0x16a')][_0x98bc('0x191')](_0xc4990c['dialCutDigit']):_0x184ff1['Contact'][_0x98bc('0x16a')]),'callerid':_0x31dd69,'Exten':_0x98bc('0x172'),'Context':_0x98bc('0x192'),'Priority':'1','variable':_0x1c767a,'timeout':(_0xc4990c[_0x98bc('0x5f')]||0x1e)*0x3e8,'async':!![],'channelid':_0x756549})['then'](function(_0x5e9d96){return _0x1d290b(_0x5e9d96);})[_0x98bc('0xad')](function(_0x1fbb99){_0xc4990c[_0x98bc('0x193')]+=0x1;var _0x7187b1=new History(_0x263138[_0x98bc('0x25')][_0x756549]);logger[_0x98bc('0x97')](util[_0x98bc('0x78')]('[originateError]:\x20%s',JSON[_0x98bc('0x4a')](_0x1fbb99)));_0x7187b1[_0x98bc('0xa6')]=0xe;_0x7187b1[_0x98bc('0xe0')]='OriginateError';_0x7187b1[_0x98bc('0x118')]=moment()[_0x98bc('0x78')](_0x98bc('0xf5'));_0x7187b1[_0x98bc('0xa7')]=_0x7187b1[_0x98bc('0x118')];_0x263138['createHistory'](_0x7187b1)['catch'](loggerCatch(_0x98bc('0x194')));_0x263138[_0x98bc('0xc5')](_0x7187b1)[_0x98bc('0xad')](loggerCatch('[originate][error]'))[_0x98bc('0x1d')](function(){delete _0x263138[_0x98bc('0x25')][_0x756549];return _0x4f1348(msgResponse('originate',_0x98bc('0x49'),'originate\x20action\x20Error'));});});});};Dialer[_0x98bc('0xa8')][_0x98bc('0x31')]=function(_0x22df7c){var _0x45fd56=this['actions'][_0x22df7c[_0x98bc('0x125')]];if(_0x45fd56){delete this[_0x98bc('0x25')][_0x22df7c[_0x98bc('0x125')]];_0x45fd56[_0x98bc('0x195')]=moment()['format'](_0x98bc('0xf5'));var _0x28fabd=_0x45fd56[_0x98bc('0x4d')]==='ivr'?this[_0x98bc('0x20')][_0x45fd56['queue']]:this['voiceQueues'][_0x45fd56[_0x98bc('0x196')]()];if(!this['isSuccess'](_0x22df7c[_0x98bc('0x197')])){this[_0x98bc('0xaf')](_0x28fabd);return this[_0x98bc('0x198')](_0x45fd56,_0x28fabd,_0x22df7c)[_0x98bc('0xad')](loggerCatch('[callProgressDetecting]\x20'));}this[_0x98bc('0xaa')][_0x22df7c[_0x98bc('0xd9')]]=_0x45fd56;}};Dialer[_0x98bc('0xa8')]['checkRetriveMax']=function(_0x2f7b1f,_0x3ed009,_0x393662){var _0x479a89=new History(_0x3ed009);if(_0x479a89[_0x98bc('0xe8')]+_0x479a89['countcongestionretry']+_0x479a89[_0x98bc('0xfb')]+_0x479a89[_0x98bc('0xfc')]+_0x479a89['countdropretry']+_0x479a89[_0x98bc('0xeb')]+_0x479a89[_0x98bc('0xe5')]+_0x479a89[_0x98bc('0xec')]>=_0x393662[_0x98bc('0xed')]-0x1){return!![];}switch(_0x2f7b1f){case 0x3:if(_0x479a89[_0x98bc('0xfb')]>=_0x393662[_0x98bc('0x199')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countnoanswerretry':_0x479a89['countnoanswerretry']+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662[_0x98bc('0x19a')],'minutes')[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89[_0x98bc('0xce')],'VoiceQueueId':_0x479a89[_0x98bc('0xfd')]||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})['catch'](loggerCatch(_0x98bc('0x19b')));break;case 0x5:if(_0x479a89['countbusyretry']>=_0x393662['dialBusyMaxRetry']-0x1){return!![];}this[_0x98bc('0xbd')]({'active':![],'countbusyretry':_0x479a89['countbusyretry']+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662[_0x98bc('0x19c')],_0x98bc('0xf4'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89[_0x98bc('0xce')],'VoiceQueueId':_0x479a89['VoiceQueueId']||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x19d')));break;case 0x8:if(_0x479a89['countcongestionretry']>=_0x393662['dialCongestionMaxRetry']-0x1){return!![];}this[_0x98bc('0xbd')]({'active':![],'countcongestionretry':_0x479a89['countcongestionretry']+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662['dialCongestionRetryFrequency'],_0x98bc('0xf4'))[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89[_0x98bc('0xce')],'VoiceQueueId':_0x479a89[_0x98bc('0xfd')]||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x19e')));break;case 0x0:if(_0x479a89['countnosuchnumberretry']>=_0x393662[_0x98bc('0x19f')]-0x1){return!![];}else{this[_0x98bc('0xbd')]({'active':![],'countnosuchnumberretry':_0x479a89[_0x98bc('0xfc')]+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662[_0x98bc('0x1a0')],_0x98bc('0xf4'))[_0x98bc('0x78')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89[_0x98bc('0xce')],'VoiceQueueId':_0x479a89['VoiceQueueId']||undefined,'CampaignId':_0x479a89['CampaignId']||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1a1')));}break;case 0xa:if(_0x479a89[_0x98bc('0xea')]>=_0x393662[_0x98bc('0x1a2')]-0x1){return!![];}this[_0x98bc('0xbd')]({'active':![],'countdropretry':_0x479a89[_0x98bc('0xea')]+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662['dialDropRetryFrequency'],_0x98bc('0xf4'))['format'](_0x98bc('0xf5')),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89['ListId'],'VoiceQueueId':_0x479a89['VoiceQueueId']||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})['catch'](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0x479a89[_0x98bc('0xeb')]>=_0x393662['dialAbandonedMaxRetry']-0x1){return!![];}this[_0x98bc('0xbd')]({'active':![],'countabandonedretry':_0x479a89[_0x98bc('0xeb')]+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662['dialAbandonedRetryFrequency'],_0x98bc('0xf4'))[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89[_0x98bc('0xce')],'VoiceQueueId':_0x479a89[_0x98bc('0xfd')]||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1a3')));break;case 0x13:if(_0x479a89[_0x98bc('0xe5')]>=_0x393662[_0x98bc('0xf0')]-0x1){return!![];}this[_0x98bc('0xbd')]({'active':![],'countmachineretry':_0x479a89[_0x98bc('0xe5')]+=0x1,'scheduledat':moment()[_0x98bc('0xf2')](_0x393662[_0x98bc('0xf3')],_0x98bc('0xf4'))[_0x98bc('0x78')](_0x98bc('0xf5')),'ContactId':_0x479a89['ContactId'],'ListId':_0x479a89['ListId'],'VoiceQueueId':_0x479a89[_0x98bc('0xfd')]||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0xf6')));break;case 0x14:if(_0x479a89[_0x98bc('0xec')]>=_0x393662[_0x98bc('0x1a4')]-0x1){return!![];}this[_0x98bc('0xbd')]({'active':![],'countagentrejectretry':_0x479a89[_0x98bc('0xec')]+=0x1,'scheduledat':moment()['add'](_0x393662[_0x98bc('0x1a5')],_0x98bc('0xf4'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x479a89[_0x98bc('0xcd')],'ListId':_0x479a89[_0x98bc('0xce')],'VoiceQueueId':_0x479a89['VoiceQueueId']||undefined,'CampaignId':_0x479a89[_0x98bc('0xd0')]||undefined})['catch'](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0x98bc('0xa8')]['callProgressDetecting']=function(_0x5a9de5,_0x476ba4,_0x1361b2){var _0x63a7ea=this;var _0x6dc28e=new History(_0x5a9de5);return new BPromise(function(_0x150bdd,_0x14e2a8){if(_[_0x98bc('0x3d')](_0x476ba4)&&typeof _0x476ba4!==_0x98bc('0x167')){return _0x14e2a8(msgResponse(_0x98bc('0x1a6'),_0x98bc('0x144'),_0x98bc('0x1a7')));}if(_[_0x98bc('0x3d')](_0x1361b2)&&typeof _0x1361b2!==_0x98bc('0x167')){return _0x14e2a8(msgResponse(_0x98bc('0x1a6'),_0x98bc('0x144'),_0x98bc('0x1a8')));}switch(_0x1361b2['reason']){case'0':_0x476ba4[_0x98bc('0x1a9')]+=0x1;_0x6dc28e['state']=0x0;_0x6dc28e['statedesc']=_0x98bc('0x1aa');_0x6dc28e['countnosuchnumberretry']+=0x1;_0x6dc28e[_0x98bc('0xe6')]+=0x1;ami[_0x98bc('0x4c')](_0x98bc('0x1ab'),ut['buildObj'](_0x5a9de5,_0x98bc('0x1ac')));_0x63a7ea['createHistory'](_0x6dc28e)[_0x98bc('0xad')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x63a7ea['checkRetriveMax'](0x0,_0x5a9de5,_0x476ba4)){if(_0x6dc28e[_0x98bc('0xfc')]>=_0x476ba4[_0x98bc('0x19f')]){_0x63a7ea[_0x98bc('0xf1')](_0x6dc28e,_0x150bdd,_0x14e2a8,'reason\x200\x20no\x20such\x20number....');}else{_0x63a7ea[_0x98bc('0xee')](_0x6dc28e,_0x150bdd,_0x14e2a8,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x476ba4['outboundNoAnswerCallsDay']+=0x1;_0x6dc28e['state']=0x3;_0x6dc28e[_0x98bc('0xe0')]=_0x98bc('0x1ad');_0x6dc28e[_0x98bc('0xfb')]+=0x1;_0x6dc28e['countglobal']+=0x1;ami[_0x98bc('0x4c')](_0x98bc('0x1ae'),ut[_0x98bc('0x1af')](_0x5a9de5,_0x98bc('0x1b0')));_0x63a7ea[_0x98bc('0xc7')](_0x6dc28e)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1b1')));if(_0x63a7ea['checkRetriveMax'](0x3,_0x5a9de5,_0x476ba4)){if(_0x6dc28e[_0x98bc('0xfb')]>=_0x476ba4[_0x98bc('0x199')]){_0x63a7ea['createStateFinal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1b2'));}else{_0x63a7ea[_0x98bc('0xee')](_0x6dc28e,_0x150bdd,_0x14e2a8,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x476ba4[_0x98bc('0x1b3')]+=0x1;_0x6dc28e[_0x98bc('0xa6')]=0x5;_0x6dc28e[_0x98bc('0xe0')]=_0x98bc('0x1b4');_0x6dc28e[_0x98bc('0xe8')]+=0x1;_0x6dc28e['countglobal']+=0x1;ami[_0x98bc('0x4c')](_0x98bc('0x1b5'),ut[_0x98bc('0x1af')](_0x5a9de5,'busy'));_0x63a7ea[_0x98bc('0xc7')](_0x6dc28e)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1b6')));if(_0x63a7ea['checkRetriveMax'](0x5,_0x5a9de5,_0x476ba4)){if(_0x6dc28e['countbusyretry']>=_0x476ba4[_0x98bc('0x1b7')]){_0x63a7ea['createStateFinal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1b8'));}else{_0x63a7ea['stateGlobal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1b8'));}}break;case'8':_0x476ba4[_0x98bc('0x64')]+=0x1;_0x6dc28e[_0x98bc('0xa6')]=0x8;_0x6dc28e[_0x98bc('0xe0')]=_0x98bc('0x1b9');_0x6dc28e[_0x98bc('0xe9')]+=0x1;_0x6dc28e[_0x98bc('0xe6')]+=0x1;ami[_0x98bc('0x4c')]('custom:agentcongestion',ut['buildObj'](_0x5a9de5,_0x98bc('0x1ba')));_0x63a7ea['createHistory'](_0x6dc28e)[_0x98bc('0xad')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x63a7ea[_0x98bc('0x1bb')](0x8,_0x5a9de5,_0x476ba4)){if(_0x6dc28e[_0x98bc('0xe9')]>=_0x476ba4[_0x98bc('0x1bc')]){_0x63a7ea[_0x98bc('0xf1')](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1bd'));}else{_0x63a7ea['stateGlobal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1bd'));}}break;case'11':_0x476ba4['outboundAbandonedCallsDay']+=0x1;_0x6dc28e[_0x98bc('0xa6')]=0xb;_0x6dc28e['statedesc']=_0x98bc('0x11d');_0x6dc28e[_0x98bc('0xeb')]+=0x1;_0x6dc28e[_0x98bc('0xe6')]+=0x1;_0x63a7ea['createHistory'](_0x6dc28e)['catch'](loggerCatch('[syncAgentComplete][createHistory][11]'));if(_0x63a7ea[_0x98bc('0x1bb')](0xb,_0x5a9de5,_0x476ba4)){if(_0x6dc28e[_0x98bc('0xeb')]>=_0x476ba4[_0x98bc('0x120')]){_0x63a7ea['createStateFinal'](_0x6dc28e,_0x150bdd,_0x14e2a8,'reason\x2011\x20abandoned');}else{_0x63a7ea[_0x98bc('0xee')](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1be'));}}break;case'20':_0x476ba4['outboundRejectCallsDay']+=0x1;_0x6dc28e[_0x98bc('0xa6')]=0x14;_0x6dc28e[_0x98bc('0xe0')]=_0x98bc('0x1bf');_0x6dc28e[_0x98bc('0xec')]+=0x1;_0x6dc28e['countglobal']+=0x1;ami[_0x98bc('0x4c')](_0x98bc('0x1c0'),ut[_0x98bc('0x1af')](_0x5a9de5,_0x98bc('0x1c1')));_0x63a7ea[_0x98bc('0xc7')](_0x6dc28e)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1c2')));if(_0x63a7ea[_0x98bc('0x1bb')](0x14,_0x5a9de5,_0x476ba4)){if(_0x6dc28e['countagentrejectretry']>=_0x476ba4['dialAgentRejectMaxRetry']){_0x63a7ea['createStateFinal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1c3'));}else{_0x63a7ea[_0x98bc('0xee')](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x98bc('0x1c3'));}}break;default:_0x476ba4[_0x98bc('0x1c4')]+=0x1;_0x6dc28e['state']=0xc;_0x6dc28e[_0x98bc('0xe0')]=_0x1361b2['reason'];_0x63a7ea[_0x98bc('0xc7')](_0x6dc28e)[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1c5')));if(_0x63a7ea[_0x98bc('0x1bb')](_0x1361b2['reason'],_0x5a9de5,_0x476ba4)){if(_0x6dc28e['countbusyretry']+_0x6dc28e['countcongestionretry']+_0x6dc28e['countnoanswerretry']+_0x6dc28e[_0x98bc('0xfc')]+_0x6dc28e['countdropretry']+_0x6dc28e[_0x98bc('0xeb')]+_0x6dc28e[_0x98bc('0xe5')]+_0x6dc28e['countagentrejectretry']>=_0x476ba4[_0x98bc('0xed')]){_0x63a7ea['stateGlobal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x1361b2[_0x98bc('0x107')]);}else{_0x63a7ea['createStateFinal'](_0x6dc28e,_0x150bdd,_0x14e2a8,_0x1361b2['reason']);}}}});};Dialer[_0x98bc('0xa8')][_0x98bc('0xee')]=function(_0x263a20,_0x46e6ce,_0x248f08,_0x36de5d){var _0x53f59e=new Final(_0x263a20);_0x53f59e['state']=0xf;_0x53f59e[_0x98bc('0xe0')]=_0x98bc('0x1c6');this[_0x98bc('0xf1')](_0x53f59e,_0x46e6ce,_0x248f08,_0x36de5d);};Dialer[_0x98bc('0xa8')][_0x98bc('0xf1')]=function(_0x5cad7b,_0x14dd56,_0x5be293,_0x54e621){this['moveContactManagedDialer'](_0x5cad7b)['then'](function(){return _0x14dd56(msgResponse('[callProgressDetecting]',_0x98bc('0xd3'),_0x54e621));})[_0x98bc('0xad')](function(){return _0x5be293(msgResponse(_0x98bc('0x1c7'),_0x98bc('0x144'),_0x98bc('0x1c8')));});};Dialer['prototype'][_0x98bc('0x9')]=function(_0x16e20d){var _0x5ec49b=_0x16e20d['dialPredictiveOptimizationPercentage']/0x64;var _0x26ab68=_0x16e20d['outboundDropCallsDayTimeout']/(_0x16e20d[_0x98bc('0x67')]+_0x16e20d[_0x98bc('0x62')]);var _0x576546=Math[_0x98bc('0x1c9')](_0x16e20d['predictiveIntervalAvailable']*(_0x16e20d[_0x98bc('0x1ca')]/0x64));var _0x3c0b44=Math[_0x98bc('0x1c9')](_0x16e20d[_0x98bc('0x1cb')]*(_0x16e20d[_0x98bc('0x1cc')]/0x64));var _0x288ae5=_0x16e20d[_0x98bc('0x51')]+_0x16e20d[_0x98bc('0x57')];var _0x23b320=Math[_0x98bc('0x1cd')](_0x16e20d[_0x98bc('0x89')]*_0x16e20d[_0x98bc('0x71')]*_0x16e20d[_0x98bc('0x6c')]*_0x16e20d[_0x98bc('0x1ce')]);if(_[_0x98bc('0x3d')](_0x16e20d[_0x98bc('0x29')])){if(!_['isUndefined'](_0x16e20d[_0x98bc('0x28')])){_0x16e20d[_0x98bc('0x28')]=undefined;loggerPredictive[_0x98bc('0x97')](_0x98bc('0x1cf'),_0x98bc('0x1d0'));}if(!_[_0x98bc('0x3d')](_0x16e20d[_0x98bc('0x91')])){loggerPredictive['error'](_0x98bc('0x1cf'),_0x98bc('0x1d1'));clearInterval(_0x16e20d['handlePredictive']);_0x16e20d[_0x98bc('0x91')]=undefined;}_0x16e20d[_0x98bc('0x29')]=moment()[_0x98bc('0x78')](_0x98bc('0xf5'));loggerPredictive[_0x98bc('0x7b')](_0x16e20d[_0x98bc('0x40')],_0x98bc('0x1d2'),_0x16e20d[_0x98bc('0x29')]);this['handlePower'](_0x16e20d,0x1);}else if(ifInterval(_0x16e20d['dialPredictiveInterval'],_0x16e20d[_0x98bc('0x29')])){this[_0x98bc('0x159')](_0x16e20d,0x1);loggerPredictiveCalls[_0x98bc('0x7b')](_0x98bc('0x1d3'),_0x16e20d[_0x98bc('0x29')],_0x16e20d['name']);_0x16e20d[_0x98bc('0x89')]=0x0;_0x16e20d[_0x98bc('0x113')]=0x0;}else if(_0x5ec49b<_0x26ab68&&_0x16e20d[_0x98bc('0x1d4')]==='dropRate'){freeVariablesPredictive(_0x16e20d);loggerPredictive['info'](_0x98bc('0x1d5'),_0x98bc('0x1d6'),_0x26ab68,_0x98bc('0x29'),_0x16e20d[_0x98bc('0x40')]);}else if(_0x23b320<_0x16e20d['predictiveIntervalErlangCallsDroppedCalls']&&_0x16e20d[_0x98bc('0x1d4')]===_0x98bc('0x1d7')){freeVariablesPredictive(_0x16e20d);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x1d8'),_0x98bc('0x1d9'),_0x23b320,_0x98bc('0x1da'),_0x16e20d[_0x98bc('0x113')],_0x98bc('0x29'),_0x16e20d[_0x98bc('0x40')]);}else if(!ifInterval(_0x16e20d[_0x98bc('0x1db')],_0x16e20d[_0x98bc('0x29')])&&_[_0x98bc('0x3d')](_0x16e20d['startPredictive'])&&!_[_0x98bc('0x3d')](_0x16e20d[_0x98bc('0x29')])){_0x16e20d['startPredictive']=moment()['format'](_0x98bc('0xf5'));loggerPredictive['info'](_0x16e20d['name'],'started\x20in\x20predictive\x20at',_0x16e20d[_0x98bc('0x28')]);this[_0x98bc('0xba')](_0x16e20d[_0x98bc('0x1db')])[_0x98bc('0xb6')](this['getDataPredictive'](_0x16e20d))['then'](mergeDataErlangB(_0x16e20d))[_0x98bc('0xb6')](this[_0x98bc('0x1dc')](_0x16e20d))[_0x98bc('0xad')](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x16e20d));}else if(!ifInterval(_0x16e20d[_0x98bc('0x1db')],_0x16e20d[_0x98bc('0x28')])){_0x16e20d[_0x98bc('0x113')]=0x0;_0x16e20d['startPredictive']=moment()[_0x98bc('0x78')](_0x98bc('0xf5'));loggerPredictive[_0x98bc('0x7b')](_0x16e20d[_0x98bc('0x40')],_0x98bc('0x1dd'),_0x16e20d[_0x98bc('0x28')]);clearInterval(_0x16e20d[_0x98bc('0x91')]);_0x16e20d['handlePredictive']=undefined;this[_0x98bc('0xba')](_0x16e20d['dialPredictiveInterval'])[_0x98bc('0xb6')](this['getDataPredictive'](_0x16e20d))[_0x98bc('0xb6')](mergeDataErlangB(_0x16e20d))['then'](this[_0x98bc('0x1dc')](_0x16e20d))['catch'](loggerCatchPredictive(_0x98bc('0x1de'),_0x16e20d));}else if(_0x16e20d[_0x98bc('0x1cb')]&&_0x288ae5<_0x16e20d[_0x98bc('0x1cb')]-_0x3c0b44){freeVariablesPredictive(_0x16e20d);loggerPredictive[_0x98bc('0x7b')](_0x16e20d[_0x98bc('0x40')],_0x98bc('0x1df'),_0x288ae5,_0x98bc('0x1e0'),_0x16e20d['predictiveIntervalAvailable'],'-',_0x3c0b44,'=',_0x16e20d[_0x98bc('0x1cb')]-_0x3c0b44,')');}else if(_0x16e20d['predictiveIntervalAvailable']&&_0x288ae5>_0x16e20d[_0x98bc('0x1cb')]+_0x576546){freeVariablesPredictive(_0x16e20d);loggerPredictive[_0x98bc('0x7b')](_0x16e20d['name'],_0x98bc('0x1df'),_0x288ae5,_0x98bc('0x1e1'),_0x16e20d['predictiveIntervalAvailable'],'+',_0x576546,'=',_0x16e20d[_0x98bc('0x1cb')]+_0x576546,')');}};Dialer[_0x98bc('0xa8')][_0x98bc('0x1e2')]=function(_0x41b615){var _0x212a1a=this;return function(_0x40dd73){return new BPromise(function(_0x2e9a35,_0x4018cf){_['merge'](_0x41b615,_0x40dd73[0x0]);if(checkGetDataPredictive(_0x40dd73[0x0])){var _0x25dbcf=_0x41b615[_0x98bc('0x1cb')]=_0x41b615[_0x98bc('0x57')]+_0x41b615['available'];var _0x56d779=_0x41b615[_0x98bc('0x1db')]*0x3c;var _0x40f06d=_0x40dd73[0x0]['predictiveIntervalAvgTalktime']+_0x40dd73[0x0][_0x98bc('0x80')];var _0x1a56a0=(_0x40dd73[0x0]['predictiveIntervalAnsweredCalls']+_0x40dd73[0x0][_0x98bc('0x6b')]+_0x40dd73[0x0][_0x98bc('0x11c')])/_0x40dd73[0x0][_0x98bc('0x6e')];_0x41b615[_0x98bc('0x6c')]=_0x1a56a0>0x0?_0x1a56a0:0x1;switch(_0x41b615[_0x98bc('0x1d4')]){case _0x98bc('0x1d7'):var _0x171b1a=_0x41b615['dialPredictiveOptimizationPercentage']/0x64;return _0x212a1a[_0x98bc('0x1e3')](_0x25dbcf,_0x56d779,_0x40f06d,_0x1a56a0,_0x171b1a)[_0x98bc('0xb6')](function(_0x23a06a){return _0x2e9a35(_0x23a06a);});case _0x98bc('0x1e4'):var _0x2c1d70=_0x41b615[_0x98bc('0x1e5')]/0x64;return _0x212a1a[_0x98bc('0x1e6')](_0x25dbcf,_0x56d779,_0x40f06d,_0x1a56a0,_0x2c1d70)[_0x98bc('0xb6')](function(_0x3b2278){return _0x2e9a35(_0x3b2278);});default:return _0x4018cf(msgResponse('[getDataPredictive]',_0x98bc('0x144'),_0x98bc('0x1e7')));}}else{return _0x4018cf(msgResponse(_0x98bc('0x1e8'),_0x98bc('0x144'),_0x98bc('0x1e9')));}});};};Dialer[_0x98bc('0xa8')][_0x98bc('0x1ea')]=function(_0x5bf8ca){var _0x9b72ec=this;return function(_0x24ef05){return new BPromise(function(_0x448ea9,_0x172f93){_[_0x98bc('0x8d')](_0x5bf8ca,_0x24ef05[0x0]);if(checkGetDataPredictive(_0x24ef05[0x0])){loggerPredictive['info'](JSON[_0x98bc('0x4a')](_0x24ef05[0x0]));if(_0x5bf8ca[_0x98bc('0x1d4')]===_0x98bc('0x1d7')){return _0x9b72ec[_0x98bc('0xc3')](_0x5bf8ca['id'])[_0x98bc('0xb6')](function(_0x4035c0){var _0x28ba79=_0x5bf8ca[_0x98bc('0x52')]-_0x4035c0[0x0][_0x98bc('0x1eb')];var _0x837c5=_0x5bf8ca[_0x98bc('0x1db')]*0x3c;var _0x2a68cf=_0x24ef05[0x0][_0x98bc('0x82')]+_0x24ef05[0x0][_0x98bc('0x80')];var _0x381b5a=(_0x24ef05[0x0]['predictiveIntervalAnsweredCalls']+_0x24ef05[0x0][_0x98bc('0x6b')]+_0x24ef05[0x0][_0x98bc('0x11c')])/_0x24ef05[0x0][_0x98bc('0x6e')];var _0x19f32c=_0x5bf8ca[_0x98bc('0x1e5')]/0x64;_0x5bf8ca[_0x98bc('0x6d')]=_0x4035c0[0x0][_0x98bc('0x1eb')]||0x0;_0x5bf8ca[_0x98bc('0x6c')]=_0x381b5a>0x0?_0x381b5a:0x1;return _0x9b72ec[_0x98bc('0x1e3')](_0x28ba79,_0x837c5,_0x2a68cf,_0x381b5a,_0x19f32c);})[_0x98bc('0xb6')](function(_0x34d77f){return _0x448ea9(_0x34d77f);})['catch'](function(_0x94ecea){return _0x172f93(msgResponse(_0x98bc('0x1ec'),_0x98bc('0x144'),JSON[_0x98bc('0x4a')](_0x94ecea)));});}if(_0x5bf8ca[_0x98bc('0x1d4')]===_0x98bc('0x1e4')){return _0x9b72ec[_0x98bc('0xc3')](_0x5bf8ca['id'])[_0x98bc('0xb6')](function(_0xe73dc4){var _0x5ac6f7=_0x5bf8ca[_0x98bc('0x52')]-_0xe73dc4[0x0][_0x98bc('0x1eb')];var _0x417d65=_0x5bf8ca[_0x98bc('0x1db')]*0x3c;var _0x39317c=_0x24ef05[0x0]['predictiveIntervalAvgTalktime']+_0x24ef05[0x0]['predictiveIntervalAvgHoldtime'];var _0x280871=(_0x24ef05[0x0][_0x98bc('0x1ed')]+_0x24ef05[0x0][_0x98bc('0x6b')]+_0x24ef05[0x0][_0x98bc('0x11c')])/_0x24ef05[0x0]['predictiveIntervalTotalCalls'];var _0x2a7b8c=_0x5bf8ca[_0x98bc('0x1e5')]/0x64;_0x5bf8ca[_0x98bc('0x6d')]=_0xe73dc4[0x0][_0x98bc('0x1eb')]||0x0;_0x5bf8ca[_0x98bc('0x6c')]=_0x280871>0x0?_0x280871:0x1;return _0x9b72ec[_0x98bc('0x1e6')](_0x5ac6f7,_0x417d65,_0x39317c,_0x280871,_0x2a7b8c);})[_0x98bc('0xb6')](function(_0x25efed){return _0x448ea9(_0x25efed);})['catch'](function(_0x49d27f){return _0x172f93(msgResponse(_0x98bc('0x1ec'),_0x98bc('0x144'),JSON[_0x98bc('0x4a')](_0x49d27f)));});}}else{return _0x172f93(msgResponse(_0x98bc('0x1e8'),_0x98bc('0x144'),_0x98bc('0x1e9')));}});};};Dialer[_0x98bc('0xa8')][_0x98bc('0x1dc')]=function(_0x32c75a){var _0x2bb709=this;return function(){var _0x4cadd4=0x0;var _0xd1120a=Math[_0x98bc('0x1cd')](_0x32c75a[_0x98bc('0x70')]*0x3e8);if(_0xd1120a>0x0){_0xd1120a=_0xd1120a<0x64?0x64:_0xd1120a;loggerPredictive[_0x98bc('0x7b')](_0x32c75a[_0x98bc('0x40')],_0x98bc('0x1ee'),_0xd1120a,_0x98bc('0x8e'));_0x32c75a['handlePredictive']=setInterval(function(){_0x2bb709['handlePredictive'](_0x32c75a);loggerPredictiveCalls['info'](_0x98bc('0x1ef'),_0x4cadd4+=0x1);},_0xd1120a);}else{loggerPredictive[_0x98bc('0x7b')](_0x32c75a[_0x98bc('0x40')],_0x98bc('0x1f0'));}};};Dialer[_0x98bc('0xa8')][_0x98bc('0x1f1')]=function(_0x287de4,_0x1c6027){var _0x4f2fe6=this;return function(_0x379110){if(_[_0x98bc('0x47')](_0x379110)){if(_['isNil'](_0x1c6027[_0x98bc('0xcf')])||!_0x1c6027[_0x98bc('0x1f2')]){if(_0x287de4[_0x98bc('0x15e')]===_0x98bc('0x8')){_0x287de4[_0x98bc('0x12e')]=_[_0x98bc('0x3d')](_0x287de4[_0x98bc('0x12e')])?!![]:_0x287de4[_0x98bc('0x12e')];var _0x465fd0=uuid['v4']();_0x4f2fe6['actions'][_0x465fd0]=new Action(_0x287de4,_0x1c6027,_0x465fd0);loggerBooked[_0x98bc('0x7b')](_0x98bc('0x1f3'),_0x465fd0,_0x98bc('0x1f4'),JSON[_0x98bc('0x4a')](_0x287de4[_0x98bc('0x12e')]),_0x98bc('0x1f5'),_0x287de4[_0x98bc('0x40')]);if(_0x287de4[_0x98bc('0x12e')]){_0x287de4[_0x98bc('0x12e')]=![];_0x4f2fe6['queueBooked'][_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xb0')]]=[];ami[_0x98bc('0x149')]({'actionid':_0x465fd0,'action':'queuestatus','queue':_0x287de4[_0x98bc('0x40')]})[_0x98bc('0xad')](function(){_0x4f2fe6['updateOriginated'](_0x287de4);_0x4f2fe6[_0x98bc('0xbd')]({'active':![],'ContactId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0]['ContactId'],'ListId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xce')],'VoiceQueueId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xfd')]||undefined,'CampaignId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1f6')));delete _0x4f2fe6[_0x98bc('0x25')][_0x465fd0];});}else{loggerBooked[_0x98bc('0x7b')]('[booked][checkContactBlack][else]',JSON['stringify'](_0x287de4[_0x98bc('0x12e')]),_0x98bc('0x1f5'),_0x287de4['name']);_0x4f2fe6[_0x98bc('0xaf')](_0x287de4);_0x4f2fe6[_0x98bc('0xbd')]({'active':![],'ContactId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xcd')],'ListId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xce')],'VoiceQueueId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xfd')]||undefined,'CampaignId':_0x4f2fe6[_0x98bc('0x25')][_0x465fd0][_0x98bc('0xd0')]||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1f6')));delete _0x4f2fe6[_0x98bc('0x25')][_0x465fd0];}}else{return _0x4f2fe6[_0x98bc('0x166')](_0x287de4,_0x1c6027);}}else{if(getDiff(_0x1c6027[_0x98bc('0x1f7')])<_0x287de4['dialRecallMeTimeout']*0x3c){if(_0x1c6027[_0x98bc('0x1f8')]&&!_0x1c6027[_0x98bc('0x1f8')]['voicePause']){_0x4f2fe6[_0x98bc('0x93')][_0x98bc('0x130')](_0x1c6027['id'])['finally'](function(){_0x4f2fe6['updateOriginated'](_0x287de4);});}else{_0x4f2fe6[_0x98bc('0xbe')]({'active':![]},_0x1c6027['id'],0x1)[_0x98bc('0x1d')](function(){_0x4f2fe6[_0x98bc('0xaf')](_0x287de4);});}}else{_0x287de4[_0x98bc('0x69')]+=0x1;_0x4f2fe6[_0x98bc('0xaf')](_0x287de4);if(_0x287de4['dialRecallInQueue']){_0x4f2fe6[_0x98bc('0xbd')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x1c6027[_0x98bc('0xcd')],'ListId':_0x1c6027[_0x98bc('0xce')],'VoiceQueueId':_0x1c6027[_0x98bc('0xfd')]||undefined,'CampaignId':_0x1c6027['CampaignId']||undefined})[_0x98bc('0xad')](loggerCatch(_0x98bc('0x1f9')));_0x4f2fe6[_0x98bc('0xc7')](createObjHistory(_0x287de4,_0x1c6027,_0x98bc('0x1fa'),0x17,_0x98bc('0x1fb')))['catch'](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x4f2fe6[_0x98bc('0xcc')](createObjHistory(_0x287de4,_0x1c6027,_0x98bc('0x1fc'),0x16,'RecallFailedTimeout'),_0x98bc('0x1fd'),_0x98bc('0x1fe'));}}}}else{_0x287de4['outboundBlacklistCallsDay']+=0x1;_0x4f2fe6[_0x98bc('0xcc')](createObjHistory(_0x287de4,_0x1c6027,_0x98bc('0x1ff'),0xd,_0x98bc('0x200')),_0x98bc('0x201'),_0x98bc('0x202'));throw _0x98bc('0x203');}};};Dialer['prototype'][_0x98bc('0x15d')]=function(_0x1d2bc3){var _0x46f51d=this;var _0x473e8a=_0x1d2bc3['limitCalls']-_0x1d2bc3[_0x98bc('0x6f')]-_0x1d2bc3[_0x98bc('0x204')];emitCampaignSummary(_0x1d2bc3);if(_0x473e8a>0x0){if(_0x473e8a>this[_0x98bc('0x23')]){_0x473e8a=this[_0x98bc('0x23')];}_0x1d2bc3['temp']+=_0x473e8a;this['getContactDialerIvr'](_0x1d2bc3['id'],_0x473e8a,_0x1d2bc3['dialOrderByScheduledAt'])[_0x98bc('0xb6')](function(_0x7cbf56){_0x1d2bc3['temp']-=_0x473e8a;_0x1d2bc3[_0x98bc('0x204')]=_0x1d2bc3[_0x98bc('0x204')]>0x0?_0x1d2bc3[_0x98bc('0x204')]:0x0;if(!checkContactEmpty(_0x7cbf56)){_0x1d2bc3['message']=_0x98bc('0x9e');logger[_0x98bc('0x7b')](_0x98bc('0x205')+_0x1d2bc3[_0x98bc('0x40')]);}else{_0x1d2bc3[_0x98bc('0x6f')]+=_0x7cbf56[_0x98bc('0x134')];_0x1d2bc3[_0x98bc('0x3e')]='RUNNING';for(var _0x5efd57=0x0;_0x5efd57<_0x7cbf56[_0x98bc('0x134')];_0x5efd57+=0x1){_0x1d2bc3[_0x98bc('0x206')]+=0x1;if(_[_0x98bc('0xac')](_0x7cbf56[_0x5efd57])||_[_0x98bc('0xac')](_0x7cbf56[_0x5efd57][_0x98bc('0x169')])||_[_0x98bc('0xac')](_0x7cbf56[_0x5efd57][_0x98bc('0x169')][_0x98bc('0x16a')])){_0x46f51d[_0x98bc('0xca')](_0x98bc('0x207'),_0x1d2bc3,_0x7cbf56[_0x5efd57]);}else{_0x46f51d[_0x98bc('0xb8')](_['pick'](_0x7cbf56[_0x5efd57],[_0x98bc('0xd0'),_0x98bc('0x208')]))[_0x98bc('0xb6')](_0x46f51d[_0x98bc('0x1f1')](_0x1d2bc3,_0x7cbf56[_0x5efd57]))['catch'](_0x46f51d[_0x98bc('0xc9')](_0x98bc('0x209'),_0x1d2bc3));}}}})['catch'](loggerGetContactDialer(_0x98bc('0x20a'),_0x1d2bc3,_0x473e8a));}};Dialer[_0x98bc('0xa8')][_0x98bc('0x159')]=function(_0x5609a9,_0x5398f3){var _0xfd3ae6=this;var _0x55cc4f=[];var _0x2c0bac=_0x5398f3>=0x1?_0x5398f3:0x1;if(_0x5609a9[_0x98bc('0x15e')]===_0x98bc('0x8')){_0x2c0bac=0x1;}var _0xf695f=Math[_0x98bc('0x1cd')](_0x5609a9['available']*_0x2c0bac)-_0x5609a9[_0x98bc('0x6f')]-_0x5609a9[_0x98bc('0x204')];emitVoiceQueueSummary(_0x5609a9);if(_0x5609a9[_0x98bc('0x20b')]>0x0){var _0x260d66=_0x5609a9[_0x98bc('0x20b')]-_0x5609a9['originated']-_0x5609a9[_0x98bc('0x57')]-_0x5609a9['temp']-_0x5609a9['pTalking'];if(_0xf695f>_0x260d66){_0xf695f=_0x260d66;}}if(_0xf695f>0x0){if(_0x5609a9[_0x98bc('0x15e')]==='booked'){_0xf695f=0x1;}if(_0xf695f>this[_0x98bc('0x23')]){_0xf695f=this['maxNumberOriginate'];}_0x5609a9[_0x98bc('0x204')]+=_0xf695f;for(var _0x52285a in this[_0x98bc('0x21')]){if(typeof this['agents'][_0x52285a]!==_0x98bc('0x9a')){if(this[_0x98bc('0x21')][_0x52285a][_0x98bc('0xa6')]==='not_inuse'&&this['agents'][_0x52285a]['status']===_0x98bc('0xd6')){_0x55cc4f['push'](this[_0x98bc('0x21')][_0x52285a]['id']);}}}this['getContactDialer'](_0x5609a9['id'],_0x55cc4f,_0xf695f,_0x5609a9[_0x98bc('0x20c')])[_0x98bc('0xb6')](function(_0x3b4e1f){_0x5609a9[_0x98bc('0x204')]-=_0xf695f;_0x5609a9[_0x98bc('0x204')]=_0x5609a9[_0x98bc('0x204')]>0x0?_0x5609a9[_0x98bc('0x204')]:0x0;if(!checkContactEmpty(_0x3b4e1f)){_0xfd3ae6[_0x98bc('0xb2')](_0x5609a9)['then'](sendMessageReschedule(_0x5609a9))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xb4')));}else{_0x5609a9[_0x98bc('0x6f')]+=_0x3b4e1f['length'];_0x5609a9['message']=_0x5609a9[_0x98bc('0x15e')]==='booked'?_0x98bc('0x20d'):_0x98bc('0x20e');for(var _0x2fedea=0x0;_0x2fedea<_0x3b4e1f[_0x98bc('0x134')];_0x2fedea+=0x1){if(_['isNil'](_0x3b4e1f[_0x2fedea])||_['isNil'](_0x3b4e1f[_0x2fedea][_0x98bc('0x169')])||_[_0x98bc('0xac')](_0x3b4e1f[_0x2fedea][_0x98bc('0x169')][_0x98bc('0x16a')])){_0xfd3ae6[_0x98bc('0xca')](_0x98bc('0x207'),_0x5609a9,_0x3b4e1f[_0x2fedea]);}else{_0xfd3ae6[_0x98bc('0xb5')](_['pick'](_0x3b4e1f[_0x2fedea],[_0x98bc('0xfd'),'Contact.phone']))[_0x98bc('0xb6')](_0xfd3ae6[_0x98bc('0x1f1')](_0x5609a9,_0x3b4e1f[_0x2fedea]))['catch'](_0xfd3ae6['loggerHandler'](_0x98bc('0x207'),_0x5609a9));}}}})[_0x98bc('0xad')](loggerGetContactDialer('[getContactDialer2]',_0x5609a9,_0xf695f));}};Dialer[_0x98bc('0xa8')][_0x98bc('0x91')]=function(_0xdc5185){if(_0xdc5185[_0x98bc('0x20b')]>0x0){var _0x17f400=_0xdc5185['dialLimitQueue']-_0xdc5185['originated']-_0xdc5185[_0x98bc('0x57')];if(_0x17f400>0x0){this['tryOriginatePredictive'](_0xdc5185);}else{loggerPredictiveCalls[_0x98bc('0x7b')]('[handlePredictive][limitChannel]');}}else{this[_0x98bc('0x20f')](_0xdc5185);}};Dialer[_0x98bc('0xa8')][_0x98bc('0x20f')]=function(_0x3fca4a){var _0x3dfd22=this;var _0x203b78=[];_0x3fca4a[_0x98bc('0x6f')]+=0x1;for(var _0x41268c in this['agents']){if(typeof this['agents'][_0x41268c]!=='undefined'){if(this[_0x98bc('0x21')][_0x41268c][_0x98bc('0xa6')]===_0x98bc('0x210')&&this[_0x98bc('0x21')][_0x41268c][_0x98bc('0xd5')]===_0x98bc('0xd6')){_0x203b78[_0x98bc('0x12a')](this[_0x98bc('0x21')][_0x41268c]['id']);}}}this[_0x98bc('0xc0')](_0x3fca4a['id'],_0x203b78,0x1,_0x3fca4a[_0x98bc('0x20c')])['then'](function(_0x288a4a){if(!checkContactEmpty(_0x288a4a)){checkContactLowerLimitOriginate(_0x3fca4a,0x1,0x0);_0x3dfd22[_0x98bc('0xb2')](_0x3fca4a)[_0x98bc('0xb6')](sendMessageReschedule(_0x3fca4a))[_0x98bc('0xad')](loggerCatch(_0x98bc('0xb4')));}else{_0x3fca4a['message']=_0x98bc('0x20e');if(_[_0x98bc('0xac')](_0x288a4a[0x0])||_['isNil'](_0x288a4a[0x0][_0x98bc('0x169')])||_['isNil'](_0x288a4a[0x0][_0x98bc('0x169')][_0x98bc('0x16a')])){_0x3dfd22['emptyContact']('[actionOriginate]\x20',_0x3fca4a,_0x288a4a[0x0]);}else{_0x3dfd22[_0x98bc('0xb5')](_[_0x98bc('0x12b')](_0x288a4a[0x0],[_0x98bc('0xfd'),_0x98bc('0x208')]))[_0x98bc('0xb6')](_0x3dfd22[_0x98bc('0x1f1')](_0x3fca4a,_0x288a4a[0x0]))[_0x98bc('0xad')](_0x3dfd22[_0x98bc('0xc9')]('[actionOriginatePredictive]\x20',_0x3fca4a));}}})[_0x98bc('0xad')](loggerGetContactDialer(_0x98bc('0x211'),_0x3fca4a,0x1));emitVoiceQueueSummary(_0x3fca4a);};Dialer[_0x98bc('0xa8')][_0x98bc('0x1e3')]=function(_0x2fcde8,_0x38ce67,_0x3b1194,_0x16c469,_0x115694,_0x4291dc){loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x212'));loggerPredictive['info']('M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2fcde8);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x213'),_0x38ce67);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x214'),_0x3b1194);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x215'),_0x16c469);loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x216'),_0x115694);loggerPredictive[_0x98bc('0x7b')]('---------------------------');return new BPromise(function(_0x1afaea,_0x1a59ca){if(_0x2fcde8<=0x0||isNaN(_0x2fcde8)){return _0x1a59ca(msgResponse(_0x98bc('0x217'),_0x98bc('0x49'),_0x98bc('0x218')+_0x2fcde8));}if(_0x3b1194<=0x0||isNaN(_0x3b1194)){return _0x1a59ca(msgResponse('[abandonmentRate]',_0x98bc('0x49'),_0x98bc('0x219')+_0x3b1194));}if(_0x16c469<=0x0||isNaN(_0x16c469)){return _0x1a59ca(msgResponse(_0x98bc('0x217'),_0x98bc('0x49'),_0x98bc('0x21a')+_0x16c469));}if(_0x38ce67<=0x0||isNaN(_0x38ce67)){return _0x1a59ca(msgResponse('[abandonmentRate]',_0x98bc('0x49'),_0x98bc('0x21b')+_0x38ce67));}if(_0x115694<=0x0||isNaN(_0x115694)){return _0x1a59ca(msgResponse(_0x98bc('0x217'),'Error',_0x98bc('0x21c')+_0x115694));}_0x4291dc=_0x4291dc||0x0;var _0x4a7f93=0x1/_0x3b1194;var _0x41e691=0x0;var _0x2eae79=0x0;var _0xe9da0c=0x0;var _0x6cfbc0=0x0;for(var _0xbd31fc=0x0;_0xe9da0c<_0x115694;_0xbd31fc+=0x1){_0x2eae79=_0xbd31fc/_0x38ce67;_0x41e691=(_0x16c469*_0x2eae79+_0x4291dc)/_0x4a7f93;_0xe9da0c=erlangb(_0x41e691,_0x2fcde8);_0x6cfbc0=_0x41e691/_0x2fcde8*(0x1-erlangb(_0x41e691,_0x2fcde8));}return _0x1afaea({'erlangCalls':_0xbd31fc,'erlangCallToSecond':_0x38ce67/_0xbd31fc,'erlangAbandonmentRate':_0xe9da0c,'erlangBusyFactor':_0x6cfbc0});});};Dialer[_0x98bc('0xa8')][_0x98bc('0x1e6')]=function(_0x32cfe3,_0x2e92e4,_0x4a4a91,_0x449779,_0x4c60b3,_0x5e2313){loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x21d'));loggerPredictive[_0x98bc('0x7b')](_0x98bc('0x21e'),_0x32cfe3);loggerPredictive['info'](_0x98bc('0x213'),_0x2e92e4);loggerPredictive[_0x98bc('0x7b')]('Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4a4a91);loggerPredictive[_0x98bc('0x7b')]('P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x449779);loggerPredictive['info'](_0x98bc('0x21f'),_0x4c60b3);loggerPredictive['info'](_0x98bc('0x83'));return new BPromise(function(_0x49ea5c,_0x32911d){if(_0x32cfe3<=0x0||isNaN(_0x32cfe3)){return _0x32911d(msgResponse('[busyFactor]','Error',_0x98bc('0x218')+_0x32cfe3));}if(_0x4a4a91<=0x0||isNaN(_0x4a4a91)){return _0x32911d(msgResponse(_0x98bc('0x220'),_0x98bc('0x49'),_0x98bc('0x219')+_0x4a4a91));}if(_0x449779<=0x0||isNaN(_0x449779)){return _0x32911d(msgResponse('[busyFactor]','Error','p\x20=\x20'+_0x449779));}if(_0x2e92e4<=0x0||isNaN(_0x2e92e4)){return _0x32911d(msgResponse(_0x98bc('0x220'),_0x98bc('0x49'),_0x98bc('0x21b')+_0x2e92e4));}if(_0x4c60b3<=0x0||isNaN(_0x4c60b3)){return _0x32911d(msgResponse('[busyFactor]',_0x98bc('0x49'),'Umin\x20=\x20'+_0x4c60b3));}_0x5e2313=_0x5e2313||0x0;var _0x5b6b45=0x1/_0x4a4a91;var _0x5ca662=0x0;var _0x5a7e11=0x0;var _0x3638f7=0x0;var _0x676f74=0x0;for(var _0x561e08=0x0;_0x676f74<_0x4c60b3;_0x561e08+=0x1){_0x5a7e11=_0x561e08/_0x2e92e4;_0x5ca662=(_0x449779*_0x5a7e11+_0x5e2313)/_0x5b6b45;_0x3638f7=erlangb(_0x5ca662,_0x32cfe3);_0x676f74=_0x5ca662/_0x32cfe3*(0x1-erlangb(_0x5ca662,_0x32cfe3));}return _0x49ea5c({'erlangCalls':_0x561e08,'erlangCallToSecond':_0x2e92e4/_0x561e08,'erlangAbandonmentRate':_0x3638f7,'erlangBusyFactor':_0x676f74});});};module[_0x98bc('0x221')]=Dialer; \ No newline at end of file +var _0x01f6=['queueStatusComplete','[unlockQueueStatus][undefined]','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','contactAgent-idHopper:\x20','Agent:\x20','[booked][unlock]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','TrunkBackup','\x20trunk\x20is\x20not\x20reachable','ifTime','checkIfTimeIntervals','Failure','INTERVAL_IS_EMPTY','\x20Intervals\x20is\x20empty\x20','timezones','isArray','command','interval','indexOf','true','Action','all','some','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','progressive','handlePower','power','dialPowerLevel','predictive','booked','Queue','method\x20not\x20recognized','handleIvr','dialActive','loggedIn','dialGlobalInterval','dialTimezone','checkDialMethod','[syncQueueSummary]','syncCampaigns','checkIsTrunkReachable','checkIfTime','launchHandleIvr','[syncCampaigns]','\x5cw{0,','pow','replace','random','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','Contact','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','outbound','dialQueueOptions','dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','%s%s','toUpper','callerid','dialRandomLastDigitCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','XMD-ORIGINATECALLERIDNUM','originatecalleridnum','dialPrefix','trim','dialCutDigit','substring','from-sip','[originateError]:\x20%s','[originate][error]','originate\x20action\x20Error','responsetime','getQueue','callProgressDetecting','[callProgressDetecting]\x20','checkRetriveMax','countnosuchnumberretry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','evt\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','buildObj','reason\x200\x20no\x20such\x20number....','NoAnswer','custom:agentnoanswer','noanswer','[syncAgentComplete][createHistory][3]','dialNoAnswerMaxRetry','reason\x203\x20ringing\x20no\x20answer','Busy','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','custom:agentcongestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','round','predictiveIntervalMaxThreshold','floor','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','[startMethodPredictive][StartProgressive][Loop]','dropRate','Dropped\x20calls\x20day','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Drop\x20in\x20this\x20interval','dialPredictiveInterval','started\x20in\x20predictive\x20at','startMethodPredictive','getDataPredictive','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dialPredictiveOptimizationPercentage','abandonmentRate','agentBusyFactor','[getDataPredictive]','Unknown\x20Predictive','getVoiceQueueRtPauses','outboundQueuePauses','[CatchErlangB]','busyFactor','check\x20failure','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','queueStatusComplete:\x20','[booked][checkContactBlack][else]','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','scheduledat','dialRecallMeTimeout','voicePause','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RecallInQueue','RECALLFAILEDTIMEOUT','RecallFailedTimeout','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','temp','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','emptyContact','[actionOriginate]\x20','Contact.phone','[actionOriginateIvr]\x20','[getContactCampaign2]','not_inuse','dialOrderByScheduledAt','ACTIVE','[getContactDialer2]','dialLimitQueue','tryOriginatePredictive','[handlePredictive][limitChannel]','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','interval\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Ts\x20=\x20','p\x20=\x20','Umin\x20=\x20','exports','bluebird','uuid','md5','ioredis','../preview/util/util','../../../config/environment/','../../../config/logger','syncQueueSummary','../ami','redis','defaults','../rpc/cmHopperHistory','../rpc/cmHopperBlack','./action','./history','./final','./agentComplete','./queueCallerAbandon','env','XCALLY_IP_AGI','127.0.0.1','rrmemory','roundrobin','prototype','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','contactsId','uniqueId','startPredictive','startProgressive','ivrOriginated','queueBookedRR','agentconnect','queuecallerabandon','bind','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','loopClearZombieChannels','isUndefined','message','name','\x20AGENTS\x20NOT\x20LOGGED','NOT_ACTIVE','\x20NOT\x20Active','Interval','INTERVAL_IS_NULL','Intervals','\x20INTERVAL_IS_NULL','Error','stringify','milliseconds','diff','emit','type','answered','available','pTalking','sumBillable','sumDuration','sumHoldTime','talking','total','abandoned','waiting','loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','format','voice:queue:%s','voice_queue:save','campaign:ivr:%s','campaign:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','clearing\x20variable\x20start\x20progressive','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','string','\x22%s\x22\x20<%s>','inspect','error','length','undefined','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','RESCHEDULED_CONTACTS','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','is\x20not\x20active','IS_DISACTIVED','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','statedesc','starttime','clearZombieChannels','[actions]','enqueue','isNil','status','channel','catch','ivr','queue','updateOriginated','countReScheduled','resolve','then','[countReScheduled]\x20','checkIsBlackList','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','[rescheduleContact]\x20','unlockContact','[unlockContact]\x20','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','notFound','saveInDb','pick','ContactId','UserId','VoiceQueueId','CampaignId','[emptyContact][createHistory]','[emptyContact]','isSuccess','Success','isTrunkReachable','active','SIP/%s','reachable','unmonitored','uniqueid','variable','amdstatus','xcally-motion-dialer','dialAMDActive','value','state','HangupInAMD','membername','AMD','[syncHangupInAMD]','Machine','amd','[syncAgentComplete][createHistory][0]','countbusyretry','countdropretry','countmachineretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','createStateFinal','add','dialMachineRetryFrequency','minutes','YYYY-MM-DD\x20HH:mm:ss','ListId','[rescheduleContact][Machine]','HANGUP','[syncHangupInAMDIvr]','MACHINE','countglobal','countcongestionretry','countnoanswerretry','countabandonedretry','reason19\x20machine....','reason\x2019\x20machine....','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AGI','cause-txt','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','[syncAgentComplete]','syncAgentConnect','[syncAgentComplete][createHistory]','[syncQueueCallerAbandon]\x20[Drop]','syncQueueCallerAbandon','droptime','dialQueueTimeout','Drop','dropreason','dialDropMaxRetry','dialDropRetryFrequency','[rescheduleContact][Drop]','endtime','calleridname','calleridnum','Abandoned','CALLEREXIT','dialAbandonedMaxRetry','queueCallerAbandonCreateState','[syncAgentComplete][createHistory][11]','actions','actionid','locked','paused','stateinterface','strategy','queueBooked','push','idHopper'];(function(_0x35035e,_0x26bc1d){var _0x3a042f=function(_0x38d4e3){while(--_0x38d4e3){_0x35035e['push'](_0x35035e['shift']());}};_0x3a042f(++_0x26bc1d);}(_0x01f6,0xea));var _0x601f=function(_0x1b4b01,_0x43eb55){_0x1b4b01=_0x1b4b01-0x0;var _0x521446=_0x01f6[_0x1b4b01];return _0x521446;};'use strict';var util=require('util');var _=require('lodash');var BPromise=require(_0x601f('0x0'));var uuid=require(_0x601f('0x1'));var moment=require('moment');var rr=require('rr');var md5=require(_0x601f('0x2'));var Redis=require(_0x601f('0x3'));var ut=require(_0x601f('0x4'));var config=require(_0x601f('0x5'));var logger=require(_0x601f('0x6'))('dialer');var loggerBooked=require(_0x601f('0x6'))('booked');var loggerPredictive=require(_0x601f('0x6'))('predictive');var loggerPredictiveCalls=require(_0x601f('0x6'))('predictiveCalls');var loggerSyncQueueSummary=require(_0x601f('0x6'))(_0x601f('0x7'));var ami=require(_0x601f('0x8'));config[_0x601f('0x9')]=_[_0x601f('0xa')](config[_0x601f('0x9')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require(_0x601f('0xb'));var cmHopperBlack=require(_0x601f('0xc'));var voiceQueueRt=require('../rpc/voiceQueueRt');var Action=require(_0x601f('0xd'));var History=require(_0x601f('0xe'));var Final=require(_0x601f('0xf'));var AgentComplete=require(_0x601f('0x10'));var QueueCallerAbandon=require(_0x601f('0x11'));var Hangup=require('./hangup');var ipAgi=process[_0x601f('0x12')][_0x601f('0x13')]||_0x601f('0x14');var strategy={'rrmemory':_0x601f('0x15'),'roundrobin':_0x601f('0x16')};var Sequence=function(){};Sequence[_0x601f('0x17')]['enqueue']=function(_0x483f91){this[_0x601f('0x18')]=this[_0x601f('0x18')]?this[_0x601f('0x18')][_0x601f('0x19')](_0x483f91):_0x483f91();};function Dialer(_0x1ce34e,_0x32d6f4){this[_0x601f('0x1a')]=new Sequence();this[_0x601f('0x1b')]=_0x32d6f4;this[_0x601f('0x1c')]=_0x1ce34e['voiceQueues'];this['campaigns']=_0x1ce34e[_0x601f('0x1d')];this[_0x601f('0x1e')]=_0x1ce34e[_0x601f('0x1e')];this[_0x601f('0x1f')]=_0x1ce34e[_0x601f('0x1f')];this[_0x601f('0x20')]=config[_0x601f('0x20')]||0x2;this[_0x601f('0x21')]={};this['actions']={};this[_0x601f('0x22')]={};this[_0x601f('0x23')]={};this['optionPredictive']={};this[_0x601f('0x24')]={};this[_0x601f('0x25')]={};this[_0x601f('0x26')]={};this['queueBooked']={};this[_0x601f('0x27')]={};ami['on'](_0x601f('0x28'),this['syncAgentConnect']['bind'](this));ami['on'](_0x601f('0x29'),this['syncQueueCallerAbandon'][_0x601f('0x2a')](this));ami['on']('originateresponse',this[_0x601f('0x2b')][_0x601f('0x2a')](this));ami['on'](_0x601f('0x2c'),this[_0x601f('0x2d')]['bind'](this));ami['on'](_0x601f('0x2e'),this['syncQueueSummary']['bind'](this));ami['on']('hangup',this[_0x601f('0x2f')][_0x601f('0x2a')](this));ami['on'](_0x601f('0x30'),this[_0x601f('0x31')][_0x601f('0x2a')](this));ami['on'](_0x601f('0x32'),this[_0x601f('0x33')][_0x601f('0x2a')](this));ami['on'](_0x601f('0x34'),this[_0x601f('0x35')][_0x601f('0x2a')](this));ami['on'](_0x601f('0x36'),this['syncQueueStatusComplete'][_0x601f('0x2a')](this));this['loopCampaigns']();this[_0x601f('0x37')]();}function isNotNull(_0x4fa51c){return _0x4fa51c!==null&&!_[_0x601f('0x38')](_0x4fa51c);}function checkIsLoggedIn(_0x371296,_0x48740d){return function(){if(_0x48740d<=0x0){_0x371296[_0x601f('0x39')]='AGENTS_NOT_LOGGED';throw _0x371296[_0x601f('0x3a')]+_0x601f('0x3b');}};}function isActive(_0x88b276){return _0x88b276;}function checkIsActive(_0x2f95a6,_0x122273){return function(){if(!isActive(_0x122273)){_0x2f95a6['message']=_0x601f('0x3c');throw _0x2f95a6[_0x601f('0x3a')]+_0x601f('0x3d');}};}function checkInterval(_0x5b4ef0){return function(){if(!isNotNull(_0x5b4ef0[_0x601f('0x3e')])){_0x5b4ef0[_0x601f('0x39')]=_0x601f('0x3f');throw _0x5b4ef0[_0x601f('0x3a')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x5b4ef0[_0x601f('0x3e')][_0x601f('0x40')])){_0x5b4ef0['message']=_0x601f('0x3f');throw _0x5b4ef0[_0x601f('0x3a')]+_0x601f('0x41');}if(!isNotNull(_['isEmpty'](_0x5b4ef0['Interval']['Intervals']))){_0x5b4ef0[_0x601f('0x39')]=_0x601f('0x3f');throw _0x5b4ef0['name']+_0x601f('0x41');}};}function msgResponse(_0xab59d9,_0x3cb6b4,_0x42461e){return{'action':_0xab59d9,'response':_0x3cb6b4,'message':_0x42461e,'stack':_0x42461e};}function myreject(_0x5c70bb){return function(_0x1ae5ca){return _0x5c70bb(msgResponse('[ifTime][Action]',_0x601f('0x42'),JSON[_0x601f('0x43')](_0x1ae5ca)));};}function getSeconds(_0x24ed27,_0x27fbb7){var _0x907e17=moment(_0x24ed27)[_0x601f('0x44')](0x0);var _0x1ba05f=moment(_0x27fbb7)[_0x601f('0x44')](0x0);return _0x907e17[_0x601f('0x45')](_0x1ba05f,'seconds');}function emit(_0xe085da,_0x3edc45,_0x4e8057){io['to'](_0xe085da)[_0x601f('0x46')](_0x3edc45,_0x4e8057);}function emitVoiceQueueSummary(_0x70f1b8){if(_0x70f1b8[_0x601f('0x47')]==='outbound'){var _0x2c9d81={'id':_0x70f1b8['id'],'name':_0x70f1b8[_0x601f('0x3a')],'strategy':_0x70f1b8['strategy'],'answered':_0x70f1b8[_0x601f('0x48')],'available':_0x70f1b8[_0x601f('0x49')],'loggedIn':_0x70f1b8['loggedIn'],'pTalking':_0x70f1b8[_0x601f('0x4a')],'sumBillable':_0x70f1b8[_0x601f('0x4b')],'sumDuration':_0x70f1b8[_0x601f('0x4c')],'sumHoldTime':_0x70f1b8[_0x601f('0x4d')]||0x0,'talking':_0x70f1b8[_0x601f('0x4e')],'total':_0x70f1b8[_0x601f('0x4f')],'type':_0x70f1b8[_0x601f('0x47')],'unmanaged':_0x70f1b8['unmanaged'],'abandoned':_0x70f1b8[_0x601f('0x50')],'waiting':_0x70f1b8[_0x601f('0x51')],'loggedInDb':_0x70f1b8[_0x601f('0x52')],'dialActive':_0x70f1b8['dialActive'],'dialMethod':_0x70f1b8[_0x601f('0x53')],'dialOriginateCallerIdName':_0x70f1b8[_0x601f('0x54')],'dialOriginateCallerIdNumber':_0x70f1b8[_0x601f('0x55')],'dialOriginateTimeout':_0x70f1b8[_0x601f('0x56')],'dialPrefix':_0x70f1b8['dialPrefix'],'outboundAnswerAgiCallsDay':_0x70f1b8[_0x601f('0x57')],'outboundAnswerCallsDay':_0x70f1b8[_0x601f('0x58')],'outboundBlacklistCallsDay':_0x70f1b8[_0x601f('0x59')],'outboundBusyCallsDay':_0x70f1b8[_0x601f('0x5a')],'outboundCongestionCallsDay':_0x70f1b8[_0x601f('0x5b')],'outboundDropCallsDayACS':_0x70f1b8['outboundDropCallsDayACS'],'outboundDropCallsDayCallersExit':_0x70f1b8['outboundDropCallsDayCallersExit'],'outboundDropCallsDayTimeout':_0x70f1b8[_0x601f('0x5c')],'outboundNoAnswerCallsDay':_0x70f1b8[_0x601f('0x5d')],'outboundNoSuchCallsDay':_0x70f1b8[_0x601f('0x5e')],'outboundOriginateFailureCallsDay':_0x70f1b8[_0x601f('0x5f')],'outboundReCallsDay':_0x70f1b8[_0x601f('0x60')],'outboundRejectCallsDay':_0x70f1b8[_0x601f('0x61')],'outboundUnknownCallsDay':_0x70f1b8[_0x601f('0x62')],'predictiveIntervalAnsweredCalls':_0x70f1b8[_0x601f('0x63')],'predictiveIntervalAvgHoldtime':_0x70f1b8[_0x601f('0x64')],'predictiveIntervalAvgTalktime':_0x70f1b8['predictiveIntervalAvgTalktime'],'predictiveIntervalDroppedCallsCallersExit':_0x70f1b8[_0x601f('0x65')],'predictiveIntervalDroppedCallsTimeout':_0x70f1b8[_0x601f('0x66')],'predictiveIntervalErlangCalls':_0x70f1b8[_0x601f('0x67')],'predictiveIntervalErlangCallsDroppedCalls':_0x70f1b8[_0x601f('0x68')],'predictiveIntervalHitRate':_0x70f1b8['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x70f1b8[_0x601f('0x69')],'predictiveIntervalPauses':_0x70f1b8[_0x601f('0x6a')],'predictiveIntervalAvailable':_0x70f1b8[_0x601f('0x6b')],'predictiveIntervalTotalCalls':_0x70f1b8[_0x601f('0x6c')],'message':_0x70f1b8[_0x601f('0x39')],'originated':_0x70f1b8[_0x601f('0x6d')],'erlangCalls':_0x70f1b8[_0x601f('0x6e')],'erlangCallToSecond':_0x70f1b8[_0x601f('0x6f')],'erlangAbandonmentRate':_0x70f1b8[_0x601f('0x70')],'erlangBusyFactor':_0x70f1b8[_0x601f('0x71')],'startPredictive':_0x70f1b8[_0x601f('0x24')],'startProgressive':_0x70f1b8[_0x601f('0x25')]};if(_0x70f1b8['Trunk']){_0x2c9d81['Trunk']={'id':_0x70f1b8[_0x601f('0x72')]['id'],'name':_0x70f1b8[_0x601f('0x72')]['name'],'active':_0x70f1b8[_0x601f('0x72')]['active'],'callerid':_0x70f1b8[_0x601f('0x72')]['callerid']};}if(_0x70f1b8[_0x601f('0x3e')]){_0x2c9d81['Interval']={'id':_0x70f1b8[_0x601f('0x3e')]['id'],'name':_0x70f1b8[_0x601f('0x3e')][_0x601f('0x3a')]};}var _0x5a28bb=md5(JSON[_0x601f('0x43')](_0x2c9d81));if(_0x70f1b8[_0x601f('0x2')]!==_0x5a28bb){_0x70f1b8['md5']=_0x5a28bb;emit(util[_0x601f('0x73')](_0x601f('0x74'),_0x2c9d81['name']),_0x601f('0x75'),_0x2c9d81);}}}function emitCampaignSummary(_0x393a42){if(_0x393a42[_0x601f('0x47')]==='ivr'){emit(util[_0x601f('0x73')](_0x601f('0x76'),_0x393a42[_0x601f('0x3a')]),_0x601f('0x77'),_0x393a42);}}function checkGetDataPredictive(_0x4b3f2f){if(isNotNull(_0x4b3f2f)&&!_[_0x601f('0x78')](_0x4b3f2f)){loggerPredictive[_0x601f('0x79')](_0x601f('0x7a'));loggerPredictive[_0x601f('0x79')](_0x601f('0x7b'),_0x4b3f2f[_0x601f('0x6c')]);loggerPredictive['info'](_0x601f('0x7c'),_0x4b3f2f[_0x601f('0x63')]);loggerPredictive[_0x601f('0x79')](_0x601f('0x7d'),_0x4b3f2f[_0x601f('0x66')]);loggerPredictive['info'](_0x601f('0x7e'),_0x4b3f2f[_0x601f('0x65')]);loggerPredictive['info'](_0x601f('0x7f'),_0x4b3f2f['predictiveIntervalAvgHoldtime']);loggerPredictive['info']('AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4b3f2f['predictiveIntervalAvgTalktime']);loggerPredictive['info'](_0x601f('0x80'));if(_0x4b3f2f[_0x601f('0x6c')]>0x0){if(!_[_0x601f('0x38')](_0x4b3f2f['predictiveIntervalAvgTalktime'])&&_0x4b3f2f[_0x601f('0x81')]>0x0){return!![];}loggerPredictive[_0x601f('0x79')](_0x601f('0x82'));if(!_['isUndefined'](_0x4b3f2f['predictiveIntervalAvgHoldtime'])&&_0x4b3f2f[_0x601f('0x64')]>0x0){return!![];}loggerPredictive[_0x601f('0x79')](_0x601f('0x83'));}else{loggerPredictive[_0x601f('0x79')](_0x601f('0x84'));}}else{loggerPredictive[_0x601f('0x79')](_0x601f('0x85'));}return![];}function mergeDataErlangB(_0xa7c556){return function(_0x528884){loggerPredictive[_0x601f('0x79')](_0x601f('0x86'));loggerPredictive[_0x601f('0x79')](_0x601f('0x87'),_0x528884['erlangCalls']);loggerPredictive['info'](_0x601f('0x88'),_0x528884[_0x601f('0x6f')]);loggerPredictive[_0x601f('0x79')](_0x601f('0x89'),_0x528884[_0x601f('0x70')]);loggerPredictive[_0x601f('0x79')](_0x601f('0x8a'),_0x528884[_0x601f('0x71')]);loggerPredictive[_0x601f('0x79')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x528884[_0x601f('0x70')]);loggerPredictive['info']('---------------------------');_[_0x601f('0x8b')](_0xa7c556,_0x528884);};}function getDiff(_0x55e56c){var _0xc8121=moment()[_0x601f('0x44')](0x0);var _0x228b07=moment(_0x55e56c)[_0x601f('0x44')](0x0);return _0xc8121[_0x601f('0x45')](_0x228b07,'seconds');}function ifInterval(_0x5f52da,_0x563f20){if(_['isUndefined'](_0x563f20)){return![];}return getDiff(_0x563f20)<_0x5f52da*0x3c;}function freeVariablesPredictive(_0x59af11){if(isNotNull(_0x59af11)){if(!_[_0x601f('0x38')](_0x59af11[_0x601f('0x25')])){_0x59af11[_0x601f('0x25')]=undefined;loggerPredictive['info'](_0x59af11['name'],_0x601f('0x8c'));}if(!_[_0x601f('0x38')](_0x59af11[_0x601f('0x24')])){_0x59af11[_0x601f('0x24')]=undefined;loggerPredictive[_0x601f('0x79')](_0x59af11[_0x601f('0x3a')],_0x601f('0x8d'));}if(!_[_0x601f('0x38')](_0x59af11[_0x601f('0x8e')])){clearInterval(_0x59af11[_0x601f('0x8e')]);_0x59af11[_0x601f('0x8e')]=undefined;loggerPredictive['info'](_0x59af11[_0x601f('0x3a')],_0x601f('0x8f'));}}}function erlangb(_0x455152,_0x37669f){if(_0x37669f===0x0){return 0x0;}var _0x1f4962=0x1;for(var _0x591489=0x1;_0x591489<=_0x37669f;_0x591489+=0x1){_0x1f4962=0x1+_0x1f4962*_0x591489/_0x455152;}return 0x1/_0x1f4962;}function isVoiceQueueOutbound(_0x13ddf7){return _0x13ddf7==='outbound';}function isNotPreview(_0x80fffe){return _0x80fffe!=='preview';}function isCampaignIvr(_0xdeec08){return _0xdeec08==='ivr';}function getCallerId(_0x370817,_0x3a2efc,_0x52dd59){if(!_['isUndefined'](_0x52dd59)&&typeof _0x52dd59===_0x601f('0x90')&&!_[_0x601f('0x78')](_0x52dd59)){if(!_['isUndefined'](_0x3a2efc)&&typeof _0x3a2efc===_0x601f('0x90')&&!_['isEmpty'](_0x3a2efc)){return util[_0x601f('0x73')](_0x601f('0x91'),_0x3a2efc,_0x52dd59);}return util['format'](_0x601f('0x91'),_0x52dd59,_0x52dd59);}if(!_[_0x601f('0x38')](_0x370817)&&typeof _0x370817==='string'&&!_[_0x601f('0x78')](_0x370817)){return _0x370817;}return'\x22\x22\x20<>';}function loggerCatchQueueSummary(_0x2e9d1a,_0x1b34f5){return function(_0x2ba769){freeVariablesPredictive(_0x1b34f5);emitVoiceQueueSummary(_0x1b34f5);emitCampaignSummary(_0x1b34f5);loggerSyncQueueSummary['error'](_0x2e9d1a,util[_0x601f('0x92')](_0x2ba769,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x2a1d09,_0x47c66d){return function(_0x243f81){loggerPredictive[_0x601f('0x93')](_0x47c66d[_0x601f('0x3a')],_0x2a1d09);loggerPredictive['error'](_0x243f81['stack']);freeVariablesPredictive(_0x47c66d);};}function loggerCatch(_0x10c0d3){return function(_0x210988){logger[_0x601f('0x93')](_0x10c0d3,util[_0x601f('0x92')](_0x210988,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x38e55a){return _0x38e55a&&!_[_0x601f('0x38')](_0x38e55a)&&_0x38e55a[_0x601f('0x94')]>0x0;}function decremetOriginate(_0x33c4e4){if(!_[_0x601f('0x38')](_0x33c4e4)&&_0x33c4e4!==null){if(typeof _0x33c4e4['originated']!==_0x601f('0x95')){if(_0x33c4e4[_0x601f('0x6d')]>0x0){_0x33c4e4[_0x601f('0x6d')]-=0x1;}else{logger[_0x601f('0x93')](_0x601f('0x96'));}}}else{logger['error'](_0x601f('0x97'));}}function checkContactLowerLimitOriginate(_0x508cfa,_0xd80ed0,_0x3ee089){if(_0xd80ed0>_0x3ee089){for(var _0x2534f0=0x0;_0x2534f0<_0xd80ed0-_0x3ee089;_0x2534f0+=0x1){decremetOriginate(_0x508cfa);}}}function loggerGetContactDialer(_0x8fd49a,_0x20086d,_0x34d894){return function(_0x567841){checkContactLowerLimitOriginate(_0x20086d,_0x34d894,0x0);logger[_0x601f('0x93')](_0x8fd49a,util[_0x601f('0x92')](_0x567841,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x2ddaea){return function(_0x202114){if(isNotNull(_0x202114)&&isNotNull(_0x202114[0x0])){if(_0x202114[0x0][_0x601f('0x98')]>0x0){_0x2ddaea[_0x601f('0x39')]=_0x601f('0x99');logger[_0x601f('0x79')](_0x601f('0x9a')+_0x2ddaea[_0x601f('0x3a')],_0x202114[0x0][_0x601f('0x98')],_0x601f('0x9b'));}else{_0x2ddaea[_0x601f('0x39')]=_0x601f('0x9c');logger[_0x601f('0x79')](_0x601f('0x9d')+_0x2ddaea[_0x601f('0x3a')]);}}};}function notSendMessagesQueue(_0x822a6f){if(_0x822a6f[_0x601f('0x9e')]){freeVariablesPredictive(_0x822a6f);if(_0x822a6f['originated']===0x0&&_0x822a6f[_0x601f('0x4e')]===0x0&&_0x822a6f[_0x601f('0x51')]===0x0&&(_0x822a6f[_0x601f('0x4a')]||0x0)===0x0){_0x822a6f[_0x601f('0x9e')]=![];_0x822a6f['available']=0x0;_0x822a6f[_0x601f('0x39')]=_0x601f('0x3c');loggerSyncQueueSummary[_0x601f('0x93')]('[syncQueueSummary]\x20Campaign\x20Queue:\x20',_0x822a6f[_0x601f('0x3a')],_0x601f('0x9f'));}else{_0x822a6f[_0x601f('0x39')]=_0x601f('0xa0');loggerSyncQueueSummary['error']('[syncQueueSummary]\x20Campaign\x20Queue:\x20',_0x822a6f[_0x601f('0x3a')],_0x601f('0xa1'));}emitVoiceQueueSummary(_0x822a6f);}}function notSendMessagesCampaign(_0x5a4050){if(_0x5a4050[_0x601f('0x9e')]){if(_0x5a4050[_0x601f('0x6d')]===0x0){_0x5a4050['sendMessageOneNotActive']=![];_0x5a4050[_0x601f('0x39')]=_0x601f('0x3c');loggerSyncQueueSummary[_0x601f('0x93')](_0x601f('0xa2'),_0x5a4050[_0x601f('0x3a')],_0x601f('0x9f'));}else{_0x5a4050[_0x601f('0x39')]=_0x601f('0xa0');loggerSyncQueueSummary['error'](_0x601f('0xa2'),_0x5a4050[_0x601f('0x3a')],'is\x20disactive');}emitCampaignSummary(_0x5a4050);}}function createObjHistory(_0x594d0b,_0x510c29,_0x1711a1,_0x54ce96,_0x275066){_0x594d0b['message']=_0x1711a1;var _0x1e53e1=new Action(_0x594d0b,_0x510c29);var _0x3f778b=new History(_0x1e53e1);_0x3f778b['state']=_0x54ce96;_0x3f778b[_0x601f('0xa3')]=_0x275066;_0x3f778b['endtime']=_0x1e53e1[_0x601f('0xa4')];return _0x3f778b;}Dialer[_0x601f('0x17')][_0x601f('0x37')]=function(){var _0x4bf0ae=this;setInterval(function(){_0x4bf0ae[_0x601f('0xa5')](_0x4bf0ae['uniqueId'],'[uniqueid]');_0x4bf0ae[_0x601f('0xa5')](_0x4bf0ae['actions'],_0x601f('0xa6'));},0x32c8);};Dialer[_0x601f('0x17')]['clearZombieChannels']=function(_0x12e2b8,_0x2a7c5a){var _0x538e07=this;for(var _0x2df0c9 in _0x12e2b8){if(typeof _0x12e2b8[_0x2df0c9]!=='undefined'){this[_0x601f('0x1a')][_0x601f('0xa7')](function(){if(!_[_0x601f('0xa8')](_0x12e2b8[_0x2df0c9])){return ami['Action']({'action':_0x601f('0xa9'),'channel':_0x12e2b8[_0x2df0c9][_0x601f('0xaa')]})[_0x601f('0xab')](function(_0x4d8bdd){if(_0x4d8bdd['message']==='No\x20such\x20channel'){setTimeout(function(){if(_0x12e2b8[_0x2df0c9]&&_0x12e2b8[_0x2df0c9]['type']!==_0x601f('0xac')){_0x538e07['updateOriginated'](_0x538e07['voiceQueues'][_0x12e2b8[_0x2df0c9][_0x601f('0xad')]]);logger[_0x601f('0x93')]('[Dialer][checkChannel]',_0x2a7c5a,_0x2df0c9,_0x12e2b8[_0x2df0c9][_0x601f('0xad')]);delete _0x12e2b8[_0x2df0c9];}if(_0x12e2b8[_0x2df0c9]&&_0x12e2b8[_0x2df0c9]['type']==='ivr'){_0x538e07[_0x601f('0xae')](_0x538e07[_0x601f('0x1d')][_0x12e2b8[_0x2df0c9][_0x601f('0xad')]]);logger[_0x601f('0x93')]('[Dialer][checkChannel][ivr]',_0x2a7c5a,_0x2df0c9,_0x12e2b8[_0x2df0c9][_0x601f('0xad')]);delete _0x12e2b8[_0x2df0c9];}},0x2328);}});}});}}};Dialer[_0x601f('0x17')][_0x601f('0xaf')]=function(_0x5816f0){return BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](cmHopper[_0x601f('0xaf')](_0x5816f0))['catch'](loggerCatch(_0x601f('0xb2')));};Dialer['prototype'][_0x601f('0xb3')]=function(_0x4fd622){return BPromise['resolve']()[_0x601f('0xb1')](cmHopperBlack[_0x601f('0xb3')](_0x4fd622))['catch'](loggerCatch('[checkIsBlackList]\x20'));};Dialer[_0x601f('0x17')][_0x601f('0xb4')]=function(_0x4b6bec){return BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](cmHopperBlack['checkIsBlackListIvr'](_0x4b6bec))[_0x601f('0xab')](loggerCatch(_0x601f('0xb5')));};Dialer[_0x601f('0x17')][_0x601f('0xb6')]=function(_0x507b30){return BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](cmHopperHistory[_0x601f('0xb7')](_0x507b30))[_0x601f('0xab')](loggerCatch(_0x601f('0xb8')));};Dialer[_0x601f('0x17')][_0x601f('0xb9')]=function(_0x31c2b5){return BPromise['resolve']()['then'](cmHopper['rescheduleContact'](_0x31c2b5))[_0x601f('0xab')](loggerCatch(_0x601f('0xba')));};Dialer['prototype'][_0x601f('0xbb')]=function(_0x28f8e8,_0x10a7fa,_0x3a7d37){return BPromise['resolve']()[_0x601f('0xb1')](cmHopper[_0x601f('0xbb')](_0x28f8e8,_0x10a7fa,_0x3a7d37))[_0x601f('0xab')](loggerCatch(_0x601f('0xbc')));};Dialer[_0x601f('0x17')][_0x601f('0xbd')]=function(_0x539770,_0x3691b3,_0x25a83f,_0x23a891){return BPromise['resolve']()[_0x601f('0xb1')](cmHopper[_0x601f('0xbd')](_0x539770,_0x3691b3,_0x25a83f,_0x23a891))[_0x601f('0xab')](loggerCatch(_0x601f('0xbe')));};Dialer[_0x601f('0x17')][_0x601f('0xbf')]=function(_0x165226,_0x27ace2,_0x54c791){return BPromise['resolve']()['then'](cmHopper[_0x601f('0xbf')](_0x165226,_0x27ace2,_0x54c791))[_0x601f('0xab')](loggerCatch('[getContactDialer]\x20'));};Dialer['prototype']['getVoiceQueueRtPauses']=function(_0x5244bb){return BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](voiceQueueRt['getVoiceQueueRtPauses'](_0x5244bb))[_0x601f('0xab')](loggerCatch(_0x601f('0xc0')));};Dialer['prototype'][_0x601f('0xc1')]=function(_0x415c96){return BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](cmHopper[_0x601f('0xc1')](_0x415c96))[_0x601f('0xab')](loggerCatch(_0x601f('0xc2')));};Dialer[_0x601f('0x17')][_0x601f('0xc3')]=function(_0x44e453){return BPromise[_0x601f('0xb0')]()['then'](cmHopperHistory[_0x601f('0xc3')](_0x44e453))[_0x601f('0xab')](loggerCatch(_0x601f('0xc4')));};Dialer[_0x601f('0x17')][_0x601f('0xae')]=function(_0x57ba57){if(!_['isUndefined'](_0x57ba57)&&_0x57ba57!==null){if(typeof _0x57ba57['originated']!==_0x601f('0x95')){if(_0x57ba57[_0x601f('0x6d')]>0x0){_0x57ba57['originated']-=0x1;}else{logger[_0x601f('0x93')](_0x601f('0xc5'));}}}else{logger[_0x601f('0x93')](_0x601f('0xc6'));}};Dialer['prototype'][_0x601f('0xc7')]=function(_0xf06835,_0x327933){var _0x656d=this;return function(_0x77e5c0){_0x656d[_0x601f('0xae')](_0x327933);logger[_0x601f('0x93')](_0xf06835,util[_0x601f('0x92')](_0x77e5c0,{'showHidden':![],'depth':null}));};};Dialer[_0x601f('0x17')]['emptyContact']=function(_0x1a14b0,_0x5c2d91,_0x56cb25){var _0xa2c87e={'state':0x19,'statedesc':_0x601f('0xc8')};this[_0x601f('0xae')](_0x5c2d91);this[_0x601f('0xc9')](_[_0x601f('0x8b')](_0xa2c87e,_[_0x601f('0xca')](_0x56cb25,[_0x601f('0xcb'),'ListId',_0x601f('0xcc'),_0x601f('0xcd'),_0x601f('0xce')])),_0x601f('0xcf'),_0x601f('0xd0'));logger[_0x601f('0x93')](_0x1a14b0);};Dialer[_0x601f('0x17')][_0x601f('0xd1')]=function(_0x3bfabf){return _0x3bfabf===_0x601f('0xd2');};Dialer[_0x601f('0x17')][_0x601f('0xd3')]=function(_0x8a24dc){return!_[_0x601f('0x38')](_0x8a24dc)&&_0x8a24dc&&!_['isUndefined'](_0x8a24dc[_0x601f('0x3a')])&&!_['isUndefined'](_0x8a24dc[_0x601f('0xd4')])&&_0x8a24dc[_0x601f('0xd4')]&&(this[_0x601f('0x1f')][util['format'](_0x601f('0xd5'),_0x8a24dc[_0x601f('0x3a')])][_0x601f('0xa9')]===_0x601f('0xd6')||this[_0x601f('0x1f')][util['format']('SIP/%s',_0x8a24dc[_0x601f('0x3a')])][_0x601f('0xa9')]===_0x601f('0xd7'));};Dialer[_0x601f('0x17')][_0x601f('0xc9')]=function(_0x1bbf17,_0x4cbd88,_0x2385b4){this['createHistory'](_0x1bbf17)[_0x601f('0xab')](loggerCatch(_0x4cbd88));this[_0x601f('0xc1')](_0x1bbf17)['catch'](loggerCatch(_0x2385b4));};Dialer[_0x601f('0x17')]['syncVarSet']=function(_0x4d734e){var _0x5c1224=this[_0x601f('0x23')][_0x4d734e[_0x601f('0xd8')]];var _0x5cbffa;if(!_['isNil'](_0x4d734e)&&!_['isNil'](_0x4d734e[_0x601f('0xd9')])&&!_[_0x601f('0xa8')](_0x4d734e[_0x601f('0xd9')][_0x601f('0xda')])&&_0x4d734e['exten']===_0x601f('0xdb')&&_0x5c1224){if(_0x5c1224['type']!==_0x601f('0xac')&&this[_0x601f('0x1c')][_0x5c1224[_0x601f('0xad')]][_0x601f('0xdc')]&&_0x4d734e[_0x601f('0xdd')]==='HANGUP'){delete this[_0x601f('0x23')][_0x4d734e[_0x601f('0xd8')]];this[_0x601f('0xae')](this[_0x601f('0x1c')][_0x5c1224[_0x601f('0xad')]]);this[_0x601f('0x1c')][_0x5c1224[_0x601f('0xad')]][_0x601f('0x58')]+=0x1;this[_0x601f('0x1c')][_0x5c1224[_0x601f('0xad')]][_0x601f('0x57')]+=0x1;_0x5cbffa=new Hangup(_0x5c1224,_0x4d734e);_0x5cbffa[_0x601f('0xde')]=0x12;_0x5cbffa[_0x601f('0xa3')]=_0x601f('0xdf');_0x5cbffa[_0x601f('0xe0')]=_0x601f('0xe1');this['saveInDb'](_0x5cbffa,'[syncHangupInAMD][createHistory]',_0x601f('0xe2'));}if(_0x5c1224[_0x601f('0x47')]!==_0x601f('0xac')&&this[_0x601f('0x1c')][_0x5c1224[_0x601f('0xad')]][_0x601f('0xdc')]&&_0x4d734e['value']==='MACHINE'){var _0x1f4a89=this;return new BPromise(function(_0x43423e,_0x193a2f){delete _0x1f4a89[_0x601f('0x23')][_0x4d734e['uniqueid']];_0x1f4a89[_0x601f('0xae')](_0x1f4a89[_0x601f('0x1c')][_0x5c1224['queue']]);_0x1f4a89[_0x601f('0x1c')][_0x5c1224['queue']][_0x601f('0x58')]+=0x1;_0x1f4a89[_0x601f('0x1c')][_0x5c1224[_0x601f('0xad')]][_0x601f('0x57')]+=0x1;var _0x15f300=_0x1f4a89['voiceQueues'][_0x5c1224[_0x601f('0xad')]];var _0x3d0b9e=new Hangup(_0x5c1224,_0x4d734e);_0x3d0b9e[_0x601f('0xde')]=0x13;_0x3d0b9e[_0x601f('0xa3')]=_0x601f('0xe3');_0x3d0b9e[_0x601f('0xe0')]='AMD';_0x3d0b9e['countmachineretry']+=0x1;_0x3d0b9e['countglobal']+=0x1;_0x3d0b9e[_0x601f('0xe4')]=!![];_0x1f4a89[_0x601f('0xc3')](_0x3d0b9e)['catch'](loggerCatch(_0x601f('0xe5')));if(_0x3d0b9e[_0x601f('0xe6')]+_0x3d0b9e['countcongestionretry']+_0x3d0b9e['countnoanswerretry']+_0x3d0b9e['countnosuchnumberretry']+_0x3d0b9e[_0x601f('0xe7')]+_0x3d0b9e['countabandonedretry']+_0x3d0b9e[_0x601f('0xe8')]+_0x3d0b9e[_0x601f('0xe9')]>=_0x15f300[_0x601f('0xea')]){_0x1f4a89[_0x601f('0xeb')](_0x3d0b9e,_0x43423e,_0x193a2f,'reason19\x20machine....');}else{if(_0x3d0b9e[_0x601f('0xe8')]>=_0x15f300[_0x601f('0xec')]){_0x1f4a89[_0x601f('0xed')](_0x3d0b9e,_0x43423e,_0x193a2f,'reason\x2019\x20machine....');}else{_0x1f4a89['rescheduleContact']({'active':![],'countmachineretry':_0x3d0b9e[_0x601f('0xe8')],'scheduledat':moment()[_0x601f('0xee')](_0x15f300[_0x601f('0xef')],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x3d0b9e[_0x601f('0xcb')],'ListId':_0x3d0b9e[_0x601f('0xf2')],'VoiceQueueId':_0x3d0b9e[_0x601f('0xcd')]||undefined,'CampaignId':_0x3d0b9e['CampaignId']||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0xf3')));_0x43423e({'reschedule':0x1});}}});}if(_0x5c1224[_0x601f('0x47')]===_0x601f('0xac')&&this[_0x601f('0x1d')][_0x5c1224[_0x601f('0xad')]][_0x601f('0xdc')]&&_0x4d734e[_0x601f('0xdd')]===_0x601f('0xf4')){delete this['uniqueId'][_0x4d734e['uniqueid']];this[_0x601f('0xae')](this['campaigns'][_0x5c1224[_0x601f('0xad')]]);_0x5cbffa=new Hangup(_0x5c1224,_0x4d734e);_0x5cbffa[_0x601f('0xde')]=0x12;_0x5cbffa['statedesc']=_0x601f('0xdf');_0x5cbffa[_0x601f('0xe0')]='AMD';this[_0x601f('0xc9')](_0x5cbffa,'[syncHangupInAMDIvr][createHistory]',_0x601f('0xf5'));}if(_0x5c1224['type']==='ivr'&&this[_0x601f('0x1d')][_0x5c1224[_0x601f('0xad')]][_0x601f('0xdc')]&&_0x4d734e[_0x601f('0xdd')]===_0x601f('0xf6')){var _0x1f4a89=this;return new BPromise(function(_0x5e2faf,_0x5e3d1d){delete _0x1f4a89[_0x601f('0x23')][_0x4d734e['uniqueid']];_0x1f4a89[_0x601f('0xae')](_0x1f4a89[_0x601f('0x1d')][_0x5c1224[_0x601f('0xad')]]);_0x1f4a89['campaigns'][_0x5c1224['queue']]['outboundAnswerCallsDay']+=0x1;_0x1f4a89[_0x601f('0x1d')][_0x5c1224[_0x601f('0xad')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x298b52=_0x1f4a89[_0x601f('0x1d')][_0x5c1224[_0x601f('0xad')]];var _0x3a5f9a=new Hangup(_0x5c1224,_0x4d734e);_0x3a5f9a[_0x601f('0xde')]=0x13;_0x3a5f9a[_0x601f('0xa3')]=_0x601f('0xe3');_0x3a5f9a[_0x601f('0xe0')]=_0x601f('0xe1');_0x3a5f9a['countmachineretry']+=0x1;_0x3a5f9a[_0x601f('0xf7')]+=0x1;_0x3a5f9a[_0x601f('0xe4')]=!![];_0x1f4a89[_0x601f('0xc3')](_0x3a5f9a)[_0x601f('0xab')](loggerCatch(_0x601f('0xe5')));if(_0x3a5f9a[_0x601f('0xe6')]+_0x3a5f9a[_0x601f('0xf8')]+_0x3a5f9a[_0x601f('0xf9')]+_0x3a5f9a['countnosuchnumberretry']+_0x3a5f9a[_0x601f('0xe7')]+_0x3a5f9a[_0x601f('0xfa')]+_0x3a5f9a[_0x601f('0xe8')]+_0x3a5f9a[_0x601f('0xe9')]>=_0x298b52['dialGlobalMaxRetry']){_0x1f4a89[_0x601f('0xeb')](_0x3a5f9a,_0x5e2faf,_0x5e3d1d,_0x601f('0xfb'));}else{if(_0x3a5f9a['countmachineretry']>=_0x298b52[_0x601f('0xec')]){_0x1f4a89[_0x601f('0xed')](_0x3a5f9a,_0x5e2faf,_0x5e3d1d,_0x601f('0xfc'));}else{_0x1f4a89[_0x601f('0xb9')]({'active':![],'countmachineretry':_0x3a5f9a[_0x601f('0xe8')],'scheduledat':moment()[_0x601f('0xee')](_0x298b52[_0x601f('0xef')],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x3a5f9a['ContactId'],'ListId':_0x3a5f9a['ListId'],'VoiceQueueId':_0x3a5f9a[_0x601f('0xcd')]||undefined,'CampaignId':_0x3a5f9a[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0xf3')));_0x5e2faf({'reschedule':0x1});}}});}}};Dialer['prototype'][_0x601f('0x2f')]=function(_0x3b72b5){var _0x1574ba=this[_0x601f('0x23')][_0x3b72b5[_0x601f('0xd8')]];var _0x392944=this;var _0x43d8ec;if(_0x1574ba&&_0x1574ba[_0x601f('0x47')]===_0x601f('0xac')){delete this['uniqueId'][_0x3b72b5[_0x601f('0xd8')]];this[_0x601f('0xae')](this[_0x601f('0x1d')][_0x1574ba[_0x601f('0xad')]]);this[_0x601f('0x1d')][_0x1574ba[_0x601f('0xad')]][_0x601f('0xfd')]+=0x1;_0x43d8ec=new Hangup(_0x1574ba,_0x3b72b5);this[_0x601f('0xc3')](_0x43d8ec)[_0x601f('0xab')](loggerCatch(_0x601f('0xfe')));this[_0x601f('0xc1')](_0x43d8ec)[_0x601f('0xab')](loggerCatch(_0x601f('0xff')));}if(_0x1574ba&&_0x1574ba[_0x601f('0x47')]!=='ivr'&&isNotNull(this[_0x601f('0x1c')][_0x1574ba[_0x601f('0xad')]][_0x601f('0x100')])){delete this[_0x601f('0x23')][_0x3b72b5[_0x601f('0xd8')]];this[_0x601f('0xae')](this[_0x601f('0x1c')][_0x1574ba['queue']]);this[_0x601f('0x1c')][_0x1574ba[_0x601f('0xad')]][_0x601f('0x58')]+=0x1;this[_0x601f('0x1c')][_0x1574ba[_0x601f('0xad')]][_0x601f('0x57')]+=0x1;_0x43d8ec=new Hangup(_0x1574ba,_0x3b72b5);_0x43d8ec[_0x601f('0xde')]=0x10;_0x43d8ec[_0x601f('0xa3')]='AnswerAGI';_0x43d8ec[_0x601f('0xe0')]=_0x601f('0x101');this[_0x601f('0xc3')](_0x43d8ec)[_0x601f('0xab')](loggerCatch(_0x601f('0xfe')));this['moveContactManagedDialer'](_0x43d8ec)['catch'](loggerCatch(_0x601f('0xff')));}if(_0x1574ba&&_0x1574ba[_0x601f('0x47')]!==_0x601f('0xac')&&!isNotNull(this[_0x601f('0x1c')][_0x1574ba[_0x601f('0xad')]][_0x601f('0x100')])){delete this['uniqueId'][_0x3b72b5[_0x601f('0xd8')]];this['updateOriginated'](this[_0x601f('0x1c')][_0x1574ba[_0x601f('0xad')]]);this['voiceQueues'][_0x1574ba[_0x601f('0xad')]][_0x601f('0x62')]+=0x1;_0x43d8ec=new Hangup(_0x1574ba,_0x3b72b5);_0x43d8ec[_0x601f('0xde')]=0xc;_0x43d8ec['statedesc']=_0x3b72b5[_0x601f('0x102')];_0x43d8ec['membername']='Unknow';this[_0x601f('0xc3')](_0x43d8ec)[_0x601f('0xab')](loggerCatch(_0x601f('0xfe')));this[_0x601f('0xc1')](_0x43d8ec)[_0x601f('0xab')](loggerCatch('[syncHangupIvr]'));}};Dialer[_0x601f('0x17')][_0x601f('0x2d')]=function(_0x5df715){var _0x355d2d=this['uniqueId'][_0x5df715[_0x601f('0xd8')]];var _0x532313=this;if(this[_0x601f('0x1c')][_0x5df715[_0x601f('0xad')]]){if(_0x355d2d&&_0x355d2d[_0x601f('0x47')]!==_0x601f('0xac')){delete this[_0x601f('0x23')][_0x5df715[_0x601f('0xd8')]];this[_0x601f('0x1c')][_0x5df715['queue']][_0x601f('0x58')]+=0x1;var _0x1b0a85=new AgentComplete(_0x355d2d,_0x5df715);if(_0x5df715[_0x601f('0x103')]===_0x601f('0x104')){_0x1b0a85[_0x601f('0x105')]=this['voiceQueues'][_0x5df715['queue']][_0x601f('0x106')]&&this[_0x601f('0x1c')][_0x5df715[_0x601f('0xad')]][_0x601f('0x107')]?moment()[_0x601f('0x73')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;}this[_0x601f('0xc3')](_0x1b0a85)[_0x601f('0xab')](loggerCatch('[syncAgentComplete][createHistory]'));this['moveContactManagedDialer'](_0x1b0a85)['catch'](loggerCatch(_0x601f('0x108')));}}};Dialer[_0x601f('0x17')][_0x601f('0x109')]=function(_0x3de669){if(this[_0x601f('0x1c')][_0x3de669[_0x601f('0xad')]]){if(this[_0x601f('0x23')][_0x3de669[_0x601f('0xd8')]]&&this['uniqueId'][_0x3de669[_0x601f('0xd8')]][_0x601f('0x47')]!==_0x601f('0xac')){this[_0x601f('0xae')](this[_0x601f('0x1c')][_0x3de669['queue']]);this[_0x601f('0x23')][_0x3de669[_0x601f('0xd8')]]['answertime']=moment()[_0x601f('0x73')](_0x601f('0xf1'));}}};Dialer[_0x601f('0x17')]['queueCallerAbandonCreateState']=function(_0x4a106b){this['createHistory'](_0x4a106b)[_0x601f('0xab')](loggerCatch(_0x601f('0x10a')));this[_0x601f('0xc1')](_0x4a106b)['catch'](loggerCatch(_0x601f('0x10b')));};Dialer[_0x601f('0x17')][_0x601f('0x10c')]=function(_0x1c3eec){var _0x2844d2=this[_0x601f('0x23')][_0x1c3eec[_0x601f('0xd8')]];var _0x223fcb=this;if(this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]]){if(_0x2844d2&&_0x2844d2[_0x601f('0x47')]!==_0x601f('0xac')){delete this[_0x601f('0x23')][_0x1c3eec[_0x601f('0xd8')]];this[_0x601f('0xae')](this[_0x601f('0x1c')][_0x1c3eec['queue']]);_0x2844d2[_0x601f('0x10d')]=moment()[_0x601f('0x73')]('YYYY-MM-DD\x20HH:mm:ss');var _0x4982de=new QueueCallerAbandon(_0x2844d2,_0x1c3eec);if(getSeconds(_0x2844d2[_0x601f('0x10d')],_0x2844d2['responsetime'])>=_0x2844d2[_0x601f('0x10e')]){this[_0x601f('0x1c')][_0x1c3eec['queue']][_0x601f('0x66')]+=0x1;this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]][_0x601f('0x5c')]+=0x1;this['voiceQueues'][_0x1c3eec[_0x601f('0xad')]][_0x601f('0x68')]+=0x1;_0x4982de[_0x601f('0xde')]=0xa;_0x4982de[_0x601f('0xa3')]=_0x601f('0x10f');_0x4982de[_0x601f('0x110')]='TIMEOUT';_0x4982de[_0x601f('0x105')]=this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]][_0x601f('0x106')]?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x4982de[_0x601f('0xe7')]+=0x1;_0x4982de['countglobal']+=0x1;if(_0x4982de[_0x601f('0xe7')]>=this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]][_0x601f('0x111')]){this['queueCallerAbandonCreateState'](_0x4982de);}else{this[_0x601f('0xb9')]({'active':![],'countdropretry':_0x4982de[_0x601f('0xe7')],'scheduledat':moment()[_0x601f('0xee')](this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]][_0x601f('0x112')],_0x601f('0xf0'))['format'](_0x601f('0xf1')),'ContactId':_0x2844d2[_0x601f('0xcb')],'ListId':_0x2844d2[_0x601f('0xf2')],'VoiceQueueId':_0x2844d2[_0x601f('0xcd')]||undefined,'CampaignId':_0x2844d2[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0x113')));var _0x1cdc04=new History(_0x4982de);_0x1cdc04['state']=0xa;_0x1cdc04[_0x601f('0xa3')]=_0x601f('0x10f');_0x1cdc04[_0x601f('0xa4')]=moment()[_0x601f('0x73')]('YYYY-MM-DD\x20HH:mm:ss');_0x1cdc04[_0x601f('0x114')]=_0x1cdc04[_0x601f('0xa4')];_0x1cdc04[_0x601f('0x115')]=_0x4982de['calleridname'];_0x1cdc04['calleridnum']=_0x4982de[_0x601f('0x116')];this[_0x601f('0xc3')](_0x1cdc04)[_0x601f('0xab')](loggerCatch('[syncAgentComplete][createHistory][10]'));}}else{this[_0x601f('0x1c')][_0x1c3eec['queue']][_0x601f('0x65')]+=0x1;this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]]['outboundDropCallsDayCallersExit']+=0x1;_0x4982de[_0x601f('0xde')]=0xb;_0x4982de[_0x601f('0xa3')]=_0x601f('0x117');_0x4982de[_0x601f('0x110')]=_0x601f('0x118');_0x4982de[_0x601f('0xfa')]+=0x1;_0x4982de[_0x601f('0xf7')]+=0x1;if(_0x4982de['countabandonedretry']>=this['voiceQueues'][_0x1c3eec[_0x601f('0xad')]][_0x601f('0x119')]){this[_0x601f('0x11a')](_0x4982de);}else{this[_0x601f('0xb9')]({'active':![],'countabandonedretry':_0x4982de['countabandonedretry'],'scheduledat':moment()[_0x601f('0xee')](this[_0x601f('0x1c')][_0x1c3eec[_0x601f('0xad')]]['dialAbandonedRetryFrequency'],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x2844d2[_0x601f('0xcb')],'ListId':_0x2844d2[_0x601f('0xf2')],'VoiceQueueId':_0x2844d2[_0x601f('0xcd')]||undefined,'CampaignId':_0x2844d2[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch('[rescheduleContact][Abandoned]'));var _0x1cdc04=new History(_0x4982de);_0x1cdc04['state']=0xb;_0x1cdc04[_0x601f('0xa3')]='Abandoned';_0x1cdc04[_0x601f('0xa4')]=moment()['format'](_0x601f('0xf1'));_0x1cdc04['endtime']=_0x1cdc04[_0x601f('0xa4')];_0x1cdc04[_0x601f('0x115')]=_0x4982de[_0x601f('0x115')];_0x1cdc04[_0x601f('0x116')]=_0x4982de[_0x601f('0x116')];this['createHistory'](_0x1cdc04)[_0x601f('0xab')](loggerCatch(_0x601f('0x11b')));}}}}};Dialer['prototype'][_0x601f('0x31')]=function(_0x1277ff){if(this['actions'][_0x1277ff[_0x601f('0xd8')]]){this['actions'][_0x1277ff['uniqueid']][_0x601f('0xaa')]=_0x1277ff[_0x601f('0xaa')];}if(this['uniqueId'][_0x1277ff['uniqueid']]){this[_0x601f('0x23')][_0x1277ff[_0x601f('0xd8')]][_0x601f('0xaa')]=_0x1277ff[_0x601f('0xaa')];}};Dialer['prototype'][_0x601f('0x35')]=function(_0xc7d6dc){if(strategy[this[_0x601f('0x1c')][this['actions'][_0xc7d6dc['actionid']][_0x601f('0xad')]]['strategy']]===_0x601f('0x16')){if(this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]]&&_[_0x601f('0xa8')](this[_0x601f('0x11c')][_0xc7d6dc['actionid']][_0x601f('0x11e')])&&_0xc7d6dc[_0x601f('0xa9')]==='1'&&_0xc7d6dc[_0x601f('0x11f')]==='0'){if(this[_0x601f('0x1e')][_0xc7d6dc[_0x601f('0x120')]]){if(!this[_0x601f('0x1e')][_0xc7d6dc[_0x601f('0x120')]][_0x601f('0x11e')]){this[_0x601f('0x1e')][_0xc7d6dc[_0x601f('0x120')]]['locked']=!![];this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]][_0x601f('0x11e')]=!![];this['actions'][_0xc7d6dc[_0x601f('0x11d')]][_0x601f('0x120')]=_0xc7d6dc['stateinterface'];}}}}else if((strategy[this['voiceQueues'][this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]][_0x601f('0xad')]][_0x601f('0x121')]]||_0x601f('0x15'))==='rrmemory'){if(this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]]){if(this[_0x601f('0x1e')][_0xc7d6dc['stateinterface']]){this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]][_0x601f('0x120')]=_0xc7d6dc['stateinterface'];if(_[_0x601f('0xa8')](this[_0x601f('0x122')][this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]][_0x601f('0xad')]])){this['queueBooked'][this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]]['queue']]=[];}this[_0x601f('0x122')][this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]]['queue']][_0x601f('0x123')](_[_0x601f('0x8b')](_[_0x601f('0xca')](this[_0x601f('0x11c')][_0xc7d6dc[_0x601f('0x11d')]],[_0x601f('0x124'),_0x601f('0x120')]),{'status':_0xc7d6dc[_0x601f('0xa9')],'paused':_0xc7d6dc[_0x601f('0x11f')]}));}}}};function unlockQueueStatus(_0xcb34ce,_0x9cbf9e){setTimeout(function(){if(_['isUndefined'](_0xcb34ce[_0x601f('0x125')])){loggerBooked[_0x601f('0x93')](_0x601f('0x126'),_0x9cbf9e);}_0xcb34ce[_0x601f('0x125')]=!![];loggerBooked[_0x601f('0x79')]('[booked][unlockQueueStatus]',_0x9cbf9e,JSON[_0x601f('0x43')](_[_0x601f('0xca')](_0xcb34ce,[_0x601f('0x3a'),_0x601f('0x125')])));},0x1f3);}Dialer[_0x601f('0x17')]['syncQueueStatusComplete']=function(_0x2bfdf5){var _0x2a61a0=this;var _0x8d73b1=_0x2a61a0[_0x601f('0x1c')][_0x2a61a0[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]];if(strategy[this[_0x601f('0x1c')][this['actions'][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]]['strategy']]===_0x601f('0x16')){if(this['actions'][_0x2bfdf5[_0x601f('0x11d')]]&&this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]]['stateinterface']){this[_0x601f('0x1b')][_0x601f('0x127')](this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0x124')],this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0x120')])[_0x601f('0xab')](function(_0x16f978){logger['error'](_0x601f('0x128'),util[_0x601f('0x92')](_0x16f978,{'showHidden':![],'depth':null}));})['finally'](function(){_0x2a61a0[_0x601f('0xae')](_0x2a61a0['voiceQueues'][_0x2a61a0[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]]);_0x2a61a0['agents'][_0x2a61a0[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0x120')]][_0x601f('0x11e')]=![];delete _0x2a61a0[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]];unlockQueueStatus(_0x8d73b1);});}else{this[_0x601f('0xae')](this[_0x601f('0x1c')][this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]]);this['rescheduleContact']({'active':![],'ContactId':this[_0x601f('0x11c')][_0x2bfdf5['actionid']][_0x601f('0xcb')],'ListId':this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]]['ListId'],'VoiceQueueId':this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xcd')]||undefined,'CampaignId':this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0x129')));delete this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]];unlockQueueStatus(_0x8d73b1);}}else if((strategy[this[_0x601f('0x1c')][this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]][_0x601f('0x121')]]||_0x601f('0x15'))==='rrmemory'){var _0x33095c;if(this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]]&&!_[_0x601f('0x78')](this[_0x601f('0x122')][this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]])){if(this[_0x601f('0x27')][_0x2a61a0['actions'][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]]){this['queueBookedRR'][_0x2a61a0[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]]=this[_0x601f('0x27')][this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]]['queue']]?this[_0x601f('0x27')][this[_0x601f('0x11c')][_0x2bfdf5['actionid']][_0x601f('0xad')]]:this['queueBooked'][this[_0x601f('0x11c')][_0x2bfdf5['actionid']][_0x601f('0xad')]]?this[_0x601f('0x122')][this[_0x601f('0x11c')][_0x2bfdf5['actionid']]['queue']][_0x601f('0x12a')]||0x0:0x0;}this[_0x601f('0x122')][this['actions'][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]][_0x601f('0x12a')]=this[_0x601f('0x27')][this[_0x601f('0x11c')][_0x2bfdf5[_0x601f('0x11d')]][_0x601f('0xad')]];for(var _0x42734a=0x0;_0x42734a=0x0;})[_0x601f('0xab')](myreject(_0x114a7e)));}}else{_0x5ea448[_0x601f('0x123')](ami[_0x601f('0x140')]({'action':_0x601f('0x13c'),'command':util['format']('iftime\x20%s,%s',_0xbbee20,!_[_0x601f('0x38')](config['timezones'][_0x3712cb])?_0x3712cb:'')})[_0x601f('0xb1')](function(_0x1e4595){return _0x1e4595['content'][_0x601f('0x13e')]('true')>=0x0;})[_0x601f('0xab')](myreject(_0x114a7e)));}BPromise[_0x601f('0x141')](_0x5ea448)[_0x601f('0xb1')](function(_0x9fd71d){var _0x4ae46a=_[_0x601f('0x142')](_0x9fd71d);if(_0x4ae46a){return _0x5571c7(_0x4ae46a);}else{_0x456a6d[_0x601f('0x39')]=_0x532523?'GLOBAL_INTERVAL_IS_OVERTIME':_0x601f('0x143');return _0x114a7e(msgResponse(_0x601f('0x144'),'Failure',_0x601f('0x145')+_0x532523+'\x20'+_0x1df63e+_0x601f('0x146')+util[_0x601f('0x92')](_0xbbee20,{'showHidden':![],'depth':null})+_0x601f('0x147')+_0x3712cb));}})['catch'](function(_0x56b186){return _0x114a7e(msgResponse(_0x601f('0x135'),_0x601f('0x137'),JSON[_0x601f('0x43')](_0x56b186)));});});};Dialer[_0x601f('0x17')]['checkDialMethod']=function(_0x4439b4){var _0x5b0c12=this;return function(){switch(_0x4439b4[_0x601f('0x53')]){case _0x601f('0x148'):freeVariablesPredictive(_0x4439b4);_0x5b0c12[_0x601f('0x149')](_0x4439b4,0x1);break;case _0x601f('0x14a'):freeVariablesPredictive(_0x4439b4);_0x5b0c12['handlePower'](_0x4439b4,_0x4439b4[_0x601f('0x14b')]);break;case _0x601f('0x14c'):_0x5b0c12[_0x601f('0x14c')](_0x4439b4);break;case _0x601f('0x14d'):freeVariablesPredictive(_0x4439b4);_0x5b0c12[_0x601f('0x149')](_0x4439b4,0x1);break;default:freeVariablesPredictive(_0x4439b4);logger['error'](_0x601f('0x14e'),_0x4439b4[_0x601f('0x3a')],_0x601f('0x14f'));}};};Dialer[_0x601f('0x17')]['launchHandleIvr']=function(_0x345e45){var _0x2c81ec=this;return function(){_0x2c81ec[_0x601f('0x150')](_0x345e45);};};Dialer[_0x601f('0x17')]['syncQueueSummary']=function(_0x42f4f9){var _0x5694ed=this;if(isNotPreview(_0x42f4f9['dialMethod'])){if(isVoiceQueueOutbound(_0x42f4f9[_0x601f('0x47')])&&isActive(_0x42f4f9[_0x601f('0x151')])){_0x42f4f9['sendMessageOneNotActive']=!![];BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](checkIsLoggedIn(_0x42f4f9,_0x42f4f9[_0x601f('0x152')]))[_0x601f('0xb1')](checkIsActive(_0x42f4f9,_0x42f4f9[_0x601f('0x151')]))[_0x601f('0xb1')](checkInterval(_0x42f4f9))[_0x601f('0xb1')](_0x5694ed['checkIsTrunkReachable'](_0x42f4f9))['then'](_0x5694ed['checkIfTime'](_0x42f4f9[_0x601f('0x153')],_0x42f4f9[_0x601f('0x154')],_0x42f4f9['name'],_0x42f4f9))[_0x601f('0xb1')](_0x5694ed['checkIfTimeIntervals'](_0x42f4f9[_0x601f('0x3e')],_0x42f4f9['dialTimezone'],_0x42f4f9['name'],_0x42f4f9))[_0x601f('0xb1')](_0x5694ed[_0x601f('0x155')](_0x42f4f9))[_0x601f('0xab')](loggerCatchQueueSummary(_0x601f('0x156'),_0x42f4f9));}else{notSendMessagesQueue(_0x42f4f9);}}else{freeVariablesPredictive(_0x42f4f9);}};Dialer['prototype'][_0x601f('0x157')]=function(){var _0xe456ea=this;var _0x2b4870;for(var _0x156d9b in this['campaigns']){if(typeof this[_0x601f('0x1d')][_0x156d9b]!=='undefined'){_0x2b4870=this[_0x601f('0x1d')][_0x156d9b];if(isCampaignIvr(_0x2b4870[_0x601f('0x47')])&&isActive(_0x2b4870[_0x601f('0xd4')])){_0x2b4870['sendMessageOneNotActive']=!![];BPromise[_0x601f('0xb0')]()[_0x601f('0xb1')](checkIsActive(_0x2b4870,_0x2b4870[_0x601f('0xd4')]))[_0x601f('0xb1')](checkInterval(_0x2b4870))[_0x601f('0xb1')](_0xe456ea[_0x601f('0x158')](_0x2b4870))[_0x601f('0xb1')](_0xe456ea[_0x601f('0x159')](_0x2b4870[_0x601f('0x153')],_0x2b4870['dialTimezone'],_0x2b4870[_0x601f('0x3a')],_0x2b4870))[_0x601f('0xb1')](_0xe456ea['checkIfTimeIntervals'](_0x2b4870[_0x601f('0x3e')],_0x2b4870['dialTimezone'],_0x2b4870[_0x601f('0x3a')],_0x2b4870))['then'](_0xe456ea[_0x601f('0x15a')](_0x2b4870))[_0x601f('0xab')](loggerCatchQueueSummary(_0x601f('0x15b'),_0x2b4870));}else{notSendMessagesCampaign(_0x2b4870);}}}};function getCallerIdRandom(_0x3c9a68,_0xa2fc8d){var _0x3429e2;var _0x2b46d1;var _0x55afcd;if(_0xa2fc8d<=0x0){_0xa2fc8d=0x1;}_0x3429e2=new RegExp(_0x601f('0x15c')+_0xa2fc8d+'}$');_0x2b46d1=Math[_0x601f('0x15d')](0xa,_0xa2fc8d-0x1);_0x55afcd=Math[_0x601f('0x15d')](0xa,_0xa2fc8d)-0x1;return util['format']('%s',_[_0x601f('0x15e')](_0x3c9a68,_0x3429e2,_[_0x601f('0x15f')](_0x2b46d1,_0x55afcd)));}function extractCalleridName(_0x5947ee){var _0x3a9c9d=_0x5947ee['match'](/"(.*?)"/);return _0x3a9c9d?_0x3a9c9d[0x1]:_0x5947ee;}function extractCalleridNumber(_0x47b47a){var _0x505eaa=_0x47b47a['match'](/<(.*?)>/);return _0x505eaa?_0x505eaa[0x1]:_0x47b47a;}Dialer[_0x601f('0x17')][_0x601f('0x160')]=function(_0x56e2ce,_0x1f94c9){var _0x164ba3=this;var _0x3db1c6=uuid['v4']();this[_0x601f('0x11c')][_0x3db1c6]=new Action(_0x56e2ce,_0x1f94c9,_0x3db1c6);return new BPromise(function(_0x58e936,_0x48146a){if(_['isUndefined'](_0x56e2ce)&&typeof _0x56e2ce!==_0x601f('0x161')){return _0x48146a(msgResponse(_0x601f('0x162'),_0x601f('0x137'),_0x601f('0x163')));}if(_[_0x601f('0x38')](_0x1f94c9['Contact'][_0x601f('0x164')])||_0x1f94c9[_0x601f('0x165')][_0x601f('0x164')]===null){return _0x48146a(msgResponse('originate','Failure',_0x601f('0x166')));}var _0x4ddb06={'XMD-CALLERID':_0x164ba3[_0x601f('0x11c')][_0x3db1c6][_0x601f('0x167')](),'XMD-AGI':_0x56e2ce[_0x601f('0x100')]?util['format'](_0x601f('0x168'),ipAgi,_0x56e2ce[_0x601f('0x100')]):_0x601f('0x169'),'XMD-AGIAFTER':_0x56e2ce['dialQueueProject2']?util['format'](_0x601f('0x168'),ipAgi,_0x56e2ce[_0x601f('0x106')]):_0x601f('0x169'),'XMD-QUEUE':_0x56e2ce[_0x601f('0x47')]===_0x601f('0x16a')?util['format']('\x22%s,%s%s,,,%s\x22',_0x56e2ce['name'],_0x56e2ce[_0x601f('0x16b')]||'',_0x56e2ce['dialAgiAfterHangupAgent']?'c':'',_0x56e2ce[_0x601f('0x10e')]||0x3):_0x601f('0x169'),'XMD-CONTACTID':_0x1f94c9['ContactId'],'XMD-CDRTYPE':_0x601f('0x16c'),'CALLERID(all)':_0x164ba3[_0x601f('0x11c')][_0x3db1c6]['getCaller'](),'XMD-AMD':_0x56e2ce[_0x601f('0xdc')]?'ACTIVE':'NONE','XMD-DESTINATION':_0x601f('0xdb')};if(_0x56e2ce['dialAMDActive']){_0x4ddb06[_0x601f('0x16d')]=_0x56e2ce[_0x601f('0x16e')]||0x9c4;_0x4ddb06[_0x601f('0x16f')]=_0x56e2ce[_0x601f('0x170')]||0x5dc;_0x4ddb06[_0x601f('0x171')]=_0x56e2ce[_0x601f('0x172')]||0x320;_0x4ddb06['XMD-AMDTOTALANALYSISTIME']=_0x56e2ce[_0x601f('0x173')]||0x1388;_0x4ddb06[_0x601f('0x174')]=_0x56e2ce[_0x601f('0x175')]||0x64;_0x4ddb06['XMD-AMDBETWEENWORDSSILENCE']=_0x56e2ce[_0x601f('0x176')]||0x32;_0x4ddb06['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x56e2ce[_0x601f('0x177')]||0x3;_0x4ddb06[_0x601f('0x178')]=_0x56e2ce[_0x601f('0x179')]||0x100;_0x4ddb06[_0x601f('0x17a')]=_0x56e2ce[_0x601f('0x17b')]||0x1388;}if(_0x56e2ce[_0x601f('0x47')]===_0x601f('0x16a')){_0x4ddb06[_0x601f('0x17c')]=_0x1f94c9[_0x601f('0xcd')];}else{_0x4ddb06[_0x601f('0x17d')]=_0x1f94c9[_0x601f('0xce')];}for(var _0x5d5c4f in _0x1f94c9['Contact']){if(typeof _0x1f94c9[_0x601f('0x165')][_0x5d5c4f]!==_0x601f('0x95')){if(isNotNull(_0x1f94c9[_0x601f('0x165')][_0x5d5c4f])&&_0x5d5c4f!=='id'&&_0x5d5c4f!=='tags'&&_0x5d5c4f!=='createdAt'&&_0x5d5c4f!=='updatedAt'){_0x4ddb06[util[_0x601f('0x73')](_0x601f('0x17e'),'XMD-',_[_0x601f('0x17f')](_0x5d5c4f))]=_0x1f94c9[_0x601f('0x165')][_0x5d5c4f];}}}var _0x3baa0e=_0x164ba3[_0x601f('0xd3')](_0x56e2ce[_0x601f('0x72')])?getCallerId(_0x56e2ce[_0x601f('0x72')][_0x601f('0x180')],_0x56e2ce['dialOriginateCallerIdName'],_0x56e2ce[_0x601f('0x181')]>0x0?getCallerIdRandom(_0x56e2ce[_0x601f('0x55')],_0x56e2ce[_0x601f('0x181')]):_0x56e2ce[_0x601f('0x55')]):getCallerId(_[_0x601f('0xa8')](_0x56e2ce[_0x601f('0x133')])?_0x56e2ce[_0x601f('0x72')]['callerid']:_0x56e2ce[_0x601f('0x133')]['callerid'],_0x56e2ce[_0x601f('0x54')],_0x56e2ce[_0x601f('0x181')]>0x0?getCallerIdRandom(_0x56e2ce[_0x601f('0x55')],_0x56e2ce[_0x601f('0x181')]):_0x56e2ce[_0x601f('0x55')]);if(_0x3baa0e){_0x4ddb06[_0x601f('0x182')]=_0x164ba3[_0x601f('0x11c')][_0x3db1c6][_0x601f('0x183')]=extractCalleridName(_0x3baa0e);_0x4ddb06[_0x601f('0x184')]=_0x164ba3[_0x601f('0x11c')][_0x3db1c6][_0x601f('0x185')]=extractCalleridNumber(_0x3baa0e);}return ami[_0x601f('0x140')]({'actionid':_0x3db1c6,'action':_0x601f('0x162'),'channel':_0x164ba3[_0x601f('0xd3')](_0x56e2ce[_0x601f('0x72')])?util[_0x601f('0x73')]('SIP/%s/%s%s',_0x56e2ce[_0x601f('0x72')][_0x601f('0x3a')],isNotNull(_0x56e2ce[_0x601f('0x186')])?_0x56e2ce[_0x601f('0x186')][_0x601f('0x187')]()||'':'',_0x56e2ce[_0x601f('0x188')]>0x0?_0x1f94c9[_0x601f('0x165')][_0x601f('0x164')][_0x601f('0x189')](_0x56e2ce[_0x601f('0x188')]):_0x1f94c9[_0x601f('0x165')][_0x601f('0x164')]):util[_0x601f('0x73')]('SIP/%s/%s%s',_[_0x601f('0xa8')](_0x56e2ce['TrunkBackup'])?_0x56e2ce['Trunk'][_0x601f('0x3a')]:_0x56e2ce[_0x601f('0x133')][_0x601f('0x3a')],isNotNull(_0x56e2ce[_0x601f('0x186')])?_0x56e2ce['dialPrefix'][_0x601f('0x187')]()||'':'',_0x56e2ce['dialCutDigit']>0x0?_0x1f94c9[_0x601f('0x165')]['phone'][_0x601f('0x189')](_0x56e2ce[_0x601f('0x188')]):_0x1f94c9[_0x601f('0x165')][_0x601f('0x164')]),'callerid':_0x3baa0e,'Exten':_0x601f('0xdb'),'Context':_0x601f('0x18a'),'Priority':'1','variable':_0x4ddb06,'timeout':(_0x56e2ce[_0x601f('0x56')]||0x1e)*0x3e8,'async':!![],'channelid':_0x3db1c6})[_0x601f('0xb1')](function(_0x38c0c7){return _0x58e936(_0x38c0c7);})[_0x601f('0xab')](function(_0x4e5a04){_0x56e2ce[_0x601f('0x5f')]+=0x1;var _0x100603=new History(_0x164ba3[_0x601f('0x11c')][_0x3db1c6]);logger['error'](util[_0x601f('0x73')](_0x601f('0x18b'),JSON[_0x601f('0x43')](_0x4e5a04)));_0x100603[_0x601f('0xde')]=0xe;_0x100603[_0x601f('0xa3')]='OriginateError';_0x100603[_0x601f('0xa4')]=moment()['format'](_0x601f('0xf1'));_0x100603[_0x601f('0x114')]=_0x100603[_0x601f('0xa4')];_0x164ba3[_0x601f('0xc3')](_0x100603)[_0x601f('0xab')](loggerCatch('[originate][error]'));_0x164ba3[_0x601f('0xc1')](_0x100603)[_0x601f('0xab')](loggerCatch(_0x601f('0x18c')))[_0x601f('0x19')](function(){delete _0x164ba3[_0x601f('0x11c')][_0x3db1c6];return _0x48146a(msgResponse(_0x601f('0x162'),_0x601f('0x42'),_0x601f('0x18d')));});});});};Dialer[_0x601f('0x17')][_0x601f('0x2b')]=function(_0xe2ef97){var _0x132503=this[_0x601f('0x11c')][_0xe2ef97[_0x601f('0x11d')]];if(_0x132503){delete this[_0x601f('0x11c')][_0xe2ef97[_0x601f('0x11d')]];_0x132503[_0x601f('0x18e')]=moment()[_0x601f('0x73')](_0x601f('0xf1'));var _0x2c47a6=_0x132503[_0x601f('0x47')]===_0x601f('0xac')?this['campaigns'][_0x132503[_0x601f('0xad')]]:this[_0x601f('0x1c')][_0x132503[_0x601f('0x18f')]()];if(!this[_0x601f('0xd1')](_0xe2ef97['response'])){this[_0x601f('0xae')](_0x2c47a6);return this[_0x601f('0x190')](_0x132503,_0x2c47a6,_0xe2ef97)['catch'](loggerCatch(_0x601f('0x191')));}this[_0x601f('0x23')][_0xe2ef97['uniqueid']]=_0x132503;}};Dialer['prototype'][_0x601f('0x192')]=function(_0x1efda9,_0x709e6,_0x1fc499){var _0x4ab07d=new History(_0x709e6);if(_0x4ab07d[_0x601f('0xe6')]+_0x4ab07d[_0x601f('0xf8')]+_0x4ab07d['countnoanswerretry']+_0x4ab07d[_0x601f('0x193')]+_0x4ab07d[_0x601f('0xe7')]+_0x4ab07d[_0x601f('0xfa')]+_0x4ab07d['countmachineretry']+_0x4ab07d['countagentrejectretry']>=_0x1fc499['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x1efda9){case 0x3:if(_0x4ab07d[_0x601f('0xf9')]>=_0x1fc499['dialNoAnswerMaxRetry']-0x1){return!![];}this[_0x601f('0xb9')]({'active':![],'countnoanswerretry':_0x4ab07d[_0x601f('0xf9')]+=0x1,'scheduledat':moment()['add'](_0x1fc499[_0x601f('0x194')],_0x601f('0xf0'))['format'](_0x601f('0xf1')),'ContactId':_0x4ab07d[_0x601f('0xcb')],'ListId':_0x4ab07d[_0x601f('0xf2')],'VoiceQueueId':_0x4ab07d[_0x601f('0xcd')]||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})['catch'](loggerCatch(_0x601f('0x195')));break;case 0x5:if(_0x4ab07d[_0x601f('0xe6')]>=_0x1fc499[_0x601f('0x196')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countbusyretry':_0x4ab07d[_0x601f('0xe6')]+=0x1,'scheduledat':moment()[_0x601f('0xee')](_0x1fc499[_0x601f('0x197')],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x4ab07d['ContactId'],'ListId':_0x4ab07d[_0x601f('0xf2')],'VoiceQueueId':_0x4ab07d['VoiceQueueId']||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0x198')));break;case 0x8:if(_0x4ab07d[_0x601f('0xf8')]>=_0x1fc499[_0x601f('0x199')]-0x1){return!![];}this[_0x601f('0xb9')]({'active':![],'countcongestionretry':_0x4ab07d[_0x601f('0xf8')]+=0x1,'scheduledat':moment()[_0x601f('0xee')](_0x1fc499[_0x601f('0x19a')],'minutes')[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x4ab07d[_0x601f('0xcb')],'ListId':_0x4ab07d[_0x601f('0xf2')],'VoiceQueueId':_0x4ab07d['VoiceQueueId']||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})['catch'](loggerCatch(_0x601f('0x19b')));break;case 0x0:if(_0x4ab07d[_0x601f('0x193')]>=_0x1fc499[_0x601f('0x19c')]-0x1){return!![];}else{this[_0x601f('0xb9')]({'active':![],'countnosuchnumberretry':_0x4ab07d[_0x601f('0x193')]+=0x1,'scheduledat':moment()[_0x601f('0xee')](_0x1fc499['dialNoSuchNumberRetryFrequency'],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x4ab07d[_0x601f('0xcb')],'ListId':_0x4ab07d['ListId'],'VoiceQueueId':_0x4ab07d[_0x601f('0xcd')]||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x4ab07d['countdropretry']>=_0x1fc499['dialDropMaxRetry']-0x1){return!![];}this[_0x601f('0xb9')]({'active':![],'countdropretry':_0x4ab07d[_0x601f('0xe7')]+=0x1,'scheduledat':moment()[_0x601f('0xee')](_0x1fc499[_0x601f('0x112')],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x4ab07d['ContactId'],'ListId':_0x4ab07d[_0x601f('0xf2')],'VoiceQueueId':_0x4ab07d['VoiceQueueId']||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})['catch'](loggerCatch(_0x601f('0x113')));break;case 0xb:if(_0x4ab07d[_0x601f('0xfa')]>=_0x1fc499[_0x601f('0x119')]-0x1){return!![];}this[_0x601f('0xb9')]({'active':![],'countabandonedretry':_0x4ab07d['countabandonedretry']+=0x1,'scheduledat':moment()[_0x601f('0xee')](_0x1fc499[_0x601f('0x19d')],_0x601f('0xf0'))[_0x601f('0x73')](_0x601f('0xf1')),'ContactId':_0x4ab07d['ContactId'],'ListId':_0x4ab07d['ListId'],'VoiceQueueId':_0x4ab07d[_0x601f('0xcd')]||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0x19e')));break;case 0x13:if(_0x4ab07d['countmachineretry']>=_0x1fc499[_0x601f('0xec')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countmachineretry':_0x4ab07d[_0x601f('0xe8')]+=0x1,'scheduledat':moment()[_0x601f('0xee')](_0x1fc499[_0x601f('0xef')],_0x601f('0xf0'))[_0x601f('0x73')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4ab07d[_0x601f('0xcb')],'ListId':_0x4ab07d[_0x601f('0xf2')],'VoiceQueueId':_0x4ab07d[_0x601f('0xcd')]||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x4ab07d['countagentrejectretry']>=_0x1fc499[_0x601f('0x19f')]-0x1){return!![];}this[_0x601f('0xb9')]({'active':![],'countagentrejectretry':_0x4ab07d[_0x601f('0xe9')]+=0x1,'scheduledat':moment()['add'](_0x1fc499['dialAgentRejectRetryFrequency'],_0x601f('0xf0'))[_0x601f('0x73')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4ab07d['ContactId'],'ListId':_0x4ab07d[_0x601f('0xf2')],'VoiceQueueId':_0x4ab07d[_0x601f('0xcd')]||undefined,'CampaignId':_0x4ab07d[_0x601f('0xce')]||undefined})['catch'](loggerCatch(_0x601f('0x1a0')));break;default:return!![];}};Dialer[_0x601f('0x17')][_0x601f('0x190')]=function(_0x9894d2,_0x34df06,_0x5a43ec){var _0x4c59e7=this;var _0x1eeee1=new History(_0x9894d2);return new BPromise(function(_0x2fdfe4,_0x5f3bea){if(_[_0x601f('0x38')](_0x34df06)&&typeof _0x34df06!==_0x601f('0x161')){return _0x5f3bea(msgResponse('[callProgressDetecting]','Failure','entity\x20is\x20undefine'));}if(_[_0x601f('0x38')](_0x5a43ec)&&typeof _0x5a43ec!==_0x601f('0x161')){return _0x5f3bea(msgResponse(_0x601f('0x1a1'),'Failure',_0x601f('0x1a2')));}switch(_0x5a43ec[_0x601f('0x103')]){case'0':_0x34df06[_0x601f('0x5e')]+=0x1;_0x1eeee1[_0x601f('0xde')]=0x0;_0x1eeee1['statedesc']=_0x601f('0x1a3');_0x1eeee1[_0x601f('0x193')]+=0x1;_0x1eeee1[_0x601f('0xf7')]+=0x1;ami[_0x601f('0x46')](_0x601f('0x1a4'),ut[_0x601f('0x1a5')](_0x9894d2,'nosuchnumber'));_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)[_0x601f('0xab')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x4c59e7['checkRetriveMax'](0x0,_0x9894d2,_0x34df06)){if(_0x1eeee1['countnosuchnumberretry']>=_0x34df06[_0x601f('0x19c')]){_0x4c59e7[_0x601f('0xed')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1a6'));}else{_0x4c59e7[_0x601f('0xeb')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x34df06[_0x601f('0x5d')]+=0x1;_0x1eeee1['state']=0x3;_0x1eeee1[_0x601f('0xa3')]=_0x601f('0x1a7');_0x1eeee1[_0x601f('0xf9')]+=0x1;_0x1eeee1[_0x601f('0xf7')]+=0x1;ami[_0x601f('0x46')](_0x601f('0x1a8'),ut[_0x601f('0x1a5')](_0x9894d2,_0x601f('0x1a9')));_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)[_0x601f('0xab')](loggerCatch(_0x601f('0x1aa')));if(_0x4c59e7['checkRetriveMax'](0x3,_0x9894d2,_0x34df06)){if(_0x1eeee1[_0x601f('0xf9')]>=_0x34df06[_0x601f('0x1ab')]){_0x4c59e7[_0x601f('0xed')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1ac'));}else{_0x4c59e7['stateGlobal'](_0x1eeee1,_0x2fdfe4,_0x5f3bea,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x34df06[_0x601f('0x5a')]+=0x1;_0x1eeee1['state']=0x5;_0x1eeee1[_0x601f('0xa3')]=_0x601f('0x1ad');_0x1eeee1[_0x601f('0xe6')]+=0x1;_0x1eeee1[_0x601f('0xf7')]+=0x1;ami['emit'](_0x601f('0x1ae'),ut[_0x601f('0x1a5')](_0x9894d2,_0x601f('0x1af')));_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)['catch'](loggerCatch(_0x601f('0x1b0')));if(_0x4c59e7[_0x601f('0x192')](0x5,_0x9894d2,_0x34df06)){if(_0x1eeee1[_0x601f('0xe6')]>=_0x34df06['dialBusyMaxRetry']){_0x4c59e7[_0x601f('0xed')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1b1'));}else{_0x4c59e7['stateGlobal'](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1b1'));}}break;case'8':_0x34df06[_0x601f('0x5b')]+=0x1;_0x1eeee1['state']=0x8;_0x1eeee1[_0x601f('0xa3')]=_0x601f('0x1b2');_0x1eeee1[_0x601f('0xf8')]+=0x1;_0x1eeee1['countglobal']+=0x1;ami['emit'](_0x601f('0x1b3'),ut[_0x601f('0x1a5')](_0x9894d2,'congestion'));_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)[_0x601f('0xab')](loggerCatch(_0x601f('0x1b4')));if(_0x4c59e7['checkRetriveMax'](0x8,_0x9894d2,_0x34df06)){if(_0x1eeee1[_0x601f('0xf8')]>=_0x34df06[_0x601f('0x199')]){_0x4c59e7[_0x601f('0xed')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1b5'));}else{_0x4c59e7[_0x601f('0xeb')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1b5'));}}break;case'11':_0x34df06[_0x601f('0x1b6')]+=0x1;_0x1eeee1['state']=0xb;_0x1eeee1[_0x601f('0xa3')]=_0x601f('0x117');_0x1eeee1[_0x601f('0xfa')]+=0x1;_0x1eeee1[_0x601f('0xf7')]+=0x1;_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)[_0x601f('0xab')](loggerCatch(_0x601f('0x11b')));if(_0x4c59e7[_0x601f('0x192')](0xb,_0x9894d2,_0x34df06)){if(_0x1eeee1['countabandonedretry']>=_0x34df06[_0x601f('0x119')]){_0x4c59e7[_0x601f('0xed')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,'reason\x2011\x20abandoned');}else{_0x4c59e7[_0x601f('0xeb')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1b7'));}}break;case'20':_0x34df06[_0x601f('0x61')]+=0x1;_0x1eeee1[_0x601f('0xde')]=0x14;_0x1eeee1[_0x601f('0xa3')]='AgentReject';_0x1eeee1[_0x601f('0xe9')]+=0x1;_0x1eeee1[_0x601f('0xf7')]+=0x1;ami[_0x601f('0x46')]('custom:agentreject',ut[_0x601f('0x1a5')](_0x9894d2,'agentreject'));_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)[_0x601f('0xab')](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x4c59e7['checkRetriveMax'](0x14,_0x9894d2,_0x34df06)){if(_0x1eeee1[_0x601f('0xe9')]>=_0x34df06[_0x601f('0x19f')]){_0x4c59e7[_0x601f('0xed')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,'reason\x2020\x20agentreject');}else{_0x4c59e7[_0x601f('0xeb')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x601f('0x1b8'));}}break;default:_0x34df06['outboundUnknownCallsDay']+=0x1;_0x1eeee1[_0x601f('0xde')]=0xc;_0x1eeee1[_0x601f('0xa3')]=_0x5a43ec[_0x601f('0x103')];_0x4c59e7[_0x601f('0xc3')](_0x1eeee1)[_0x601f('0xab')](loggerCatch(_0x601f('0x1b9')));if(_0x4c59e7[_0x601f('0x192')](_0x5a43ec[_0x601f('0x103')],_0x9894d2,_0x34df06)){if(_0x1eeee1[_0x601f('0xe6')]+_0x1eeee1[_0x601f('0xf8')]+_0x1eeee1[_0x601f('0xf9')]+_0x1eeee1[_0x601f('0x193')]+_0x1eeee1[_0x601f('0xe7')]+_0x1eeee1[_0x601f('0xfa')]+_0x1eeee1[_0x601f('0xe8')]+_0x1eeee1[_0x601f('0xe9')]>=_0x34df06[_0x601f('0xea')]){_0x4c59e7[_0x601f('0xeb')](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x5a43ec[_0x601f('0x103')]);}else{_0x4c59e7['createStateFinal'](_0x1eeee1,_0x2fdfe4,_0x5f3bea,_0x5a43ec[_0x601f('0x103')]);}}}});};Dialer[_0x601f('0x17')][_0x601f('0xeb')]=function(_0x57c5a6,_0x398916,_0x122031,_0x53cb18){var _0xb12325=new Final(_0x57c5a6);_0xb12325[_0x601f('0xde')]=0xf;_0xb12325[_0x601f('0xa3')]=_0x601f('0x1ba');this['createStateFinal'](_0xb12325,_0x398916,_0x122031,_0x53cb18);};Dialer['prototype'][_0x601f('0xed')]=function(_0x22d388,_0x3478d4,_0x10480e,_0x1db639){this[_0x601f('0xc1')](_0x22d388)[_0x601f('0xb1')](function(){return _0x3478d4(msgResponse(_0x601f('0x1a1'),_0x601f('0xd2'),_0x1db639));})[_0x601f('0xab')](function(){return _0x10480e(msgResponse(_0x601f('0x1bb'),'Failure',_0x601f('0x1bc')));});};Dialer[_0x601f('0x17')]['predictive']=function(_0x579620){var _0x5e23b8=_0x579620['dialPredictiveOptimizationPercentage']/0x64;var _0x5a609f=_0x579620[_0x601f('0x5c')]/(_0x579620[_0x601f('0x5c')]+_0x579620[_0x601f('0x58')]);var _0x34ca5b=Math[_0x601f('0x1bd')](_0x579620[_0x601f('0x6b')]*(_0x579620[_0x601f('0x1be')]/0x64));var _0x3c16b7=Math[_0x601f('0x1bd')](_0x579620[_0x601f('0x6b')]*(_0x579620['predictiveIntervalMinThreshold']/0x64));var _0x431bab=_0x579620[_0x601f('0x49')]+_0x579620[_0x601f('0x4e')];var _0x3c70be=Math[_0x601f('0x1bf')](_0x579620[_0x601f('0x6e')]*_0x579620[_0x601f('0x70')]*_0x579620[_0x601f('0x1c0')]*_0x579620[_0x601f('0x69')]);if(_[_0x601f('0x38')](_0x579620[_0x601f('0x25')])){if(!_[_0x601f('0x38')](_0x579620[_0x601f('0x24')])){_0x579620[_0x601f('0x24')]=undefined;loggerPredictive[_0x601f('0x93')](_0x601f('0x1c1'),_0x601f('0x1c2'));}if(!_['isUndefined'](_0x579620[_0x601f('0x8e')])){loggerPredictive[_0x601f('0x93')]('[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x579620['handlePredictive']);_0x579620['handlePredictive']=undefined;}_0x579620['startProgressive']=moment()['format'](_0x601f('0xf1'));loggerPredictive[_0x601f('0x79')](_0x579620[_0x601f('0x3a')],_0x601f('0x1c3'),_0x579620[_0x601f('0x25')]);this[_0x601f('0x149')](_0x579620,0x1);}else if(ifInterval(_0x579620['dialPredictiveInterval'],_0x579620[_0x601f('0x25')])){this[_0x601f('0x149')](_0x579620,0x1);loggerPredictiveCalls[_0x601f('0x79')](_0x601f('0x1c4'),_0x579620[_0x601f('0x25')],_0x579620[_0x601f('0x3a')]);_0x579620[_0x601f('0x6e')]=0x0;_0x579620[_0x601f('0x68')]=0x0;}else if(_0x5e23b8<_0x5a609f&&_0x579620['dialPredictiveOptimization']===_0x601f('0x1c5')){freeVariablesPredictive(_0x579620);loggerPredictive[_0x601f('0x79')]('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]',_0x601f('0x1c6'),_0x5a609f,'startProgressive',_0x579620['name']);}else if(_0x3c70be<_0x579620[_0x601f('0x68')]&&_0x579620[_0x601f('0x1c7')]===_0x601f('0x1c5')){freeVariablesPredictive(_0x579620);loggerPredictive[_0x601f('0x79')](_0x601f('0x1c8'),'Max\x20Drop\x20',_0x3c70be,_0x601f('0x1c9'),_0x579620[_0x601f('0x68')],'startProgressive',_0x579620[_0x601f('0x3a')]);}else if(!ifInterval(_0x579620[_0x601f('0x1ca')],_0x579620[_0x601f('0x25')])&&_[_0x601f('0x38')](_0x579620[_0x601f('0x24')])&&!_[_0x601f('0x38')](_0x579620[_0x601f('0x25')])){_0x579620['startPredictive']=moment()[_0x601f('0x73')](_0x601f('0xf1'));loggerPredictive['info'](_0x579620[_0x601f('0x3a')],_0x601f('0x1cb'),_0x579620[_0x601f('0x24')]);this[_0x601f('0xb6')](_0x579620[_0x601f('0x1ca')])[_0x601f('0xb1')](this['getDataPredictive'](_0x579620))[_0x601f('0xb1')](mergeDataErlangB(_0x579620))['then'](this[_0x601f('0x1cc')](_0x579620))[_0x601f('0xab')](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x579620));}else if(!ifInterval(_0x579620[_0x601f('0x1ca')],_0x579620[_0x601f('0x24')])){_0x579620[_0x601f('0x68')]=0x0;_0x579620[_0x601f('0x24')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0x579620['name'],'recalculate\x20predictive\x20at',_0x579620[_0x601f('0x24')]);clearInterval(_0x579620['handlePredictive']);_0x579620[_0x601f('0x8e')]=undefined;this[_0x601f('0xb6')](_0x579620['dialPredictiveInterval'])[_0x601f('0xb1')](this[_0x601f('0x1cd')](_0x579620))[_0x601f('0xb1')](mergeDataErlangB(_0x579620))[_0x601f('0xb1')](this[_0x601f('0x1cc')](_0x579620))['catch'](loggerCatchPredictive(_0x601f('0x1ce'),_0x579620));}else if(_0x579620['predictiveIntervalAvailable']&&_0x431bab<_0x579620[_0x601f('0x6b')]-_0x3c16b7){freeVariablesPredictive(_0x579620);loggerPredictive[_0x601f('0x79')](_0x579620['name'],_0x601f('0x1cf'),_0x431bab,')\x20are\x20less\x20than\x20threshold\x20(',_0x579620[_0x601f('0x6b')],'-',_0x3c16b7,'=',_0x579620[_0x601f('0x6b')]-_0x3c16b7,')');}else if(_0x579620[_0x601f('0x6b')]&&_0x431bab>_0x579620[_0x601f('0x6b')]+_0x34ca5b){freeVariablesPredictive(_0x579620);loggerPredictive[_0x601f('0x79')](_0x579620['name'],_0x601f('0x1cf'),_0x431bab,_0x601f('0x1d0'),_0x579620['predictiveIntervalAvailable'],'+',_0x34ca5b,'=',_0x579620['predictiveIntervalAvailable']+_0x34ca5b,')');}};Dialer['prototype'][_0x601f('0x1cd')]=function(_0x3c4f88){var _0x2459a9=this;return function(_0xd47773){return new BPromise(function(_0x1a7428,_0x2fa1e4){_[_0x601f('0x8b')](_0x3c4f88,_0xd47773[0x0]);if(checkGetDataPredictive(_0xd47773[0x0])){var _0x4851fe=_0x3c4f88[_0x601f('0x6b')]=_0x3c4f88[_0x601f('0x4e')]+_0x3c4f88[_0x601f('0x49')];var _0x29eb42=_0x3c4f88[_0x601f('0x1ca')]*0x3c;var _0x2f259c=_0xd47773[0x0][_0x601f('0x81')]+_0xd47773[0x0][_0x601f('0x64')];var _0x2fb8f9=(_0xd47773[0x0]['predictiveIntervalAnsweredCalls']+_0xd47773[0x0][_0x601f('0x66')]+_0xd47773[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0xd47773[0x0]['predictiveIntervalTotalCalls'];_0x3c4f88[_0x601f('0x1c0')]=_0x2fb8f9>0x0?_0x2fb8f9:0x1;switch(_0x3c4f88[_0x601f('0x1c7')]){case _0x601f('0x1c5'):var _0x3bf33f=_0x3c4f88[_0x601f('0x1d1')]/0x64;return _0x2459a9[_0x601f('0x1d2')](_0x4851fe,_0x29eb42,_0x2f259c,_0x2fb8f9,_0x3bf33f)['then'](function(_0x2a7be4){return _0x1a7428(_0x2a7be4);});case _0x601f('0x1d3'):var _0x36e434=_0x3c4f88[_0x601f('0x1d1')]/0x64;return _0x2459a9['busyFactor'](_0x4851fe,_0x29eb42,_0x2f259c,_0x2fb8f9,_0x36e434)[_0x601f('0xb1')](function(_0x3d54d2){return _0x1a7428(_0x3d54d2);});default:return _0x2fa1e4(msgResponse(_0x601f('0x1d4'),'Failure',_0x601f('0x1d5')));}}else{return _0x2fa1e4(msgResponse('[getDataPredictive]',_0x601f('0x137'),'check\x20failure'));}});};};Dialer[_0x601f('0x17')]['getDataPredictiveOld']=function(_0x311f0e){var _0x5c0bbd=this;return function(_0xf09d34){return new BPromise(function(_0x142426,_0x50ba38){_['merge'](_0x311f0e,_0xf09d34[0x0]);if(checkGetDataPredictive(_0xf09d34[0x0])){loggerPredictive[_0x601f('0x79')](JSON[_0x601f('0x43')](_0xf09d34[0x0]));if(_0x311f0e['dialPredictiveOptimization']===_0x601f('0x1c5')){return _0x5c0bbd[_0x601f('0x1d6')](_0x311f0e['id'])[_0x601f('0xb1')](function(_0x3d9be2){var _0x2763c4=_0x311f0e[_0x601f('0x152')]-_0x3d9be2[0x0][_0x601f('0x1d7')];var _0x375f07=_0x311f0e['dialPredictiveInterval']*0x3c;var _0x21306c=_0xf09d34[0x0][_0x601f('0x81')]+_0xf09d34[0x0][_0x601f('0x64')];var _0xca68f1=(_0xf09d34[0x0][_0x601f('0x63')]+_0xf09d34[0x0][_0x601f('0x66')]+_0xf09d34[0x0][_0x601f('0x65')])/_0xf09d34[0x0][_0x601f('0x6c')];var _0x2d15b7=_0x311f0e[_0x601f('0x1d1')]/0x64;_0x311f0e[_0x601f('0x6a')]=_0x3d9be2[0x0]['outboundQueuePauses']||0x0;_0x311f0e['predictiveIntervalHitRate']=_0xca68f1>0x0?_0xca68f1:0x1;return _0x5c0bbd[_0x601f('0x1d2')](_0x2763c4,_0x375f07,_0x21306c,_0xca68f1,_0x2d15b7);})[_0x601f('0xb1')](function(_0x12274e){return _0x142426(_0x12274e);})[_0x601f('0xab')](function(_0xff825c){return _0x50ba38(msgResponse(_0x601f('0x1d8'),_0x601f('0x137'),JSON[_0x601f('0x43')](_0xff825c)));});}if(_0x311f0e[_0x601f('0x1c7')]===_0x601f('0x1d3')){return _0x5c0bbd[_0x601f('0x1d6')](_0x311f0e['id'])[_0x601f('0xb1')](function(_0x291f28){var _0x401a6d=_0x311f0e[_0x601f('0x152')]-_0x291f28[0x0][_0x601f('0x1d7')];var _0x326e5e=_0x311f0e[_0x601f('0x1ca')]*0x3c;var _0x12b2ae=_0xf09d34[0x0][_0x601f('0x81')]+_0xf09d34[0x0]['predictiveIntervalAvgHoldtime'];var _0x50c6cc=(_0xf09d34[0x0][_0x601f('0x63')]+_0xf09d34[0x0]['predictiveIntervalDroppedCallsTimeout']+_0xf09d34[0x0][_0x601f('0x65')])/_0xf09d34[0x0][_0x601f('0x6c')];var _0x1924c7=_0x311f0e[_0x601f('0x1d1')]/0x64;_0x311f0e[_0x601f('0x6a')]=_0x291f28[0x0][_0x601f('0x1d7')]||0x0;_0x311f0e[_0x601f('0x1c0')]=_0x50c6cc>0x0?_0x50c6cc:0x1;return _0x5c0bbd[_0x601f('0x1d9')](_0x401a6d,_0x326e5e,_0x12b2ae,_0x50c6cc,_0x1924c7);})[_0x601f('0xb1')](function(_0x38813a){return _0x142426(_0x38813a);})[_0x601f('0xab')](function(_0xc21b53){return _0x50ba38(msgResponse('[CatchErlangB]','Failure',JSON[_0x601f('0x43')](_0xc21b53)));});}}else{return _0x50ba38(msgResponse(_0x601f('0x1d4'),_0x601f('0x137'),_0x601f('0x1da')));}});};};Dialer[_0x601f('0x17')][_0x601f('0x1cc')]=function(_0x50568c){var _0x36a51b=this;return function(){var _0x162ae5=0x0;var _0x340002=Math[_0x601f('0x1bf')](_0x50568c[_0x601f('0x6f')]*0x3e8);if(_0x340002>0x0){_0x340002=_0x340002<0x64?0x64:_0x340002;loggerPredictive[_0x601f('0x79')](_0x50568c[_0x601f('0x3a')],'one\x20call\x20every:',_0x340002,'milliseconds');_0x50568c[_0x601f('0x8e')]=setInterval(function(){_0x36a51b['handlePredictive'](_0x50568c);loggerPredictiveCalls[_0x601f('0x79')]('[handlePredictive]',_0x162ae5+=0x1);},_0x340002);}else{loggerPredictive[_0x601f('0x79')](_0x50568c[_0x601f('0x3a')],_0x601f('0x1db'));}};};Dialer[_0x601f('0x17')][_0x601f('0x1dc')]=function(_0x3018b1,_0xb8bab5){var _0x369512=this;return function(_0x446bee){if(_['isEmpty'](_0x446bee)){if(_['isNil'](_0xb8bab5[_0x601f('0xcc')])||!_0xb8bab5[_0x601f('0x1dd')]){if(_0x3018b1[_0x601f('0x53')]===_0x601f('0x14d')){_0x3018b1['queueStatusComplete']=_[_0x601f('0x38')](_0x3018b1[_0x601f('0x125')])?!![]:_0x3018b1[_0x601f('0x125')];var _0x1c6253=uuid['v4']();_0x369512['actions'][_0x1c6253]=new Action(_0x3018b1,_0xb8bab5,_0x1c6253);loggerBooked[_0x601f('0x79')]('[booked][checkContactBlack]',_0x1c6253,_0x601f('0x1de'),JSON[_0x601f('0x43')](_0x3018b1[_0x601f('0x125')]),'Queue:\x20',_0x3018b1[_0x601f('0x3a')]);if(_0x3018b1[_0x601f('0x125')]){_0x3018b1[_0x601f('0x125')]=![];_0x369512[_0x601f('0x122')][_0x369512['actions'][_0x1c6253]['queue']]=[];ami['Action']({'actionid':_0x1c6253,'action':'queuestatus','queue':_0x3018b1['name']})[_0x601f('0xab')](function(){_0x369512[_0x601f('0xae')](_0x3018b1);_0x369512['rescheduleContact']({'active':![],'ContactId':_0x369512[_0x601f('0x11c')][_0x1c6253][_0x601f('0xcb')],'ListId':_0x369512[_0x601f('0x11c')][_0x1c6253][_0x601f('0xf2')],'VoiceQueueId':_0x369512[_0x601f('0x11c')][_0x1c6253][_0x601f('0xcd')]||undefined,'CampaignId':_0x369512[_0x601f('0x11c')][_0x1c6253][_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x369512['actions'][_0x1c6253];});}else{loggerBooked[_0x601f('0x79')](_0x601f('0x1df'),JSON[_0x601f('0x43')](_0x3018b1[_0x601f('0x125')]),_0x601f('0x1e0'),_0x3018b1[_0x601f('0x3a')]);_0x369512[_0x601f('0xae')](_0x3018b1);_0x369512['rescheduleContact']({'active':![],'ContactId':_0x369512[_0x601f('0x11c')][_0x1c6253][_0x601f('0xcb')],'ListId':_0x369512['actions'][_0x1c6253][_0x601f('0xf2')],'VoiceQueueId':_0x369512['actions'][_0x1c6253][_0x601f('0xcd')]||undefined,'CampaignId':_0x369512[_0x601f('0x11c')][_0x1c6253]['CampaignId']||undefined})['catch'](loggerCatch(_0x601f('0x1e1')));delete _0x369512[_0x601f('0x11c')][_0x1c6253];}}else{return _0x369512['actionOriginate'](_0x3018b1,_0xb8bab5);}}else{if(getDiff(_0xb8bab5[_0x601f('0x1e2')])<_0x3018b1[_0x601f('0x1e3')]*0x3c){if(_0xb8bab5['Agent']&&!_0xb8bab5['Agent'][_0x601f('0x1e4')]){_0x369512[_0x601f('0x1b')][_0x601f('0x127')](_0xb8bab5['id'])[_0x601f('0x19')](function(){_0x369512[_0x601f('0xae')](_0x3018b1);});}else{_0x369512[_0x601f('0xbb')]({'active':![]},_0xb8bab5['id'],0x1)[_0x601f('0x19')](function(){_0x369512[_0x601f('0xae')](_0x3018b1);});}}else{_0x3018b1['outboundReCallsDay']+=0x1;_0x369512[_0x601f('0xae')](_0x3018b1);if(_0x3018b1[_0x601f('0x1e5')]){_0x369512[_0x601f('0xb9')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0xb8bab5[_0x601f('0xcb')],'ListId':_0xb8bab5[_0x601f('0xf2')],'VoiceQueueId':_0xb8bab5[_0x601f('0xcd')]||undefined,'CampaignId':_0xb8bab5[_0x601f('0xce')]||undefined})[_0x601f('0xab')](loggerCatch(_0x601f('0x1e6')));_0x369512[_0x601f('0xc3')](createObjHistory(_0x3018b1,_0xb8bab5,'RECALLINQUEUE',0x17,_0x601f('0x1e7')))[_0x601f('0xab')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x369512[_0x601f('0xc9')](createObjHistory(_0x3018b1,_0xb8bab5,_0x601f('0x1e8'),0x16,_0x601f('0x1e9')),'[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]');}}}}else{_0x3018b1[_0x601f('0x59')]+=0x1;_0x369512[_0x601f('0xc9')](createObjHistory(_0x3018b1,_0xb8bab5,_0x601f('0x1ea'),0xd,_0x601f('0x1eb')),_0x601f('0x1ec'),_0x601f('0x1ed'));throw'inBlackList';}};};Dialer[_0x601f('0x17')]['handleIvr']=function(_0x521f86){var _0x2c7b88=this;var _0x40db24=_0x521f86['limitCalls']-_0x521f86[_0x601f('0x6d')]-_0x521f86[_0x601f('0x1ee')];emitCampaignSummary(_0x521f86);if(_0x40db24>0x0){if(_0x40db24>this[_0x601f('0x20')]){_0x40db24=this[_0x601f('0x20')];}_0x521f86['temp']+=_0x40db24;this[_0x601f('0xbf')](_0x521f86['id'],_0x40db24,_0x521f86['dialOrderByScheduledAt'])['then'](function(_0x6c711b){_0x521f86['temp']-=_0x40db24;_0x521f86[_0x601f('0x1ee')]=_0x521f86[_0x601f('0x1ee')]>0x0?_0x521f86[_0x601f('0x1ee')]:0x0;if(!checkContactEmpty(_0x6c711b)){_0x521f86['message']=_0x601f('0x9c');logger[_0x601f('0x79')](_0x601f('0x1ef')+_0x521f86['name']);}else{_0x521f86[_0x601f('0x6d')]+=_0x6c711b[_0x601f('0x94')];_0x521f86['message']=_0x601f('0x1f0');for(var _0x50f3b4=0x0;_0x50f3b4<_0x6c711b['length'];_0x50f3b4+=0x1){_0x521f86[_0x601f('0x1f1')]+=0x1;if(_[_0x601f('0xa8')](_0x6c711b[_0x50f3b4])||_[_0x601f('0xa8')](_0x6c711b[_0x50f3b4][_0x601f('0x165')])||_['isNil'](_0x6c711b[_0x50f3b4][_0x601f('0x165')][_0x601f('0x164')])){_0x2c7b88[_0x601f('0x1f2')](_0x601f('0x1f3'),_0x521f86,_0x6c711b[_0x50f3b4]);}else{_0x2c7b88[_0x601f('0xb4')](_[_0x601f('0xca')](_0x6c711b[_0x50f3b4],['CampaignId',_0x601f('0x1f4')]))[_0x601f('0xb1')](_0x2c7b88[_0x601f('0x1dc')](_0x521f86,_0x6c711b[_0x50f3b4]))['catch'](_0x2c7b88['loggerHandler'](_0x601f('0x1f5'),_0x521f86));}}}})[_0x601f('0xab')](loggerGetContactDialer(_0x601f('0x1f6'),_0x521f86,_0x40db24));}};Dialer[_0x601f('0x17')][_0x601f('0x149')]=function(_0x4182b1,_0x505710){var _0x5123af=this;var _0x1cb9df=[];var _0x3e3d18=_0x505710>=0x1?_0x505710:0x1;if(_0x4182b1[_0x601f('0x53')]===_0x601f('0x14d')){_0x3e3d18=0x1;}var _0x473e19=Math[_0x601f('0x1bf')](_0x4182b1[_0x601f('0x49')]*_0x3e3d18)-_0x4182b1[_0x601f('0x6d')]-_0x4182b1[_0x601f('0x1ee')];emitVoiceQueueSummary(_0x4182b1);if(_0x4182b1['dialLimitQueue']>0x0){var _0x44398d=_0x4182b1['dialLimitQueue']-_0x4182b1['originated']-_0x4182b1[_0x601f('0x4e')]-_0x4182b1[_0x601f('0x1ee')]-_0x4182b1[_0x601f('0x4a')];if(_0x473e19>_0x44398d){_0x473e19=_0x44398d;}}if(_0x473e19>0x0){if(_0x4182b1[_0x601f('0x53')]===_0x601f('0x14d')){_0x473e19=0x1;}if(_0x473e19>this[_0x601f('0x20')]){_0x473e19=this[_0x601f('0x20')];}_0x4182b1[_0x601f('0x1ee')]+=_0x473e19;for(var _0x2a98fa in this[_0x601f('0x1e')]){if(typeof this['agents'][_0x2a98fa]!==_0x601f('0x95')){if(this[_0x601f('0x1e')][_0x2a98fa][_0x601f('0xde')]===_0x601f('0x1f7')&&this[_0x601f('0x1e')][_0x2a98fa][_0x601f('0xa9')]===_0x601f('0xd6')){_0x1cb9df['push'](this[_0x601f('0x1e')][_0x2a98fa]['id']);}}}this[_0x601f('0xbd')](_0x4182b1['id'],_0x1cb9df,_0x473e19,_0x4182b1[_0x601f('0x1f8')])['then'](function(_0x3a9d74){_0x4182b1[_0x601f('0x1ee')]-=_0x473e19;_0x4182b1[_0x601f('0x1ee')]=_0x4182b1[_0x601f('0x1ee')]>0x0?_0x4182b1['temp']:0x0;if(!checkContactEmpty(_0x3a9d74)){_0x5123af[_0x601f('0xaf')](_0x4182b1)[_0x601f('0xb1')](sendMessageReschedule(_0x4182b1))[_0x601f('0xab')](loggerCatch(_0x601f('0xb2')));}else{_0x4182b1['originated']+=_0x3a9d74[_0x601f('0x94')];_0x4182b1[_0x601f('0x39')]=_0x4182b1[_0x601f('0x53')]===_0x601f('0x14d')?_0x601f('0x1f9'):_0x601f('0x1f0');for(var _0x48a4d4=0x0;_0x48a4d4<_0x3a9d74[_0x601f('0x94')];_0x48a4d4+=0x1){if(_[_0x601f('0xa8')](_0x3a9d74[_0x48a4d4])||_[_0x601f('0xa8')](_0x3a9d74[_0x48a4d4]['Contact'])||_[_0x601f('0xa8')](_0x3a9d74[_0x48a4d4][_0x601f('0x165')][_0x601f('0x164')])){_0x5123af[_0x601f('0x1f2')]('[actionOriginate]\x20',_0x4182b1,_0x3a9d74[_0x48a4d4]);}else{_0x5123af[_0x601f('0xb3')](_['pick'](_0x3a9d74[_0x48a4d4],[_0x601f('0xcd'),_0x601f('0x1f4')]))[_0x601f('0xb1')](_0x5123af[_0x601f('0x1dc')](_0x4182b1,_0x3a9d74[_0x48a4d4]))[_0x601f('0xab')](_0x5123af['loggerHandler']('[actionOriginate]\x20',_0x4182b1));}}}})[_0x601f('0xab')](loggerGetContactDialer(_0x601f('0x1fa'),_0x4182b1,_0x473e19));}};Dialer[_0x601f('0x17')][_0x601f('0x8e')]=function(_0x2a2184){if(_0x2a2184['dialLimitQueue']>0x0){var _0x1340a8=_0x2a2184[_0x601f('0x1fb')]-_0x2a2184[_0x601f('0x6d')]-_0x2a2184['talking'];if(_0x1340a8>0x0){this[_0x601f('0x1fc')](_0x2a2184);}else{loggerPredictiveCalls[_0x601f('0x79')](_0x601f('0x1fd'));}}else{this[_0x601f('0x1fc')](_0x2a2184);}};Dialer['prototype']['tryOriginatePredictive']=function(_0x1696a7){var _0x172639=this;var _0x5e75cd=[];_0x1696a7[_0x601f('0x6d')]+=0x1;for(var _0x3e6bba in this[_0x601f('0x1e')]){if(typeof this['agents'][_0x3e6bba]!==_0x601f('0x95')){if(this['agents'][_0x3e6bba]['state']===_0x601f('0x1f7')&&this['agents'][_0x3e6bba]['status']===_0x601f('0xd6')){_0x5e75cd[_0x601f('0x123')](this[_0x601f('0x1e')][_0x3e6bba]['id']);}}}this['getContactDialer'](_0x1696a7['id'],_0x5e75cd,0x1,_0x1696a7[_0x601f('0x1f8')])[_0x601f('0xb1')](function(_0x24740d){if(!checkContactEmpty(_0x24740d)){checkContactLowerLimitOriginate(_0x1696a7,0x1,0x0);_0x172639['countReScheduled'](_0x1696a7)[_0x601f('0xb1')](sendMessageReschedule(_0x1696a7))[_0x601f('0xab')](loggerCatch('[countReScheduled]\x20'));}else{_0x1696a7[_0x601f('0x39')]=_0x601f('0x1f0');if(_['isNil'](_0x24740d[0x0])||_[_0x601f('0xa8')](_0x24740d[0x0][_0x601f('0x165')])||_['isNil'](_0x24740d[0x0]['Contact'][_0x601f('0x164')])){_0x172639[_0x601f('0x1f2')](_0x601f('0x1f3'),_0x1696a7,_0x24740d[0x0]);}else{_0x172639['checkIsBlackList'](_['pick'](_0x24740d[0x0],['VoiceQueueId',_0x601f('0x1f4')]))[_0x601f('0xb1')](_0x172639[_0x601f('0x1dc')](_0x1696a7,_0x24740d[0x0]))[_0x601f('0xab')](_0x172639[_0x601f('0xc7')](_0x601f('0x1fe'),_0x1696a7));}}})[_0x601f('0xab')](loggerGetContactDialer(_0x601f('0x1ff'),_0x1696a7,0x1));emitVoiceQueueSummary(_0x1696a7);};Dialer[_0x601f('0x17')][_0x601f('0x1d2')]=function(_0x4de0da,_0x59f38e,_0x344f09,_0x3a17a3,_0x301988,_0xa17319){loggerPredictive[_0x601f('0x79')](_0x601f('0x200'));loggerPredictive[_0x601f('0x79')](_0x601f('0x201'),_0x4de0da);loggerPredictive['info'](_0x601f('0x202'),_0x59f38e);loggerPredictive[_0x601f('0x79')](_0x601f('0x203'),_0x344f09);loggerPredictive['info'](_0x601f('0x204'),_0x3a17a3);loggerPredictive[_0x601f('0x79')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x301988);loggerPredictive[_0x601f('0x79')](_0x601f('0x80'));return new BPromise(function(_0x22f8b7,_0xd63a41){if(_0x4de0da<=0x0||isNaN(_0x4de0da)){return _0xd63a41(msgResponse(_0x601f('0x205'),_0x601f('0x42'),_0x601f('0x206')+_0x4de0da));}if(_0x344f09<=0x0||isNaN(_0x344f09)){return _0xd63a41(msgResponse(_0x601f('0x205'),_0x601f('0x42'),'Ts\x20=\x20'+_0x344f09));}if(_0x3a17a3<=0x0||isNaN(_0x3a17a3)){return _0xd63a41(msgResponse(_0x601f('0x205'),'Error','p\x20=\x20'+_0x3a17a3));}if(_0x59f38e<=0x0||isNaN(_0x59f38e)){return _0xd63a41(msgResponse('[abandonmentRate]',_0x601f('0x42'),_0x601f('0x207')+_0x59f38e));}if(_0x301988<=0x0||isNaN(_0x301988)){return _0xd63a41(msgResponse(_0x601f('0x205'),_0x601f('0x42'),'Amax\x20=\x20'+_0x301988));}_0xa17319=_0xa17319||0x0;var _0x24be8d=0x1/_0x344f09;var _0x45243e=0x0;var _0x177a6c=0x0;var _0x5a7ece=0x0;var _0x559aed=0x0;for(var _0x26ac11=0x0;_0x5a7ece<_0x301988;_0x26ac11+=0x1){_0x177a6c=_0x26ac11/_0x59f38e;_0x45243e=(_0x3a17a3*_0x177a6c+_0xa17319)/_0x24be8d;_0x5a7ece=erlangb(_0x45243e,_0x4de0da);_0x559aed=_0x45243e/_0x4de0da*(0x1-erlangb(_0x45243e,_0x4de0da));}return _0x22f8b7({'erlangCalls':_0x26ac11,'erlangCallToSecond':_0x59f38e/_0x26ac11,'erlangAbandonmentRate':_0x5a7ece,'erlangBusyFactor':_0x559aed});});};Dialer[_0x601f('0x17')][_0x601f('0x1d9')]=function(_0x35849a,_0x5110b3,_0x43a60e,_0x4daf05,_0xfaca77,_0x836bd){loggerPredictive[_0x601f('0x79')](_0x601f('0x208'));loggerPredictive['info'](_0x601f('0x201'),_0x35849a);loggerPredictive[_0x601f('0x79')](_0x601f('0x202'),_0x5110b3);loggerPredictive[_0x601f('0x79')](_0x601f('0x203'),_0x43a60e);loggerPredictive['info'](_0x601f('0x204'),_0x4daf05);loggerPredictive[_0x601f('0x79')](_0x601f('0x209'),_0xfaca77);loggerPredictive['info']('---------------------------');return new BPromise(function(_0x55ec28,_0x4ecc83){if(_0x35849a<=0x0||isNaN(_0x35849a)){return _0x4ecc83(msgResponse(_0x601f('0x20a'),_0x601f('0x42'),_0x601f('0x206')+_0x35849a));}if(_0x43a60e<=0x0||isNaN(_0x43a60e)){return _0x4ecc83(msgResponse(_0x601f('0x20a'),_0x601f('0x42'),_0x601f('0x20b')+_0x43a60e));}if(_0x4daf05<=0x0||isNaN(_0x4daf05)){return _0x4ecc83(msgResponse(_0x601f('0x20a'),_0x601f('0x42'),_0x601f('0x20c')+_0x4daf05));}if(_0x5110b3<=0x0||isNaN(_0x5110b3)){return _0x4ecc83(msgResponse(_0x601f('0x20a'),'Error',_0x601f('0x207')+_0x5110b3));}if(_0xfaca77<=0x0||isNaN(_0xfaca77)){return _0x4ecc83(msgResponse(_0x601f('0x20a'),'Error',_0x601f('0x20d')+_0xfaca77));}_0x836bd=_0x836bd||0x0;var _0x19bbd1=0x1/_0x43a60e;var _0x2e0183=0x0;var _0x23fc08=0x0;var _0x5c3d12=0x0;var _0x487693=0x0;for(var _0x41789d=0x0;_0x487693<_0xfaca77;_0x41789d+=0x1){_0x23fc08=_0x41789d/_0x5110b3;_0x2e0183=(_0x4daf05*_0x23fc08+_0x836bd)/_0x19bbd1;_0x5c3d12=erlangb(_0x2e0183,_0x35849a);_0x487693=_0x2e0183/_0x35849a*(0x1-erlangb(_0x2e0183,_0x35849a));}return _0x55ec28({'erlangCalls':_0x41789d,'erlangCallToSecond':_0x5110b3/_0x41789d,'erlangAbandonmentRate':_0x5c3d12,'erlangBusyFactor':_0x487693});});};module[_0x601f('0x20e')]=Dialer; \ No newline at end of file diff --git a/server/services/ami/dialer/queueCallerAbandon.js b/server/services/ami/dialer/queueCallerAbandon.js index 661a3ff..22cb1db 100644 --- a/server/services/ami/dialer/queueCallerAbandon.js +++ b/server/services/ami/dialer/queueCallerAbandon.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x37c7=['countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countnoanswerretry'];(function(_0x4ff09b,_0x53f67d){var _0x3f5c2e=function(_0x124592){while(--_0x124592){_0x4ff09b['push'](_0x4ff09b['shift']());}};_0x3f5c2e(++_0x53f67d);}(_0x37c7,0x127));var _0x737c=function(_0x44976e,_0x311385){_0x44976e=_0x44976e-0x0;var _0x4852b2=_0x37c7[_0x44976e];return _0x4852b2;};'use strict';var util=require(_0x737c('0x0'));var _=require(_0x737c('0x1'));var moment=require(_0x737c('0x2'));function getSeconds(_0x5d047d,_0x44af78){var _0x3a9618=moment(_0x5d047d)['milliseconds'](0x0);var _0x4ebe40=moment(_0x44af78)[_0x737c('0x3')](0x0);return _0x3a9618[_0x737c('0x4')](_0x4ebe40,_0x737c('0x5'));}function QueueCallerAbandon(_0x5499e2,_0x125dca){this[_0x737c('0x6')]=_0x5499e2[_0x737c('0x6')];this['type']=_0x5499e2[_0x737c('0x7')];this[_0x737c('0x8')]=_0x5499e2[_0x737c('0x7')]===_0x737c('0x9')?_0x737c('0xa'):_0x5499e2['type'];this[_0x737c('0xb')]=_0x5499e2[_0x737c('0xb')];this['countcongestionretry']=_0x5499e2['countcongestionretry'];this['countnoanswerretry']=_0x5499e2[_0x737c('0xc')];this[_0x737c('0xd')]=_0x5499e2[_0x737c('0xb')]+_0x5499e2[_0x737c('0xe')]+_0x5499e2[_0x737c('0xc')]+_0x5499e2[_0x737c('0xf')]+_0x5499e2[_0x737c('0x10')]+_0x5499e2['countabandonedretry']+_0x5499e2['countmachineretry']+_0x5499e2['countagentrejectretry'];this[_0x737c('0xf')]=_0x5499e2[_0x737c('0xf')];this[_0x737c('0x10')]=_0x5499e2[_0x737c('0x10')];this[_0x737c('0x11')]=_0x5499e2[_0x737c('0x11')];this['countmachineretry']=_0x5499e2[_0x737c('0x12')];this[_0x737c('0x13')]=_0x5499e2[_0x737c('0x13')];this[_0x737c('0x14')]=_0x125dca[_0x737c('0x14')];this[_0x737c('0x15')]=_0x5499e2['name'];this[_0x737c('0x16')]=_0x5499e2[_0x737c('0x17')];this[_0x737c('0x18')]=_0x5499e2[_0x737c('0x18')];this[_0x737c('0x19')]=_0x5499e2[_0x737c('0x19')];this[_0x737c('0x1a')]=_0x5499e2[_0x737c('0x1a')];this[_0x737c('0x1b')]=this['droptime'];this[_0x737c('0x1c')]=getSeconds(_0x5499e2[_0x737c('0x19')],_0x5499e2['starttime']);this[_0x737c('0x1d')]=getSeconds(this[_0x737c('0x1a')],_0x5499e2[_0x737c('0x19')]);this['talktime']=0x0;this['queue']=_0x125dca['queue'];this[_0x737c('0x1e')]=_0x125dca['connectedlinename'];this[_0x737c('0x1f')]=_0x125dca[_0x737c('0x1f')];this[_0x737c('0x20')]=_0x5499e2[_0x737c('0x20')];this[_0x737c('0x21')]=_0x5499e2[_0x737c('0x21')];this[_0x737c('0x22')]=_0x5499e2['callbackat'];this[_0x737c('0x23')]=_0x5499e2[_0x737c('0x23')];this['ContactId']=_0x5499e2[_0x737c('0x24')];this[_0x737c('0x25')]=_0x5499e2['ListId'];this[_0x737c('0x26')]=_0x5499e2['UserId'];this[_0x737c('0x27')]=_0x5499e2[_0x737c('0x27')];this[_0x737c('0x28')]=_0x5499e2[_0x737c('0x28')];this[_0x737c('0x29')]=_0x5499e2[_0x737c('0x29')]||'';this['originatecalleridname']=_0x5499e2[_0x737c('0x2a')]||'';}module[_0x737c('0x2b')]=QueueCallerAbandon; \ No newline at end of file +var _0x879c=['util','lodash','milliseconds','diff','seconds','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname'];(function(_0x3fdb3a,_0x5a9391){var _0x53556a=function(_0x1d3ad1){while(--_0x1d3ad1){_0x3fdb3a['push'](_0x3fdb3a['shift']());}};_0x53556a(++_0x5a9391);}(_0x879c,0xf6));var _0xc879=function(_0xbde8eb,_0xc9dbd1){_0xbde8eb=_0xbde8eb-0x0;var _0xd5b4d4=_0x879c[_0xbde8eb];return _0xd5b4d4;};'use strict';var util=require(_0xc879('0x0'));var _=require(_0xc879('0x1'));var moment=require('moment');function getSeconds(_0x3d31c6,_0xcc6b1b){var _0x3cf08b=moment(_0x3d31c6)[_0xc879('0x2')](0x0);var _0x1fd46c=moment(_0xcc6b1b)[_0xc879('0x2')](0x0);return _0x3cf08b[_0xc879('0x3')](_0x1fd46c,_0xc879('0x4'));}function QueueCallerAbandon(_0x3f29fd,_0x7907b8){this[_0xc879('0x5')]=_0x3f29fd[_0xc879('0x5')];this[_0xc879('0x6')]=_0x3f29fd[_0xc879('0x6')];this[_0xc879('0x7')]=_0x3f29fd[_0xc879('0x6')]==='outbound'?_0xc879('0x8'):_0x3f29fd['type'];this['countbusyretry']=_0x3f29fd[_0xc879('0x9')];this[_0xc879('0xa')]=_0x3f29fd[_0xc879('0xa')];this['countnoanswerretry']=_0x3f29fd[_0xc879('0xb')];this[_0xc879('0xc')]=_0x3f29fd['countbusyretry']+_0x3f29fd[_0xc879('0xa')]+_0x3f29fd[_0xc879('0xb')]+_0x3f29fd[_0xc879('0xd')]+_0x3f29fd[_0xc879('0xe')]+_0x3f29fd[_0xc879('0xf')]+_0x3f29fd[_0xc879('0x10')]+_0x3f29fd['countagentrejectretry'];this['countnosuchnumberretry']=_0x3f29fd[_0xc879('0xd')];this['countdropretry']=_0x3f29fd[_0xc879('0xe')];this[_0xc879('0xf')]=_0x3f29fd[_0xc879('0xf')];this[_0xc879('0x10')]=_0x3f29fd[_0xc879('0x10')];this[_0xc879('0x11')]=_0x3f29fd[_0xc879('0x11')];this[_0xc879('0x12')]=_0x7907b8[_0xc879('0x12')];this['calleridname']=_0x3f29fd[_0xc879('0x13')];this[_0xc879('0x14')]=_0x3f29fd[_0xc879('0x15')];this[_0xc879('0x16')]=_0x3f29fd[_0xc879('0x16')];this[_0xc879('0x17')]=_0x3f29fd[_0xc879('0x17')];this[_0xc879('0x18')]=_0x3f29fd[_0xc879('0x18')];this[_0xc879('0x19')]=this['droptime'];this[_0xc879('0x1a')]=getSeconds(_0x3f29fd[_0xc879('0x17')],_0x3f29fd[_0xc879('0x16')]);this[_0xc879('0x1b')]=getSeconds(this['droptime'],_0x3f29fd[_0xc879('0x17')]);this[_0xc879('0x1c')]=0x0;this['queue']=_0x7907b8[_0xc879('0x8')];this['membername']=_0x7907b8[_0xc879('0x1d')];this[_0xc879('0x1e')]=_0x7907b8[_0xc879('0x1e')];this['callback']=_0x3f29fd[_0xc879('0x1f')];this[_0xc879('0x20')]=_0x3f29fd[_0xc879('0x20')];this['callbackat']=_0x3f29fd[_0xc879('0x21')];this[_0xc879('0x22')]=_0x3f29fd['recallme'];this['ContactId']=_0x3f29fd[_0xc879('0x23')];this['ListId']=_0x3f29fd['ListId'];this[_0xc879('0x24')]=_0x3f29fd['UserId'];this[_0xc879('0x25')]=_0x3f29fd[_0xc879('0x25')];this[_0xc879('0x26')]=_0x3f29fd[_0xc879('0x26')];this[_0xc879('0x27')]=_0x3f29fd['originatecalleridnum']||'';this[_0xc879('0x28')]=_0x3f29fd[_0xc879('0x28')]||'';}module['exports']=QueueCallerAbandon; \ No newline at end of file diff --git a/server/services/ami/fax/action.js b/server/services/ami/fax/action.js index 81d59a8..2f04d48 100644 --- a/server/services/ami/fax/action.js +++ b/server/services/ami/fax/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfc5b=['util','moment','format','%s/%s/%s','tech','Trunk','name','fax','localstationid','path','AttachmentId'];(function(_0x17ae4f,_0x30a379){var _0x309577=function(_0x38003a){while(--_0x38003a){_0x17ae4f['push'](_0x17ae4f['shift']());}};_0x309577(++_0x30a379);}(_0xfc5b,0x1a2));var _0xbfc5=function(_0x19da5c,_0x577d13){_0x19da5c=_0x19da5c-0x0;var _0x57252a=_0xfc5b[_0x19da5c];return _0x57252a;};'use strict';var util=require(_0xbfc5('0x0'));var _=require('lodash');var moment=require(_0xbfc5('0x1'));function Action(_0x2299aa,_0xde5e87,_0x4f7277){this['uniqueid']=_0x2299aa||undefined;this['channel']=util[_0xbfc5('0x2')](_0xbfc5('0x3'),_0xde5e87[_0xbfc5('0x4')],_0xde5e87[_0xbfc5('0x5')][_0xbfc5('0x6')],_0x4f7277[_0xbfc5('0x7')]);this[_0xbfc5('0x8')]=_0xde5e87[_0xbfc5('0x8')];this['headerinfo']=_0xde5e87['headerinfo'];this[_0xbfc5('0x9')]=_0x4f7277['path'];this[_0xbfc5('0xa')]=_0x4f7277[_0xbfc5('0xa')];}module['exports']=Action; \ No newline at end of file +var _0xae58=['localstationid','headerinfo','path','AttachmentId','exports','util','lodash','uniqueid','format','%s/%s/%s','tech'];(function(_0x1c546c,_0x5c57cb){var _0x2cc384=function(_0x4dee11){while(--_0x4dee11){_0x1c546c['push'](_0x1c546c['shift']());}};_0x2cc384(++_0x5c57cb);}(_0xae58,0x170));var _0x8ae5=function(_0xd2e2ab,_0x2440cf){_0xd2e2ab=_0xd2e2ab-0x0;var _0x1703a2=_0xae58[_0xd2e2ab];return _0x1703a2;};'use strict';var util=require(_0x8ae5('0x0'));var _=require(_0x8ae5('0x1'));var moment=require('moment');function Action(_0x5f29c0,_0x5e3c5c,_0x294795){this[_0x8ae5('0x2')]=_0x5f29c0||undefined;this['channel']=util[_0x8ae5('0x3')](_0x8ae5('0x4'),_0x5e3c5c[_0x8ae5('0x5')],_0x5e3c5c['Trunk']['name'],_0x294795['fax']);this['localstationid']=_0x5e3c5c[_0x8ae5('0x6')];this[_0x8ae5('0x7')]=_0x5e3c5c[_0x8ae5('0x7')];this[_0x8ae5('0x8')]=_0x294795[_0x8ae5('0x8')];this[_0x8ae5('0x9')]=_0x294795[_0x8ae5('0x9')];}module[_0x8ae5('0xa')]=Action; \ No newline at end of file diff --git a/server/services/ami/fax/index.js b/server/services/ami/fax/index.js index 7f8a17c..3f2260a 100644 --- a/server/services/ami/fax/index.js +++ b/server/services/ami/fax/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06a1=['syncNewchannel','varset','syncVarSet','bind','syncNewState','newexten','syncReceiveFax','hangup','originateresponse','prototype','from-voip-provider','hasOwnProperty','exten','localstationid','channels','uniqueid','channel','name','info','\x20syncNewchannel\x20','variable','value','channelstate','channelstatedesc','syncNewExten','syncFaxStatus','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','application/pdf','notify','catch','error','stringify','\x20receiveFax\x20','syncOriginateResponse','merge','pick','response','AttachmentId','update','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','then','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','syncHangup','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','faxpages','faxstatus','SUCCESS','faxstatusstring','SENDING\x20FAILED','send','execOriginate','FaxAccountId','[Fax][execOriginate][success]','Fax\x20received','[Fax][execOriginate][failure]','Fax\x20failed','checkTrunk','Trunk','Trunk\x20Reachable','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','path','execute','format','dir','XMF-PATH','Action','variablesAction','addVariables','ext','isTrunkReachable','isNil','active','SIP/%s','reachable','\x20Trunk\x20is\x20not\x20active','Empty\x20Fax','Empty\x20path','Is\x20Valid','util','lodash','uuid','moment','./util/gs','../../../config/logger','fax','../ami','./rpcDb','./channel','./util/util','./action','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','actions','newchannel'];(function(_0x1e2cda,_0x2c8320){var _0x49c9a5=function(_0x5d5d86){while(--_0x5d5d86){_0x1e2cda['push'](_0x1e2cda['shift']());}};_0x49c9a5(++_0x2c8320);}(_0x06a1,0x14d));var _0x106a=function(_0x34949e,_0x3e7624){_0x34949e=_0x34949e-0x0;var _0x27e3fc=_0x06a1[_0x34949e];return _0x27e3fc;};'use strict';var util=require(_0x106a('0x0'));var _=require(_0x106a('0x1'));var BPromise=require('bluebird');var uuid=require(_0x106a('0x2'));var moment=require(_0x106a('0x3'));var path=require('path');var tiff2pdf=require('tiff2pdf');var gs=require(_0x106a('0x4'));var logger=require(_0x106a('0x5'))(_0x106a('0x6'));var ami=require(_0x106a('0x7'));var rpcDb=require(_0x106a('0x8'));var Channel=require(_0x106a('0x9'));var ut=require(_0x106a('0xa'));var Action=require(_0x106a('0xb'));var faxAccount=require('../rpc/faxAccount');var attachment=require(_0x106a('0xc'));var faxMessage=require(_0x106a('0xd'));function Fax(_0x4f44f9){this['channels']={};this['faxAccounts']=_0x4f44f9[_0x106a('0xe')];this['trunks']=_0x4f44f9[_0x106a('0xf')];this[_0x106a('0x10')]={};ami['on'](_0x106a('0x11'),this[_0x106a('0x12')]['bind'](this));ami['on'](_0x106a('0x13'),this[_0x106a('0x14')][_0x106a('0x15')](this));ami['on']('newstate',this[_0x106a('0x16')][_0x106a('0x15')](this));ami['on'](_0x106a('0x17'),this['syncNewExten'][_0x106a('0x15')](this));ami['on']('faxstatus',this['syncFaxStatus'][_0x106a('0x15')](this));ami['on']('receivefax',this[_0x106a('0x18')][_0x106a('0x15')](this));ami['on'](_0x106a('0x19'),this['syncHangup'][_0x106a('0x15')](this));ami['on'](_0x106a('0x1a'),this['syncOriginateResponse'][_0x106a('0x15')](this));}Fax[_0x106a('0x1b')][_0x106a('0x12')]=function(_0x3b0267){if(_0x3b0267['context']===_0x106a('0x1c')){for(var _0x4c8c6d in this[_0x106a('0xe')]){if(this[_0x106a('0xe')][_0x106a('0x1d')](_0x4c8c6d)){if(_0x3b0267[_0x106a('0x1e')]===this[_0x106a('0xe')][_0x4c8c6d][_0x106a('0x1f')]){this[_0x106a('0x20')][_0x3b0267[_0x106a('0x21')]]={};this['channels'][_0x3b0267[_0x106a('0x21')]][_0x106a('0x22')]=_0x3b0267[_0x106a('0x22')];this[_0x106a('0x20')][_0x3b0267[_0x106a('0x21')]]['id']=this[_0x106a('0xe')][_0x4c8c6d]['id'];this[_0x106a('0x20')][_0x3b0267[_0x106a('0x21')]][_0x106a('0x23')]=this['faxAccounts'][_0x4c8c6d][_0x106a('0x23')];logger[_0x106a('0x24')](_0x3b0267[_0x106a('0x21')],_0x106a('0x25'));}}}}if(this['actions'][_0x3b0267[_0x106a('0x21')]]){this[_0x106a('0x20')][_0x3b0267[_0x106a('0x21')]]={};this['channels'][_0x3b0267[_0x106a('0x21')]]['channel']=_0x3b0267[_0x106a('0x22')];logger[_0x106a('0x24')](_0x3b0267[_0x106a('0x21')],_0x106a('0x25'));}};Fax[_0x106a('0x1b')][_0x106a('0x14')]=function(_0x56ed4f){if(this['channels'][_0x56ed4f['uniqueid']]){for(var _0x1d39cb in _0x56ed4f['variable']){if(_0x56ed4f[_0x106a('0x26')]['hasOwnProperty'](_0x1d39cb)){this['channels'][_0x56ed4f[_0x106a('0x21')]][_0x1d39cb]=_0x56ed4f[_0x106a('0x27')];}}}};Fax[_0x106a('0x1b')]['syncNewState']=function(_0x3763ce){if(this['channels'][_0x3763ce['uniqueid']]){this['channels'][_0x3763ce[_0x106a('0x21')]]['channelstate']=_0x3763ce[_0x106a('0x28')];this[_0x106a('0x20')][_0x3763ce['uniqueid']][_0x106a('0x29')]=_0x3763ce[_0x106a('0x29')];}};Fax[_0x106a('0x1b')][_0x106a('0x2a')]=function(_0x26c920){if(this['channels'][_0x26c920[_0x106a('0x21')]]){for(var _0x2d8883 in _0x26c920[_0x106a('0x26')]){if(_0x26c920['variable'][_0x106a('0x1d')](_0x2d8883)){this[_0x106a('0x20')][_0x26c920['uniqueid']][_0x2d8883]=_0x26c920['value'];}}}};Fax[_0x106a('0x1b')][_0x106a('0x2b')]=function(_0x2d3781){if(this[_0x106a('0x20')][_0x2d3781['uniqueid']]){this['channels'][_0x2d3781[_0x106a('0x21')]][_0x106a('0x2c')]=_0x2d3781[_0x106a('0x2c')];this[_0x106a('0x20')][_0x2d3781[_0x106a('0x21')]]['status']=_0x2d3781[_0x106a('0x2d')];this[_0x106a('0x20')][_0x2d3781[_0x106a('0x21')]]['localstationid']=_0x2d3781['localstationid'];this[_0x106a('0x20')][_0x2d3781[_0x106a('0x21')]][_0x106a('0x2e')]=_0x2d3781[_0x106a('0x2e')];logger[_0x106a('0x24')](_0x2d3781[_0x106a('0x21')],_0x106a('0x2f'));}};Fax[_0x106a('0x1b')][_0x106a('0x18')]=function(_0x38e27a){var _0x54801f=this;if(this[_0x106a('0x20')][_0x38e27a['uniqueid']]){var _0x3b57dd=this['channels'][_0x38e27a['uniqueid']]['id'];this[_0x106a('0x20')][_0x38e27a[_0x106a('0x21')]][_0x106a('0x30')]=_0x38e27a[_0x106a('0x30')];this[_0x106a('0x20')][_0x38e27a[_0x106a('0x21')]][_0x106a('0x31')]=_0x38e27a[_0x106a('0x31')];this[_0x106a('0x20')][_0x38e27a[_0x106a('0x21')]][_0x106a('0x1f')]=_0x38e27a[_0x106a('0x1f')];this[_0x106a('0x20')][_0x38e27a[_0x106a('0x21')]][_0x106a('0x32')]=_0x38e27a[_0x106a('0x32')];this[_0x106a('0x20')][_0x38e27a[_0x106a('0x21')]][_0x106a('0x33')]=_0x38e27a[_0x106a('0x33')];this['channels'][_0x38e27a['uniqueid']][_0x106a('0x2e')]=_0x38e27a[_0x106a('0x2e')];this['channels'][_0x38e27a['uniqueid']]['calleridnum']=_0x38e27a[_0x106a('0x34')];if(this[_0x106a('0x20')][_0x38e27a[_0x106a('0x21')]]['pagestransferred']>0x0){tiff2pdf(_0x38e27a[_0x106a('0x2e')],_0x106a('0x35'),function(_0x32dda3){logger[_0x106a('0x24')](_0x38e27a[_0x106a('0x21')],_0x106a('0x36'),_0x32dda3[_0x106a('0x37')]);attachment[_0x106a('0x38')]({'name':path[_0x106a('0x39')](_0x38e27a[_0x106a('0x2e')])[_0x106a('0x23')],'basename':path[_0x106a('0x39')](_0x38e27a[_0x106a('0x2e')])[_0x106a('0x23')]+_0x106a('0x3a'),'type':_0x106a('0x3b')})['then'](function(_0xcd8917){faxAccount[_0x106a('0x3c')](_0x3b57dd,{'from':_0x38e27a[_0x106a('0x34')],'mapKey':_0x106a('0x6'),'body':path['parse'](_0x38e27a[_0x106a('0x2e')])[_0x106a('0x23')]+'.pdf','AttachmentId':_0xcd8917['id']})[_0x106a('0x3d')](function(_0x9aed57){logger[_0x106a('0x3e')](_0x38e27a[_0x106a('0x21')],'\x20notify\x20',JSON[_0x106a('0x3f')](_0x9aed57));});})[_0x106a('0x3d')](function(_0x374a7a){logger['error'](_0x38e27a[_0x106a('0x21')],_0x106a('0x40'),JSON[_0x106a('0x3f')](_0x374a7a));});});}logger['info'](_0x38e27a[_0x106a('0x21')],_0x106a('0x40'));}};Fax[_0x106a('0x1b')][_0x106a('0x41')]=function(_0x1b1119){if(this[_0x106a('0x10')][_0x1b1119[_0x106a('0x21')]]){_[_0x106a('0x42')](this[_0x106a('0x20')][_0x1b1119[_0x106a('0x21')]],_[_0x106a('0x43')](_0x1b1119,[_0x106a('0x44'),'reason']));}};function updateStatus(_0xa9c6f0){if(_0xa9c6f0[_0x106a('0x45')]){faxMessage[_0x106a('0x46')](_0xa9c6f0[_0x106a('0x45')],{'failMessage':'SENDING\x20FAILED\x20'})['then'](function(_0x1d1891){ut[_0x106a('0x47')](_0x106a('0x48'),_0x1d1891);})[_0x106a('0x3d')](function(_0x16e49b){ut[_0x106a('0x47')](_0x106a('0x49'),_0x16e49b);});}else{ut['logger'](_0x106a('0x4a'));}}Fax[_0x106a('0x1b')][_0x106a('0x4b')]=function(_0x4c906c,_0x275c73,_0x4f4706){var _0x4790f7=this;var _0x333b14={};if(_0x275c73){_0x333b14={'read':_0x275c73};}else{_0x333b14={'failMessage':_0x4f4706};}if(this[_0x106a('0x10')][_0x4c906c][_0x106a('0x45')]){faxMessage['update'](this['actions'][_0x4c906c]['AttachmentId'],_0x333b14)[_0x106a('0x4c')](function(_0x2ef17d){ut['logger'](_0x106a('0x4d'),_0x2ef17d);})[_0x106a('0x3d')](function(_0x7d3dfd){ut[_0x106a('0x47')](_0x106a('0x4e'),_0x7d3dfd);})[_0x106a('0x4f')](function(){delete _0x4790f7['channels'][_0x4c906c];delete _0x4790f7[_0x106a('0x10')][_0x4c906c];});}else{ut['logger']('[Fax][Message][NoUpdate2]');delete this['channels'][_0x4c906c];delete this[_0x106a('0x10')][_0x4c906c];}};Fax[_0x106a('0x1b')][_0x106a('0x50')]=function(_0x51a14c){var _0x8119a0=this;if(this[_0x106a('0x20')][_0x51a14c[_0x106a('0x21')]]){if(this[_0x106a('0x10')][_0x51a14c['uniqueid']]){this[_0x106a('0x20')][_0x51a14c[_0x106a('0x21')]]['id']=this[_0x106a('0x10')][_0x51a14c['uniqueid']]['id'];this[_0x106a('0x20')][_0x51a14c[_0x106a('0x21')]][_0x106a('0x23')]=this[_0x106a('0x10')][_0x51a14c['uniqueid']][_0x106a('0x23')];}logger[_0x106a('0x24')](_0x51a14c['uniqueid'],this[_0x106a('0x10')][_0x51a14c[_0x106a('0x21')]]?_0x106a('0x51'):_0x106a('0x52'),JSON['stringify'](this[_0x106a('0x20')][_0x51a14c[_0x106a('0x21')]]));if(this['actions'][_0x51a14c[_0x106a('0x21')]]){if(this[_0x106a('0x20')][_0x51a14c[_0x106a('0x21')]][_0x106a('0x53')]>0x0&&this[_0x106a('0x20')][_0x51a14c[_0x106a('0x21')]][_0x106a('0x54')]===_0x106a('0x55')){this[_0x106a('0x4b')](_0x51a14c[_0x106a('0x21')],!![]);}else{this['updateStatus'](_0x51a14c[_0x106a('0x21')],![],this['channels'][_0x51a14c[_0x106a('0x21')]][_0x106a('0x56')]?'SENDING\x20FAILED:\x20'+this['channels'][_0x51a14c[_0x106a('0x21')]]['faxstatusstring']:_0x106a('0x57'));}}}};Fax['prototype'][_0x106a('0x58')]=function(_0x126e52){var _0x262802=this;return new BPromise(function(_0x23d300,_0x5c9410){_0x262802[_0x106a('0x59')](_0x126e52,_0x262802[_0x106a('0xe')][_0x126e52[_0x106a('0x5a')]])['then'](function(_0x29c542){ut[_0x106a('0x47')](_0x106a('0x5b'),_0x29c542);_0x23d300(ut[_0x106a('0x37')](_0x106a('0x5c')));})[_0x106a('0x3d')](function(_0xf40d0b){ut[_0x106a('0x47')](_0x106a('0x5d'),_0xf40d0b);updateStatus(_0x126e52);_0x5c9410(ut[_0x106a('0x37')](_0x106a('0x5e')));});});};Fax['prototype']['checkAfterSend']=function(_0x4f450d){var _0x4b3e12=this;return new BPromise(function(_0x191c4c,_0x4bc7b4){var _0x51b89a=_0x4b3e12[_0x106a('0x5f')](_0x4b3e12[_0x106a('0xe')][_0x4f450d[_0x106a('0x5a')]][_0x106a('0x60')],_0x4f450d);if(_0x51b89a['isValid']){_0x191c4c(ut['message'](_0x106a('0x61')));}else{_0x4bc7b4(ut[_0x106a('0x37')](_0x51b89a[_0x106a('0x37')]));}});};function originate(_0x53ff0c,_0x5ab17b,_0x17c83e){return new BPromise(function(_0x3074bc,_0x32f29f){if(_0x17c83e){var _0x433366=util['format'](_0x106a('0x62'),path[_0x106a('0x39')](_0x53ff0c[_0x106a('0x63')])['name'],_0x53ff0c[_0x106a('0x63')]);gs[_0x106a('0x64')](_0x433366)[_0x106a('0x4c')](function(){_0x53ff0c[_0x106a('0x63')]=util[_0x106a('0x65')]('%s/%s.tif',path[_0x106a('0x39')](_0x53ff0c['path'])[_0x106a('0x66')],path['parse'](_0x53ff0c[_0x106a('0x63')])[_0x106a('0x23')]);_0x5ab17b[_0x106a('0x67')]=_0x53ff0c['path'];ut[_0x106a('0x47')]('Convert\x20pdf\x20to\x20tif','');ami[_0x106a('0x68')](ut[_0x106a('0x69')](_0x53ff0c,_0x5ab17b))[_0x106a('0x4c')](function(_0x782a35){_0x3074bc(_0x782a35);})[_0x106a('0x3d')](function(_0x8a8885){_0x32f29f(_0x8a8885);});})['catch'](function(_0x12c139){_0x32f29f(_0x12c139);});}else{ami[_0x106a('0x68')](ut['variablesAction'](_0x53ff0c,_0x5ab17b))[_0x106a('0x4c')](function(_0xefab1f){_0x3074bc(_0xefab1f);})[_0x106a('0x3d')](function(_0x38dfaa){_0x32f29f(_0x38dfaa);});}});}Fax[_0x106a('0x1b')]['execOriginate']=function(_0x5c9df8,_0x3069f4){var _0x324e11=this;return new BPromise(function(_0x306ddc,_0x3cbf4a){var _0x4db3e3=uuid['v4']();var _0x2a5529=ut[_0x106a('0x6a')](_0x5c9df8,_0x3069f4);_0x324e11[_0x106a('0x10')][_0x4db3e3]=new Action(_0x4db3e3,_0x3069f4,_0x5c9df8);var _0x5d517e=_0x324e11[_0x106a('0x10')][_0x4db3e3];if(path[_0x106a('0x39')](_0x5c9df8[_0x106a('0x63')])[_0x106a('0x6b')]===_0x106a('0x3a')){originate(_0x5d517e,_0x2a5529,!![])[_0x106a('0x4c')](function(_0x31ebfd){_0x306ddc(_0x31ebfd);})['catch'](function(_0x35c910){_0x3cbf4a(_0x35c910);});}else{originate(_0x5d517e,_0x2a5529,![])[_0x106a('0x4c')](function(_0x4ede2a){_0x306ddc(_0x4ede2a);})[_0x106a('0x3d')](function(_0x57e21e){_0x3cbf4a(_0x57e21e);});}});};Fax[_0x106a('0x1b')][_0x106a('0x6c')]=function(_0x22736a){return!_[_0x106a('0x6d')](_0x22736a)&&!_[_0x106a('0x6d')](_0x22736a[_0x106a('0x23')])&&!_[_0x106a('0x6d')](_0x22736a[_0x106a('0x6e')])&&_0x22736a[_0x106a('0x6e')]&&!_[_0x106a('0x6d')](this[_0x106a('0xf')][util['format'](_0x106a('0x6f'),_0x22736a['name'])])&&!_[_0x106a('0x6d')](this[_0x106a('0xf')][util['format'](_0x106a('0x6f'),_0x22736a[_0x106a('0x23')])][_0x106a('0x2d')])&&(this[_0x106a('0xf')][util['format'](_0x106a('0x6f'),_0x22736a['name'])][_0x106a('0x2d')]===_0x106a('0x70')||this[_0x106a('0xf')][util[_0x106a('0x65')](_0x106a('0x6f'),_0x22736a[_0x106a('0x23')])][_0x106a('0x2d')]==='unmonitored');};Fax[_0x106a('0x1b')][_0x106a('0x5f')]=function(_0x23eaa7,_0x2a3ce1){if(!this['isTrunkReachable'](_0x23eaa7)){ut[_0x106a('0x47')]('[Fax][checkTrunk][Trunk\x20not\x20work]',_[_0x106a('0x6d')](_0x23eaa7)?'':_0x23eaa7['name']+_0x106a('0x71'));return{'isValid':![],'message':'Trunk\x20not\x20working'};}if(_[_0x106a('0x6d')](_0x2a3ce1['fax'])){ut[_0x106a('0x47')]('[Fax][checkTrunk][Empty\x20Fax]',JSON[_0x106a('0x3f')](_0x2a3ce1));return{'isValid':![],'message':_0x106a('0x72')};}if(_[_0x106a('0x6d')](_0x2a3ce1['path'])){ut[_0x106a('0x47')]('[Fax][checkTrunk][Empty\x20path]',JSON[_0x106a('0x3f')](_0x2a3ce1));return{'isValid':![],'message':_0x106a('0x73')};}return{'isValid':!![],'message':_0x106a('0x74')};};module['exports']=Fax; \ No newline at end of file +var _0x77ee=['Fax\x20failed','checkAfterSend','Trunk','Trunk\x20Reachable','format','%s/%s.tif','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','addVariables','ext','isTrunkReachable','isNil','active','SIP/%s','reachable','unmonitored','checkTrunk','Trunk\x20not\x20working','[Fax][checkTrunk][Empty\x20Fax]','Empty\x20Fax','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','Is\x20Valid','exports','util','bluebird','path','./util/gs','../../../config/logger','fax','../ami','./channel','./util/util','./action','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','channels','faxAccounts','trunks','actions','bind','newstate','syncNewState','newexten','syncFaxStatus','syncReceiveFax','hangup','originateresponse','prototype','context','from-voip-provider','hasOwnProperty','localstationid','uniqueid','channel','name','\x20syncNewchannel\x20','variable','value','channelstate','channelstatedesc','syncNewExten','operation','status','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','filename','calleridnum','/var/opt/motion2/server/files/attachments/','info','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','then','notify','error','\x20notify\x20','catch','\x20receiveFax\x20','syncOriginateResponse','pick','response','reason','AttachmentId','update','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','syncHangup','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','stringify','faxpages','faxstatus','SUCCESS','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','send','execOriginate','FaxAccountId','[Fax][execOriginate][success]','Fax\x20received','[Fax][execOriginate][failure]'];(function(_0x50aa4b,_0x2fdb32){var _0x2b4000=function(_0x7bd82c){while(--_0x7bd82c){_0x50aa4b['push'](_0x50aa4b['shift']());}};_0x2b4000(++_0x2fdb32);}(_0x77ee,0x8f));var _0xe77e=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x77ee[_0x5b644e];return _0x49c6bf;};'use strict';var util=require(_0xe77e('0x0'));var _=require('lodash');var BPromise=require(_0xe77e('0x1'));var uuid=require('uuid');var moment=require('moment');var path=require(_0xe77e('0x2'));var tiff2pdf=require('tiff2pdf');var gs=require(_0xe77e('0x3'));var logger=require(_0xe77e('0x4'))(_0xe77e('0x5'));var ami=require(_0xe77e('0x6'));var rpcDb=require('./rpcDb');var Channel=require(_0xe77e('0x7'));var ut=require(_0xe77e('0x8'));var Action=require(_0xe77e('0x9'));var faxAccount=require(_0xe77e('0xa'));var attachment=require(_0xe77e('0xb'));var faxMessage=require(_0xe77e('0xc'));function Fax(_0x2f1452){this[_0xe77e('0xd')]={};this['faxAccounts']=_0x2f1452[_0xe77e('0xe')];this['trunks']=_0x2f1452[_0xe77e('0xf')];this[_0xe77e('0x10')]={};ami['on']('newchannel',this['syncNewchannel'][_0xe77e('0x11')](this));ami['on']('varset',this['syncVarSet'][_0xe77e('0x11')](this));ami['on'](_0xe77e('0x12'),this[_0xe77e('0x13')]['bind'](this));ami['on'](_0xe77e('0x14'),this['syncNewExten'][_0xe77e('0x11')](this));ami['on']('faxstatus',this[_0xe77e('0x15')][_0xe77e('0x11')](this));ami['on']('receivefax',this[_0xe77e('0x16')][_0xe77e('0x11')](this));ami['on'](_0xe77e('0x17'),this['syncHangup'][_0xe77e('0x11')](this));ami['on'](_0xe77e('0x18'),this['syncOriginateResponse']['bind'](this));}Fax[_0xe77e('0x19')]['syncNewchannel']=function(_0xe9e399){if(_0xe9e399[_0xe77e('0x1a')]===_0xe77e('0x1b')){for(var _0x2321ef in this[_0xe77e('0xe')]){if(this[_0xe77e('0xe')][_0xe77e('0x1c')](_0x2321ef)){if(_0xe9e399['exten']===this[_0xe77e('0xe')][_0x2321ef][_0xe77e('0x1d')]){this[_0xe77e('0xd')][_0xe9e399['uniqueid']]={};this['channels'][_0xe9e399[_0xe77e('0x1e')]][_0xe77e('0x1f')]=_0xe9e399[_0xe77e('0x1f')];this[_0xe77e('0xd')][_0xe9e399[_0xe77e('0x1e')]]['id']=this['faxAccounts'][_0x2321ef]['id'];this[_0xe77e('0xd')][_0xe9e399['uniqueid']]['name']=this[_0xe77e('0xe')][_0x2321ef][_0xe77e('0x20')];logger['info'](_0xe9e399['uniqueid'],_0xe77e('0x21'));}}}}if(this['actions'][_0xe9e399[_0xe77e('0x1e')]]){this[_0xe77e('0xd')][_0xe9e399[_0xe77e('0x1e')]]={};this[_0xe77e('0xd')][_0xe9e399[_0xe77e('0x1e')]][_0xe77e('0x1f')]=_0xe9e399['channel'];logger['info'](_0xe9e399[_0xe77e('0x1e')],'\x20syncNewchannel\x20');}};Fax[_0xe77e('0x19')]['syncVarSet']=function(_0x4ab825){if(this[_0xe77e('0xd')][_0x4ab825[_0xe77e('0x1e')]]){for(var _0x3ef9e9 in _0x4ab825[_0xe77e('0x22')]){if(_0x4ab825['variable']['hasOwnProperty'](_0x3ef9e9)){this[_0xe77e('0xd')][_0x4ab825[_0xe77e('0x1e')]][_0x3ef9e9]=_0x4ab825[_0xe77e('0x23')];}}}};Fax[_0xe77e('0x19')][_0xe77e('0x13')]=function(_0x2d3fe2){if(this['channels'][_0x2d3fe2[_0xe77e('0x1e')]]){this[_0xe77e('0xd')][_0x2d3fe2[_0xe77e('0x1e')]][_0xe77e('0x24')]=_0x2d3fe2[_0xe77e('0x24')];this[_0xe77e('0xd')][_0x2d3fe2[_0xe77e('0x1e')]][_0xe77e('0x25')]=_0x2d3fe2[_0xe77e('0x25')];}};Fax[_0xe77e('0x19')][_0xe77e('0x26')]=function(_0x21ec11){if(this[_0xe77e('0xd')][_0x21ec11[_0xe77e('0x1e')]]){for(var _0x67f0ed in _0x21ec11[_0xe77e('0x22')]){if(_0x21ec11[_0xe77e('0x22')]['hasOwnProperty'](_0x67f0ed)){this[_0xe77e('0xd')][_0x21ec11[_0xe77e('0x1e')]][_0x67f0ed]=_0x21ec11[_0xe77e('0x23')];}}}};Fax[_0xe77e('0x19')][_0xe77e('0x15')]=function(_0x5f3f28){if(this['channels'][_0x5f3f28[_0xe77e('0x1e')]]){this[_0xe77e('0xd')][_0x5f3f28[_0xe77e('0x1e')]][_0xe77e('0x27')]=_0x5f3f28[_0xe77e('0x27')];this['channels'][_0x5f3f28['uniqueid']][_0xe77e('0x28')]=_0x5f3f28['status'];this['channels'][_0x5f3f28['uniqueid']][_0xe77e('0x1d')]=_0x5f3f28[_0xe77e('0x1d')];this['channels'][_0x5f3f28[_0xe77e('0x1e')]]['filename']=_0x5f3f28['filename'];logger['info'](_0x5f3f28[_0xe77e('0x1e')],_0xe77e('0x29'));}};Fax[_0xe77e('0x19')][_0xe77e('0x16')]=function(_0x16d9b0){var _0x4d6701=this;if(this['channels'][_0x16d9b0['uniqueid']]){var _0x314f5c=this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]]['id'];this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]][_0xe77e('0x2a')]=_0x16d9b0[_0xe77e('0x2a')];this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]]['pagestransferred']=_0x16d9b0[_0xe77e('0x2b')];this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]][_0xe77e('0x1d')]=_0x16d9b0[_0xe77e('0x1d')];this['channels'][_0x16d9b0[_0xe77e('0x1e')]][_0xe77e('0x2c')]=_0x16d9b0[_0xe77e('0x2c')];this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]]['transferrate']=_0x16d9b0['transferrate'];this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]][_0xe77e('0x2d')]=_0x16d9b0['filename'];this[_0xe77e('0xd')][_0x16d9b0['uniqueid']][_0xe77e('0x2e')]=_0x16d9b0[_0xe77e('0x2e')];if(this[_0xe77e('0xd')][_0x16d9b0[_0xe77e('0x1e')]]['pagestransferred']>0x0){tiff2pdf(_0x16d9b0[_0xe77e('0x2d')],_0xe77e('0x2f'),function(_0x5de0e3){logger[_0xe77e('0x30')](_0x16d9b0[_0xe77e('0x1e')],_0xe77e('0x31'),_0x5de0e3[_0xe77e('0x32')]);attachment[_0xe77e('0x33')]({'name':path[_0xe77e('0x34')](_0x16d9b0[_0xe77e('0x2d')])[_0xe77e('0x20')],'basename':path[_0xe77e('0x34')](_0x16d9b0['filename'])['name']+_0xe77e('0x35'),'type':'application/pdf'})[_0xe77e('0x36')](function(_0x4949c3){faxAccount[_0xe77e('0x37')](_0x314f5c,{'from':_0x16d9b0[_0xe77e('0x2e')],'mapKey':_0xe77e('0x5'),'body':path[_0xe77e('0x34')](_0x16d9b0[_0xe77e('0x2d')])[_0xe77e('0x20')]+_0xe77e('0x35'),'AttachmentId':_0x4949c3['id']})['catch'](function(_0x1ee67e){logger[_0xe77e('0x38')](_0x16d9b0[_0xe77e('0x1e')],_0xe77e('0x39'),JSON['stringify'](_0x1ee67e));});})[_0xe77e('0x3a')](function(_0x120226){logger[_0xe77e('0x38')](_0x16d9b0['uniqueid'],_0xe77e('0x3b'),JSON['stringify'](_0x120226));});});}logger['info'](_0x16d9b0[_0xe77e('0x1e')],'\x20receiveFax\x20');}};Fax[_0xe77e('0x19')][_0xe77e('0x3c')]=function(_0x25e355){if(this[_0xe77e('0x10')][_0x25e355[_0xe77e('0x1e')]]){_['merge'](this['channels'][_0x25e355[_0xe77e('0x1e')]],_[_0xe77e('0x3d')](_0x25e355,[_0xe77e('0x3e'),_0xe77e('0x3f')]));}};function updateStatus(_0x36410c){if(_0x36410c[_0xe77e('0x40')]){faxMessage[_0xe77e('0x41')](_0x36410c[_0xe77e('0x40')],{'failMessage':'SENDING\x20FAILED\x20'})[_0xe77e('0x36')](function(_0x2534e1){ut[_0xe77e('0x42')](_0xe77e('0x43'),_0x2534e1);})[_0xe77e('0x3a')](function(_0x4c6161){ut[_0xe77e('0x42')](_0xe77e('0x44'),_0x4c6161);});}else{ut[_0xe77e('0x42')](_0xe77e('0x45'));}}Fax[_0xe77e('0x19')][_0xe77e('0x46')]=function(_0xcafaa1,_0x40870d,_0x1dc743){var _0x3175f1=this;var _0x541d59={};if(_0x40870d){_0x541d59={'read':_0x40870d};}else{_0x541d59={'failMessage':_0x1dc743};}if(this[_0xe77e('0x10')][_0xcafaa1][_0xe77e('0x40')]){faxMessage[_0xe77e('0x41')](this[_0xe77e('0x10')][_0xcafaa1][_0xe77e('0x40')],_0x541d59)[_0xe77e('0x36')](function(_0x1bbc49){ut[_0xe77e('0x42')](_0xe77e('0x47'),_0x1bbc49);})[_0xe77e('0x3a')](function(_0x6b346b){ut[_0xe77e('0x42')](_0xe77e('0x48'),_0x6b346b);})[_0xe77e('0x49')](function(){delete _0x3175f1[_0xe77e('0xd')][_0xcafaa1];delete _0x3175f1[_0xe77e('0x10')][_0xcafaa1];});}else{ut['logger'](_0xe77e('0x4a'));delete this['channels'][_0xcafaa1];delete this[_0xe77e('0x10')][_0xcafaa1];}};Fax[_0xe77e('0x19')][_0xe77e('0x4b')]=function(_0x73fb3b){var _0x106c11=this;if(this[_0xe77e('0xd')][_0x73fb3b[_0xe77e('0x1e')]]){if(this['actions'][_0x73fb3b[_0xe77e('0x1e')]]){this[_0xe77e('0xd')][_0x73fb3b[_0xe77e('0x1e')]]['id']=this[_0xe77e('0x10')][_0x73fb3b[_0xe77e('0x1e')]]['id'];this[_0xe77e('0xd')][_0x73fb3b[_0xe77e('0x1e')]]['name']=this[_0xe77e('0x10')][_0x73fb3b[_0xe77e('0x1e')]]['name'];}logger[_0xe77e('0x30')](_0x73fb3b[_0xe77e('0x1e')],this[_0xe77e('0x10')][_0x73fb3b[_0xe77e('0x1e')]]?_0xe77e('0x4c'):_0xe77e('0x4d'),JSON[_0xe77e('0x4e')](this[_0xe77e('0xd')][_0x73fb3b['uniqueid']]));if(this[_0xe77e('0x10')][_0x73fb3b[_0xe77e('0x1e')]]){if(this[_0xe77e('0xd')][_0x73fb3b[_0xe77e('0x1e')]][_0xe77e('0x4f')]>0x0&&this[_0xe77e('0xd')][_0x73fb3b[_0xe77e('0x1e')]][_0xe77e('0x50')]===_0xe77e('0x51')){this['updateStatus'](_0x73fb3b['uniqueid'],!![]);}else{this[_0xe77e('0x46')](_0x73fb3b[_0xe77e('0x1e')],![],this[_0xe77e('0xd')][_0x73fb3b['uniqueid']][_0xe77e('0x52')]?_0xe77e('0x53')+this[_0xe77e('0xd')][_0x73fb3b[_0xe77e('0x1e')]]['faxstatusstring']:_0xe77e('0x54'));}}}};Fax[_0xe77e('0x19')][_0xe77e('0x55')]=function(_0x355a73){var _0x5d38f9=this;return new BPromise(function(_0x405cfb,_0x3e47f8){_0x5d38f9[_0xe77e('0x56')](_0x355a73,_0x5d38f9[_0xe77e('0xe')][_0x355a73[_0xe77e('0x57')]])[_0xe77e('0x36')](function(_0x2f0d39){ut[_0xe77e('0x42')](_0xe77e('0x58'),_0x2f0d39);_0x405cfb(ut[_0xe77e('0x32')](_0xe77e('0x59')));})[_0xe77e('0x3a')](function(_0xddbdfb){ut[_0xe77e('0x42')](_0xe77e('0x5a'),_0xddbdfb);updateStatus(_0x355a73);_0x3e47f8(ut[_0xe77e('0x32')](_0xe77e('0x5b')));});});};Fax['prototype'][_0xe77e('0x5c')]=function(_0x259d92){var _0x398063=this;return new BPromise(function(_0x495407,_0x2f273e){var _0x2d04ce=_0x398063['checkTrunk'](_0x398063[_0xe77e('0xe')][_0x259d92['FaxAccountId']][_0xe77e('0x5d')],_0x259d92);if(_0x2d04ce['isValid']){_0x495407(ut[_0xe77e('0x32')](_0xe77e('0x5e')));}else{_0x2f273e(ut[_0xe77e('0x32')](_0x2d04ce[_0xe77e('0x32')]));}});};function originate(_0x4d6bcc,_0x45e0a1,_0x216664){return new BPromise(function(_0x51b14c,_0x40a4a4){if(_0x216664){var _0x5b3ed1=util[_0xe77e('0x5f')]('gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit',path[_0xe77e('0x34')](_0x4d6bcc[_0xe77e('0x2')])[_0xe77e('0x20')],_0x4d6bcc[_0xe77e('0x2')]);gs['execute'](_0x5b3ed1)[_0xe77e('0x36')](function(){_0x4d6bcc['path']=util[_0xe77e('0x5f')](_0xe77e('0x60'),path[_0xe77e('0x34')](_0x4d6bcc['path'])['dir'],path['parse'](_0x4d6bcc['path'])['name']);_0x45e0a1[_0xe77e('0x61')]=_0x4d6bcc[_0xe77e('0x2')];ut[_0xe77e('0x42')](_0xe77e('0x62'),'');ami[_0xe77e('0x63')](ut[_0xe77e('0x64')](_0x4d6bcc,_0x45e0a1))[_0xe77e('0x36')](function(_0xa73533){_0x51b14c(_0xa73533);})['catch'](function(_0x1a8fb1){_0x40a4a4(_0x1a8fb1);});})[_0xe77e('0x3a')](function(_0x371093){_0x40a4a4(_0x371093);});}else{ami[_0xe77e('0x63')](ut[_0xe77e('0x64')](_0x4d6bcc,_0x45e0a1))[_0xe77e('0x36')](function(_0x2f9496){_0x51b14c(_0x2f9496);})[_0xe77e('0x3a')](function(_0x542b6b){_0x40a4a4(_0x542b6b);});}});}Fax[_0xe77e('0x19')][_0xe77e('0x56')]=function(_0xb443b0,_0x55c8ec){var _0x4158f7=this;return new BPromise(function(_0x276a22,_0x28bae9){var _0x1fa2f1=uuid['v4']();var _0x48872c=ut[_0xe77e('0x65')](_0xb443b0,_0x55c8ec);_0x4158f7[_0xe77e('0x10')][_0x1fa2f1]=new Action(_0x1fa2f1,_0x55c8ec,_0xb443b0);var _0x191a62=_0x4158f7[_0xe77e('0x10')][_0x1fa2f1];if(path[_0xe77e('0x34')](_0xb443b0[_0xe77e('0x2')])[_0xe77e('0x66')]===_0xe77e('0x35')){originate(_0x191a62,_0x48872c,!![])[_0xe77e('0x36')](function(_0x364211){_0x276a22(_0x364211);})['catch'](function(_0xb70d08){_0x28bae9(_0xb70d08);});}else{originate(_0x191a62,_0x48872c,![])['then'](function(_0x6c079){_0x276a22(_0x6c079);})[_0xe77e('0x3a')](function(_0x3268ff){_0x28bae9(_0x3268ff);});}});};Fax[_0xe77e('0x19')][_0xe77e('0x67')]=function(_0x5a3ea6){return!_[_0xe77e('0x68')](_0x5a3ea6)&&!_[_0xe77e('0x68')](_0x5a3ea6[_0xe77e('0x20')])&&!_['isNil'](_0x5a3ea6[_0xe77e('0x69')])&&_0x5a3ea6[_0xe77e('0x69')]&&!_[_0xe77e('0x68')](this[_0xe77e('0xf')][util[_0xe77e('0x5f')](_0xe77e('0x6a'),_0x5a3ea6[_0xe77e('0x20')])])&&!_[_0xe77e('0x68')](this[_0xe77e('0xf')][util[_0xe77e('0x5f')]('SIP/%s',_0x5a3ea6[_0xe77e('0x20')])][_0xe77e('0x28')])&&(this[_0xe77e('0xf')][util[_0xe77e('0x5f')]('SIP/%s',_0x5a3ea6[_0xe77e('0x20')])][_0xe77e('0x28')]===_0xe77e('0x6b')||this[_0xe77e('0xf')][util[_0xe77e('0x5f')](_0xe77e('0x6a'),_0x5a3ea6[_0xe77e('0x20')])][_0xe77e('0x28')]===_0xe77e('0x6c'));};Fax[_0xe77e('0x19')][_0xe77e('0x6d')]=function(_0x1d7661,_0xdd4546){if(!this['isTrunkReachable'](_0x1d7661)){ut[_0xe77e('0x42')]('[Fax][checkTrunk][Trunk\x20not\x20work]',_[_0xe77e('0x68')](_0x1d7661)?'':_0x1d7661[_0xe77e('0x20')]+'\x20Trunk\x20is\x20not\x20active');return{'isValid':![],'message':_0xe77e('0x6e')};}if(_[_0xe77e('0x68')](_0xdd4546['fax'])){ut[_0xe77e('0x42')](_0xe77e('0x6f'),JSON[_0xe77e('0x4e')](_0xdd4546));return{'isValid':![],'message':_0xe77e('0x70')};}if(_['isNil'](_0xdd4546[_0xe77e('0x2')])){ut[_0xe77e('0x42')](_0xe77e('0x71'),JSON['stringify'](_0xdd4546));return{'isValid':![],'message':_0xe77e('0x72')};}return{'isValid':!![],'message':_0xe77e('0x73')};};module[_0xe77e('0x74')]=Fax; \ No newline at end of file diff --git a/server/services/ami/fax/rpcDb.js b/server/services/ami/fax/rpcDb.js index 87c8670..0ed8d92 100644 --- a/server/services/ami/fax/rpcDb.js +++ b/server/services/ami/fax/rpcDb.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd52a=['bluebird','../../../config/logger','preview','lodash','error','resolve','notify','[Notify]\x20','util'];(function(_0xbb1361,_0x21a9b6){var _0x3362a3=function(_0x5d6e61){while(--_0x5d6e61){_0xbb1361['push'](_0xbb1361['shift']());}};_0x3362a3(++_0x21a9b6);}(_0xd52a,0xa1));var _0xad52=function(_0x1530f2,_0x30b5bc){_0x1530f2=_0x1530f2-0x0;var _0x34930a=_0xd52a[_0x1530f2];return _0x34930a;};'use strict';var util=require(_0xad52('0x0'));var BPromise=require(_0xad52('0x1'));var logger=require(_0xad52('0x2'))(_0xad52('0x3'));var _=require(_0xad52('0x4'));var faxAccount=require('../rpc/faxAccount');function loggerCatch(_0x259727){return function(_0x386d98){logger[_0xad52('0x5')](_0x259727,util['inspect'](_0x386d98,{'showHidden':![],'depth':null}));};}exports['notify']=function(_0x5683ff,_0x295385){return BPromise[_0xad52('0x6')]()['then'](faxAccount[_0xad52('0x7')](_0x5683ff,_0x295385))['catch'](loggerCatch(_0xad52('0x8')));}; \ No newline at end of file +var _0x7fec=['error','inspect','notify','resolve','then','catch','[Notify]\x20','util','bluebird','../../../config/logger','preview','lodash','../rpc/faxAccount'];(function(_0x17ebe2,_0x1072c9){var _0x2694d7=function(_0x5ef0f0){while(--_0x5ef0f0){_0x17ebe2['push'](_0x17ebe2['shift']());}};_0x2694d7(++_0x1072c9);}(_0x7fec,0x166));var _0xc7fe=function(_0x558349,_0x243263){_0x558349=_0x558349-0x0;var _0xacc059=_0x7fec[_0x558349];return _0xacc059;};'use strict';var util=require(_0xc7fe('0x0'));var BPromise=require(_0xc7fe('0x1'));var logger=require(_0xc7fe('0x2'))(_0xc7fe('0x3'));var _=require(_0xc7fe('0x4'));var faxAccount=require(_0xc7fe('0x5'));function loggerCatch(_0x24ab12){return function(_0x48083d){logger[_0xc7fe('0x6')](_0x24ab12,util[_0xc7fe('0x7')](_0x48083d,{'showHidden':![],'depth':null}));};}exports[_0xc7fe('0x8')]=function(_0xb7fae,_0x51259f){return BPromise[_0xc7fe('0x9')]()[_0xc7fe('0xa')](faxAccount['notify'](_0xb7fae,_0x51259f))[_0xc7fe('0xb')](loggerCatch(_0xc7fe('0xc')));}; \ No newline at end of file diff --git a/server/services/ami/fax/util/gs.js b/server/services/ami/fax/util/gs.js index 82308a2..3fab8c6 100644 --- a/server/services/ami/fax/util/gs.js +++ b/server/services/ami/fax/util/gs.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa8c7=['child_process','exec','info','Exec\x20gs','inspect','fax','bluebird'];(function(_0x5ca842,_0x56a902){var _0x4c4083=function(_0x2e51a6){while(--_0x2e51a6){_0x5ca842['push'](_0x5ca842['shift']());}};_0x4c4083(++_0x56a902);}(_0xa8c7,0x155));var _0x7a8c=function(_0x1f1bfd,_0x51584d){_0x1f1bfd=_0x1f1bfd-0x0;var _0x375323=_0xa8c7[_0x1f1bfd];return _0x375323;};'use strict';var util=require('util');var logger=require('../../../../config/logger')(_0x7a8c('0x0'));var BPromise=require(_0x7a8c('0x1'));var exec=require(_0x7a8c('0x2'))[_0x7a8c('0x3')];exports['execute']=function(_0x1ad850){return new BPromise(function(_0x54d094,_0x27aa64){exec(_0x1ad850,function(_0x55cde5,_0x45f3ba,_0x38342d){logger[_0x7a8c('0x4')]('Exec\x20gs',_0x45f3ba);if(_0x55cde5){logger[_0x7a8c('0x4')](_0x7a8c('0x5'),'\x20Error\x20:',util[_0x7a8c('0x6')](_0x55cde5,{'showHidden':![],'depth':null}),_0x45f3ba,_0x38342d);_0x27aa64(_0x55cde5);}_0x54d094(_0x45f3ba);});});}; \ No newline at end of file +var _0x41ed=['fax','child_process','execute','info','Exec\x20gs','\x20Error\x20:','../../../../config/logger'];(function(_0x145a9f,_0x11e82d){var _0x1a206e=function(_0x3422e4){while(--_0x3422e4){_0x145a9f['push'](_0x145a9f['shift']());}};_0x1a206e(++_0x11e82d);}(_0x41ed,0x1db));var _0xd41e=function(_0x398872,_0x209e1f){_0x398872=_0x398872-0x0;var _0x307542=_0x41ed[_0x398872];return _0x307542;};'use strict';var util=require('util');var logger=require(_0xd41e('0x0'))(_0xd41e('0x1'));var BPromise=require('bluebird');var exec=require(_0xd41e('0x2'))['exec'];exports[_0xd41e('0x3')]=function(_0x46d9ad){return new BPromise(function(_0x506af5,_0x2a27b5){exec(_0x46d9ad,function(_0x3c7458,_0x42ceb1,_0x145d0a){logger[_0xd41e('0x4')](_0xd41e('0x5'),_0x42ceb1);if(_0x3c7458){logger[_0xd41e('0x4')](_0xd41e('0x5'),_0xd41e('0x6'),util['inspect'](_0x3c7458,{'showHidden':![],'depth':null}),_0x42ceb1,_0x145d0a);_0x2a27b5(_0x3c7458);}_0x506af5(_0x42ceb1);});});}; \ No newline at end of file diff --git a/server/services/ami/fax/util/util.js b/server/services/ami/fax/util/util.js index e901ce8..9e0102b 100644 --- a/server/services/ami/fax/util/util.js +++ b/server/services/ami/fax/util/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7af2=['info','inspect','addVariables','ecm','headerinfo','minrate','format','\x22%s\x22','modem','faxdetect','path','originate','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','localstationid','uniqueid','lodash','moment','../../../../config/logger','fax','logger'];(function(_0x42bdad,_0x12836c){var _0x122626=function(_0x2eb29c){while(--_0x2eb29c){_0x42bdad['push'](_0x42bdad['shift']());}};_0x122626(++_0x12836c);}(_0x7af2,0x119));var _0x27af=function(_0x18b9a8,_0x1770b6){_0x18b9a8=_0x18b9a8-0x0;var _0x4a0a8f=_0x7af2[_0x18b9a8];return _0x4a0a8f;};'use strict';var util=require('util');var _=require(_0x27af('0x0'));var moment=require(_0x27af('0x1'));var logger=require(_0x27af('0x2'))(_0x27af('0x3'));exports['message']=function(_0x8556d){return{'message':_0x8556d};};exports[_0x27af('0x4')]=function(_0x709cb6,_0x2a542f){logger[_0x27af('0x5')](_0x709cb6,util[_0x27af('0x6')](_0x2a542f,{'showHidden':![],'depth':null}));};exports[_0x27af('0x7')]=function(_0x184630,_0x2193c6){var _0x572219={'XMF-ECM':_0x2193c6[_0x27af('0x8')],'XMF-HEADERINFO':_0x2193c6[_0x27af('0x9')],'XMF-MINRATE':_0x2193c6[_0x27af('0xa')],'XMF-MAXRATE':_0x2193c6['maxrate'],'XMF-MODEM':util[_0x27af('0xb')](_0x27af('0xc'),_0x2193c6[_0x27af('0xd')]),'XMF-GATEWAY':_0x2193c6['gateway'],'XMF-FAXDETECT':_0x2193c6[_0x27af('0xe')],'XMF-T38TIMEOUT':_0x2193c6['t38timeout'],'XMF-LOCALSTATIONID':_0x2193c6['localstationid'],'XMF-PATH':_0x184630[_0x27af('0xf')]};return _0x572219;};exports['variablesAction']=function(_0x50fe01,_0x184e25){return{'actionid':_0x50fe01['uniqueid'],'action':_0x27af('0x10'),'channel':_0x50fe01['channel'],'Exten':_0x27af('0x11'),'Context':_0x27af('0x12'),'Priority':'1','callerid':util[_0x27af('0xb')](_0x27af('0x13'),_0x50fe01[_0x27af('0x9')]?_0x50fe01[_0x27af('0x9')]:'',_0x50fe01[_0x27af('0x14')]),'variable':_0x184e25,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x50fe01[_0x27af('0x15')]};}; \ No newline at end of file +var _0xb7c8=['logger','info','inspect','addVariables','ecm','headerinfo','minrate','maxrate','format','modem','faxdetect','t38timeout','path','variablesAction','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','localstationid','uniqueid','lodash','moment','../../../../config/logger','fax','message'];(function(_0x4706c6,_0x23d052){var _0x2d7a25=function(_0xdb502f){while(--_0xdb502f){_0x4706c6['push'](_0x4706c6['shift']());}};_0x2d7a25(++_0x23d052);}(_0xb7c8,0x119));var _0x8b7c=function(_0x2c8454,_0x579501){_0x2c8454=_0x2c8454-0x0;var _0x511f5b=_0xb7c8[_0x2c8454];return _0x511f5b;};'use strict';var util=require('util');var _=require(_0x8b7c('0x0'));var moment=require(_0x8b7c('0x1'));var logger=require(_0x8b7c('0x2'))(_0x8b7c('0x3'));exports[_0x8b7c('0x4')]=function(_0x31ad24){return{'message':_0x31ad24};};exports[_0x8b7c('0x5')]=function(_0x50113e,_0x38672b){logger[_0x8b7c('0x6')](_0x50113e,util[_0x8b7c('0x7')](_0x38672b,{'showHidden':![],'depth':null}));};exports[_0x8b7c('0x8')]=function(_0x107428,_0x12665c){var _0x7a3850={'XMF-ECM':_0x12665c[_0x8b7c('0x9')],'XMF-HEADERINFO':_0x12665c[_0x8b7c('0xa')],'XMF-MINRATE':_0x12665c[_0x8b7c('0xb')],'XMF-MAXRATE':_0x12665c[_0x8b7c('0xc')],'XMF-MODEM':util[_0x8b7c('0xd')]('\x22%s\x22',_0x12665c[_0x8b7c('0xe')]),'XMF-GATEWAY':_0x12665c['gateway'],'XMF-FAXDETECT':_0x12665c[_0x8b7c('0xf')],'XMF-T38TIMEOUT':_0x12665c[_0x8b7c('0x10')],'XMF-LOCALSTATIONID':_0x12665c['localstationid'],'XMF-PATH':_0x107428[_0x8b7c('0x11')]};return _0x7a3850;};exports[_0x8b7c('0x12')]=function(_0x3594b1,_0x586826){return{'actionid':_0x3594b1['uniqueid'],'action':_0x8b7c('0x13'),'channel':_0x3594b1[_0x8b7c('0x14')],'Exten':_0x8b7c('0x15'),'Context':_0x8b7c('0x16'),'Priority':'1','callerid':util[_0x8b7c('0xd')](_0x8b7c('0x17'),_0x3594b1[_0x8b7c('0xa')]?_0x3594b1['headerinfo']:'',_0x3594b1[_0x8b7c('0x18')]),'variable':_0x586826,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x3594b1[_0x8b7c('0x19')]};}; \ No newline at end of file diff --git a/server/services/ami/index.js b/server/services/ami/index.js index 44563ca..ba13214 100644 --- a/server/services/ami/index.js +++ b/server/services/ami/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x23a6=['getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','getZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','initFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','initCampaigns','initVoiceExtensions','getFaxAccounts','initFaxAccounts','initVoiceQueueReports','initCampaignHopperHistory','initVoiceCallReports','catch','log','sync','util','./server','./realtime','./acw','./trigger','./dialer','./preview','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trunk','./rpc/trigger','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','get','hour','resolve','then','getAgents','initTelephones','getTrunks','initTrunks','getTemplates','initTemplates','getZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts'];(function(_0x586f52,_0xec748d){var _0x3eee79=function(_0x2081a3){while(--_0x2081a3){_0x586f52['push'](_0x586f52['shift']());}};_0x3eee79(++_0xec748d);}(_0x23a6,0xdc));var _0x623a=function(_0x30f033,_0x57fb7f){_0x30f033=_0x30f033-0x0;var _0x2b6f63=_0x23a6[_0x30f033];return _0x2b6f63;};'use strict';var BPromise=require('bluebird');var util=require(_0x623a('0x0'));var moment=require('moment');var server=require(_0x623a('0x1'));var Realtime=require(_0x623a('0x2'));var Report=require('./report');var Acw=require(_0x623a('0x3'));var Trigger=require(_0x623a('0x4'));var Dialer=require(_0x623a('0x5'));var Preview=require(_0x623a('0x6'));var Fax=require(_0x623a('0x7'));var user=require(_0x623a('0x8'));var voiceQueue=require(_0x623a('0x9'));var voiceQueueReport=require(_0x623a('0xa'));var voiceCallReport=require(_0x623a('0xb'));var trunk=require(_0x623a('0xc'));var trigger=require(_0x623a('0xd'));var template=require(_0x623a('0xe'));var cmHopperHistory=require(_0x623a('0xf'));var campaign=require(_0x623a('0x10'));var voiceExtension=require(_0x623a('0x11'));var faxAccount=require(_0x623a('0x12'));var zendesk=require(_0x623a('0x13'));var salesforce=require(_0x623a('0x14'));var sugarcrm=require(_0x623a('0x15'));var freshdesk=require('./rpc/integrations/freshdesk');var desk=require('./rpc/integrations/desk');var zoho=require(_0x623a('0x16'));var vtiger=require(_0x623a('0x17'));var freshsales=require(_0x623a('0x18'));var servicenow=require(_0x623a('0x19'));var dynamics365=require(_0x623a('0x1a'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()[_0x623a('0x1b')](_0x623a('0x1c'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x623a('0x1b')](_0x623a('0x1c'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0x623a('0x1d')]()[_0x623a('0x1e')](user[_0x623a('0x1f')]())[_0x623a('0x1e')](realtime['initAgents']())[_0x623a('0x1e')](user['getTelephones']())['then'](realtime[_0x623a('0x20')]())[_0x623a('0x1e')](trunk[_0x623a('0x21')]())[_0x623a('0x1e')](realtime[_0x623a('0x22')]())[_0x623a('0x1e')](voiceQueue['getVoiceQueues']())[_0x623a('0x1e')](realtime['initVoiceQueues']())['then'](trigger['getTriggers']())[_0x623a('0x1e')](realtime['initTriggers']())[_0x623a('0x1e')](template[_0x623a('0x23')]())[_0x623a('0x1e')](realtime[_0x623a('0x24')]())[_0x623a('0x1e')](zendesk[_0x623a('0x25')]())['then'](realtime['initZendeskAccounts']())[_0x623a('0x1e')](salesforce[_0x623a('0x26')]())['then'](realtime[_0x623a('0x27')]())[_0x623a('0x1e')](sugarcrm[_0x623a('0x28')]())[_0x623a('0x1e')](realtime[_0x623a('0x29')]())['then'](freshdesk[_0x623a('0x2a')]())[_0x623a('0x1e')](realtime[_0x623a('0x2b')]())[_0x623a('0x1e')](desk[_0x623a('0x2c')]())[_0x623a('0x1e')](realtime['initDeskAccounts']())[_0x623a('0x1e')](zoho[_0x623a('0x2d')]())[_0x623a('0x1e')](realtime['initZohoAccounts']())[_0x623a('0x1e')](vtiger[_0x623a('0x2e')]())[_0x623a('0x1e')](realtime[_0x623a('0x2f')]())[_0x623a('0x1e')](freshsales[_0x623a('0x30')]())[_0x623a('0x1e')](realtime[_0x623a('0x31')]())[_0x623a('0x1e')](servicenow[_0x623a('0x32')]())[_0x623a('0x1e')](realtime[_0x623a('0x33')]())[_0x623a('0x1e')](dynamics365[_0x623a('0x34')]())[_0x623a('0x1e')](realtime[_0x623a('0x35')]())[_0x623a('0x1e')](campaign[_0x623a('0x36')]())[_0x623a('0x1e')](realtime[_0x623a('0x37')]())[_0x623a('0x1e')](voiceExtension['getVoiceExtensions']())['then'](realtime[_0x623a('0x38')]())[_0x623a('0x1e')](faxAccount[_0x623a('0x39')]())[_0x623a('0x1e')](realtime[_0x623a('0x3a')]())[_0x623a('0x1e')](function(){return realtime;});}function initParams(){return BPromise[_0x623a('0x1d')]()['then'](voiceQueueReport['getVoiceQueueReports']())['then'](realtime[_0x623a('0x3b')]())['then'](cmHopperHistory['getVoiceQueueHopperHistory']())[_0x623a('0x1e')](realtime['initVoiceQueueHopperHistory']())['then'](cmHopperHistory['getCampaignHopperHistory']())[_0x623a('0x1e')](realtime[_0x623a('0x3c')]())[_0x623a('0x1e')](voiceCallReport['getVoiceCallReports']())[_0x623a('0x1e')](realtime[_0x623a('0x3d')]())[_0x623a('0x1e')](function(_0x2f4498){})[_0x623a('0x3e')](function(_0xf35fa0){console[_0x623a('0x3f')](_0xf35fa0);});}function main(){return server['listen'](realtime,preview,fax)[_0x623a('0x1e')](function(_0x1a55af){return initRealtime();})['then'](function(){return initParams();})[_0x623a('0x1e')](function(){report[_0x623a('0x40')]();setInterval(initRealtime,0x1388);})['catch'](function(_0x139ba8){console[_0x623a('0x3f')](_0x139ba8);});}main(); \ No newline at end of file +var _0x7c39=['getTemplates','getZendeskAccounts','initZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','initSugarcrmAccounts','getDeskAccounts','initDeskAccounts','getZohoAccounts','initZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','initFreshsalesAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','initCampaigns','getFaxAccounts','initFaxAccounts','getVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','getCampaignHopperHistory','initVoiceCallReports','catch','log','listen','sync','bluebird','util','moment','./acw','./trigger','./dialer','./rpc/voiceQueue','./rpc/voiceCallReport','./rpc/trunk','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/freshdesk','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/dynamics365','hour','get','resolve','then','getAgents','getTelephones','initTelephones','getTrunks','initTrunks','initVoiceQueues','getTriggers','initTriggers'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0x7c39,0x98));var _0x97c3=function(_0x4e822a,_0x21f15e){_0x4e822a=_0x4e822a-0x0;var _0x5908df=_0x7c39[_0x4e822a];return _0x5908df;};'use strict';var BPromise=require(_0x97c3('0x0'));var util=require(_0x97c3('0x1'));var moment=require(_0x97c3('0x2'));var server=require('./server');var Realtime=require('./realtime');var Report=require('./report');var Acw=require(_0x97c3('0x3'));var Trigger=require(_0x97c3('0x4'));var Dialer=require(_0x97c3('0x5'));var Preview=require('./preview');var Fax=require('./fax');var user=require('./rpc/user');var voiceQueue=require(_0x97c3('0x6'));var voiceQueueReport=require('./rpc/voiceQueueReport');var voiceCallReport=require(_0x97c3('0x7'));var trunk=require(_0x97c3('0x8'));var trigger=require('./rpc/trigger');var template=require(_0x97c3('0x9'));var cmHopperHistory=require(_0x97c3('0xa'));var campaign=require(_0x97c3('0xb'));var voiceExtension=require('./rpc/voiceExtension');var faxAccount=require(_0x97c3('0xc'));var zendesk=require(_0x97c3('0xd'));var salesforce=require(_0x97c3('0xe'));var sugarcrm=require('./rpc/integrations/sugarcrm');var freshdesk=require(_0x97c3('0xf'));var desk=require('./rpc/integrations/desk');var zoho=require('./rpc/integrations/zoho');var vtiger=require(_0x97c3('0x10'));var freshsales=require(_0x97c3('0x11'));var servicenow=require('./rpc/integrations/servicenow');var dynamics365=require(_0x97c3('0x12'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()['get'](_0x97c3('0x13'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x97c3('0x14')](_0x97c3('0x13'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0x97c3('0x15')]()[_0x97c3('0x16')](user[_0x97c3('0x17')]())[_0x97c3('0x16')](realtime['initAgents']())[_0x97c3('0x16')](user[_0x97c3('0x18')]())[_0x97c3('0x16')](realtime[_0x97c3('0x19')]())[_0x97c3('0x16')](trunk[_0x97c3('0x1a')]())[_0x97c3('0x16')](realtime[_0x97c3('0x1b')]())[_0x97c3('0x16')](voiceQueue['getVoiceQueues']())['then'](realtime[_0x97c3('0x1c')]())[_0x97c3('0x16')](trigger[_0x97c3('0x1d')]())[_0x97c3('0x16')](realtime[_0x97c3('0x1e')]())[_0x97c3('0x16')](template[_0x97c3('0x1f')]())['then'](realtime['initTemplates']())[_0x97c3('0x16')](zendesk[_0x97c3('0x20')]())['then'](realtime[_0x97c3('0x21')]())[_0x97c3('0x16')](salesforce[_0x97c3('0x22')]())[_0x97c3('0x16')](realtime[_0x97c3('0x23')]())[_0x97c3('0x16')](sugarcrm['getSugarcrmAccounts']())[_0x97c3('0x16')](realtime[_0x97c3('0x24')]())[_0x97c3('0x16')](freshdesk['getFreshdeskAccounts']())['then'](realtime['initFreshdeskAccounts']())['then'](desk[_0x97c3('0x25')]())[_0x97c3('0x16')](realtime[_0x97c3('0x26')]())[_0x97c3('0x16')](zoho[_0x97c3('0x27')]())['then'](realtime[_0x97c3('0x28')]())[_0x97c3('0x16')](vtiger[_0x97c3('0x29')]())[_0x97c3('0x16')](realtime[_0x97c3('0x2a')]())[_0x97c3('0x16')](freshsales[_0x97c3('0x2b')]())[_0x97c3('0x16')](realtime[_0x97c3('0x2c')]())[_0x97c3('0x16')](servicenow['getServicenowAccounts']())[_0x97c3('0x16')](realtime[_0x97c3('0x2d')]())['then'](dynamics365[_0x97c3('0x2e')]())[_0x97c3('0x16')](realtime[_0x97c3('0x2f')]())[_0x97c3('0x16')](campaign[_0x97c3('0x30')]())[_0x97c3('0x16')](realtime[_0x97c3('0x31')]())[_0x97c3('0x16')](voiceExtension['getVoiceExtensions']())['then'](realtime['initVoiceExtensions']())['then'](faxAccount[_0x97c3('0x32')]())[_0x97c3('0x16')](realtime[_0x97c3('0x33')]())[_0x97c3('0x16')](function(){return realtime;});}function initParams(){return BPromise[_0x97c3('0x15')]()[_0x97c3('0x16')](voiceQueueReport[_0x97c3('0x34')]())[_0x97c3('0x16')](realtime['initVoiceQueueReports']())[_0x97c3('0x16')](cmHopperHistory[_0x97c3('0x35')]())[_0x97c3('0x16')](realtime[_0x97c3('0x36')]())[_0x97c3('0x16')](cmHopperHistory[_0x97c3('0x37')]())[_0x97c3('0x16')](realtime['initCampaignHopperHistory']())[_0x97c3('0x16')](voiceCallReport['getVoiceCallReports']())[_0x97c3('0x16')](realtime[_0x97c3('0x38')]())[_0x97c3('0x16')](function(_0x42ecb0){})[_0x97c3('0x39')](function(_0x3537e1){console[_0x97c3('0x3a')](_0x3537e1);});}function main(){return server[_0x97c3('0x3b')](realtime,preview,fax)[_0x97c3('0x16')](function(_0x3ad580){return initRealtime();})[_0x97c3('0x16')](function(){return initParams();})['then'](function(){report[_0x97c3('0x3c')]();setInterval(initRealtime,0x1388);})['catch'](function(_0x119fe){console[_0x97c3('0x3a')](_0x119fe);});}main(); \ No newline at end of file diff --git a/server/services/ami/model/agent.js b/server/services/ami/model/agent.js index 07bd968..b43a1a3 100644 --- a/server/services/ami/model/agent.js +++ b/server/services/ami/model/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8454=['user:save','exports','lodash','util','moment','md5','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','email','accountcode','state','status','address','phone','mobile','interface','online','voiceStatus','unknown','voiceStatusTime','voiceStatusQueue','onhold','prototype','updateStatusRealtime','not_inuse','idle','inuse','statePause','format','fullname','stateTime','voiceStatusCallerIdNumber','user:%s','emit'];(function(_0x4323d4,_0x1c38df){var _0x1c3864=function(_0x29beb0){while(--_0x29beb0){_0x4323d4['push'](_0x4323d4['shift']());}};_0x1c3864(++_0x1c38df);}(_0x8454,0x1a4));var _0x4845=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x8454[_0x19e35c];return _0x3e1fe8;};'use strict';var _=require(_0x4845('0x0'));var util=require(_0x4845('0x1'));var moment=require(_0x4845('0x2'));var md5=require(_0x4845('0x3'));var Redis=require(_0x4845('0x4'));var config=require(_0x4845('0x5'));config[_0x4845('0x6')]=_['defaults'](config[_0x4845('0x6')],{'host':_0x4845('0x7'),'port':0x18eb});var io=require(_0x4845('0x8'))(new Redis(config[_0x4845('0x6')]));function Agent(_0x5304c9){this['id']=_0x5304c9['id']||0x0;this['name']=_0x5304c9[_0x4845('0x9')]||'';this[_0x4845('0xa')]=_0x5304c9['email']||'';this[_0x4845('0xb')]=_0x5304c9[_0x4845('0xb')]||'';this['fullname']=_0x5304c9['fullname']||'';this[_0x4845('0xc')]='unknown';this['stateTime']=0x0;this[_0x4845('0xd')]='unknown';this[_0x4845('0xe')]='';this[_0x4845('0xf')]='';this[_0x4845('0x10')]='';this[_0x4845('0x11')]='';this[_0x4845('0x12')]=_0x5304c9[_0x4845('0x12')]||![];this[_0x4845('0x13')]=_0x4845('0x14');this[_0x4845('0x15')]=0x0;this['voiceStatusCallerIdNumber']='';this[_0x4845('0x16')]='';this[_0x4845('0x17')]=![];this['local']=![];this[_0x4845('0x3')]='';}Agent[_0x4845('0x18')][_0x4845('0x19')]=function(_0x2f9b02){var _0x5ec8e3;if(_0x2f9b02&&_0x2f9b02[_0x4845('0xc')]){_0x5ec8e3=_0x2f9b02[_0x4845('0xc')]['toLowerCase']();switch(_0x5ec8e3){case _0x4845('0x1a'):_0x5ec8e3=_0x4845('0x1b');break;case _0x4845('0x1c'):_0x5ec8e3='talking';break;}}if(_0x5ec8e3&&this[_0x4845('0x13')]!==_0x5ec8e3||_0x2f9b02[_0x4845('0x1d')]){this[_0x4845('0x15')]=_['toNumber'](moment()[_0x4845('0x1e')]('x'));}if(_0x5ec8e3){this[_0x4845('0x13')]=_0x5ec8e3;}var _0xa15689={'id':this['id'],'name':this['name'],'email':this['email'],'accountcode':this[_0x4845('0xb')],'fullname':this[_0x4845('0x1f')],'state':this[_0x4845('0xc')],'stateTime':this[_0x4845('0x20')],'status':this[_0x4845('0xd')],'address':this[_0x4845('0xe')],'online':this[_0x4845('0x12')],'voiceStatus':this[_0x4845('0x13')],'voiceStatusTime':this[_0x4845('0x15')],'voiceStatusCallerIdNumber':this[_0x4845('0x21')],'voiceStatusQueue':this[_0x4845('0x16')],'interface':this['interface'],'onhold':this[_0x4845('0x17')]};var _0x7eac8e=md5(JSON['stringify'](_0xa15689));if(this[_0x4845('0x3')]!==_0x7eac8e){this[_0x4845('0x3')]=_0x7eac8e;io['to'](util[_0x4845('0x1e')](_0x4845('0x22'),_0xa15689['name']))[_0x4845('0x23')](_0x4845('0x24'),_0xa15689);}};module[_0x4845('0x25')]=Agent; \ No newline at end of file +var _0x35b4=['email','fullname','unknown','address','phone','interface','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','voiceStatusQueue','onhold','local','state','toLowerCase','not_inuse','idle','inuse','talking','statePause','toNumber','stateTime','status','format','user:%s','emit','user:save','lodash','util','moment','md5','redis','localhost','socket.io-emitter','name'];(function(_0x1a9caa,_0x4ffb13){var _0x5c4478=function(_0x26fd59){while(--_0x26fd59){_0x1a9caa['push'](_0x1a9caa['shift']());}};_0x5c4478(++_0x4ffb13);}(_0x35b4,0x156));var _0x435b=function(_0x2d37b1,_0x347d8b){_0x2d37b1=_0x2d37b1-0x0;var _0x5bbad2=_0x35b4[_0x2d37b1];return _0x5bbad2;};'use strict';var _=require(_0x435b('0x0'));var util=require(_0x435b('0x1'));var moment=require(_0x435b('0x2'));var md5=require(_0x435b('0x3'));var Redis=require('ioredis');var config=require('../../../config/environment');config[_0x435b('0x4')]=_['defaults'](config[_0x435b('0x4')],{'host':_0x435b('0x5'),'port':0x18eb});var io=require(_0x435b('0x6'))(new Redis(config[_0x435b('0x4')]));function Agent(_0x4b09ea){this['id']=_0x4b09ea['id']||0x0;this['name']=_0x4b09ea[_0x435b('0x7')]||'';this['email']=_0x4b09ea[_0x435b('0x8')]||'';this['accountcode']=_0x4b09ea['accountcode']||'';this[_0x435b('0x9')]=_0x4b09ea[_0x435b('0x9')]||'';this['state']=_0x435b('0xa');this['stateTime']=0x0;this['status']='unknown';this[_0x435b('0xb')]='';this[_0x435b('0xc')]='';this['mobile']='';this[_0x435b('0xd')]='';this['online']=_0x4b09ea[_0x435b('0xe')]||![];this[_0x435b('0xf')]=_0x435b('0xa');this[_0x435b('0x10')]=0x0;this[_0x435b('0x11')]='';this[_0x435b('0x12')]='';this[_0x435b('0x13')]=![];this[_0x435b('0x14')]=![];this[_0x435b('0x3')]='';}Agent['prototype']['updateStatusRealtime']=function(_0x27feaf){var _0x1eba58;if(_0x27feaf&&_0x27feaf[_0x435b('0x15')]){_0x1eba58=_0x27feaf[_0x435b('0x15')][_0x435b('0x16')]();switch(_0x1eba58){case _0x435b('0x17'):_0x1eba58=_0x435b('0x18');break;case _0x435b('0x19'):_0x1eba58=_0x435b('0x1a');break;}}if(_0x1eba58&&this[_0x435b('0xf')]!==_0x1eba58||_0x27feaf[_0x435b('0x1b')]){this['voiceStatusTime']=_[_0x435b('0x1c')](moment()['format']('x'));}if(_0x1eba58){this[_0x435b('0xf')]=_0x1eba58;}var _0x216b2c={'id':this['id'],'name':this['name'],'email':this['email'],'accountcode':this['accountcode'],'fullname':this['fullname'],'state':this['state'],'stateTime':this[_0x435b('0x1d')],'status':this[_0x435b('0x1e')],'address':this[_0x435b('0xb')],'online':this[_0x435b('0xe')],'voiceStatus':this[_0x435b('0xf')],'voiceStatusTime':this[_0x435b('0x10')],'voiceStatusCallerIdNumber':this[_0x435b('0x11')],'voiceStatusQueue':this[_0x435b('0x12')],'interface':this[_0x435b('0xd')],'onhold':this[_0x435b('0x13')]};var _0x9ffbb3=md5(JSON['stringify'](_0x216b2c));if(this[_0x435b('0x3')]!==_0x9ffbb3){this[_0x435b('0x3')]=_0x9ffbb3;io['to'](util[_0x435b('0x1f')](_0x435b('0x20'),_0x216b2c[_0x435b('0x7')]))[_0x435b('0x21')](_0x435b('0x22'),_0x216b2c);}};module['exports']=Agent; \ No newline at end of file diff --git a/server/services/ami/model/campaign.js b/server/services/ami/model/campaign.js index 3e06ba6..ec58918 100644 --- a/server/services/ami/model/campaign.js +++ b/server/services/ami/model/campaign.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdcf9=['DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','originated','temp','ivrAnswerCallsDay','ivrTotalCallsDays','message','sendMessageOneNotActive','active','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt'];(function(_0x4d13a6,_0xf86ffa){var _0x5795fe=function(_0x4fd9a1){while(--_0x4fd9a1){_0x4d13a6['push'](_0x4d13a6['shift']());}};_0x5795fe(++_0xf86ffa);}(_0xdcf9,0x101));var _0x9dcf=function(_0x496c25,_0x45deb0){_0x496c25=_0x496c25-0x0;var _0x457f3c=_0xdcf9[_0x496c25];return _0x457f3c;};'use strict';function Campaign(_0x167a02){this['id']=_0x167a02['id']||0x0;this[_0x9dcf('0x0')]=_0x167a02[_0x9dcf('0x0')]||'';this[_0x9dcf('0x1')]=_0x167a02[_0x9dcf('0x1')]||_0x9dcf('0x2');this[_0x9dcf('0x3')]=0x0;this[_0x9dcf('0x4')]=0x0;this[_0x9dcf('0x5')]=0x0;this[_0x9dcf('0x6')]=0x0;this[_0x9dcf('0x7')]='';this[_0x9dcf('0x8')]=!![];this[_0x9dcf('0x9')]=_0x167a02['active'];this['limitCalls']=_0x167a02['limitCalls'];this[_0x9dcf('0xa')]=_0x167a02[_0x9dcf('0xa')]||null;this[_0x9dcf('0xb')]=_0x167a02[_0x9dcf('0xb')]?_0x167a02[_0x9dcf('0xb')]:null;this['dialOriginateCallerIdName']=_0x167a02[_0x9dcf('0xc')];this['dialOriginateCallerIdNumber']=_0x167a02['dialOriginateCallerIdNumber'];this['dialOriginateTimeout']=_0x167a02[_0x9dcf('0xd')]||0x1e;this['dialCongestionMaxRetry']=_0x167a02[_0x9dcf('0xe')];this[_0x9dcf('0xf')]=_0x167a02['dialCongestionRetryFrequency'];this[_0x9dcf('0x10')]=_0x167a02[_0x9dcf('0x10')];this[_0x9dcf('0x11')]=_0x167a02['dialBusyRetryFrequency'];this[_0x9dcf('0x12')]=_0x167a02['dialNoAnswerMaxRetry'];this[_0x9dcf('0x13')]=_0x167a02['dialNoAnswerRetryFrequency'];this['dialGlobalMaxRetry']=_0x167a02['dialGlobalMaxRetry'];this[_0x9dcf('0x14')]=_0x167a02[_0x9dcf('0x14')]||0x3;this['dialNoSuchNumberRetryFrequency']=_0x167a02[_0x9dcf('0x15')]||0x96;this['dialDropMaxRetry']=_0x167a02[_0x9dcf('0x16')]||0x3;this[_0x9dcf('0x17')]=_0x167a02[_0x9dcf('0x17')]||0x96;this[_0x9dcf('0x18')]=_0x167a02[_0x9dcf('0x18')]||0x3;this[_0x9dcf('0x19')]=_0x167a02['dialAbandonedRetryFrequency']||0x96;this['dialMachineMaxRetry']=_0x167a02[_0x9dcf('0x1a')]||0x3;this[_0x9dcf('0x1b')]=_0x167a02[_0x9dcf('0x1b')]||0x96;this['dialAgentRejectMaxRetry']=_0x167a02[_0x9dcf('0x1c')]||0x3;this[_0x9dcf('0x1d')]=_0x167a02[_0x9dcf('0x1d')]||0x96;this[_0x9dcf('0x1e')]=_0x167a02[_0x9dcf('0x1e')]||_0x9dcf('0x1f');this[_0x9dcf('0x20')]=_0x167a02[_0x9dcf('0x20')]||undefined;this[_0x9dcf('0x21')]=_0x167a02[_0x9dcf('0x21')]||undefined;this[_0x9dcf('0x22')]=_0x167a02[_0x9dcf('0x22')]||undefined;this['TrunkBackup']=_0x167a02[_0x9dcf('0x23')]?_0x167a02['TrunkBackup']:undefined;this['Trunk']=_0x167a02['Trunk']?_0x167a02['Trunk']:undefined;this[_0x9dcf('0x24')]=_0x167a02['Interval']?_0x167a02[_0x9dcf('0x24')]:undefined;this[_0x9dcf('0x25')]=_0x167a02['SquareProject']?_0x167a02[_0x9dcf('0x25')]:undefined;this[_0x9dcf('0x26')]=_0x167a02['SquareProject']?_0x167a02[_0x9dcf('0x25')][_0x9dcf('0x0')]:undefined;this[_0x9dcf('0x27')]=_0x167a02[_0x9dcf('0x27')]||![];this['dialAMDInitialSilence']=_0x167a02[_0x9dcf('0x28')];this[_0x9dcf('0x29')]=_0x167a02[_0x9dcf('0x29')];this[_0x9dcf('0x2a')]=_0x167a02[_0x9dcf('0x2a')];this['dialAMDTotalAnalysisTime']=_0x167a02['dialAMDTotalAnalysisTime'];this['dialAMDMinWordLength']=_0x167a02['dialAMDMinWordLength'];this[_0x9dcf('0x2b')]=_0x167a02[_0x9dcf('0x2b')];this[_0x9dcf('0x2c')]=_0x167a02[_0x9dcf('0x2c')];this[_0x9dcf('0x2d')]=_0x167a02[_0x9dcf('0x2d')];this[_0x9dcf('0x2e')]=_0x167a02[_0x9dcf('0x2e')];}module[_0x9dcf('0x2f')]=Campaign; \ No newline at end of file +var _0x9926=['dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','name','type','campaign','ivrAnswerCallsDay','message','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency'];(function(_0x1f6215,_0x59e6ea){var _0x54ca44=function(_0x404e90){while(--_0x404e90){_0x1f6215['push'](_0x1f6215['shift']());}};_0x54ca44(++_0x59e6ea);}(_0x9926,0x104));var _0x6992=function(_0xe1c7bb,_0x47eaba){_0xe1c7bb=_0xe1c7bb-0x0;var _0x4a8128=_0x9926[_0xe1c7bb];return _0x4a8128;};'use strict';function Campaign(_0x945e7a){this['id']=_0x945e7a['id']||0x0;this['name']=_0x945e7a[_0x6992('0x0')]||'';this[_0x6992('0x1')]=_0x945e7a[_0x6992('0x1')]||_0x6992('0x2');this['originated']=0x0;this['temp']=0x0;this[_0x6992('0x3')]=0x0;this['ivrTotalCallsDays']=0x0;this[_0x6992('0x4')]='';this[_0x6992('0x5')]=!![];this[_0x6992('0x6')]=_0x945e7a[_0x6992('0x6')];this[_0x6992('0x7')]=_0x945e7a['limitCalls'];this[_0x6992('0x8')]=_0x945e7a[_0x6992('0x8')]||null;this[_0x6992('0x9')]=_0x945e7a[_0x6992('0x9')]?_0x945e7a[_0x6992('0x9')]:null;this[_0x6992('0xa')]=_0x945e7a[_0x6992('0xa')];this[_0x6992('0xb')]=_0x945e7a[_0x6992('0xb')];this[_0x6992('0xc')]=_0x945e7a[_0x6992('0xc')]||0x1e;this[_0x6992('0xd')]=_0x945e7a[_0x6992('0xd')];this[_0x6992('0xe')]=_0x945e7a[_0x6992('0xe')];this[_0x6992('0xf')]=_0x945e7a['dialBusyMaxRetry'];this[_0x6992('0x10')]=_0x945e7a[_0x6992('0x10')];this[_0x6992('0x11')]=_0x945e7a[_0x6992('0x11')];this[_0x6992('0x12')]=_0x945e7a['dialNoAnswerRetryFrequency'];this[_0x6992('0x13')]=_0x945e7a[_0x6992('0x13')];this[_0x6992('0x14')]=_0x945e7a['dialNoSuchNumberMaxRetry']||0x3;this[_0x6992('0x15')]=_0x945e7a[_0x6992('0x15')]||0x96;this[_0x6992('0x16')]=_0x945e7a[_0x6992('0x16')]||0x3;this[_0x6992('0x17')]=_0x945e7a['dialDropRetryFrequency']||0x96;this[_0x6992('0x18')]=_0x945e7a[_0x6992('0x18')]||0x3;this['dialAbandonedRetryFrequency']=_0x945e7a['dialAbandonedRetryFrequency']||0x96;this['dialMachineMaxRetry']=_0x945e7a['dialMachineMaxRetry']||0x3;this['dialMachineRetryFrequency']=_0x945e7a[_0x6992('0x19')]||0x96;this[_0x6992('0x1a')]=_0x945e7a[_0x6992('0x1a')]||0x3;this[_0x6992('0x1b')]=_0x945e7a[_0x6992('0x1b')]||0x96;this[_0x6992('0x1c')]=_0x945e7a[_0x6992('0x1c')]||_0x6992('0x1d');this[_0x6992('0x1e')]=_0x945e7a['dialPrefix']||undefined;this[_0x6992('0x1f')]=_0x945e7a[_0x6992('0x1f')]||undefined;this[_0x6992('0x20')]=_0x945e7a[_0x6992('0x20')]||undefined;this['TrunkBackup']=_0x945e7a[_0x6992('0x21')]?_0x945e7a[_0x6992('0x21')]:undefined;this['Trunk']=_0x945e7a[_0x6992('0x22')]?_0x945e7a[_0x6992('0x22')]:undefined;this['Interval']=_0x945e7a[_0x6992('0x23')]?_0x945e7a[_0x6992('0x23')]:undefined;this[_0x6992('0x24')]=_0x945e7a['SquareProject']?_0x945e7a[_0x6992('0x24')]:undefined;this['dialQueueProject']=_0x945e7a[_0x6992('0x24')]?_0x945e7a[_0x6992('0x24')][_0x6992('0x0')]:undefined;this[_0x6992('0x25')]=_0x945e7a[_0x6992('0x25')]||![];this['dialAMDInitialSilence']=_0x945e7a[_0x6992('0x26')];this['dialAMDGreeting']=_0x945e7a[_0x6992('0x27')];this[_0x6992('0x28')]=_0x945e7a[_0x6992('0x28')];this[_0x6992('0x29')]=_0x945e7a[_0x6992('0x29')];this[_0x6992('0x2a')]=_0x945e7a[_0x6992('0x2a')];this[_0x6992('0x2b')]=_0x945e7a[_0x6992('0x2b')];this[_0x6992('0x2c')]=_0x945e7a[_0x6992('0x2c')];this[_0x6992('0x2d')]=_0x945e7a[_0x6992('0x2d')];this[_0x6992('0x2e')]=_0x945e7a['dialAMDMaximumWordLength'];}module['exports']=Campaign; \ No newline at end of file diff --git a/server/services/ami/model/channel.js b/server/services/ami/model/channel.js index 5ac8bbc..f20eb33 100644 --- a/server/services/ami/model/channel.js +++ b/server/services/ami/model/channel.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x639a=['monitor','queue','monitors','transferconnectedlinenum','mohtime','starttime','channel','calleridname','connectedlinenum','accountcode','context','uniqueid','linkedid','answered','endtime','unmanaged','abandoned','lastapplication','lastdata','billableseconds','holdtime','type','disposition'];(function(_0x3a3a6a,_0x5eb6a9){var _0xa89294=function(_0x55d78c){while(--_0x55d78c){_0x3a3a6a['push'](_0x3a3a6a['shift']());}};_0xa89294(++_0x5eb6a9);}(_0x639a,0x1e8));var _0xa639=function(_0x22bb96,_0x3eb342){_0x22bb96=_0x22bb96-0x0;var _0x1b14cd=_0x639a[_0x22bb96];return _0x1b14cd;};'use strict';function Channel(){this[_0xa639('0x0')]=null;this[_0xa639('0x1')]='';this['destinationchannel']='';this['calleridnum']=0x0;this[_0xa639('0x2')]='';this[_0xa639('0x3')]=undefined;this['connectedlinename']=undefined;this[_0xa639('0x4')]=0x0;this[_0xa639('0x5')]='';this[_0xa639('0x6')]=0x0;this[_0xa639('0x7')]=0x0;this['exten']=0x0;this[_0xa639('0x8')]=![];this['answertime']=null;this[_0xa639('0x9')]=null;this[_0xa639('0xa')]=![];this[_0xa639('0xb')]=![];this[_0xa639('0xc')]='';this[_0xa639('0xd')]='';this['duration']=0x0;this[_0xa639('0xe')]=0x0;this[_0xa639('0xf')]=0x0;this[_0xa639('0x10')]=null;this['tag']=null;this[_0xa639('0x11')]=null;this[_0xa639('0x12')]=![];this['monitorFilename']=null;this[_0xa639('0x13')]=null;this[_0xa639('0x14')]=[];this['transfercalleridnum']=undefined;this[_0xa639('0x15')]=undefined;this[_0xa639('0x16')]=0x0;}module['exports']=Channel; \ No newline at end of file +var _0xbc87=['starttime','calleridnum','calleridname','connectedlinenum','context','uniqueid','linkedid','exten','answered','answertime','endtime','unmanaged','abandoned','lastapplication','lastdata','duration','billableseconds','holdtime','type','tag','disposition','monitorFilename','monitors','transfercalleridnum','transferconnectedlinenum','mohtime','exports'];(function(_0x2cab9e,_0x3087dd){var _0x18498d=function(_0x347f9c){while(--_0x347f9c){_0x2cab9e['push'](_0x2cab9e['shift']());}};_0x18498d(++_0x3087dd);}(_0xbc87,0x144));var _0x7bc8=function(_0x2d7bbf,_0x5554f9){_0x2d7bbf=_0x2d7bbf-0x0;var _0x26ce6d=_0xbc87[_0x2d7bbf];return _0x26ce6d;};'use strict';function Channel(){this[_0x7bc8('0x0')]=null;this['channel']='';this['destinationchannel']='';this[_0x7bc8('0x1')]=0x0;this[_0x7bc8('0x2')]='';this[_0x7bc8('0x3')]=undefined;this['connectedlinename']=undefined;this['accountcode']=0x0;this[_0x7bc8('0x4')]='';this[_0x7bc8('0x5')]=0x0;this[_0x7bc8('0x6')]=0x0;this[_0x7bc8('0x7')]=0x0;this[_0x7bc8('0x8')]=![];this[_0x7bc8('0x9')]=null;this[_0x7bc8('0xa')]=null;this[_0x7bc8('0xb')]=![];this[_0x7bc8('0xc')]=![];this[_0x7bc8('0xd')]='';this[_0x7bc8('0xe')]='';this[_0x7bc8('0xf')]=0x0;this[_0x7bc8('0x10')]=0x0;this[_0x7bc8('0x11')]=0x0;this[_0x7bc8('0x12')]=null;this[_0x7bc8('0x13')]=null;this[_0x7bc8('0x14')]=null;this['monitor']=![];this[_0x7bc8('0x15')]=null;this['queue']=null;this[_0x7bc8('0x16')]=[];this[_0x7bc8('0x17')]=undefined;this[_0x7bc8('0x18')]=undefined;this[_0x7bc8('0x19')]=0x0;}module[_0x7bc8('0x1a')]=Channel; \ No newline at end of file diff --git a/server/services/ami/model/deskAccount.js b/server/services/ami/model/deskAccount.js index fa40c38..53b1c27 100644 --- a/server/services/ami/model/deskAccount.js +++ b/server/services/ami/model/deskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf2e0=['consumerKey','token','tokenSecret','type','serverUrl','Configurations','exports','name','username','remoteUri','authType','password'];(function(_0x459356,_0x2bd203){var _0xd431d7=function(_0x2423c8){while(--_0x2423c8){_0x459356['push'](_0x459356['shift']());}};_0xd431d7(++_0x2bd203);}(_0xf2e0,0xc7));var _0x0f2e=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xf2e0[_0x6c993a];return _0x27f547;};'use strict';function DeskAccount(_0x3bf0f1){this['id']=_0x3bf0f1['id']||0x0;this[_0x0f2e('0x0')]=_0x3bf0f1['name']||'';this[_0x0f2e('0x1')]=_0x3bf0f1[_0x0f2e('0x1')]||'';this['remoteUri']=_0x3bf0f1[_0x0f2e('0x2')]||'';this[_0x0f2e('0x3')]=_0x3bf0f1[_0x0f2e('0x3')]||'';this['password']=_0x3bf0f1[_0x0f2e('0x4')]||'';this[_0x0f2e('0x5')]=_0x3bf0f1[_0x0f2e('0x5')]||'';this['consumerSecret']=_0x3bf0f1['consumerSecret']||'';this[_0x0f2e('0x6')]=_0x3bf0f1['token']||'';this[_0x0f2e('0x7')]=_0x3bf0f1[_0x0f2e('0x7')]||'';this[_0x0f2e('0x8')]=_0x3bf0f1['type']||'';this[_0x0f2e('0x9')]=_0x3bf0f1[_0x0f2e('0x9')]||'';this[_0x0f2e('0xa')]=_0x3bf0f1['Configurations']||{};}module[_0x0f2e('0xb')]=DeskAccount; \ No newline at end of file +var _0x3de0=['remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret','type','serverUrl','Configurations','exports','name','username'];(function(_0x35e3d2,_0x63ffbc){var _0x29daa0=function(_0x31d775){while(--_0x31d775){_0x35e3d2['push'](_0x35e3d2['shift']());}};_0x29daa0(++_0x63ffbc);}(_0x3de0,0x143));var _0x03de=function(_0x1a0968,_0x1a41f7){_0x1a0968=_0x1a0968-0x0;var _0x39abdf=_0x3de0[_0x1a0968];return _0x39abdf;};'use strict';function DeskAccount(_0x27c5fa){this['id']=_0x27c5fa['id']||0x0;this['name']=_0x27c5fa[_0x03de('0x0')]||'';this[_0x03de('0x1')]=_0x27c5fa['username']||'';this[_0x03de('0x2')]=_0x27c5fa[_0x03de('0x2')]||'';this['authType']=_0x27c5fa[_0x03de('0x3')]||'';this[_0x03de('0x4')]=_0x27c5fa['password']||'';this['consumerKey']=_0x27c5fa[_0x03de('0x5')]||'';this[_0x03de('0x6')]=_0x27c5fa[_0x03de('0x6')]||'';this[_0x03de('0x7')]=_0x27c5fa[_0x03de('0x7')]||'';this[_0x03de('0x8')]=_0x27c5fa[_0x03de('0x8')]||'';this[_0x03de('0x9')]=_0x27c5fa['type']||'';this[_0x03de('0xa')]=_0x27c5fa['serverUrl']||'';this['Configurations']=_0x27c5fa[_0x03de('0xb')]||{};}module[_0x03de('0xc')]=DeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/dynamics365Account.js b/server/services/ami/model/dynamics365Account.js index 102fa28..28c6877 100644 --- a/server/services/ami/model/dynamics365Account.js +++ b/server/services/ami/model/dynamics365Account.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec24=['Configurations','exports','name','username','password','remoteUri','tenantId','clientId','clientSecret','serverUrl'];(function(_0x1fb4b5,_0x3fec2a){var _0x25a3db=function(_0x57021a){while(--_0x57021a){_0x1fb4b5['push'](_0x1fb4b5['shift']());}};_0x25a3db(++_0x3fec2a);}(_0xec24,0xfc));var _0x4ec2=function(_0x2abc8c,_0x381759){_0x2abc8c=_0x2abc8c-0x0;var _0x2eba36=_0xec24[_0x2abc8c];return _0x2eba36;};'use strict';function Dynamics365Account(_0x3134e2){this['id']=_0x3134e2['id']||0x0;this[_0x4ec2('0x0')]=_0x3134e2[_0x4ec2('0x0')]||'';this[_0x4ec2('0x1')]=_0x3134e2[_0x4ec2('0x1')]||'';this[_0x4ec2('0x2')]=_0x3134e2[_0x4ec2('0x2')]||'';this['remoteUri']=_0x3134e2[_0x4ec2('0x3')]||'';this[_0x4ec2('0x4')]=_0x3134e2[_0x4ec2('0x4')]||'';this[_0x4ec2('0x5')]=_0x3134e2[_0x4ec2('0x5')]||'';this[_0x4ec2('0x6')]=_0x3134e2[_0x4ec2('0x6')]||{};this[_0x4ec2('0x7')]=_0x3134e2[_0x4ec2('0x7')]||'';this[_0x4ec2('0x8')]=_0x3134e2[_0x4ec2('0x8')]||{};}module[_0x4ec2('0x9')]=Dynamics365Account; \ No newline at end of file +var _0x4c2c=['remoteUri','tenantId','clientId','serverUrl','Configurations','exports','name','username','password'];(function(_0x25916d,_0x445355){var _0xf278f4=function(_0x5224f5){while(--_0x5224f5){_0x25916d['push'](_0x25916d['shift']());}};_0xf278f4(++_0x445355);}(_0x4c2c,0x177));var _0xc4c2=function(_0x490c45,_0x97b829){_0x490c45=_0x490c45-0x0;var _0x82738e=_0x4c2c[_0x490c45];return _0x82738e;};'use strict';function Dynamics365Account(_0x562781){this['id']=_0x562781['id']||0x0;this[_0xc4c2('0x0')]=_0x562781[_0xc4c2('0x0')]||'';this[_0xc4c2('0x1')]=_0x562781[_0xc4c2('0x1')]||'';this[_0xc4c2('0x2')]=_0x562781[_0xc4c2('0x2')]||'';this[_0xc4c2('0x3')]=_0x562781[_0xc4c2('0x3')]||'';this[_0xc4c2('0x4')]=_0x562781['tenantId']||'';this[_0xc4c2('0x5')]=_0x562781[_0xc4c2('0x5')]||'';this['clientSecret']=_0x562781['clientSecret']||{};this[_0xc4c2('0x6')]=_0x562781['serverUrl']||'';this['Configurations']=_0x562781[_0xc4c2('0x7')]||{};}module[_0xc4c2('0x8')]=Dynamics365Account; \ No newline at end of file diff --git a/server/services/ami/model/faxAccount.js b/server/services/ami/model/faxAccount.js index 7a07cae..cd8e874 100644 --- a/server/services/ami/model/faxAccount.js +++ b/server/services/ami/model/faxAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x256e=['t38timeout','tech','SIP','Trunk','ListId','key','name','description','ecm','headerinfo','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect'];(function(_0x1bc10c,_0x4b5d84){var _0x502203=function(_0x5e41d7){while(--_0x5e41d7){_0x1bc10c['push'](_0x1bc10c['shift']());}};_0x502203(++_0x4b5d84);}(_0x256e,0x105));var _0xe256=function(_0x4f67bd,_0x162b71){_0x4f67bd=_0x4f67bd-0x0;var _0x2deb00=_0x256e[_0x4f67bd];return _0x2deb00;};'use strict';function FaxAccount(_0x2d9212){this['id']=_0x2d9212['id']||0x0;this[_0xe256('0x0')]=_0x2d9212[_0xe256('0x0')]||'';this[_0xe256('0x1')]=_0x2d9212['description'];this[_0xe256('0x2')]=_0x2d9212[_0xe256('0x2')];this[_0xe256('0x3')]=_0x2d9212['headerinfo'];this['localstationid']=_0x2d9212[_0xe256('0x4')];this[_0xe256('0x5')]=_0x2d9212[_0xe256('0x5')]||0x960;this[_0xe256('0x6')]=_0x2d9212[_0xe256('0x6')]||0x3840;this[_0xe256('0x7')]=_0x2d9212[_0xe256('0x7')]||_0xe256('0x8');this[_0xe256('0x9')]=_0x2d9212['gateway']||'no';this[_0xe256('0xa')]=_0x2d9212[_0xe256('0xa')]||'no';this[_0xe256('0xb')]=_0x2d9212[_0xe256('0xb')]||0x1388;this[_0xe256('0xc')]=_0x2d9212[_0xe256('0xc')]||_0xe256('0xd');this[_0xe256('0xe')]=_0x2d9212[_0xe256('0xe')]?_0x2d9212[_0xe256('0xe')]:undefined;this[_0xe256('0xf')]=_0x2d9212[_0xe256('0xf')];this['key']=_0x2d9212[_0xe256('0x10')];}module['exports']=FaxAccount; \ No newline at end of file +var _0x5e89=['gateway','faxdetect','t38timeout','tech','SIP','Trunk','exports','description','ecm','headerinfo','minrate','maxrate','modem','v17,v27,v29'];(function(_0x38cb51,_0xeb1028){var _0x30ce20=function(_0x406c08){while(--_0x406c08){_0x38cb51['push'](_0x38cb51['shift']());}};_0x30ce20(++_0xeb1028);}(_0x5e89,0x19d));var _0x95e8=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x5e89[_0x5ddb1c];return _0x354adc;};'use strict';function FaxAccount(_0x42dff2){this['id']=_0x42dff2['id']||0x0;this['name']=_0x42dff2['name']||'';this['description']=_0x42dff2[_0x95e8('0x0')];this[_0x95e8('0x1')]=_0x42dff2[_0x95e8('0x1')];this[_0x95e8('0x2')]=_0x42dff2[_0x95e8('0x2')];this['localstationid']=_0x42dff2['localstationid'];this[_0x95e8('0x3')]=_0x42dff2[_0x95e8('0x3')]||0x960;this[_0x95e8('0x4')]=_0x42dff2[_0x95e8('0x4')]||0x3840;this['modem']=_0x42dff2[_0x95e8('0x5')]||_0x95e8('0x6');this['gateway']=_0x42dff2[_0x95e8('0x7')]||'no';this[_0x95e8('0x8')]=_0x42dff2[_0x95e8('0x8')]||'no';this[_0x95e8('0x9')]=_0x42dff2['t38timeout']||0x1388;this[_0x95e8('0xa')]=_0x42dff2[_0x95e8('0xa')]||_0x95e8('0xb');this[_0x95e8('0xc')]=_0x42dff2[_0x95e8('0xc')]?_0x42dff2[_0x95e8('0xc')]:undefined;this['ListId']=_0x42dff2['ListId'];this['key']=_0x42dff2['key'];}module[_0x95e8('0xd')]=FaxAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshdeskAccount.js b/server/services/ami/model/freshdeskAccount.js index 1af51e2..f1ba0b2 100644 --- a/server/services/ami/model/freshdeskAccount.js +++ b/server/services/ami/model/freshdeskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfdec=['name','username','remoteUri','serverUrl','exports'];(function(_0xf82311,_0x29504b){var _0x39d8fa=function(_0x27c1d2){while(--_0x27c1d2){_0xf82311['push'](_0xf82311['shift']());}};_0x39d8fa(++_0x29504b);}(_0xfdec,0xfa));var _0xcfde=function(_0x817d9b,_0x3c37e3){_0x817d9b=_0x817d9b-0x0;var _0x2752e1=_0xfdec[_0x817d9b];return _0x2752e1;};'use strict';function FreshdeskAccount(_0x38d5ce){this['id']=_0x38d5ce['id']||0x0;this[_0xcfde('0x0')]=_0x38d5ce[_0xcfde('0x0')]||'';this[_0xcfde('0x1')]=_0x38d5ce[_0xcfde('0x1')]||'';this['apiKey']=_0x38d5ce['token']||'';this[_0xcfde('0x2')]=_0x38d5ce[_0xcfde('0x2')]||'';this[_0xcfde('0x3')]=_0x38d5ce['serverUrl']||'';this['Configurations']=_0x38d5ce['Configurations']||{};}module[_0xcfde('0x4')]=FreshdeskAccount; \ No newline at end of file +var _0x97ad=['username','apiKey','token','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x45fc6c,_0x576a86){var _0x456120=function(_0xc5cf21){while(--_0xc5cf21){_0x45fc6c['push'](_0x45fc6c['shift']());}};_0x456120(++_0x576a86);}(_0x97ad,0x157));var _0xd97a=function(_0xe88494,_0x13750e){_0xe88494=_0xe88494-0x0;var _0x3f2954=_0x97ad[_0xe88494];return _0x3f2954;};'use strict';function FreshdeskAccount(_0x1def01){this['id']=_0x1def01['id']||0x0;this[_0xd97a('0x0')]=_0x1def01['name']||'';this[_0xd97a('0x1')]=_0x1def01[_0xd97a('0x1')]||'';this[_0xd97a('0x2')]=_0x1def01[_0xd97a('0x3')]||'';this[_0xd97a('0x4')]=_0x1def01[_0xd97a('0x4')]||'';this['serverUrl']=_0x1def01[_0xd97a('0x5')]||'';this[_0xd97a('0x6')]=_0x1def01[_0xd97a('0x6')]||{};}module[_0xd97a('0x7')]=FreshdeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshsalesAccount.js b/server/services/ami/model/freshsalesAccount.js index 35097d4..9b2f8f5 100644 --- a/server/services/ami/model/freshsalesAccount.js +++ b/server/services/ami/model/freshsalesAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x43be=['Configurations','exports','name','username','token','remoteUri','serverUrl'];(function(_0x1b765a,_0x47b086){var _0x5c66ff=function(_0x2f32fb){while(--_0x2f32fb){_0x1b765a['push'](_0x1b765a['shift']());}};_0x5c66ff(++_0x47b086);}(_0x43be,0x152));var _0xe43b=function(_0x2a7b37,_0x487c1a){_0x2a7b37=_0x2a7b37-0x0;var _0x2df1e0=_0x43be[_0x2a7b37];return _0x2df1e0;};'use strict';function FreshsalesAccount(_0x1c93dc){this['id']=_0x1c93dc['id']||0x0;this[_0xe43b('0x0')]=_0x1c93dc[_0xe43b('0x0')]||'';this[_0xe43b('0x1')]=_0x1c93dc[_0xe43b('0x1')]||'';this['apiKey']=_0x1c93dc[_0xe43b('0x2')]||'';this[_0xe43b('0x3')]=_0x1c93dc['remoteUri']||'';this[_0xe43b('0x4')]=_0x1c93dc[_0xe43b('0x4')]||'';this['Configurations']=_0x1c93dc[_0xe43b('0x5')]||{};}module[_0xe43b('0x6')]=FreshsalesAccount; \ No newline at end of file +var _0x25e9=['username','apiKey','token','remoteUri','serverUrl','Configurations','name'];(function(_0x193928,_0x59fcb4){var _0x182cd4=function(_0x422fbb){while(--_0x422fbb){_0x193928['push'](_0x193928['shift']());}};_0x182cd4(++_0x59fcb4);}(_0x25e9,0x179));var _0x925e=function(_0x1e440c,_0x3b2ca5){_0x1e440c=_0x1e440c-0x0;var _0x3cfab5=_0x25e9[_0x1e440c];return _0x3cfab5;};'use strict';function FreshsalesAccount(_0x30e2c0){this['id']=_0x30e2c0['id']||0x0;this[_0x925e('0x0')]=_0x30e2c0[_0x925e('0x0')]||'';this['username']=_0x30e2c0[_0x925e('0x1')]||'';this[_0x925e('0x2')]=_0x30e2c0[_0x925e('0x3')]||'';this[_0x925e('0x4')]=_0x30e2c0[_0x925e('0x4')]||'';this[_0x925e('0x5')]=_0x30e2c0[_0x925e('0x5')]||'';this['Configurations']=_0x30e2c0[_0x925e('0x6')]||{};}module['exports']=FreshsalesAccount; \ No newline at end of file diff --git a/server/services/ami/model/queueReport.js b/server/services/ami/model/queueReport.js index 816eb0e..c0821d2 100644 --- a/server/services/ami/model/queueReport.js +++ b/server/services/ami/model/queueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2314=['queuecallerjoinAt','position','count','queuecallerabandon','queuecallerabandonAt','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','originalposition','channel','connectedlinenum','connectedlinename','exten','priority','holdtime','assigned','mohtime','variables','exports','type','inbound','calleridnum','calleridname','queue'];(function(_0x2070da,_0x45e586){var _0x4f9fe1=function(_0x5b6f2a){while(--_0x5b6f2a){_0x2070da['push'](_0x2070da['shift']());}};_0x4f9fe1(++_0x45e586);}(_0x2314,0x133));var _0x4231=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x2314[_0x3ab51d];return _0x29a04e;};'use strict';function QueueReport(){this[_0x4231('0x0')]=_0x4231('0x1');this['uniqueid']='';this[_0x4231('0x2')]='';this[_0x4231('0x3')]='';this[_0x4231('0x4')]='';this[_0x4231('0x5')]=null;this['queuecallerleaveAt']=null;this[_0x4231('0x6')]=0x1;this[_0x4231('0x7')]=0x1;this[_0x4231('0x8')]=![];this[_0x4231('0x9')]=null;this['queuecallercomplete']=![];this[_0x4231('0xa')]=null;this[_0x4231('0xb')]=![];this[_0x4231('0xc')]=null;this[_0x4231('0xd')]=0x1;this[_0x4231('0xe')]='';this[_0x4231('0xf')]='';this[_0x4231('0x10')]='';this['accountcode']='';this['context']='';this[_0x4231('0x11')]='';this[_0x4231('0x12')]='';this[_0x4231('0x13')]=0x0;this[_0x4231('0x14')]=![];this['lastAssignedTo']='';this[_0x4231('0x15')]=0x0;this[_0x4231('0x16')]={};}module[_0x4231('0x17')]=QueueReport; \ No newline at end of file +var _0x51ef=['queuecallerleaveAt','position','count','queuecallerabandon','queuecallerabandonAt','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','originalposition','channel','connectedlinename','context','exten','priority','holdtime','assigned','lastAssignedTo','mohtime','type','inbound','uniqueid','queue','queuecallerjoinAt'];(function(_0x11f688,_0x40fc33){var _0x5b8558=function(_0x992d74){while(--_0x992d74){_0x11f688['push'](_0x11f688['shift']());}};_0x5b8558(++_0x40fc33);}(_0x51ef,0x1db));var _0xf51e=function(_0x22ceed,_0x1998f0){_0x22ceed=_0x22ceed-0x0;var _0x2bc59f=_0x51ef[_0x22ceed];return _0x2bc59f;};'use strict';function QueueReport(){this[_0xf51e('0x0')]=_0xf51e('0x1');this[_0xf51e('0x2')]='';this['calleridnum']='';this['calleridname']='';this[_0xf51e('0x3')]='';this[_0xf51e('0x4')]=null;this[_0xf51e('0x5')]=null;this[_0xf51e('0x6')]=0x1;this[_0xf51e('0x7')]=0x1;this[_0xf51e('0x8')]=![];this[_0xf51e('0x9')]=null;this[_0xf51e('0xa')]=![];this[_0xf51e('0xb')]=null;this[_0xf51e('0xc')]=![];this[_0xf51e('0xd')]=null;this[_0xf51e('0xe')]=0x1;this[_0xf51e('0xf')]='';this['connectedlinenum']='';this[_0xf51e('0x10')]='';this['accountcode']='';this[_0xf51e('0x11')]='';this[_0xf51e('0x12')]='';this[_0xf51e('0x13')]='';this[_0xf51e('0x14')]=0x0;this[_0xf51e('0x15')]=![];this[_0xf51e('0x16')]='';this[_0xf51e('0x17')]=0x0;this['variables']={};}module['exports']=QueueReport; \ No newline at end of file diff --git a/server/services/ami/model/salesforceAccount.js b/server/services/ami/model/salesforceAccount.js index efb4806..68a068e 100644 --- a/server/services/ami/model/salesforceAccount.js +++ b/server/services/ami/model/salesforceAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x517f=['username','remoteUri','password','clientId','clientSecret','securityToken','type','integrationTab','serverUrl','Configurations','name'];(function(_0x3ceb54,_0x5bddfd){var _0x26d8a6=function(_0x32e484){while(--_0x32e484){_0x3ceb54['push'](_0x3ceb54['shift']());}};_0x26d8a6(++_0x5bddfd);}(_0x517f,0x1d8));var _0xf517=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0x517f[_0x1a36a5];return _0x746243;};'use strict';function SalesforceAccount(_0x3b41d3){this['id']=_0x3b41d3['id']||0x0;this[_0xf517('0x0')]=_0x3b41d3[_0xf517('0x0')]||'';this[_0xf517('0x1')]=_0x3b41d3[_0xf517('0x1')]||'';this[_0xf517('0x2')]=_0x3b41d3[_0xf517('0x2')]||'';this['password']=_0x3b41d3[_0xf517('0x3')]||'';this[_0xf517('0x4')]=_0x3b41d3[_0xf517('0x4')]||'';this[_0xf517('0x5')]=_0x3b41d3['clientSecret']||'';this[_0xf517('0x6')]=_0x3b41d3['securityToken']||'';this[_0xf517('0x7')]=_0x3b41d3[_0xf517('0x7')]||_0xf517('0x8');this[_0xf517('0x9')]=_0x3b41d3[_0xf517('0x9')]||'';this[_0xf517('0xa')]=_0x3b41d3[_0xf517('0xa')]||{};}module['exports']=SalesforceAccount; \ No newline at end of file +var _0x0a48=['clientSecret','securityToken','type','integrationTab','serverUrl','exports','name','username','remoteUri','password','clientId'];(function(_0x406f41,_0x5108cc){var _0x13fc13=function(_0x1a4301){while(--_0x1a4301){_0x406f41['push'](_0x406f41['shift']());}};_0x13fc13(++_0x5108cc);}(_0x0a48,0x95));var _0x80a4=function(_0x38b360,_0x4fd106){_0x38b360=_0x38b360-0x0;var _0x29932f=_0x0a48[_0x38b360];return _0x29932f;};'use strict';function SalesforceAccount(_0x3af003){this['id']=_0x3af003['id']||0x0;this[_0x80a4('0x0')]=_0x3af003['name']||'';this[_0x80a4('0x1')]=_0x3af003[_0x80a4('0x1')]||'';this[_0x80a4('0x2')]=_0x3af003[_0x80a4('0x2')]||'';this[_0x80a4('0x3')]=_0x3af003['password']||'';this['clientId']=_0x3af003[_0x80a4('0x4')]||'';this[_0x80a4('0x5')]=_0x3af003[_0x80a4('0x5')]||'';this[_0x80a4('0x6')]=_0x3af003['securityToken']||'';this[_0x80a4('0x7')]=_0x3af003['type']||_0x80a4('0x8');this[_0x80a4('0x9')]=_0x3af003[_0x80a4('0x9')]||'';this['Configurations']=_0x3af003['Configurations']||{};}module[_0x80a4('0xa')]=SalesforceAccount; \ No newline at end of file diff --git a/server/services/ami/model/servicenowAccount.js b/server/services/ami/model/servicenowAccount.js index 901d8d1..e36b0f2 100644 --- a/server/services/ami/model/servicenowAccount.js +++ b/server/services/ami/model/servicenowAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8823=['password','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x312e5b,_0x188724){var _0x58e84d=function(_0x2b91bd){while(--_0x2b91bd){_0x312e5b['push'](_0x312e5b['shift']());}};_0x58e84d(++_0x188724);}(_0x8823,0x98));var _0x3882=function(_0x48801b,_0x5995c2){_0x48801b=_0x48801b-0x0;var _0x36f57d=_0x8823[_0x48801b];return _0x36f57d;};'use strict';function ServicenowAccount(_0x592d87){this['id']=_0x592d87['id']||0x0;this['name']=_0x592d87[_0x3882('0x0')]||'';this[_0x3882('0x1')]=_0x592d87['username']||'';this[_0x3882('0x2')]=_0x592d87['password']||'';this[_0x3882('0x3')]=_0x592d87['remoteUri']||'';this[_0x3882('0x4')]=_0x592d87[_0x3882('0x4')]||'';this[_0x3882('0x5')]=_0x592d87[_0x3882('0x5')]||{};}module[_0x3882('0x6')]=ServicenowAccount; \ No newline at end of file +var _0xfa9e=['username','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x13ff53,_0x5e1424){var _0x290228=function(_0x3e3133){while(--_0x3e3133){_0x13ff53['push'](_0x13ff53['shift']());}};_0x290228(++_0x5e1424);}(_0xfa9e,0xad));var _0xefa9=function(_0x1dda59,_0xb18d21){_0x1dda59=_0x1dda59-0x0;var _0x56a58f=_0xfa9e[_0x1dda59];return _0x56a58f;};'use strict';function ServicenowAccount(_0x3bd1b6){this['id']=_0x3bd1b6['id']||0x0;this['name']=_0x3bd1b6[_0xefa9('0x0')]||'';this['username']=_0x3bd1b6[_0xefa9('0x1')]||'';this['password']=_0x3bd1b6['password']||'';this[_0xefa9('0x2')]=_0x3bd1b6[_0xefa9('0x2')]||'';this[_0xefa9('0x3')]=_0x3bd1b6[_0xefa9('0x3')]||'';this[_0xefa9('0x4')]=_0x3bd1b6[_0xefa9('0x4')]||{};}module[_0xefa9('0x5')]=ServicenowAccount; \ No newline at end of file diff --git a/server/services/ami/model/sugarcrmAccount.js b/server/services/ami/model/sugarcrmAccount.js index 5486d8b..fb37737 100644 --- a/server/services/ami/model/sugarcrmAccount.js +++ b/server/services/ami/model/sugarcrmAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd083=['Configurations','exports','name','username','password','remoteUri','serverUrl'];(function(_0x3a6f31,_0x53e5f5){var _0x3dd2c6=function(_0x54aec8){while(--_0x54aec8){_0x3a6f31['push'](_0x3a6f31['shift']());}};_0x3dd2c6(++_0x53e5f5);}(_0xd083,0x10c));var _0x3d08=function(_0x14476b,_0xd1a7a4){_0x14476b=_0x14476b-0x0;var _0x24e2e8=_0xd083[_0x14476b];return _0x24e2e8;};'use strict';function SugarcrmAccount(_0x3cfd9d){this['id']=_0x3cfd9d['id']||0x0;this[_0x3d08('0x0')]=_0x3cfd9d[_0x3d08('0x0')]||'';this['username']=_0x3cfd9d[_0x3d08('0x1')]||'';this[_0x3d08('0x2')]=_0x3cfd9d[_0x3d08('0x2')]||'';this[_0x3d08('0x3')]=_0x3cfd9d[_0x3d08('0x3')]||'';this[_0x3d08('0x4')]=_0x3cfd9d[_0x3d08('0x4')]||'';this[_0x3d08('0x5')]=_0x3cfd9d[_0x3d08('0x5')]||{};}module[_0x3d08('0x6')]=SugarcrmAccount; \ No newline at end of file +var _0x3551=['remoteUri','serverUrl','Configurations','exports','name','username','password'];(function(_0x3d59e0,_0x170079){var _0x43baf4=function(_0xae481f){while(--_0xae481f){_0x3d59e0['push'](_0x3d59e0['shift']());}};_0x43baf4(++_0x170079);}(_0x3551,0x1c4));var _0x1355=function(_0x4bf591,_0x48b450){_0x4bf591=_0x4bf591-0x0;var _0x18f0df=_0x3551[_0x4bf591];return _0x18f0df;};'use strict';function SugarcrmAccount(_0x16a977){this['id']=_0x16a977['id']||0x0;this[_0x1355('0x0')]=_0x16a977[_0x1355('0x0')]||'';this[_0x1355('0x1')]=_0x16a977['username']||'';this['password']=_0x16a977[_0x1355('0x2')]||'';this[_0x1355('0x3')]=_0x16a977[_0x1355('0x3')]||'';this[_0x1355('0x4')]=_0x16a977[_0x1355('0x4')]||'';this[_0x1355('0x5')]=_0x16a977[_0x1355('0x5')]||{};}module[_0x1355('0x6')]=SugarcrmAccount; \ No newline at end of file diff --git a/server/services/ami/model/telephone.js b/server/services/ami/model/telephone.js index b7c1880..5c6569e 100644 --- a/server/services/ami/model/telephone.js +++ b/server/services/ami/model/telephone.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8654=['status','unknown','exports','name','accountcode','state'];(function(_0x2070da,_0x45e586){var _0x4f9fe1=function(_0x5b6f2a){while(--_0x5b6f2a){_0x2070da['push'](_0x2070da['shift']());}};_0x4f9fe1(++_0x45e586);}(_0x8654,0x153));var _0x4865=function(_0xe64497,_0x3a2fb8){_0xe64497=_0xe64497-0x0;var _0x5e3c9a=_0x8654[_0xe64497];return _0x5e3c9a;};'use strict';function Telephone(_0x88a5ab){this['id']=_0x88a5ab['id']||0x0;this[_0x4865('0x0')]=_0x88a5ab[_0x4865('0x0')]||'';this[_0x4865('0x1')]=_0x88a5ab[_0x4865('0x1')]||'';this[_0x4865('0x2')]='unknown';this['stateTime']=0x0;this[_0x4865('0x3')]=_0x4865('0x4');this['address']='';}module[_0x4865('0x5')]=Telephone; \ No newline at end of file +var _0x3efb=['status','unknown','address','name','accountcode','stateTime'];(function(_0x4b6830,_0x2bf6fb){var _0x239e4a=function(_0x364735){while(--_0x364735){_0x4b6830['push'](_0x4b6830['shift']());}};_0x239e4a(++_0x2bf6fb);}(_0x3efb,0x8d));var _0xb3ef=function(_0x121886,_0x8cd8e5){_0x121886=_0x121886-0x0;var _0x20ca01=_0x3efb[_0x121886];return _0x20ca01;};'use strict';function Telephone(_0x406dc4){this['id']=_0x406dc4['id']||0x0;this[_0xb3ef('0x0')]=_0x406dc4[_0xb3ef('0x0')]||'';this[_0xb3ef('0x1')]=_0x406dc4['accountcode']||'';this['state']='unknown';this[_0xb3ef('0x2')]=0x0;this[_0xb3ef('0x3')]=_0xb3ef('0x4');this[_0xb3ef('0x5')]='';}module['exports']=Telephone; \ No newline at end of file diff --git a/server/services/ami/model/template.js b/server/services/ami/model/template.js index 08ddaec..3ff50db 100644 --- a/server/services/ami/model/template.js +++ b/server/services/ami/model/template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e7c=['name','html','exports'];(function(_0x2e3425,_0x1280bc){var _0x160d7b=function(_0x30946e){while(--_0x30946e){_0x2e3425['push'](_0x2e3425['shift']());}};_0x160d7b(++_0x1280bc);}(_0x1e7c,0x1e3));var _0xc1e7=function(_0x58357f,_0x536ba5){_0x58357f=_0x58357f-0x0;var _0x3dd506=_0x1e7c[_0x58357f];return _0x3dd506;};'use strict';function template(_0xda0f52){this['id']=_0xda0f52['id']||0x0;this[_0xc1e7('0x0')]=_0xda0f52['name']||'';this[_0xc1e7('0x1')]=_0xda0f52[_0xc1e7('0x1')]||'';}module[_0xc1e7('0x2')]=template; \ No newline at end of file +var _0x5bf5=['html','name'];(function(_0xca268,_0x1cc126){var _0x1e5699=function(_0x34a47f){while(--_0x34a47f){_0xca268['push'](_0xca268['shift']());}};_0x1e5699(++_0x1cc126);}(_0x5bf5,0xf1));var _0x55bf=function(_0xdfa2c4,_0xf2d691){_0xdfa2c4=_0xdfa2c4-0x0;var _0x2857f7=_0x5bf5[_0xdfa2c4];return _0x2857f7;};'use strict';function template(_0xa91c1c){this['id']=_0xa91c1c['id']||0x0;this[_0x55bf('0x0')]=_0xa91c1c[_0x55bf('0x0')]||'';this[_0x55bf('0x1')]=_0xa91c1c[_0x55bf('0x1')]||'';}module['exports']=template; \ No newline at end of file diff --git a/server/services/ami/model/trigger.js b/server/services/ami/model/trigger.js index 31beede..28fb806 100644 --- a/server/services/ami/model/trigger.js +++ b/server/services/ami/model/trigger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x008c=['name','channel','status','AllConditions','AnyConditions','Actions','exports'];(function(_0x83b4e,_0x47c407){var _0x2beec8=function(_0x48848f){while(--_0x48848f){_0x83b4e['push'](_0x83b4e['shift']());}};_0x2beec8(++_0x47c407);}(_0x008c,0x188));var _0xc008=function(_0x205852,_0x184d90){_0x205852=_0x205852-0x0;var _0x491d8d=_0x008c[_0x205852];return _0x491d8d;};'use strict';function Trigger(_0x2be4ba){this['id']=_0x2be4ba['id']||0x0;this[_0xc008('0x0')]=_0x2be4ba[_0xc008('0x0')]||'';this[_0xc008('0x1')]=_0x2be4ba[_0xc008('0x1')]||'voice';this[_0xc008('0x2')]=_0x2be4ba[_0xc008('0x2')]||![];this[_0xc008('0x3')]=_0x2be4ba[_0xc008('0x3')]||[];this[_0xc008('0x4')]=_0x2be4ba[_0xc008('0x4')]||[];this[_0xc008('0x5')]=_0x2be4ba[_0xc008('0x5')]||[];}module[_0xc008('0x6')]=Trigger; \ No newline at end of file +var _0x8ef6=['status','AllConditions','AnyConditions','exports','name','channel','voice'];(function(_0x137f28,_0x4f2498){var _0x36785e=function(_0x3ebf5f){while(--_0x3ebf5f){_0x137f28['push'](_0x137f28['shift']());}};_0x36785e(++_0x4f2498);}(_0x8ef6,0xf2));var _0x68ef=function(_0x2001b0,_0x5f046f){_0x2001b0=_0x2001b0-0x0;var _0x1ee3c5=_0x8ef6[_0x2001b0];return _0x1ee3c5;};'use strict';function Trigger(_0x58ecc7){this['id']=_0x58ecc7['id']||0x0;this[_0x68ef('0x0')]=_0x58ecc7[_0x68ef('0x0')]||'';this[_0x68ef('0x1')]=_0x58ecc7[_0x68ef('0x1')]||_0x68ef('0x2');this[_0x68ef('0x3')]=_0x58ecc7['status']||![];this[_0x68ef('0x4')]=_0x58ecc7[_0x68ef('0x4')]||[];this[_0x68ef('0x5')]=_0x58ecc7[_0x68ef('0x5')]||[];this['Actions']=_0x58ecc7['Actions']||[];}module[_0x68ef('0x6')]=Trigger; \ No newline at end of file diff --git a/server/services/ami/model/trunk.js b/server/services/ami/model/trunk.js index 7fb62b0..08eb405 100644 --- a/server/services/ami/model/trunk.js +++ b/server/services/ami/model/trunk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d6d=['status','registry','indexOf','split','host','domain','domainport','refresh','registrationtime','address','active','name','state','unknown','stateTime'];(function(_0x435ba5,_0x55875f){var _0x5af51d=function(_0x35b1ed){while(--_0x35b1ed){_0x435ba5['push'](_0x435ba5['shift']());}};_0x5af51d(++_0x55875f);}(_0x5d6d,0xa0));var _0xd5d6=function(_0x100ae3,_0x3c03f0){_0x100ae3=_0x100ae3-0x0;var _0x1a627b=_0x5d6d[_0x100ae3];return _0x1a627b;};'use strict';function Trunk(_0x2cccb4){this['id']=_0x2cccb4['id']||0x0;this[_0xd5d6('0x0')]=_0x2cccb4[_0xd5d6('0x0')]||![];this['name']=_0x2cccb4[_0xd5d6('0x1')]||'';this[_0xd5d6('0x2')]=_0xd5d6('0x3');this[_0xd5d6('0x4')]=0x0;this[_0xd5d6('0x5')]='unknown';this['registry']=_0x2cccb4[_0xd5d6('0x6')]&&_0x2cccb4[_0xd5d6('0x6')][_0xd5d6('0x7')](':')?_0x2cccb4[_0xd5d6('0x6')][_0xd5d6('0x8')](':')[0x0]:'';this[_0xd5d6('0x9')]='';this['port']='';this[_0xd5d6('0xa')]='';this[_0xd5d6('0xb')]='';this[_0xd5d6('0xc')]='';this['stateRegistry']='unknown';this[_0xd5d6('0xd')]='';this[_0xd5d6('0xe')]='';}module['exports']=Trunk; \ No newline at end of file +var _0xf6a9=['stateTime','status','unknown','registry','split','host','port','domain','stateRegistry','address','active','name','state'];(function(_0x110fe0,_0x50c9f5){var _0x4582d0=function(_0x357ebb){while(--_0x357ebb){_0x110fe0['push'](_0x110fe0['shift']());}};_0x4582d0(++_0x50c9f5);}(_0xf6a9,0x176));var _0x9f6a=function(_0x55c4f6,_0x46a508){_0x55c4f6=_0x55c4f6-0x0;var _0x454afc=_0xf6a9[_0x55c4f6];return _0x454afc;};'use strict';function Trunk(_0x73a217){this['id']=_0x73a217['id']||0x0;this['active']=_0x73a217[_0x9f6a('0x0')]||![];this['name']=_0x73a217[_0x9f6a('0x1')]||'';this[_0x9f6a('0x2')]='unknown';this[_0x9f6a('0x3')]=0x0;this[_0x9f6a('0x4')]=_0x9f6a('0x5');this[_0x9f6a('0x6')]=_0x73a217[_0x9f6a('0x6')]&&_0x73a217[_0x9f6a('0x6')]['indexOf'](':')?_0x73a217[_0x9f6a('0x6')][_0x9f6a('0x7')](':')[0x0]:'';this[_0x9f6a('0x8')]='';this[_0x9f6a('0x9')]='';this[_0x9f6a('0xa')]='';this['domainport']='';this['refresh']='';this[_0x9f6a('0xb')]=_0x9f6a('0x5');this['registrationtime']='';this[_0x9f6a('0xc')]='';}module['exports']=Trunk; \ No newline at end of file diff --git a/server/services/ami/model/voiceExtension.js b/server/services/ami/model/voiceExtension.js index 0de7fef..e84a90b 100644 --- a/server/services/ami/model/voiceExtension.js +++ b/server/services/ami/model/voiceExtension.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde39=['recordingFormat','none','mandatoryDisposition','exports','exten'];(function(_0x3dd184,_0x1d0d71){var _0x987835=function(_0x4036b9){while(--_0x4036b9){_0x3dd184['push'](_0x3dd184['shift']());}};_0x987835(++_0x1d0d71);}(_0xde39,0xae));var _0x9de3=function(_0x2d126e,_0x1e8257){_0x2d126e=_0x2d126e-0x0;var _0xcb04d3=_0xde39[_0x2d126e];return _0xcb04d3;};'use strict';function voiceExtension(_0x1e15a7){this['id']=_0x1e15a7['id']||0x0;this[_0x9de3('0x0')]=_0x1e15a7[_0x9de3('0x0')]||'';this[_0x9de3('0x1')]=_0x1e15a7[_0x9de3('0x1')]||_0x9de3('0x2');this['mandatoryDisposition']=_0x1e15a7[_0x9de3('0x3')]||![];}module[_0x9de3('0x4')]=voiceExtension; \ No newline at end of file +var _0x2e10=['exten','recordingFormat','none','mandatoryDisposition','exports'];(function(_0x3ca0ef,_0x13da45){var _0x1b1127=function(_0x66101b){while(--_0x66101b){_0x3ca0ef['push'](_0x3ca0ef['shift']());}};_0x1b1127(++_0x13da45);}(_0x2e10,0xc3));var _0x02e1=function(_0x244fb2,_0x34e517){_0x244fb2=_0x244fb2-0x0;var _0x477b05=_0x2e10[_0x244fb2];return _0x477b05;};'use strict';function voiceExtension(_0x3e9229){this['id']=_0x3e9229['id']||0x0;this[_0x02e1('0x0')]=_0x3e9229[_0x02e1('0x0')]||'';this[_0x02e1('0x1')]=_0x3e9229[_0x02e1('0x1')]||_0x02e1('0x2');this[_0x02e1('0x3')]=_0x3e9229['mandatoryDisposition']||![];}module[_0x02e1('0x4')]=voiceExtension; \ No newline at end of file diff --git a/server/services/ami/model/voiceQueue.js b/server/services/ami/model/voiceQueue.js index cfe6f87..f826ca3 100644 --- a/server/services/ami/model/voiceQueue.js +++ b/server/services/ami/model/voiceQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1cfb=['dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','exports','inuse','busy','unavailable','ringing','wav','wav49','rrmemory','roundrobin','name','monitor_format','type','inbound','answered','sumDuration','sumBillable','abandoned','acwTimeout','autopause','sendMessageOneNotActive','message','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialLimitChannel','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialGlobalMaxRetry','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangAbandonmentRate'];(function(_0x41c7b9,_0x393db1){var _0x5da2b7=function(_0x351edd){while(--_0x351edd){_0x41c7b9['push'](_0x41c7b9['shift']());}};_0x5da2b7(++_0x393db1);}(_0x1cfb,0x152));var _0xb1cf=function(_0x42835a,_0x5259a7){_0x42835a=_0x42835a-0x0;var _0xa4f23b=_0x1cfb[_0x42835a];return _0xa4f23b;};'use strict';var statusDesc=['unknown','not_inuse',_0xb1cf('0x0'),_0xb1cf('0x1'),'invalid',_0xb1cf('0x2'),_0xb1cf('0x3'),'ringinuse','onhold'];var monitorFormat={'wav':_0xb1cf('0x4'),'wav49':_0xb1cf('0x5'),'gsm':'gsm'};var strategy={'rrmemory':_0xb1cf('0x6'),'roundrobin':_0xb1cf('0x7')};function VoiceQueue(_0x20bf8f){this['id']=_0x20bf8f['id']||0x0;this[_0xb1cf('0x8')]=_0x20bf8f[_0xb1cf('0x8')]||'';this[_0xb1cf('0x9')]=_0x20bf8f[_0xb1cf('0x9')]||'';this[_0xb1cf('0xa')]=_0x20bf8f[_0xb1cf('0xa')]||_0xb1cf('0xb');this['waiting']=0x0;this['talking']=0x0;this['total']=0x0;this[_0xb1cf('0xc')]=0x0;this[_0xb1cf('0xd')]=0x0;this['sumHoldTime']=0x0;this[_0xb1cf('0xe')]=0x0;this['unmanaged']=0x0;this[_0xb1cf('0xf')]=0x0;this['loggedIn']=0x0;this['available']=0x0;this['acw']=_0x20bf8f['acw']||![];this[_0xb1cf('0x10')]=_0x20bf8f[_0xb1cf('0x10')]||0xa;this[_0xb1cf('0x11')]=_0x20bf8f[_0xb1cf('0x11')]||'no';this[_0xb1cf('0x12')]=!![];this[_0xb1cf('0x13')]='';this[_0xb1cf('0x14')]=0x0;this[_0xb1cf('0x15')]=0x0;this[_0xb1cf('0x16')]=_0x20bf8f['dialTimezone']||null;this[_0xb1cf('0x17')]=_0x20bf8f['dialGlobalInterval']?_0x20bf8f[_0xb1cf('0x17')]:null;this[_0xb1cf('0x18')]=_0x20bf8f[_0xb1cf('0x18')];this['dialMethod']=_0x20bf8f['dialMethod']||'progressive';this[_0xb1cf('0x19')]=_0x20bf8f[_0xb1cf('0x19')]||0x0;this['dialLimitQueue']=_0x20bf8f['dialLimitQueue']||0x0;this[_0xb1cf('0x1a')]=_0x20bf8f['dialPowerLevel']||0x1;this[_0xb1cf('0x1b')]=_0x20bf8f[_0xb1cf('0x1b')]||'dropRate';this['dialPredictiveOptimizationPercentage']=_0x20bf8f[_0xb1cf('0x1c')]||0.03;this['dialPredictiveInterval']=_0x20bf8f['dialPredictiveInterval']||0x258;this[_0xb1cf('0x1d')]=_0x20bf8f[_0xb1cf('0x1d')]||_0xb1cf('0x1e');this[_0xb1cf('0x1f')]=_0x20bf8f[_0xb1cf('0x1f')]||_0xb1cf('0x1e');this[_0xb1cf('0x20')]=_0x20bf8f[_0xb1cf('0x20')]||0x1e;this['dialQueueOptions']=_0x20bf8f['dialQueueOptions']||_0xb1cf('0x21');this[_0xb1cf('0x22')]=_0x20bf8f[_0xb1cf('0x22')]||0x3;this[_0xb1cf('0x23')]=_0x20bf8f[_0xb1cf('0x23')]||undefined;this[_0xb1cf('0x24')]=_0x20bf8f[_0xb1cf('0x24')]||0x3;this[_0xb1cf('0x25')]=_0x20bf8f[_0xb1cf('0x25')]||0x96;this[_0xb1cf('0x26')]=_0x20bf8f['dialBusyMaxRetry']||0x3;this[_0xb1cf('0x27')]=_0x20bf8f['dialBusyRetryFrequency']||0x96;this[_0xb1cf('0x28')]=_0x20bf8f[_0xb1cf('0x28')]||0x3;this[_0xb1cf('0x29')]=_0x20bf8f[_0xb1cf('0x29')]||0x96;this[_0xb1cf('0x2a')]=_0x20bf8f[_0xb1cf('0x2a')]||0x3;this[_0xb1cf('0x2b')]=_0x20bf8f[_0xb1cf('0x2b')]||0x96;this[_0xb1cf('0x2c')]=_0x20bf8f['dialDropMaxRetry']||0x3;this['dialDropRetryFrequency']=_0x20bf8f[_0xb1cf('0x2d')]||0x96;this[_0xb1cf('0x2e')]=_0x20bf8f[_0xb1cf('0x2e')]||0x3;this[_0xb1cf('0x2f')]=_0x20bf8f[_0xb1cf('0x2f')]||0x96;this[_0xb1cf('0x30')]=_0x20bf8f[_0xb1cf('0x30')]||0x3;this[_0xb1cf('0x31')]=_0x20bf8f[_0xb1cf('0x31')]||0x96;this[_0xb1cf('0x32')]=_0x20bf8f['dialAgentRejectMaxRetry']||0x3;this[_0xb1cf('0x33')]=_0x20bf8f['dialAgentRejectRetryFrequency']||0x96;this[_0xb1cf('0x34')]=_0x20bf8f[_0xb1cf('0x34')]||0x4;this['Trunk']=_0x20bf8f['Trunk']?_0x20bf8f['Trunk']:undefined;this[_0xb1cf('0x35')]=_0x20bf8f[_0xb1cf('0x35')]?_0x20bf8f['TrunkBackup']:undefined;this['dialPrefix']=_0x20bf8f[_0xb1cf('0x36')]||undefined;this['Interval']=_0x20bf8f['Interval']?_0x20bf8f[_0xb1cf('0x37')]:undefined;this[_0xb1cf('0x38')]=_0x20bf8f[_0xb1cf('0x38')]||_0xb1cf('0x39');this[_0xb1cf('0x3a')]=_0x20bf8f[_0xb1cf('0x3a')]||undefined;this[_0xb1cf('0x3b')]=_0x20bf8f['dialCutDigit']||undefined;this[_0xb1cf('0x3c')]=strategy[_0x20bf8f[_0xb1cf('0x3c')]]||_0xb1cf('0x6');this[_0xb1cf('0x3d')]=!![];this['dialAMDActive']=_0x20bf8f['dialAMDActive']||![];this['dialAMDInitialSilence']=_0x20bf8f[_0xb1cf('0x3e')];this[_0xb1cf('0x3f')]=_0x20bf8f[_0xb1cf('0x3f')];this[_0xb1cf('0x40')]=_0x20bf8f[_0xb1cf('0x40')];this[_0xb1cf('0x41')]=_0x20bf8f[_0xb1cf('0x41')];this['dialAMDMinWordLength']=_0x20bf8f[_0xb1cf('0x42')];this['dialAMDBetweenWordsSilence']=_0x20bf8f[_0xb1cf('0x43')];this[_0xb1cf('0x44')]=_0x20bf8f[_0xb1cf('0x44')];this[_0xb1cf('0x45')]=_0x20bf8f[_0xb1cf('0x45')];this[_0xb1cf('0x46')]=_0x20bf8f[_0xb1cf('0x46')];this[_0xb1cf('0x47')]=0x0;this[_0xb1cf('0x48')]=0x0;this[_0xb1cf('0x49')]=_0x20bf8f[_0xb1cf('0x49')];this[_0xb1cf('0x4a')]=0x0;this[_0xb1cf('0x4b')]=0x0;this[_0xb1cf('0x4c')]=0x0;this[_0xb1cf('0x4d')]=0x0;this[_0xb1cf('0x4e')]=0x0;this[_0xb1cf('0x4f')]=0x0;this[_0xb1cf('0x50')]=0x0;this['outboundBlacklistCallsDay']=0x0;this[_0xb1cf('0x51')]=0x0;this[_0xb1cf('0x52')]=0x0;this[_0xb1cf('0x53')]=0x0;this[_0xb1cf('0x54')]=0x0;this[_0xb1cf('0x55')]=0x0;this[_0xb1cf('0x56')]=0x0;this[_0xb1cf('0x57')]=undefined;this[_0xb1cf('0x58')]=undefined;this['handlePredictive']=undefined;this['predictiveIntervalMultiplicativeFactor']=1.05;this[_0xb1cf('0x59')]=0x0;this[_0xb1cf('0x5a')]=0x0;this[_0xb1cf('0x5b')]=0x0;this['predictiveIntervalDroppedCallsTimeout']=0x0;this[_0xb1cf('0x5c')]=0x0;this[_0xb1cf('0x5d')]=0x0;this[_0xb1cf('0x5e')]=0x0;this[_0xb1cf('0x5f')]=0x0;this[_0xb1cf('0x60')]=_0x20bf8f[_0xb1cf('0x61')]||0x14;this['predictiveIntervalMinThreshold']=_0x20bf8f['dialPredictiveIntervalMaxThreshold']||0xa;this[_0xb1cf('0x62')]=0x0;this[_0xb1cf('0x63')]=0x0;this[_0xb1cf('0x64')]=0x1;this['erlangCalls']=0x0;this['erlangCallToSecond']=0x0;this[_0xb1cf('0x65')]=0x0;this['erlangBusyFactor']=0x0;this[_0xb1cf('0x66')]=_0x20bf8f[_0xb1cf('0x66')]||0x1e;this[_0xb1cf('0x67')]=_0x20bf8f[_0xb1cf('0x67')]||![];this['dialQueueProject2']=_0x20bf8f[_0xb1cf('0x68')]||undefined;this[_0xb1cf('0x69')]=_0x20bf8f[_0xb1cf('0x69')]||![];this['dialAgiAfterHangupAgent']=_0x20bf8f[_0xb1cf('0x6a')]||![];this['monitor_format']=monitorFormat[_0x20bf8f[_0xb1cf('0x9')]]?monitorFormat[_0x20bf8f['monitor_format']]:undefined;this[_0xb1cf('0x6b')]=_0x20bf8f[_0xb1cf('0x6b')]||![];this[_0xb1cf('0x6c')]=_0x20bf8f[_0xb1cf('0x6c')]?_0x20bf8f[_0xb1cf('0x6c')]:undefined;}module[_0xb1cf('0x6d')]=VoiceQueue; \ No newline at end of file +var _0xdcac=['dialDropRetryFrequency','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundAbandonedDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalAvailable','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','exports','unknown','inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','wav','wav49','rrmemory','roundrobin','name','monitor_format','type','inbound','waiting','talking','total','sumDuration','sumHoldTime','unmanaged','abandoned','loggedIn','available','acw','acwTimeout','autopause','message','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','anonymous','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry'];(function(_0x1b3785,_0x145888){var _0x16340e=function(_0x5f29fc){while(--_0x5f29fc){_0x1b3785['push'](_0x1b3785['shift']());}};_0x16340e(++_0x145888);}(_0xdcac,0xbb));var _0xcdca=function(_0xa2e990,_0x27310c){_0xa2e990=_0xa2e990-0x0;var _0x4f1db6=_0xdcac[_0xa2e990];return _0x4f1db6;};'use strict';var statusDesc=[_0xcdca('0x0'),'not_inuse',_0xcdca('0x1'),_0xcdca('0x2'),_0xcdca('0x3'),_0xcdca('0x4'),_0xcdca('0x5'),_0xcdca('0x6'),_0xcdca('0x7')];var monitorFormat={'wav':_0xcdca('0x8'),'wav49':_0xcdca('0x9'),'gsm':'gsm'};var strategy={'rrmemory':_0xcdca('0xa'),'roundrobin':_0xcdca('0xb')};function VoiceQueue(_0x4a63b7){this['id']=_0x4a63b7['id']||0x0;this[_0xcdca('0xc')]=_0x4a63b7['name']||'';this[_0xcdca('0xd')]=_0x4a63b7[_0xcdca('0xd')]||'';this['type']=_0x4a63b7[_0xcdca('0xe')]||_0xcdca('0xf');this[_0xcdca('0x10')]=0x0;this[_0xcdca('0x11')]=0x0;this[_0xcdca('0x12')]=0x0;this['answered']=0x0;this[_0xcdca('0x13')]=0x0;this[_0xcdca('0x14')]=0x0;this['sumBillable']=0x0;this[_0xcdca('0x15')]=0x0;this[_0xcdca('0x16')]=0x0;this[_0xcdca('0x17')]=0x0;this[_0xcdca('0x18')]=0x0;this[_0xcdca('0x19')]=_0x4a63b7[_0xcdca('0x19')]||![];this[_0xcdca('0x1a')]=_0x4a63b7[_0xcdca('0x1a')]||0xa;this['autopause']=_0x4a63b7[_0xcdca('0x1b')]||'no';this['sendMessageOneNotActive']=!![];this[_0xcdca('0x1c')]='';this['originated']=0x0;this[_0xcdca('0x1d')]=0x0;this[_0xcdca('0x1e')]=_0x4a63b7[_0xcdca('0x1e')]||null;this['dialGlobalInterval']=_0x4a63b7[_0xcdca('0x1f')]?_0x4a63b7[_0xcdca('0x1f')]:null;this[_0xcdca('0x20')]=_0x4a63b7[_0xcdca('0x20')];this['dialMethod']=_0x4a63b7[_0xcdca('0x21')]||_0xcdca('0x22');this[_0xcdca('0x23')]=_0x4a63b7[_0xcdca('0x23')]||0x0;this[_0xcdca('0x24')]=_0x4a63b7[_0xcdca('0x24')]||0x0;this[_0xcdca('0x25')]=_0x4a63b7[_0xcdca('0x25')]||0x1;this['dialPredictiveOptimization']=_0x4a63b7[_0xcdca('0x26')]||_0xcdca('0x27');this[_0xcdca('0x28')]=_0x4a63b7[_0xcdca('0x28')]||0.03;this[_0xcdca('0x29')]=_0x4a63b7[_0xcdca('0x29')]||0x258;this[_0xcdca('0x2a')]=_0x4a63b7[_0xcdca('0x2a')]||'anonymous';this[_0xcdca('0x2b')]=_0x4a63b7[_0xcdca('0x2b')]||_0xcdca('0x2c');this[_0xcdca('0x2d')]=_0x4a63b7['dialOriginateTimeout']||0x1e;this[_0xcdca('0x2e')]=_0x4a63b7[_0xcdca('0x2e')]||_0xcdca('0x2f');this[_0xcdca('0x30')]=_0x4a63b7[_0xcdca('0x30')]||0x3;this[_0xcdca('0x31')]=_0x4a63b7[_0xcdca('0x31')]||undefined;this[_0xcdca('0x32')]=_0x4a63b7[_0xcdca('0x32')]||0x3;this[_0xcdca('0x33')]=_0x4a63b7[_0xcdca('0x33')]||0x96;this['dialBusyMaxRetry']=_0x4a63b7[_0xcdca('0x34')]||0x3;this[_0xcdca('0x35')]=_0x4a63b7[_0xcdca('0x35')]||0x96;this[_0xcdca('0x36')]=_0x4a63b7['dialNoAnswerMaxRetry']||0x3;this[_0xcdca('0x37')]=_0x4a63b7[_0xcdca('0x37')]||0x96;this[_0xcdca('0x38')]=_0x4a63b7[_0xcdca('0x38')]||0x3;this[_0xcdca('0x39')]=_0x4a63b7[_0xcdca('0x39')]||0x96;this[_0xcdca('0x3a')]=_0x4a63b7['dialDropMaxRetry']||0x3;this['dialDropRetryFrequency']=_0x4a63b7[_0xcdca('0x3b')]||0x96;this['dialAbandonedMaxRetry']=_0x4a63b7['dialAbandonedMaxRetry']||0x3;this[_0xcdca('0x3c')]=_0x4a63b7[_0xcdca('0x3c')]||0x96;this[_0xcdca('0x3d')]=_0x4a63b7['dialMachineMaxRetry']||0x3;this[_0xcdca('0x3e')]=_0x4a63b7[_0xcdca('0x3e')]||0x96;this[_0xcdca('0x3f')]=_0x4a63b7[_0xcdca('0x3f')]||0x3;this[_0xcdca('0x40')]=_0x4a63b7['dialAgentRejectRetryFrequency']||0x96;this[_0xcdca('0x41')]=_0x4a63b7['dialGlobalMaxRetry']||0x4;this[_0xcdca('0x42')]=_0x4a63b7[_0xcdca('0x42')]?_0x4a63b7[_0xcdca('0x42')]:undefined;this['TrunkBackup']=_0x4a63b7[_0xcdca('0x43')]?_0x4a63b7[_0xcdca('0x43')]:undefined;this[_0xcdca('0x44')]=_0x4a63b7['dialPrefix']||undefined;this['Interval']=_0x4a63b7[_0xcdca('0x45')]?_0x4a63b7[_0xcdca('0x45')]:undefined;this['dialOrderByScheduledAt']=_0x4a63b7[_0xcdca('0x46')]||_0xcdca('0x47');this[_0xcdca('0x48')]=_0x4a63b7[_0xcdca('0x48')]||undefined;this[_0xcdca('0x49')]=_0x4a63b7[_0xcdca('0x49')]||undefined;this[_0xcdca('0x4a')]=strategy[_0x4a63b7[_0xcdca('0x4a')]]||_0xcdca('0xa');this[_0xcdca('0x4b')]=!![];this['dialAMDActive']=_0x4a63b7[_0xcdca('0x4c')]||![];this[_0xcdca('0x4d')]=_0x4a63b7[_0xcdca('0x4d')];this[_0xcdca('0x4e')]=_0x4a63b7[_0xcdca('0x4e')];this['dialAMDAfterGreetingSilence']=_0x4a63b7[_0xcdca('0x4f')];this[_0xcdca('0x50')]=_0x4a63b7[_0xcdca('0x50')];this[_0xcdca('0x51')]=_0x4a63b7[_0xcdca('0x51')];this[_0xcdca('0x52')]=_0x4a63b7[_0xcdca('0x52')];this[_0xcdca('0x53')]=_0x4a63b7['dialAMDMaximumNumberOfWords'];this[_0xcdca('0x54')]=_0x4a63b7[_0xcdca('0x54')];this[_0xcdca('0x55')]=_0x4a63b7[_0xcdca('0x55')];this['outboundRejectCallsDay']=0x0;this[_0xcdca('0x56')]=0x0;this[_0xcdca('0x57')]=_0x4a63b7[_0xcdca('0x57')];this[_0xcdca('0x58')]=0x0;this[_0xcdca('0x59')]=0x0;this[_0xcdca('0x5a')]=0x0;this['outboundBusyCallsDay']=0x0;this[_0xcdca('0x5b')]=0x0;this[_0xcdca('0x5c')]=0x0;this['outboundUnknownCallsDay']=0x0;this[_0xcdca('0x5d')]=0x0;this[_0xcdca('0x5e')]=0x0;this['outboundDropCallsDayCallersExit']=0x0;this[_0xcdca('0x5f')]=0x0;this[_0xcdca('0x60')]=0x0;this['outboundReCallsDay']=0x0;this[_0xcdca('0x61')]=0x0;this[_0xcdca('0x62')]=undefined;this[_0xcdca('0x63')]=undefined;this[_0xcdca('0x64')]=undefined;this[_0xcdca('0x65')]=1.05;this[_0xcdca('0x66')]=0x0;this[_0xcdca('0x67')]=0x0;this[_0xcdca('0x68')]=0x0;this['predictiveIntervalDroppedCallsTimeout']=0x0;this[_0xcdca('0x69')]=0x0;this[_0xcdca('0x6a')]=0x0;this['predictiveIntervalPauses']=0x0;this[_0xcdca('0x6b')]=0x0;this['predictiveIntervalMaxThreshold']=_0x4a63b7[_0xcdca('0x6c')]||0x14;this[_0xcdca('0x6d')]=_0x4a63b7[_0xcdca('0x6c')]||0xa;this[_0xcdca('0x6e')]=0x0;this[_0xcdca('0x6f')]=0x0;this[_0xcdca('0x70')]=0x1;this['erlangCalls']=0x0;this[_0xcdca('0x71')]=0x0;this[_0xcdca('0x72')]=0x0;this[_0xcdca('0x73')]=0x0;this['dialRecallMeTimeout']=_0x4a63b7['dialRecallMeTimeout']||0x1e;this['dialRecallInQueue']=_0x4a63b7[_0xcdca('0x74')]||![];this[_0xcdca('0x75')]=_0x4a63b7['dialQueueProject2']||undefined;this[_0xcdca('0x76')]=_0x4a63b7['dialAgiAfterHangupClient']||![];this[_0xcdca('0x77')]=_0x4a63b7['dialAgiAfterHangupAgent']||![];this[_0xcdca('0xd')]=monitorFormat[_0x4a63b7[_0xcdca('0xd')]]?monitorFormat[_0x4a63b7[_0xcdca('0xd')]]:undefined;this[_0xcdca('0x78')]=_0x4a63b7['mandatoryDisposition']||![];this[_0xcdca('0x79')]=_0x4a63b7[_0xcdca('0x79')]?_0x4a63b7[_0xcdca('0x79')]:undefined;}module[_0xcdca('0x7a')]=VoiceQueue; \ No newline at end of file diff --git a/server/services/ami/model/vtigerAccount.js b/server/services/ami/model/vtigerAccount.js index b29bef7..8c8a62a 100644 --- a/server/services/ami/model/vtigerAccount.js +++ b/server/services/ami/model/vtigerAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf35b=['name','accessKey','remoteUri','serverUrl','Configurations'];(function(_0x106061,_0x5c2ec6){var _0x250904=function(_0x698b64){while(--_0x698b64){_0x106061['push'](_0x106061['shift']());}};_0x250904(++_0x5c2ec6);}(_0xf35b,0x1e5));var _0xbf35=function(_0x299967,_0x50e860){_0x299967=_0x299967-0x0;var _0xb9c80a=_0xf35b[_0x299967];return _0xb9c80a;};'use strict';function VtigerAccount(_0x55fdc1){this['id']=_0x55fdc1['id']||0x0;this[_0xbf35('0x0')]=_0x55fdc1['name']||'';this['username']=_0x55fdc1['username']||'';this[_0xbf35('0x1')]=_0x55fdc1[_0xbf35('0x1')]||'';this[_0xbf35('0x2')]=_0x55fdc1[_0xbf35('0x2')]||'';this[_0xbf35('0x3')]=_0x55fdc1[_0xbf35('0x3')]||'';this['Configurations']=_0x55fdc1[_0xbf35('0x4')]||{};}module['exports']=VtigerAccount; \ No newline at end of file +var _0xe038=['remoteUri','serverUrl','Configurations','name','username','accessKey'];(function(_0x4b3b7b,_0x3983b2){var _0x36a411=function(_0x31b4ec){while(--_0x31b4ec){_0x4b3b7b['push'](_0x4b3b7b['shift']());}};_0x36a411(++_0x3983b2);}(_0xe038,0x1b9));var _0x8e03=function(_0x4ae6ef,_0xc2af80){_0x4ae6ef=_0x4ae6ef-0x0;var _0x3cbb4e=_0xe038[_0x4ae6ef];return _0x3cbb4e;};'use strict';function VtigerAccount(_0x414265){this['id']=_0x414265['id']||0x0;this[_0x8e03('0x0')]=_0x414265[_0x8e03('0x0')]||'';this['username']=_0x414265[_0x8e03('0x1')]||'';this['accessKey']=_0x414265[_0x8e03('0x2')]||'';this[_0x8e03('0x3')]=_0x414265['remoteUri']||'';this['serverUrl']=_0x414265[_0x8e03('0x4')]||'';this['Configurations']=_0x414265[_0x8e03('0x5')]||{};}module['exports']=VtigerAccount; \ No newline at end of file diff --git a/server/services/ami/model/zendeskAccount.js b/server/services/ami/model/zendeskAccount.js index 50c7b32..c5c86fc 100644 --- a/server/services/ami/model/zendeskAccount.js +++ b/server/services/ami/model/zendeskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb28=['Configurations','exports','name','username','password','token','remoteUri','authType','integrationTab','serverUrl'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xdb28,0x106));var _0x8db2=function(_0x2d3030,_0x46d52b){_0x2d3030=_0x2d3030-0x0;var _0x53b2d6=_0xdb28[_0x2d3030];return _0x53b2d6;};'use strict';function ZendeskAccount(_0x2f1285){this['id']=_0x2f1285['id']||0x0;this[_0x8db2('0x0')]=_0x2f1285[_0x8db2('0x0')]||'';this[_0x8db2('0x1')]=_0x2f1285['username']||'';this[_0x8db2('0x2')]=_0x2f1285[_0x8db2('0x2')]||'';this[_0x8db2('0x3')]=_0x2f1285[_0x8db2('0x3')]||'';this[_0x8db2('0x4')]=_0x2f1285['remoteUri']||'';this[_0x8db2('0x5')]=_0x2f1285[_0x8db2('0x5')]||'';this['type']=_0x2f1285['type']||_0x8db2('0x6');this[_0x8db2('0x7')]=_0x2f1285[_0x8db2('0x7')]||'';this[_0x8db2('0x8')]=_0x2f1285[_0x8db2('0x8')]||{};}module[_0x8db2('0x9')]=ZendeskAccount; \ No newline at end of file +var _0x0b0e=['exports','name','username','password','token','remoteUri','authType','type','serverUrl','Configurations'];(function(_0x5d225a,_0x2debe9){var _0x1e7761=function(_0x491dc2){while(--_0x491dc2){_0x5d225a['push'](_0x5d225a['shift']());}};_0x1e7761(++_0x2debe9);}(_0x0b0e,0x187));var _0xe0b0=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0x0b0e[_0x2d2c16];return _0x53f2fb;};'use strict';function ZendeskAccount(_0x29cd1e){this['id']=_0x29cd1e['id']||0x0;this['name']=_0x29cd1e[_0xe0b0('0x0')]||'';this['username']=_0x29cd1e[_0xe0b0('0x1')]||'';this[_0xe0b0('0x2')]=_0x29cd1e[_0xe0b0('0x2')]||'';this[_0xe0b0('0x3')]=_0x29cd1e[_0xe0b0('0x3')]||'';this[_0xe0b0('0x4')]=_0x29cd1e[_0xe0b0('0x4')]||'';this[_0xe0b0('0x5')]=_0x29cd1e[_0xe0b0('0x5')]||'';this[_0xe0b0('0x6')]=_0x29cd1e[_0xe0b0('0x6')]||'integrationTab';this['serverUrl']=_0x29cd1e[_0xe0b0('0x7')]||'';this[_0xe0b0('0x8')]=_0x29cd1e[_0xe0b0('0x8')]||{};}module[_0xe0b0('0x9')]=ZendeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/zohoAccount.js b/server/services/ami/model/zohoAccount.js index b331e19..478af95 100644 --- a/server/services/ami/model/zohoAccount.js +++ b/server/services/ami/model/zohoAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8f4c=['clientSecret','code','refreshToken','Configurations','exports','name','description','host','zone','clientId'];(function(_0x4eec36,_0x4f20cf){var _0x4bca37=function(_0x43667e){while(--_0x43667e){_0x4eec36['push'](_0x4eec36['shift']());}};_0x4bca37(++_0x4f20cf);}(_0x8f4c,0x113));var _0xc8f4=function(_0x3fbbd0,_0x269a1f){_0x3fbbd0=_0x3fbbd0-0x0;var _0x135c98=_0x8f4c[_0x3fbbd0];return _0x135c98;};'use strict';function ZohoAccount(_0x56f041){this['id']=_0x56f041['id']||0x0;this[_0xc8f4('0x0')]=_0x56f041[_0xc8f4('0x0')]||'';this[_0xc8f4('0x1')]=_0x56f041[_0xc8f4('0x1')]||'';this[_0xc8f4('0x2')]=_0x56f041['host']||'';this[_0xc8f4('0x3')]=_0x56f041[_0xc8f4('0x3')]||'';this[_0xc8f4('0x4')]=_0x56f041['clientId']||'';this[_0xc8f4('0x5')]=_0x56f041['clientSecret']||'';this['serverUrl']=_0x56f041['serverUrl']||'';this[_0xc8f4('0x6')]=_0x56f041['code']||'';this[_0xc8f4('0x7')]=_0x56f041[_0xc8f4('0x7')]||'';this[_0xc8f4('0x8')]=_0x56f041[_0xc8f4('0x8')]||{};}module[_0xc8f4('0x9')]=ZohoAccount; \ No newline at end of file +var _0x2fee=['clientId','clientSecret','serverUrl','code','refreshToken','Configurations','exports','name','description','host','zone'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2fee,0x11a));var _0xe2fe=function(_0x3303fb,_0x1266dd){_0x3303fb=_0x3303fb-0x0;var _0x71a686=_0x2fee[_0x3303fb];return _0x71a686;};'use strict';function ZohoAccount(_0x57774a){this['id']=_0x57774a['id']||0x0;this['name']=_0x57774a[_0xe2fe('0x0')]||'';this['description']=_0x57774a[_0xe2fe('0x1')]||'';this['host']=_0x57774a[_0xe2fe('0x2')]||'';this[_0xe2fe('0x3')]=_0x57774a['zone']||'';this[_0xe2fe('0x4')]=_0x57774a[_0xe2fe('0x4')]||'';this[_0xe2fe('0x5')]=_0x57774a['clientSecret']||'';this[_0xe2fe('0x6')]=_0x57774a[_0xe2fe('0x6')]||'';this[_0xe2fe('0x7')]=_0x57774a[_0xe2fe('0x7')]||'';this[_0xe2fe('0x8')]=_0x57774a[_0xe2fe('0x8')]||'';this['Configurations']=_0x57774a[_0xe2fe('0x9')]||{};}module[_0xe2fe('0xa')]=ZohoAccount; \ No newline at end of file diff --git a/server/services/ami/preview/action.js b/server/services/ami/preview/action.js index b1a8659..091dfc8 100644 --- a/server/services/ami/preview/action.js +++ b/server/services/ami/preview/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ea6=['Agent','channelAgent','membername','format','SIP/%s','phone','firstName','Contact','lastName','active','calleridnum','countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','callback','callbackuniqueid','recallme','ContactId','ListId','VoiceQueueId','originatecalleridnum','originatecalleridname','getCaller','\x22%s\x22\x20<%s>','util','lodash','isNil','string','uniqueid','idContact','queue','name','type','campaigntype'];(function(_0x281959,_0x3a32f5){var _0x811bd=function(_0x4efc3b){while(--_0x4efc3b){_0x281959['push'](_0x281959['shift']());}};_0x811bd(++_0x3a32f5);}(_0x6ea6,0x186));var _0x66ea=function(_0x3124f8,_0x1a8b23){_0x3124f8=_0x3124f8-0x0;var _0x5bab5f=_0x6ea6[_0x3124f8];return _0x5bab5f;};'use strict';var util=require(_0x66ea('0x0'));var _=require(_0x66ea('0x1'));var moment=require('moment');function checkNameSurname(_0x41ae8b,_0x28ee91,_0x1ed9db){var _0x3ff5f6='';if(!_[_0x66ea('0x2')](_0x28ee91)&&_0x66ea('0x3')===typeof _0x28ee91){_0x3ff5f6+=_0x28ee91;}if(!_[_0x66ea('0x2')](_0x1ed9db)&&_0x66ea('0x3')===typeof _0x1ed9db){_0x3ff5f6+='\x20'+_0x1ed9db;}if(_0x3ff5f6!==''){return _0x3ff5f6;}return _0x41ae8b;}function Action(_0x4788d3,_0x27c6e9,_0x75d3fb,_0x8393ec,_0x2d643a){this[_0x66ea('0x4')]=_0x75d3fb||undefined;this[_0x66ea('0x5')]=_0x4788d3['id'];this[_0x66ea('0x6')]=_0x27c6e9[_0x66ea('0x7')];this[_0x66ea('0x8')]=_0x27c6e9[_0x66ea('0x8')];this[_0x66ea('0x9')]=_0x66ea('0x6');this['dialAnswer']=![];this['membername']=_[_0x66ea('0x2')](_0x4788d3['Agent'])?undefined:_0x4788d3[_0x66ea('0xa')]['name'];this[_0x66ea('0xb')]=this[_0x66ea('0xc')]?util[_0x66ea('0xd')](_0x66ea('0xe'),this[_0x66ea('0xc')]):_0x8393ec||undefined;this['calleridname']=checkNameSurname(_0x4788d3['Contact'][_0x66ea('0xf')],_0x4788d3['Contact'][_0x66ea('0x10')],_0x4788d3[_0x66ea('0x11')][_0x66ea('0x12')]);this[_0x66ea('0x13')]=_0x4788d3[_0x66ea('0x13')]||![];this[_0x66ea('0x14')]=_0x4788d3[_0x66ea('0x11')]['phone'];this['scheduledat']=_0x4788d3['scheduledat'];this['countbusyretry']=_0x4788d3[_0x66ea('0x15')]||0x0;this['countcongestionretry']=_0x4788d3['countcongestionretry']||0x0;this[_0x66ea('0x16')]=_0x4788d3[_0x66ea('0x16')]||0x0;this[_0x66ea('0x17')]=(_0x4788d3[_0x66ea('0x15')]||0x0)+(_0x4788d3[_0x66ea('0x18')]||0x0)+(_0x4788d3[_0x66ea('0x16')]||0x0)+(_0x4788d3[_0x66ea('0x19')]||0x0)+(_0x4788d3[_0x66ea('0x1a')]||0x0)+(_0x4788d3[_0x66ea('0x1b')]||0x0)+(_0x4788d3[_0x66ea('0x1c')]||0x0)+(_0x4788d3[_0x66ea('0x1d')]||0x0);this[_0x66ea('0x19')]=_0x4788d3[_0x66ea('0x19')]||0x0;this[_0x66ea('0x1a')]=_0x4788d3[_0x66ea('0x1a')]||0x0;this[_0x66ea('0x1b')]=_0x4788d3[_0x66ea('0x1b')]||0x0;this[_0x66ea('0x1c')]=_0x4788d3[_0x66ea('0x1c')]||0x0;this[_0x66ea('0x1d')]=_0x4788d3[_0x66ea('0x1d')]||0x0;this['callback']=_0x4788d3[_0x66ea('0x1e')];this[_0x66ea('0x1f')]=_0x4788d3[_0x66ea('0x1f')];this['callbackat']=_0x4788d3['callbackat'];this[_0x66ea('0x20')]=_0x4788d3[_0x66ea('0x20')];this[_0x66ea('0x21')]=_0x4788d3[_0x66ea('0x21')];this['ListId']=_0x4788d3[_0x66ea('0x22')];this['UserId']=_['isNil'](_0x4788d3['Agent'])?_0x4788d3['UserId']:_0x4788d3[_0x66ea('0xa')]['id'];this[_0x66ea('0x23')]=_0x4788d3['VoiceQueueId'];this[_0x66ea('0x24')]='';this[_0x66ea('0x25')]='';}Action['prototype'][_0x66ea('0x26')]=function(){return util[_0x66ea('0xd')](_0x66ea('0x27'),this['calleridname'],this['number']);};module['exports']=Action; \ No newline at end of file +var _0x616c=['countglobal','countdropretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','prototype','\x22%s\x22\x20<%s>','calleridname','number','exports','util','lodash','moment','string','uniqueid','idContact','queue','name','type','campaigntype','dialAnswer','membername','isNil','Agent','channelAgent','format','SIP/%s','Contact','phone','lastName','active','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry'];(function(_0x594371,_0x374af2){var _0x25d473=function(_0x205a1c){while(--_0x205a1c){_0x594371['push'](_0x594371['shift']());}};_0x25d473(++_0x374af2);}(_0x616c,0x122));var _0xc616=function(_0xa10994,_0x2f5087){_0xa10994=_0xa10994-0x0;var _0x38ca6e=_0x616c[_0xa10994];return _0x38ca6e;};'use strict';var util=require(_0xc616('0x0'));var _=require(_0xc616('0x1'));var moment=require(_0xc616('0x2'));function checkNameSurname(_0x50ed5a,_0x1359ee,_0x4315f1){var _0xe3244e='';if(!_['isNil'](_0x1359ee)&&_0xc616('0x3')===typeof _0x1359ee){_0xe3244e+=_0x1359ee;}if(!_['isNil'](_0x4315f1)&&_0xc616('0x3')===typeof _0x4315f1){_0xe3244e+='\x20'+_0x4315f1;}if(_0xe3244e!==''){return _0xe3244e;}return _0x50ed5a;}function Action(_0x3551ef,_0x19c953,_0x5958b8,_0x857d17,_0x421c2f){this[_0xc616('0x4')]=_0x5958b8||undefined;this[_0xc616('0x5')]=_0x3551ef['id'];this[_0xc616('0x6')]=_0x19c953[_0xc616('0x7')];this[_0xc616('0x8')]=_0x19c953[_0xc616('0x8')];this[_0xc616('0x9')]=_0xc616('0x6');this[_0xc616('0xa')]=![];this[_0xc616('0xb')]=_[_0xc616('0xc')](_0x3551ef['Agent'])?undefined:_0x3551ef[_0xc616('0xd')]['name'];this[_0xc616('0xe')]=this['membername']?util[_0xc616('0xf')](_0xc616('0x10'),this[_0xc616('0xb')]):_0x857d17||undefined;this['calleridname']=checkNameSurname(_0x3551ef[_0xc616('0x11')][_0xc616('0x12')],_0x3551ef[_0xc616('0x11')]['firstName'],_0x3551ef['Contact'][_0xc616('0x13')]);this[_0xc616('0x14')]=_0x3551ef[_0xc616('0x14')]||![];this['calleridnum']=_0x3551ef[_0xc616('0x11')][_0xc616('0x12')];this[_0xc616('0x15')]=_0x3551ef[_0xc616('0x15')];this[_0xc616('0x16')]=_0x3551ef[_0xc616('0x16')]||0x0;this['countcongestionretry']=_0x3551ef[_0xc616('0x17')]||0x0;this['countnoanswerretry']=_0x3551ef[_0xc616('0x18')]||0x0;this[_0xc616('0x19')]=(_0x3551ef[_0xc616('0x16')]||0x0)+(_0x3551ef[_0xc616('0x17')]||0x0)+(_0x3551ef[_0xc616('0x18')]||0x0)+(_0x3551ef['countnosuchnumberretry']||0x0)+(_0x3551ef[_0xc616('0x1a')]||0x0)+(_0x3551ef['countabandonedretry']||0x0)+(_0x3551ef[_0xc616('0x1b')]||0x0)+(_0x3551ef[_0xc616('0x1c')]||0x0);this[_0xc616('0x1d')]=_0x3551ef[_0xc616('0x1d')]||0x0;this['countdropretry']=_0x3551ef['countdropretry']||0x0;this['countabandonedretry']=_0x3551ef['countabandonedretry']||0x0;this[_0xc616('0x1b')]=_0x3551ef[_0xc616('0x1b')]||0x0;this[_0xc616('0x1c')]=_0x3551ef[_0xc616('0x1c')]||0x0;this[_0xc616('0x1e')]=_0x3551ef[_0xc616('0x1e')];this[_0xc616('0x1f')]=_0x3551ef['callbackuniqueid'];this['callbackat']=_0x3551ef[_0xc616('0x20')];this[_0xc616('0x21')]=_0x3551ef[_0xc616('0x21')];this[_0xc616('0x22')]=_0x3551ef[_0xc616('0x22')];this[_0xc616('0x23')]=_0x3551ef['ListId'];this['UserId']=_['isNil'](_0x3551ef[_0xc616('0xd')])?_0x3551ef[_0xc616('0x24')]:_0x3551ef['Agent']['id'];this['VoiceQueueId']=_0x3551ef[_0xc616('0x25')];this[_0xc616('0x26')]='';this[_0xc616('0x27')]='';}Action[_0xc616('0x28')]['getCaller']=function(){return util['format'](_0xc616('0x29'),this[_0xc616('0x2a')],this[_0xc616('0x2b')]);};module[_0xc616('0x2c')]=Action; \ No newline at end of file diff --git a/server/services/ami/preview/index.js b/server/services/ami/preview/index.js index 06593f1..6dfa34d 100644 --- a/server/services/ami/preview/index.js +++ b/server/services/ami/preview/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['type','outbound','strategy','answered','loggedIn','pTalking','sumDuration','sumHoldTime','talking','unmanaged','loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','outboundAbandonedCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','originated','erlangCalls','erlangCallToSecond','erlangBusyFactor','startPredictive','startProgressive','Trunk','callerid','Interval','voice:queue:%s','name','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','stringify','format','voice_queue_channel:remove','sendMessageOneNotActive','available','paused','NOT_ACTIVE','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','IS_DISACTIVED','logger','syncCampaigns','hasOwnProperty','booked','clearZombieChannels','dialActive','setMessage','recallMe','clearZombieChannel','actions','[clearZombieChannels][talking]','Queue','queue','pTalking:\x20','dialAnswer','pick','contactId','UserId','VoiceQueueId','ListId','status','catch','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','decrementTalkink','loggerError','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','size','agentReadyId','then','length','getDiff','scheduledat','Agent','voicePause','logger2','[RecallMe]','disableContact','starttime','YYYY-MM-DD\x20HH:mm:ss','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','createCustomerFinal','[HistoryRecallClose]','IsNotLoggedIn','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','ACTIVE','countnosuchnumberretry','countglobal','totalGlobal','emit','[callProgressDetectingCustomer][logNoSuch]','dialGlobalMaxRetry','cloneAction','[callProgressDetectingCustomer][logNoSuchGlobal]','rescheduleContact','scheduledAt','unlockAgent','linkedid','ANSWER','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','custom:agentconnect','buildObj','connect','custom:agentConnectPreview','buildAcw','custom:agentcomplete','complete','outboundAnswerCallsDay','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','crateCustomerReportQueue','sumBillable','[syncHangup][talking][decrement]','BUSY','outboundBusyCallsDay','countbusyretry','Busy','[callProgressDetectingCustomer][logBusy]','Global','dialBusyMaxRetry','dialBusyRetryFrequency','activeContact','NOANSWER','custom:agentnoanswer','noanswer','[callProgressDetectingCustomer][logNoAnswerGlobal]','countnoanswerretry','dialNoAnswerMaxRetry','[callProgressDetectingCustomer][logNoAnswer]','dialNoAnswerRetryFrequency','CONGESTION','outboundCongestionCallsDay','countcongestionretry','Congestion','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','dialCongestionMaxRetry','countagentrejectretry','AgentReject','custom:agentreject','agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedRetryFrequency','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','dialstatus','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','isUndefined','object','reason','logAgent','NoSuchNumber','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','NoAnswer','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','isNil','phone','lookAgent','isEmpty','execCall','[Preview][execCall][success]','Queue:\x20','\x20IdHopper:\x20','idContact','custom:agentcalled','Calling','[Preview][execCall][failure]','Call\x20failed','outboundBlacklistCallsDay','logBlacklist','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','SIP/%s','unmonitored','run','execRun','unlock','active','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','Call\x20unsuccessful','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20work]','\x20Trunk\x20Backup\x20is\x20not\x20active','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','campaign\x20Name:\x20','SIP/%s/%s%s','trim','dialCutDigit','substring','getCallerId','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','originatecalleridname','extractCalleridName','originatecalleridnum','extractCalleridNumber','addVariables','merge','toLowerVariables','variablesAction','[originated][increment]','originated:\x20','OriginateError','[originateFailure][logOriginateFailure]','syncNewExten','channel','actionid','logLookAgent','responsetime','isFailure','response','unlockContact','rejected','[callProgressDetectingAgent][logAnswer]','syncHangup','[syncHangup][talking]','callProgressDetectingCustomer','[syncHangup][talking][cause]','cause','dialQueueProject','transfer','destuniqueid','addVariable','variables','filterKey','keys','variable','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','exports','util','lodash','bluebird','uuid','md5','ioredis','../../../config/environment','../../../config/logger','preview','actionPreview','./rpcDb','./util/util','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','sequence','campaignsPreview','trunks','agents','clockClearZombieChannels','originateresponse','bind','hangup','syncHangupRequest','syncDialEnd','newexten','varset','syncVarSet','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','loopCampaigns'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x34e8,0x12c));var _0x834e=function(_0x34bdde,_0x1dfaa0){_0x34bdde=_0x34bdde-0x0;var _0x4b1907=_0x34e8[_0x34bdde];return _0x4b1907;};'use strict';var util=require(_0x834e('0x0'));var _=require(_0x834e('0x1'));var BPromise=require(_0x834e('0x2'));var uuid=require(_0x834e('0x3'));var moment=require('moment');var md5=require(_0x834e('0x4'));var Redis=require(_0x834e('0x5'));var config=require(_0x834e('0x6'));var logger=require(_0x834e('0x7'))(_0x834e('0x8'));var loggerAction=require(_0x834e('0x7'))(_0x834e('0x9'));var ami=require('../ami');var rpcDb=require(_0x834e('0xa'));var Action=require('./action');var ut=require(_0x834e('0xb'));config[_0x834e('0xc')]=_[_0x834e('0xd')](config[_0x834e('0xc')],{'host':_0x834e('0xe'),'port':0x18eb});var io=require(_0x834e('0xf'))(new Redis(config[_0x834e('0xc')]));var Sequence=function(){};Sequence[_0x834e('0x10')][_0x834e('0x11')]=function(_0x186b3b){this[_0x834e('0x12')]=this[_0x834e('0x12')]?this[_0x834e('0x12')][_0x834e('0x13')](_0x186b3b):_0x186b3b();};function Preview(_0x293514){this[_0x834e('0x14')]=new Sequence();this[_0x834e('0x15')]=_0x293514['voiceQueues'];this[_0x834e('0x16')]=_0x293514[_0x834e('0x16')];this['actions']={};this[_0x834e('0x17')]=_0x293514[_0x834e('0x17')];this[_0x834e('0x18')]=0x0;ami['on'](_0x834e('0x19'),this['syncOriginateResponse'][_0x834e('0x1a')](this));ami['on'](_0x834e('0x1b'),this['syncHangup'][_0x834e('0x1a')](this));ami['on']('hanguprequest',this[_0x834e('0x1c')][_0x834e('0x1a')](this));ami['on']('dialend',this[_0x834e('0x1d')][_0x834e('0x1a')](this));ami['on'](_0x834e('0x1e'),this['syncNewExten'][_0x834e('0x1a')](this));ami['on'](_0x834e('0x1f'),this[_0x834e('0x20')][_0x834e('0x1a')](this));ami['on'](_0x834e('0x21'),this[_0x834e('0x22')][_0x834e('0x1a')](this));ami['on']('blindtransfer',this[_0x834e('0x23')][_0x834e('0x1a')](this));this[_0x834e('0x24')](this[_0x834e('0x15')]);}function emit(_0x4ab05d,_0x45a630,_0x62f8f1){io['to'](_0x4ab05d)['emit'](_0x45a630,_0x62f8f1);}function emitCampaignPreview(_0x1b4bdf){if(_0x1b4bdf[_0x834e('0x25')]===_0x834e('0x26')){var _0x5c55ca={'id':_0x1b4bdf['id'],'name':_0x1b4bdf['name'],'strategy':_0x1b4bdf[_0x834e('0x27')],'answered':_0x1b4bdf[_0x834e('0x28')],'available':_0x1b4bdf['available'],'loggedIn':_0x1b4bdf[_0x834e('0x29')],'pTalking':_0x1b4bdf[_0x834e('0x2a')],'sumBillable':_0x1b4bdf['sumBillable'],'sumDuration':_0x1b4bdf[_0x834e('0x2b')],'sumHoldTime':_0x1b4bdf[_0x834e('0x2c')]||0x0,'talking':_0x1b4bdf[_0x834e('0x2d')],'total':_0x1b4bdf['total'],'type':_0x1b4bdf[_0x834e('0x25')],'unmanaged':_0x1b4bdf[_0x834e('0x2e')],'abandoned':_0x1b4bdf['abandoned'],'waiting':_0x1b4bdf['waiting'],'loggedInDb':_0x1b4bdf[_0x834e('0x2f')],'dialActive':_0x1b4bdf['dialActive'],'dialMethod':_0x1b4bdf[_0x834e('0x30')],'dialOriginateCallerIdName':_0x1b4bdf[_0x834e('0x31')],'dialOriginateCallerIdNumber':_0x1b4bdf[_0x834e('0x32')],'dialOriginateTimeout':_0x1b4bdf[_0x834e('0x33')],'dialPrefix':_0x1b4bdf[_0x834e('0x34')],'outboundAnswerAgiCallsDay':_0x1b4bdf[_0x834e('0x35')],'outboundAnswerCallsDay':_0x1b4bdf['outboundAnswerCallsDay'],'outboundBlacklistCallsDay':_0x1b4bdf['outboundBlacklistCallsDay'],'outboundBusyCallsDay':_0x1b4bdf['outboundBusyCallsDay'],'outboundCongestionCallsDay':_0x1b4bdf['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x1b4bdf[_0x834e('0x36')],'outboundDropCallsDayCallersExit':_0x1b4bdf[_0x834e('0x37')],'outboundDropCallsDayTimeout':_0x1b4bdf[_0x834e('0x38')],'outboundNoAnswerCallsDay':_0x1b4bdf['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x1b4bdf[_0x834e('0x39')],'outboundOriginateFailureCallsDay':_0x1b4bdf[_0x834e('0x3a')],'outboundReCallsDay':_0x1b4bdf[_0x834e('0x3b')],'outboundRejectCallsDay':_0x1b4bdf[_0x834e('0x3c')],'outboundUnknownCallsDay':_0x1b4bdf[_0x834e('0x3d')],'outboundAbandonedCallsDay':_0x1b4bdf[_0x834e('0x3e')],'predictiveIntervalAnsweredCalls':_0x1b4bdf[_0x834e('0x3f')],'predictiveIntervalAvgHoldtime':_0x1b4bdf[_0x834e('0x40')],'predictiveIntervalAvgTalktime':_0x1b4bdf[_0x834e('0x41')],'predictiveIntervalDroppedCallsCallersExit':_0x1b4bdf['predictiveIntervalDroppedCallsCallersExit'],'predictiveIntervalDroppedCallsTimeout':_0x1b4bdf[_0x834e('0x42')],'predictiveIntervalErlangCalls':_0x1b4bdf['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x1b4bdf[_0x834e('0x43')],'predictiveIntervalHitRate':_0x1b4bdf[_0x834e('0x44')],'predictiveIntervalMultiplicativeFactor':_0x1b4bdf[_0x834e('0x45')],'predictiveIntervalPauses':_0x1b4bdf[_0x834e('0x46')],'predictiveIntervalAvailable':_0x1b4bdf[_0x834e('0x47')],'predictiveIntervalTotalCalls':_0x1b4bdf[_0x834e('0x48')],'message':_0x1b4bdf[_0x834e('0x49')],'originated':_0x1b4bdf[_0x834e('0x4a')],'erlangCalls':_0x1b4bdf[_0x834e('0x4b')],'erlangCallToSecond':_0x1b4bdf[_0x834e('0x4c')],'erlangAbandonmentRate':_0x1b4bdf['erlangAbandonmentRate'],'erlangBusyFactor':_0x1b4bdf[_0x834e('0x4d')],'startPredictive':_0x1b4bdf[_0x834e('0x4e')],'startProgressive':_0x1b4bdf[_0x834e('0x4f')]};if(_0x1b4bdf[_0x834e('0x50')]){_0x5c55ca['Trunk']={'id':_0x1b4bdf[_0x834e('0x50')]['id'],'name':_0x1b4bdf[_0x834e('0x50')]['name'],'active':_0x1b4bdf['Trunk']['active'],'callerid':_0x1b4bdf[_0x834e('0x50')][_0x834e('0x51')]};}if(_0x1b4bdf[_0x834e('0x52')]){_0x5c55ca[_0x834e('0x52')]={'id':_0x1b4bdf[_0x834e('0x52')]['id'],'name':_0x1b4bdf[_0x834e('0x52')]['name']};}var _0x2c2d94=md5(JSON['stringify'](_0x5c55ca));if(_0x1b4bdf[_0x834e('0x4')]!==_0x2c2d94){_0x1b4bdf[_0x834e('0x4')]=_0x2c2d94;emit(util['format'](_0x834e('0x53'),_0x5c55ca[_0x834e('0x54')]),'voice_queue:save',_0x5c55ca);}}}function emitVoiceQueueChannelRemove(_0x481f70){logger[_0x834e('0x55')](_0x834e('0x56'),JSON[_0x834e('0x57')](_0x481f70));emit(util[_0x834e('0x58')](_0x834e('0x53'),_0x481f70['name']),_0x834e('0x59'),_0x481f70);}function notSendMessagesQueue(_0x548d1d){if(_0x548d1d['sendMessageOneNotActive']){if(_0x548d1d[_0x834e('0x4a')]===0x0&&_0x548d1d['pTalking']===0x0){_0x548d1d[_0x834e('0x5a')]=![];_0x548d1d[_0x834e('0x5b')]=0x0;_0x548d1d[_0x834e('0x5c')]=0x0;_0x548d1d[_0x834e('0x49')]=_0x834e('0x5d');ut['logger'](_0x834e('0x5e'),_0x548d1d[_0x834e('0x54')]+_0x834e('0x5f'));}else{_0x548d1d['message']=_0x834e('0x60');ut[_0x834e('0x61')]('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x548d1d[_0x834e('0x54')]+'\x20is\x20disactive');}emitCampaignPreview(_0x548d1d);}}Preview[_0x834e('0x10')][_0x834e('0x24')]=function(){var _0x4a18bb=this;setInterval(function(){_0x4a18bb['syncCampaigns']();},0x7cf);};Preview[_0x834e('0x10')][_0x834e('0x62')]=function(){var _0x3bcbf4=this[_0x834e('0x15')];this[_0x834e('0x18')]+=0x1;for(var _0x23feea in _0x3bcbf4){if(_0x3bcbf4[_0x834e('0x63')](_0x23feea)&&(_0x3bcbf4[_0x23feea]['dialMethod']===_0x834e('0x8')||_0x3bcbf4[_0x23feea]['dialMethod']===_0x834e('0x64'))&&_0x3bcbf4[_0x23feea]['type']===_0x834e('0x26')){if(this['clockClearZombieChannels']>0x7){this[_0x834e('0x18')]=0x0;this[_0x834e('0x65')]();}}if(_0x3bcbf4['hasOwnProperty'](_0x23feea)&&_0x3bcbf4[_0x23feea][_0x834e('0x30')]===_0x834e('0x8')&&_0x3bcbf4[_0x23feea][_0x834e('0x25')]===_0x834e('0x26')){if(_0x3bcbf4[_0x23feea][_0x834e('0x66')]){this[_0x834e('0x67')](_0x3bcbf4[_0x23feea]);this[_0x834e('0x68')](_0x3bcbf4[_0x23feea]);}else{notSendMessagesQueue(_0x3bcbf4[_0x23feea]);}}}};Preview[_0x834e('0x10')][_0x834e('0x69')]=function(_0x279ea1){var _0x5f3943=this;this[_0x834e('0x14')][_0x834e('0x11')](function(){if(!_['isNil'](_0x5f3943[_0x834e('0x6a')][_0x279ea1])){loggerAction[_0x834e('0x55')](_0x834e('0x6b'),_0x279ea1,_0x834e('0x6c'),_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')],'originated:\x20',JSON['stringify'](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]][_0x834e('0x4a')]),_0x834e('0x6e'),JSON[_0x834e('0x57')](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]][_0x834e('0x2a')]),JSON[_0x834e('0x57')](_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6f')]),JSON[_0x834e('0x57')](_[_0x834e('0x70')](_0x5f3943[_0x834e('0x6a')][_0x279ea1],[_0x834e('0x71'),_0x834e('0x72'),_0x834e('0x73'),_0x834e('0x74')])));return ami['Action']({'action':_0x834e('0x75'),'channel':_0x5f3943[_0x834e('0x6a')][_0x279ea1]['channel']})[_0x834e('0x76')](function(_0x3b0988){if(_0x3b0988['message']===_0x834e('0x77')){setTimeout(function(){if(_0x5f3943[_0x834e('0x6a')][_0x279ea1]){ut[_0x834e('0x78')](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]],_0x834e('0x79'));if(_0x5f3943['actions'][_0x279ea1][_0x834e('0x6f')]===!![]){ut[_0x834e('0x7a')](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]],_0x834e('0x79'));ut[_0x834e('0x7b')](_0x834e('0x7c')+_0x279ea1,_0x5f3943['actions'][_0x279ea1][_0x834e('0x6d')]);}ut['loggerError'](_0x834e('0x7d')+_0x279ea1,_0x5f3943['actions'][_0x279ea1][_0x834e('0x6d')]);delete _0x5f3943['actions'][_0x279ea1];}},0x2328);}});}});};Preview['prototype'][_0x834e('0x65')]=function(){var _0x3e1bee=this;loggerAction['info']('[action]',_[_0x834e('0x7e')](this[_0x834e('0x6a')]));for(var _0x138ed2 in this[_0x834e('0x6a')]){if(_0x3e1bee[_0x834e('0x6a')][_0x834e('0x63')](_0x138ed2)){_0x3e1bee[_0x834e('0x69')](_0x138ed2);}}};Preview[_0x834e('0x10')]['recallMe']=function(_0x142334){var _0x3c70bf=this;rpcDb['getContactRecallMe'](_0x142334['id'],ut[_0x834e('0x7f')](this['agents']))[_0x834e('0x80')](function(_0x45eceb){if(!_['isNil'](_0x45eceb)){for(var _0x41ef86=0x0;_0x41ef86<_0x45eceb[_0x834e('0x81')];_0x41ef86+=0x1){if(ut[_0x834e('0x82')](_0x45eceb[_0x41ef86][_0x834e('0x83')])<_0x142334['dialRecallMeTimeout']*0x3c){if(_0x45eceb[_0x41ef86][_0x834e('0x84')]&&!_0x45eceb[_0x41ef86][_0x834e('0x84')][_0x834e('0x85')]){_0x3c70bf['run'](_0x45eceb[_0x41ef86]['id'])[_0x834e('0x80')](ut[_0x834e('0x86')](_0x834e('0x87')))[_0x834e('0x76')](ut[_0x834e('0x86')](_0x834e('0x87')));}else{rpcDb[_0x834e('0x88')](_0x45eceb[_0x41ef86]['id']);}}else{var _0x1def00=new Action(_0x45eceb[_0x41ef86],_0x142334);_0x1def00[_0x834e('0x89')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));_0x142334[_0x834e('0x3b')]+=0x1;ut[_0x834e('0x8b')](_0x1def00,0x17,_0x834e('0x8c'));if(_0x142334[_0x834e('0x8d')]){rpcDb[_0x834e('0x8e')](ut[_0x834e('0x8f')](_0x45eceb[_0x41ef86]));rpcDb[_0x834e('0x90')](_0x1def00,_0x834e('0x91'));}else{ut[_0x834e('0x8b')](_0x1def00,0x16,_0x834e('0x92'));rpcDb[_0x834e('0x90')](_0x1def00,'[HistoryRecallClose]');rpcDb[_0x834e('0x93')](_0x1def00,_0x834e('0x94'));}}}}})[_0x834e('0x76')](ut[_0x834e('0x86')]('[getContactRecallMe]'));};Preview[_0x834e('0x10')]['setMessage']=function(_0x56a152){_0x56a152[_0x834e('0x5a')]=!![];if(ut[_0x834e('0x95')](_0x56a152[_0x834e('0x29')])){_0x56a152[_0x834e('0x49')]=_0x834e('0x96');}else if(!ut[_0x834e('0x97')](_0x56a152[_0x834e('0x66')])){_0x56a152[_0x834e('0x49')]='NOT_ACTIVE';}else if(!this[_0x834e('0x98')](_0x56a152['Trunk'])){if(!this[_0x834e('0x98')](_0x56a152[_0x834e('0x99')])){_0x56a152['message']='TRUNK_IS_NOT_REACHABLE';}else{_0x56a152[_0x834e('0x49')]=_0x834e('0x9a');}}else{_0x56a152[_0x834e('0x49')]=_0x834e('0x9a');}emitCampaignPreview(_0x56a152);};Preview[_0x834e('0x10')]['callProgressDetectingCustomer']=function(_0x2b0d93,_0x15018f,_0x2df64f){var _0x228a60=this;var _0x3181af=this[_0x834e('0x6a')][_0x15018f];var _0x87818b=this[_0x834e('0x15')][_0x3181af[_0x834e('0x6d')]];var _0x324f67;if(_0x87818b){switch(_0x2df64f){case'1':_0x87818b['outboundNoSuchCallsDay']+=0x1;_0x3181af[_0x834e('0x9b')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x0,'NoSuchNumber');ami[_0x834e('0x9e')]('custom:agentnosuchnumber',ut['buildObj'](_0x3181af,'nosuchnumber'));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0x9f'));if(ut['totalGlobal'](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,'Global');rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xa2'));}else{if(_0x3181af['countnosuchnumberretry']>=_0x87818b['dialNoSuchNumberMaxRetry']){rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xa2'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0x9b'),_0x87818b['dialNoSuchNumberRetryFrequency']),_0x3181af[_0x834e('0xa5')],_0x3181af['activeContact']);}}delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xa6')]];break;case _0x834e('0xa7'):var _0x5afb41=moment()[_0x834e('0x58')](_0x834e('0x8a'));_0x3181af['responsetime']=_0x5afb41;_0x3181af[_0x834e('0xa8')]=_0x5afb41;_0x3181af[_0x834e('0x6f')]=!![];_0x87818b[_0x834e('0x2a')]+=0x1;logger['info'](_0x834e('0xa9'),_0x3181af[_0x834e('0xaa')],_0x834e('0xab'),_0x87818b[_0x834e('0x54')],_0x834e('0x6e'),_0x87818b[_0x834e('0x2a')]);ami[_0x834e('0x9e')](_0x834e('0xac'),ut[_0x834e('0xad')](_0x3181af,_0x834e('0xae'),this['campaignsPreview'][_0x3181af['queue']]));if(_0x87818b['acw']){ami[_0x834e('0x9e')](_0x834e('0xaf'),ut[_0x834e('0xb0')](_0x3181af));}break;case'16':ami[_0x834e('0x9e')](_0x834e('0xb1'),ut['buildObj'](_0x3181af,'complete',this[_0x834e('0x15')][_0x3181af[_0x834e('0x6d')]]));emitVoiceQueueChannelRemove(ut[_0x834e('0xad')](_0x3181af,_0x834e('0xb2')));_0x87818b[_0x834e('0xb3')]+=0x1;_0x87818b['total']+=0x1;_0x87818b[_0x834e('0x28')]+=0x1;ut[_0x834e('0x7a')](_0x87818b,_0x834e('0xb4'));_0x3181af['countglobal']=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x4,_0x834e('0xb5'));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xb6'));rpcDb['createCustomerFinal'](_0x3181af,'[callProgressDetectingCustomer][logAnswerGlobal]');rpcDb[_0x834e('0xb7')](_0x3181af);_0x87818b[_0x834e('0x2b')]+=_0x3181af['talktime'];_0x87818b[_0x834e('0xb8')]+=_0x3181af['talktime'];logger[_0x834e('0x55')](_0x834e('0xb9'),_0x3181af[_0x834e('0xaa')],'\x20Queue',_0x87818b[_0x834e('0x54')],'pTalking:\x20',_0x87818b['pTalking']);delete this['actions'][_0x2b0d93[_0x834e('0xa6')]];break;case _0x834e('0xba'):_0x87818b[_0x834e('0xbb')]+=0x1;_0x3181af[_0x834e('0xbc')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x5,_0x834e('0xbd'));ami[_0x834e('0x9e')]('custom:agentbusy',ut[_0x834e('0xad')](_0x3181af,'busy'));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xbe'));if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb['createCustomerFinal'](_0x324f67,'[callProgressDetectingCustomer][logBusyGlobal]');}else{if(_0x3181af[_0x834e('0xbc')]>=_0x87818b[_0x834e('0xc0')]){rpcDb['createCustomerFinal'](_0x3181af,_0x834e('0xbe'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xbc'),_0x87818b[_0x834e('0xc1')]),_0x3181af['unlockAgent'],_0x3181af[_0x834e('0xc2')]);}}break;case _0x834e('0xc3'):_0x87818b['outboundNoAnswerCallsDay']+=0x1;_0x3181af['countnoanswerretry']+=0x1;_0x3181af['countglobal']=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x3,'NoAnswer');ami[_0x834e('0x9e')](_0x834e('0xc4'),ut['buildObj'](_0x3181af,_0x834e('0xc5')));rpcDb['createCustomerHistory'](_0x3181af,'[callProgressDetectingCustomer][logNoAnswer]');if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb['createCustomerFinal'](_0x324f67,_0x834e('0xc6'));}else{if(_0x3181af[_0x834e('0xc7')]>=_0x87818b[_0x834e('0xc8')]){rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xc9'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xc7'),_0x87818b[_0x834e('0xca')]),_0x3181af[_0x834e('0xa5')],_0x3181af[_0x834e('0xc2')]);}}break;case _0x834e('0xcb'):_0x87818b[_0x834e('0xcc')]+=0x1;_0x3181af[_0x834e('0xcd')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x8,_0x834e('0xce'));ami[_0x834e('0x9e')](_0x834e('0xcf'),ut[_0x834e('0xad')](_0x3181af,_0x834e('0xd0')));rpcDb['createCustomerHistory'](_0x3181af,_0x834e('0xd1'));if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xd2'));}else{if(_0x3181af[_0x834e('0xcd')]>=_0x87818b[_0x834e('0xd3')]){rpcDb['createCustomerFinal'](_0x3181af,'[callProgressDetectingCustomer][logCongestion]');}else{rpcDb['rescheduleContact'](ut[_0x834e('0xa4')](_0x3181af,'countcongestionretry',_0x87818b[_0x834e('0xc1')]),_0x3181af[_0x834e('0xa5')],_0x3181af[_0x834e('0xc2')]);}}break;case'CANCEL':_0x87818b[_0x834e('0x3c')]+=0x1;_0x3181af[_0x834e('0xd4')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x14,_0x834e('0xd5'));ami['emit'](_0x834e('0xd6'),ut[_0x834e('0xad')](_0x3181af,_0x834e('0xd7')));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xd8'));if(ut['totalGlobal'](_0x3181af)>=_0x87818b['dialGlobalMaxRetry']){_0x324f67=ut['cloneAction'](_0x3181af,0x14,'AgentReject');rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xd9'));}else{if(_0x3181af['countagentrejectretry']>=_0x87818b[_0x834e('0xda')]){rpcDb[_0x834e('0x93')](_0x3181af,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xd4'),_0x87818b[_0x834e('0xdb')]),_0x3181af[_0x834e('0xa5')],_0x3181af[_0x834e('0xc2')]);}}break;case'ABANDONED':_0x87818b['outboundAbandonedCallsDay']+=0x1;_0x3181af[_0x834e('0xdc')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut['logCustomer'](_0x3181af,0xb,_0x834e('0xdd'));rpcDb[_0x834e('0x90')](_0x3181af,'[callProgressDetectingCustomer][logAbandoned]');if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb['createCustomerFinal'](_0x324f67,_0x834e('0xde'));}else{if(_0x3181af['countabandonedetry']>=_0x87818b['dialAbandonedMaxRety']){rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xde'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xdc'),_0x87818b[_0x834e('0xdf')]),_0x3181af['unlockAgent'],_0x3181af['activeContact']);}}break;default:if(_0x3181af[_0x834e('0x6f')]){ut[_0x834e('0x7a')](_0x87818b,_0x834e('0xe0'));ut[_0x834e('0x7b')](_0x834e('0xe1')+_0x87818b[_0x834e('0x54')],_0x2b0d93);}_0x87818b[_0x834e('0x3d')]+=0x1;_0x3181af['countglobal']=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0xc,_0x2b0d93['cause-txt']||_0x2b0d93[_0x834e('0xe2')]);rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xe3'));if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xe4'));}else{rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xe4'));}delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xa6')]];}if(!(_0x3181af[_0x834e('0x6f')]&&_0x2df64f==='16')){ut['updateOriginated'](_0x87818b,_0x834e('0xe5'));logger[_0x834e('0x55')]('[originated][decrement][callProgressDetectingCustomer]',_0x3181af[_0x834e('0xaa')],'\x20Queue',_0x87818b[_0x834e('0x54')],'originated:\x20',_0x87818b[_0x834e('0x4a')]);}if(_0x2df64f!=='ANSWER'){delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xa6')]];delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xe6')]];}}};Preview['prototype'][_0x834e('0xe7')]=function(_0x38085e,_0x375fec,_0x2247f7){if(_[_0x834e('0xe8')](_0x375fec)&&_0x834e('0xe9')!==typeof _0x375fec){return;}if(_[_0x834e('0xe8')](_0x2247f7)&&_0x834e('0xe9')!==typeof _0x2247f7){return;}switch(_0x2247f7[_0x834e('0xea')]){case'0':ut[_0x834e('0xeb')](_0x38085e,0x0,_0x834e('0xec'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xee'));break;case'3':ut[_0x834e('0xeb')](_0x38085e,0x3,_0x834e('0xef'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf0'));break;case'5':ut['logAgent'](_0x38085e,0x5,'Busy');rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf1'));break;case'8':ut[_0x834e('0xeb')](_0x38085e,0x8,_0x834e('0xce'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf2'));break;case'22':ut[_0x834e('0xeb')](_0x38085e,0x16,_0x834e('0xf3'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf4'));break;default:ut[_0x834e('0xeb')](_0x38085e,0xc,_0x2247f7[_0x834e('0xea')]);rpcDb['createAgentHistory'](_0x38085e,_0x834e('0xf2'));}ut['updateOriginated'](_0x375fec,_0x834e('0xf5'));logger[_0x834e('0x55')](_0x834e('0xf6'),_0x38085e['uniqueid'],_0x834e('0xab'),_0x375fec[_0x834e('0x54')],'originated:\x20',_0x375fec['originated']);delete this[_0x834e('0x6a')][_0x38085e[_0x834e('0xaa')]];};Preview['prototype'][_0x834e('0xf7')]=function(_0x132edd,_0x4643d9,_0x135219,_0x170ec2,_0x5e6fff){var _0x4e7545=this;return new BPromise(function(_0x453e58,_0x5dd31e){if(_['isNil'](_0x4643d9)||_['isNil'](_0x4643d9[_0x834e('0xf8')])||_[_0x834e('0xf9')](_0x4643d9['Contact'][_0x834e('0xfa')])||_[_0x834e('0xf9')](_0x4643d9[_0x834e('0x73')])){_0x5dd31e(ut[_0x834e('0x49')]('Contact\x20is\x20undefined',_0x170ec2,_0x5e6fff));return;}var _0x1998ba=uuid['v4']();var _0x288eb1=_0x4e7545[_0x834e('0x15')][_0x4643d9['Queue'][_0x834e('0x54')]];var _0x5f3b7d=_0x135219?_0x4e7545[_0x834e('0x17')][_0x135219]['id']:undefined;_0x4e7545['actions'][_0x1998ba]=new Action(_0x4643d9,_0x288eb1,_0x1998ba,_0x135219,_0x5f3b7d);var _0x461420=_0x4e7545[_0x834e('0x6a')][_0x1998ba];_0x461420['unlockAgent']=_0x170ec2;_0x461420[_0x834e('0xc2')]=_0x5e6fff;_0x461420[_0x834e('0xfb')]=_0x135219;if(_[_0x834e('0xfc')](_0x132edd)){_0x4e7545[_0x834e('0xfd')](_0x461420,_0x288eb1,_0x4643d9,_0x135219)[_0x834e('0x80')](function(_0x24d77c){logger['info'](_0x834e('0xfe'),_0x834e('0xff')+_0x461420[_0x834e('0x6d')]+_0x834e('0x100')+_0x461420[_0x834e('0x101')],JSON[_0x834e('0x57')](_0x24d77c));ami['emit'](_0x834e('0x102'),ut['buildObj'](_0x461420,'called',_0x4e7545[_0x834e('0x15')][_0x461420['queue']]));_0x453e58(ut['message'](_0x834e('0x103')));})[_0x834e('0x76')](function(_0x257fed){ut[_0x834e('0x61')](_0x834e('0x104'),_0x257fed);_0x5dd31e(ut[_0x834e('0x49')](_0x834e('0x105'),_0x170ec2,_0x5e6fff));});}else{_0x288eb1[_0x834e('0x106')]+=0x1;ut[_0x834e('0x107')](_0x461420);rpcDb[_0x834e('0x108')](_0x461420,_0x834e('0x109'));delete _0x4e7545[_0x834e('0x6a')][_0x1998ba];_0x5dd31e(ut[_0x834e('0x49')](_0x834e('0x10a'),_0x170ec2,_0x5e6fff));}});};Preview['prototype'][_0x834e('0x98')]=function(_0x4874e1){return!_[_0x834e('0xf9')](_0x4874e1)&&!_[_0x834e('0xf9')](_0x4874e1[_0x834e('0x54')])&&!_[_0x834e('0xf9')](_0x4874e1['active'])&&_0x4874e1['active']&&!_[_0x834e('0xf9')](this[_0x834e('0x16')][util['format'](_0x834e('0x10b'),_0x4874e1[_0x834e('0x54')])])&&!_['isNil'](this[_0x834e('0x16')][util[_0x834e('0x58')](_0x834e('0x10b'),_0x4874e1[_0x834e('0x54')])]['status'])&&(this['trunks'][util['format']('SIP/%s',_0x4874e1[_0x834e('0x54')])][_0x834e('0x75')]==='reachable'||this[_0x834e('0x16')][util['format'](_0x834e('0x10b'),_0x4874e1[_0x834e('0x54')])][_0x834e('0x75')]===_0x834e('0x10c'));};Preview[_0x834e('0x10')][_0x834e('0x10d')]=function(_0x3c775f,_0x4fc61d){var _0x12a0f3=this;return new BPromise(function(_0x20d52f,_0x59ac23){_0x12a0f3[_0x834e('0x10e')](_0x3c775f,_0x4fc61d)[_0x834e('0x80')](function(_0x536f66){_0x20d52f(_['pick'](_0x536f66,['message']));})[_0x834e('0x76')](function(_0x19e17b){if(_0x19e17b[_0x834e('0x10f')]){rpcDb['unlockContact'](_0x3c775f);}if(_0x19e17b[_0x834e('0x110')]){rpcDb[_0x834e('0x88')](_0x3c775f);}_0x59ac23(_[_0x834e('0x70')](_0x19e17b,[_0x834e('0x49')]));});});};Preview[_0x834e('0x10')][_0x834e('0x10e')]=function(_0x19cb0b,_0x13af70){var _0x8804a8=this;return new BPromise(function(_0x102640,_0x48b6c4){var _0x5d6b66,_0x117e8f;rpcDb[_0x834e('0x111')](_0x19cb0b)[_0x834e('0x80')](function(_0x3eda93){if(!_[_0x834e('0xf9')](_0x3eda93[0x0])){_0x117e8f=_0x3eda93[0x0][_0x834e('0x112')]?![]:!![];_0x5d6b66=_0x3eda93[0x0][_0x834e('0x112')]?!![]:![];_0x5d6b66=_0x13af70?!![]:_0x5d6b66;}var _0x39210f=_0x8804a8[_0x834e('0x113')](_0x3eda93);if(_0x39210f[_0x834e('0x114')]){rpcDb[_0x834e('0x115')](_[_0x834e('0x70')](_0x3eda93[0x0],[_0x834e('0x73'),'Contact.phone']))[_0x834e('0x80')](function(_0x3b13be){_0x8804a8[_0x834e('0xf7')](_0x3b13be,_0x3eda93[0x0],_0x13af70,_0x117e8f,_0x5d6b66)[_0x834e('0x80')](function(_0x495697){_0x102640(_0x495697);})['catch'](function(_0x4e7c43){_0x48b6c4(_0x4e7c43);});})[_0x834e('0x76')](function(_0xf98fb4){ut[_0x834e('0x61')](_0x834e('0x116'),_0xf98fb4);_0x48b6c4(ut[_0x834e('0x49')](_0x834e('0x117'),_0x117e8f,_0x5d6b66));});}else{_0x48b6c4(ut[_0x834e('0x49')](_0x39210f[_0x834e('0x49')],_0x117e8f,_0x5d6b66));}})['catch'](function(_0x58ff66){ut['logger']('[Preview][getContactPreview]',_0x58ff66);_0x48b6c4(ut[_0x834e('0x49')](_0x834e('0x117'),![],!![]));});});};Preview[_0x834e('0x10')][_0x834e('0x113')]=function(_0x72f950){if(_[_0x834e('0xf9')](_0x72f950)||_[_0x834e('0xfc')](_0x72f950)||!_[_0x834e('0xf9')](_0x72f950[0x0][_0x834e('0x84')])&&_['isNil'](_0x72f950[0x0]['Agent']['name'])){ut['logger'](_0x834e('0x118'),_0x72f950);return{'isValid':![],'message':_0x834e('0x119')};}var _0x284183=this[_0x834e('0x15')][_0x72f950[0x0][_0x834e('0x6c')][_0x834e('0x54')]];_0x284183[_0x834e('0x49')]=_0x834e('0x9a');if(_[_0x834e('0xf9')](_0x284183)){ut[_0x834e('0x61')](_0x834e('0x11a'),_0x284183);return{'isValid':![],'message':_0x834e('0x11b')};}if(!this[_0x834e('0x98')](_0x284183[_0x834e('0x50')])){ut[_0x834e('0x61')](_0x834e('0x11c'),'campaign\x20Name:\x20'+_0x284183[_0x834e('0x54')]+'\x20Trunk\x20is\x20not\x20active');if(!this[_0x834e('0x98')](_0x284183[_0x834e('0x99')])){ut[_0x834e('0x61')]('[Preview][validateContact][Trunk\x20not\x20work]',_0x284183[_0x834e('0x54')]+_0x834e('0x11d'));return{'isValid':![],'message':'Trunk\x20not\x20work'};}}if(!ut['isActive'](_0x284183[_0x834e('0x66')])){ut[_0x834e('0x61')](_0x834e('0x11e'),_0x284183[_0x834e('0x54')]+_0x834e('0x11f'));return{'isValid':![],'message':_0x834e('0x120')+_0x284183[_0x834e('0x54')]+_0x834e('0x11f')};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview[_0x834e('0x10')][_0x834e('0xfd')]=function(_0x375e40,_0x1d4947,_0x1912e6,_0x614e15){var _0x17aaae=this;return new BPromise(function(_0x58ebc8,_0x40a92a){var _0x59e298=_0x375e40['uniqueid'];var _0x1115b7=_0x17aaae[_0x834e('0x98')](_0x1d4947['Trunk'])?util[_0x834e('0x58')](_0x834e('0x121'),_0x1d4947['Trunk'][_0x834e('0x54')],_[_0x834e('0xf9')](_0x1d4947['dialPrefix'])?'':_0x1d4947['dialPrefix'][_0x834e('0x122')]()||'',_0x1d4947[_0x834e('0x123')]>0x0?_0x1912e6['Contact']['phone'][_0x834e('0x124')](_0x1d4947[_0x834e('0x123')]):_0x1912e6['Contact']['phone']):util['format']('SIP/%s/%s%s',_[_0x834e('0xf9')](_0x1d4947['TrunkBackup'])?_0x1d4947[_0x834e('0x50')]['name']:_0x1d4947[_0x834e('0x99')][_0x834e('0x54')],_[_0x834e('0xf9')](_0x1d4947[_0x834e('0x34')])?'':_0x1d4947['dialPrefix'][_0x834e('0x122')]()||'',_0x1d4947[_0x834e('0x123')]>0x0?_0x1912e6[_0x834e('0xf8')][_0x834e('0xfa')][_0x834e('0x124')](_0x1d4947[_0x834e('0x123')]):_0x1912e6[_0x834e('0xf8')][_0x834e('0xfa')]);var _0x464ae6=_0x17aaae[_0x834e('0x98')](_0x1d4947['Trunk'])?ut[_0x834e('0x125')](_0x1d4947['Trunk'][_0x834e('0x51')],_0x1d4947[_0x834e('0x31')],_0x1d4947[_0x834e('0x126')]>0x0?ut[_0x834e('0x127')](_0x1d4947[_0x834e('0x32')],_0x1d4947['dialRandomLastDigitCallerIdNumber']):_0x1d4947[_0x834e('0x32')]):ut['getCallerId'](_['isNil'](_0x1d4947[_0x834e('0x99')])?_0x1d4947[_0x834e('0x50')][_0x834e('0x51')]:_0x1d4947['TrunkBackup'][_0x834e('0x51')],_0x1d4947[_0x834e('0x31')],_0x1d4947[_0x834e('0x126')]>0x0?ut[_0x834e('0x127')](_0x1d4947[_0x834e('0x32')],_0x1d4947[_0x834e('0x126')]):_0x1d4947[_0x834e('0x32')]);if(_0x464ae6){_0x375e40[_0x834e('0x128')]=ut[_0x834e('0x129')](_0x464ae6);_0x375e40[_0x834e('0x12a')]=ut[_0x834e('0x12b')](_0x464ae6);}var _0x578204=ut[_0x834e('0x12c')](_0x1d4947,_0x1912e6,_0x1115b7,_0x464ae6,_0x59e298,_0x375e40);_[_0x834e('0x12d')](_0x375e40,ut[_0x834e('0x12e')](_0x578204));_0x375e40[_0x834e('0x89')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));ami['Action'](ut[_0x834e('0x12f')](_0x375e40,_0x1d4947,_0x578204,_0x375e40[_0x834e('0xc2')],_0x614e15))[_0x834e('0x80')](function(_0x37dea1){_0x1d4947[_0x834e('0x4a')]+=0x1;logger[_0x834e('0x55')](_0x834e('0x130'),_0x59e298,_0x834e('0xab'),_0x1d4947[_0x834e('0x54')],_0x834e('0x131'),_0x1d4947['originated']);_0x58ebc8(_0x37dea1);})['catch'](function(_0x5f339f){ut['logAgent'](_0x375e40,0xe,_0x834e('0x132'));rpcDb[_0x834e('0xed')](_0x375e40,_0x834e('0x133'));_0x40a92a(_0x5f339f);});});};Preview[_0x834e('0x10')][_0x834e('0x134')]=function(_0x1d53c6){if(this['actions'][_0x1d53c6[_0x834e('0xa6')]]){this['actions'][_0x1d53c6['linkedid']]['channel']=_0x1d53c6[_0x834e('0x135')];}};Preview[_0x834e('0x10')]['syncOriginateResponse']=function(_0x5cb379){var _0x494e08=this;var _0x2515f6=this[_0x834e('0x6a')][_0x5cb379[_0x834e('0x136')]];if(_0x2515f6){if(_0x2515f6['lookAgent']&&this[_0x834e('0x17')][_0x2515f6[_0x834e('0xfb')]]){ut[_0x834e('0x137')](_0x2515f6,this[_0x834e('0x17')][_0x2515f6[_0x834e('0xfb')]][_0x834e('0x54')],this['agents'][_0x2515f6['lookAgent']]['id']);}var _0x5c7fe3=_['clone'](_0x2515f6);_0x5c7fe3[_0x834e('0x138')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));var _0xfa95ad=_0x494e08[_0x834e('0x15')][_0x2515f6[_0x834e('0x6d')]];if(ut[_0x834e('0x139')](_0x5cb379[_0x834e('0x13a')])){if(_0x2515f6[_0x834e('0xa5')]){rpcDb[_0x834e('0x13b')](_0x2515f6[_0x834e('0x101')]);}if(_0x2515f6[_0x834e('0xc2')]){rpcDb[_0x834e('0x88')](_0x2515f6[_0x834e('0x101')]);}ami[_0x834e('0x9e')]('custom:agentringnoanswer',ut['buildObj'](_0x2515f6,_0x834e('0x13c'),this[_0x834e('0x15')][_0x2515f6[_0x834e('0x6d')]]));this['callProgressDetectingAgent'](_0x5c7fe3,_0xfa95ad,_0x5cb379);}else{_0x2515f6[_0x834e('0x89')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));ut[_0x834e('0xeb')](_0x5c7fe3,0x4,_0x834e('0xb5'));rpcDb[_0x834e('0xed')](_0x5c7fe3,_0x834e('0x13d'));}}};Preview[_0x834e('0x10')][_0x834e('0x13e')]=function(_0x53850c){var _0x1785ca=this;var _0x2e0674=this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]];var _0x4b6834;if(_0x2e0674){_0x4b6834=this[_0x834e('0x15')][_0x2e0674[_0x834e('0x6d')]];logger[_0x834e('0x55')](_0x834e('0x13f'),_0x53850c[_0x834e('0xa6')],_0x834e('0xab'),_0x4b6834[_0x834e('0x54')],_0x834e('0x6e'),_0x4b6834[_0x834e('0x2a')]);}if(this['actions'][_0x53850c[_0x834e('0xa6')]]&&_0x53850c['linkedid']!==_0x53850c[_0x834e('0xaa')]){if(_0x53850c['cause']==='16'&&this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]][_0x834e('0x6f')]){this[_0x834e('0x140')](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c['cause']);}else if(this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]]['dialAnswer']){logger['info'](_0x834e('0x141'),_0x53850c['linkedid'],_0x53850c['cause'],'\x20Queue',_0x4b6834[_0x834e('0x54')],_0x834e('0x6e'),_0x4b6834[_0x834e('0x2a')]);this[_0x834e('0x140')](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')]);}}else if(_0x2e0674&&_[_0x834e('0xf9')](_0x2e0674['statedesc'])&&_0x4b6834[_0x834e('0x143')]&&_0x53850c[_0x834e('0xa6')]===_0x53850c['uniqueid']&&_['isNil'](_0x53850c[_0x834e('0xea')])&&_0x53850c[_0x834e('0x142')]==='16'&&_0x53850c['channelstate']==='6'&&_['isUndefined'](_0x2e0674[_0x834e('0x144')])){if(_0x2e0674[_0x834e('0xa5')]){rpcDb[_0x834e('0x13b')](_0x2e0674['idContact']);}if(_0x2e0674[_0x834e('0xc2')]){rpcDb[_0x834e('0x88')](_0x2e0674[_0x834e('0x101')]);}_0x53850c['reason']='22';this[_0x834e('0xe7')](_0x2e0674,_0x4b6834,_0x53850c);}else if(_0x2e0674&&_0x2e0674['transfer']){if(_0x53850c[_0x834e('0x142')]==='16'&&this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]][_0x834e('0x6f')]){logger[_0x834e('0x55')]('[syncHangup][talking][transfer]',_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')],_0x834e('0xab'),_0x4b6834[_0x834e('0x54')],_0x834e('0x6e'),_0x4b6834['pTalking']);this['callProgressDetectingCustomer'](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')]);}else if(this[_0x834e('0x6a')][_0x53850c['linkedid']][_0x834e('0x6f')]){logger[_0x834e('0x55')](_0x834e('0x141'),_0x53850c[_0x834e('0xa6')],_0x53850c['cause'],_0x834e('0xab'),_0x4b6834[_0x834e('0x54')],'pTalking:\x20',_0x4b6834[_0x834e('0x2a')]);this[_0x834e('0x140')](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')]);}}};Preview['prototype'][_0x834e('0x1d')]=function(_0x52a673){if(this[_0x834e('0x6a')][_0x52a673[_0x834e('0xe6')]]&&_0x52a673[_0x834e('0xe6')]!==_0x52a673[_0x834e('0x145')]){this[_0x834e('0x140')](_0x52a673,_0x52a673[_0x834e('0xe6')],_0x52a673['dialstatus']);}};Preview['prototype'][_0x834e('0x1c')]=function(_0x3f2c59){if(this['actions'][_0x3f2c59[_0x834e('0xa6')]]&&_0x3f2c59['linkedid']!==_0x3f2c59[_0x834e('0xaa')]&&!this[_0x834e('0x6a')][_0x3f2c59[_0x834e('0xa6')]][_0x834e('0x6f')]){if(_0x3f2c59[_0x834e('0x142')]==='1'){this[_0x834e('0x140')](_0x3f2c59,_0x3f2c59[_0x834e('0xa6')],_0x3f2c59['cause']);}}};Preview[_0x834e('0x10')][_0x834e('0x146')]=function(_0x2a6bca,_0x223d48,_0x1c03bc){if(this['actions'][_0x2a6bca]){if(_[_0x834e('0xf9')](this[_0x834e('0x6a')][_0x2a6bca][_0x834e('0x147')])){this['actions'][_0x2a6bca]['variables']={};}this['actions'][_0x2a6bca][_0x834e('0x147')][_0x223d48]=_0x1c03bc;}};Preview[_0x834e('0x10')][_0x834e('0x20')]=function(_0xd6f2cc){try{if(!_[_0x834e('0xf9')](_0xd6f2cc)){if(ut[_0x834e('0x148')](_[_0x834e('0x149')](_0xd6f2cc[_0x834e('0x14a')])[0x0])){this[_0x834e('0x146')](_0xd6f2cc[_0x834e('0xaa')],_[_0x834e('0x149')](_0xd6f2cc['variable'])[0x0],_0xd6f2cc[_0x834e('0x14b')]);}}}catch(_0x3552b1){logger[_0x834e('0x14c')](_0x834e('0x14d'),util[_0x834e('0x14e')](_0x3552b1,{'showHidden':![],'depth':null}));}};Preview[_0x834e('0x10')][_0x834e('0x22')]=function(_0xa4bb26){if(_0xa4bb26){if(this['actions'][_0xa4bb26[_0x834e('0x14f')]]){this[_0x834e('0x6a')][_0xa4bb26['transfertargetlinkedid']][_0x834e('0x144')]=!![];}}};Preview[_0x834e('0x10')][_0x834e('0x23')]=function(_0x3fba1d){if(_0x3fba1d){if(this['actions'][_0x3fba1d['transfererlinkedid']]){this[_0x834e('0x6a')][_0x3fba1d['transfererlinkedid']][_0x834e('0x144')]=!![];}}};module[_0x834e('0x150')]=Preview; \ No newline at end of file +var _0x34e8=['type','outbound','strategy','answered','loggedIn','pTalking','sumDuration','sumHoldTime','talking','unmanaged','loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','outboundAbandonedCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','originated','erlangCalls','erlangCallToSecond','erlangBusyFactor','startPredictive','startProgressive','Trunk','callerid','Interval','voice:queue:%s','name','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','stringify','format','voice_queue_channel:remove','sendMessageOneNotActive','available','paused','NOT_ACTIVE','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','IS_DISACTIVED','logger','syncCampaigns','hasOwnProperty','booked','clearZombieChannels','dialActive','setMessage','recallMe','clearZombieChannel','actions','[clearZombieChannels][talking]','Queue','queue','pTalking:\x20','dialAnswer','pick','contactId','UserId','VoiceQueueId','ListId','status','catch','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','decrementTalkink','loggerError','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','size','agentReadyId','then','length','getDiff','scheduledat','Agent','voicePause','logger2','[RecallMe]','disableContact','starttime','YYYY-MM-DD\x20HH:mm:ss','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','createCustomerFinal','[HistoryRecallClose]','IsNotLoggedIn','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','ACTIVE','countnosuchnumberretry','countglobal','totalGlobal','emit','[callProgressDetectingCustomer][logNoSuch]','dialGlobalMaxRetry','cloneAction','[callProgressDetectingCustomer][logNoSuchGlobal]','rescheduleContact','scheduledAt','unlockAgent','linkedid','ANSWER','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','custom:agentconnect','buildObj','connect','custom:agentConnectPreview','buildAcw','custom:agentcomplete','complete','outboundAnswerCallsDay','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','crateCustomerReportQueue','sumBillable','[syncHangup][talking][decrement]','BUSY','outboundBusyCallsDay','countbusyretry','Busy','[callProgressDetectingCustomer][logBusy]','Global','dialBusyMaxRetry','dialBusyRetryFrequency','activeContact','NOANSWER','custom:agentnoanswer','noanswer','[callProgressDetectingCustomer][logNoAnswerGlobal]','countnoanswerretry','dialNoAnswerMaxRetry','[callProgressDetectingCustomer][logNoAnswer]','dialNoAnswerRetryFrequency','CONGESTION','outboundCongestionCallsDay','countcongestionretry','Congestion','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','dialCongestionMaxRetry','countagentrejectretry','AgentReject','custom:agentreject','agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedRetryFrequency','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','dialstatus','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','isUndefined','object','reason','logAgent','NoSuchNumber','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','NoAnswer','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','isNil','phone','lookAgent','isEmpty','execCall','[Preview][execCall][success]','Queue:\x20','\x20IdHopper:\x20','idContact','custom:agentcalled','Calling','[Preview][execCall][failure]','Call\x20failed','outboundBlacklistCallsDay','logBlacklist','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','SIP/%s','unmonitored','run','execRun','unlock','active','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','Call\x20unsuccessful','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20work]','\x20Trunk\x20Backup\x20is\x20not\x20active','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','campaign\x20Name:\x20','SIP/%s/%s%s','trim','dialCutDigit','substring','getCallerId','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','originatecalleridname','extractCalleridName','originatecalleridnum','extractCalleridNumber','addVariables','merge','toLowerVariables','variablesAction','[originated][increment]','originated:\x20','OriginateError','[originateFailure][logOriginateFailure]','syncNewExten','channel','actionid','logLookAgent','responsetime','isFailure','response','unlockContact','rejected','[callProgressDetectingAgent][logAnswer]','syncHangup','[syncHangup][talking]','callProgressDetectingCustomer','[syncHangup][talking][cause]','cause','dialQueueProject','transfer','destuniqueid','addVariable','variables','filterKey','keys','variable','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','exports','util','lodash','bluebird','uuid','md5','ioredis','../../../config/environment','../../../config/logger','preview','actionPreview','./rpcDb','./util/util','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','sequence','campaignsPreview','trunks','agents','clockClearZombieChannels','originateresponse','bind','hangup','syncHangupRequest','syncDialEnd','newexten','varset','syncVarSet','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','loopCampaigns'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x34e8,0x12c));var _0x834e=function(_0x18c8b1,_0x1b726c){_0x18c8b1=_0x18c8b1-0x0;var _0x5e3e1c=_0x34e8[_0x18c8b1];return _0x5e3e1c;};'use strict';var util=require(_0x834e('0x0'));var _=require(_0x834e('0x1'));var BPromise=require(_0x834e('0x2'));var uuid=require(_0x834e('0x3'));var moment=require('moment');var md5=require(_0x834e('0x4'));var Redis=require(_0x834e('0x5'));var config=require(_0x834e('0x6'));var logger=require(_0x834e('0x7'))(_0x834e('0x8'));var loggerAction=require(_0x834e('0x7'))(_0x834e('0x9'));var ami=require('../ami');var rpcDb=require(_0x834e('0xa'));var Action=require('./action');var ut=require(_0x834e('0xb'));config[_0x834e('0xc')]=_[_0x834e('0xd')](config[_0x834e('0xc')],{'host':_0x834e('0xe'),'port':0x18eb});var io=require(_0x834e('0xf'))(new Redis(config[_0x834e('0xc')]));var Sequence=function(){};Sequence[_0x834e('0x10')][_0x834e('0x11')]=function(_0x186b3b){this[_0x834e('0x12')]=this[_0x834e('0x12')]?this[_0x834e('0x12')][_0x834e('0x13')](_0x186b3b):_0x186b3b();};function Preview(_0x293514){this[_0x834e('0x14')]=new Sequence();this[_0x834e('0x15')]=_0x293514['voiceQueues'];this[_0x834e('0x16')]=_0x293514[_0x834e('0x16')];this['actions']={};this[_0x834e('0x17')]=_0x293514[_0x834e('0x17')];this[_0x834e('0x18')]=0x0;ami['on'](_0x834e('0x19'),this['syncOriginateResponse'][_0x834e('0x1a')](this));ami['on'](_0x834e('0x1b'),this['syncHangup'][_0x834e('0x1a')](this));ami['on']('hanguprequest',this[_0x834e('0x1c')][_0x834e('0x1a')](this));ami['on']('dialend',this[_0x834e('0x1d')][_0x834e('0x1a')](this));ami['on'](_0x834e('0x1e'),this['syncNewExten'][_0x834e('0x1a')](this));ami['on'](_0x834e('0x1f'),this[_0x834e('0x20')][_0x834e('0x1a')](this));ami['on'](_0x834e('0x21'),this[_0x834e('0x22')][_0x834e('0x1a')](this));ami['on']('blindtransfer',this[_0x834e('0x23')][_0x834e('0x1a')](this));this[_0x834e('0x24')](this[_0x834e('0x15')]);}function emit(_0x4ab05d,_0x45a630,_0x62f8f1){io['to'](_0x4ab05d)['emit'](_0x45a630,_0x62f8f1);}function emitCampaignPreview(_0x1b4bdf){if(_0x1b4bdf[_0x834e('0x25')]===_0x834e('0x26')){var _0x5c55ca={'id':_0x1b4bdf['id'],'name':_0x1b4bdf['name'],'strategy':_0x1b4bdf[_0x834e('0x27')],'answered':_0x1b4bdf[_0x834e('0x28')],'available':_0x1b4bdf['available'],'loggedIn':_0x1b4bdf[_0x834e('0x29')],'pTalking':_0x1b4bdf[_0x834e('0x2a')],'sumBillable':_0x1b4bdf['sumBillable'],'sumDuration':_0x1b4bdf[_0x834e('0x2b')],'sumHoldTime':_0x1b4bdf[_0x834e('0x2c')]||0x0,'talking':_0x1b4bdf[_0x834e('0x2d')],'total':_0x1b4bdf['total'],'type':_0x1b4bdf[_0x834e('0x25')],'unmanaged':_0x1b4bdf[_0x834e('0x2e')],'abandoned':_0x1b4bdf['abandoned'],'waiting':_0x1b4bdf['waiting'],'loggedInDb':_0x1b4bdf[_0x834e('0x2f')],'dialActive':_0x1b4bdf['dialActive'],'dialMethod':_0x1b4bdf[_0x834e('0x30')],'dialOriginateCallerIdName':_0x1b4bdf[_0x834e('0x31')],'dialOriginateCallerIdNumber':_0x1b4bdf[_0x834e('0x32')],'dialOriginateTimeout':_0x1b4bdf[_0x834e('0x33')],'dialPrefix':_0x1b4bdf[_0x834e('0x34')],'outboundAnswerAgiCallsDay':_0x1b4bdf[_0x834e('0x35')],'outboundAnswerCallsDay':_0x1b4bdf['outboundAnswerCallsDay'],'outboundBlacklistCallsDay':_0x1b4bdf['outboundBlacklistCallsDay'],'outboundBusyCallsDay':_0x1b4bdf['outboundBusyCallsDay'],'outboundCongestionCallsDay':_0x1b4bdf['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x1b4bdf[_0x834e('0x36')],'outboundDropCallsDayCallersExit':_0x1b4bdf[_0x834e('0x37')],'outboundDropCallsDayTimeout':_0x1b4bdf[_0x834e('0x38')],'outboundNoAnswerCallsDay':_0x1b4bdf['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x1b4bdf[_0x834e('0x39')],'outboundOriginateFailureCallsDay':_0x1b4bdf[_0x834e('0x3a')],'outboundReCallsDay':_0x1b4bdf[_0x834e('0x3b')],'outboundRejectCallsDay':_0x1b4bdf[_0x834e('0x3c')],'outboundUnknownCallsDay':_0x1b4bdf[_0x834e('0x3d')],'outboundAbandonedCallsDay':_0x1b4bdf[_0x834e('0x3e')],'predictiveIntervalAnsweredCalls':_0x1b4bdf[_0x834e('0x3f')],'predictiveIntervalAvgHoldtime':_0x1b4bdf[_0x834e('0x40')],'predictiveIntervalAvgTalktime':_0x1b4bdf[_0x834e('0x41')],'predictiveIntervalDroppedCallsCallersExit':_0x1b4bdf['predictiveIntervalDroppedCallsCallersExit'],'predictiveIntervalDroppedCallsTimeout':_0x1b4bdf[_0x834e('0x42')],'predictiveIntervalErlangCalls':_0x1b4bdf['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x1b4bdf[_0x834e('0x43')],'predictiveIntervalHitRate':_0x1b4bdf[_0x834e('0x44')],'predictiveIntervalMultiplicativeFactor':_0x1b4bdf[_0x834e('0x45')],'predictiveIntervalPauses':_0x1b4bdf[_0x834e('0x46')],'predictiveIntervalAvailable':_0x1b4bdf[_0x834e('0x47')],'predictiveIntervalTotalCalls':_0x1b4bdf[_0x834e('0x48')],'message':_0x1b4bdf[_0x834e('0x49')],'originated':_0x1b4bdf[_0x834e('0x4a')],'erlangCalls':_0x1b4bdf[_0x834e('0x4b')],'erlangCallToSecond':_0x1b4bdf[_0x834e('0x4c')],'erlangAbandonmentRate':_0x1b4bdf['erlangAbandonmentRate'],'erlangBusyFactor':_0x1b4bdf[_0x834e('0x4d')],'startPredictive':_0x1b4bdf[_0x834e('0x4e')],'startProgressive':_0x1b4bdf[_0x834e('0x4f')]};if(_0x1b4bdf[_0x834e('0x50')]){_0x5c55ca['Trunk']={'id':_0x1b4bdf[_0x834e('0x50')]['id'],'name':_0x1b4bdf[_0x834e('0x50')]['name'],'active':_0x1b4bdf['Trunk']['active'],'callerid':_0x1b4bdf[_0x834e('0x50')][_0x834e('0x51')]};}if(_0x1b4bdf[_0x834e('0x52')]){_0x5c55ca[_0x834e('0x52')]={'id':_0x1b4bdf[_0x834e('0x52')]['id'],'name':_0x1b4bdf[_0x834e('0x52')]['name']};}var _0x2c2d94=md5(JSON['stringify'](_0x5c55ca));if(_0x1b4bdf[_0x834e('0x4')]!==_0x2c2d94){_0x1b4bdf[_0x834e('0x4')]=_0x2c2d94;emit(util['format'](_0x834e('0x53'),_0x5c55ca[_0x834e('0x54')]),'voice_queue:save',_0x5c55ca);}}}function emitVoiceQueueChannelRemove(_0x481f70){logger[_0x834e('0x55')](_0x834e('0x56'),JSON[_0x834e('0x57')](_0x481f70));emit(util[_0x834e('0x58')](_0x834e('0x53'),_0x481f70['name']),_0x834e('0x59'),_0x481f70);}function notSendMessagesQueue(_0x548d1d){if(_0x548d1d['sendMessageOneNotActive']){if(_0x548d1d[_0x834e('0x4a')]===0x0&&_0x548d1d['pTalking']===0x0){_0x548d1d[_0x834e('0x5a')]=![];_0x548d1d[_0x834e('0x5b')]=0x0;_0x548d1d[_0x834e('0x5c')]=0x0;_0x548d1d[_0x834e('0x49')]=_0x834e('0x5d');ut['logger'](_0x834e('0x5e'),_0x548d1d[_0x834e('0x54')]+_0x834e('0x5f'));}else{_0x548d1d['message']=_0x834e('0x60');ut[_0x834e('0x61')]('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x548d1d[_0x834e('0x54')]+'\x20is\x20disactive');}emitCampaignPreview(_0x548d1d);}}Preview[_0x834e('0x10')][_0x834e('0x24')]=function(){var _0x4a18bb=this;setInterval(function(){_0x4a18bb['syncCampaigns']();},0x7cf);};Preview[_0x834e('0x10')][_0x834e('0x62')]=function(){var _0x3bcbf4=this[_0x834e('0x15')];this[_0x834e('0x18')]+=0x1;for(var _0x23feea in _0x3bcbf4){if(_0x3bcbf4[_0x834e('0x63')](_0x23feea)&&(_0x3bcbf4[_0x23feea]['dialMethod']===_0x834e('0x8')||_0x3bcbf4[_0x23feea]['dialMethod']===_0x834e('0x64'))&&_0x3bcbf4[_0x23feea]['type']===_0x834e('0x26')){if(this['clockClearZombieChannels']>0x7){this[_0x834e('0x18')]=0x0;this[_0x834e('0x65')]();}}if(_0x3bcbf4['hasOwnProperty'](_0x23feea)&&_0x3bcbf4[_0x23feea][_0x834e('0x30')]===_0x834e('0x8')&&_0x3bcbf4[_0x23feea][_0x834e('0x25')]===_0x834e('0x26')){if(_0x3bcbf4[_0x23feea][_0x834e('0x66')]){this[_0x834e('0x67')](_0x3bcbf4[_0x23feea]);this[_0x834e('0x68')](_0x3bcbf4[_0x23feea]);}else{notSendMessagesQueue(_0x3bcbf4[_0x23feea]);}}}};Preview[_0x834e('0x10')][_0x834e('0x69')]=function(_0x279ea1){var _0x5f3943=this;this[_0x834e('0x14')][_0x834e('0x11')](function(){if(!_['isNil'](_0x5f3943[_0x834e('0x6a')][_0x279ea1])){loggerAction[_0x834e('0x55')](_0x834e('0x6b'),_0x279ea1,_0x834e('0x6c'),_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')],'originated:\x20',JSON['stringify'](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]][_0x834e('0x4a')]),_0x834e('0x6e'),JSON[_0x834e('0x57')](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]][_0x834e('0x2a')]),JSON[_0x834e('0x57')](_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6f')]),JSON[_0x834e('0x57')](_[_0x834e('0x70')](_0x5f3943[_0x834e('0x6a')][_0x279ea1],[_0x834e('0x71'),_0x834e('0x72'),_0x834e('0x73'),_0x834e('0x74')])));return ami['Action']({'action':_0x834e('0x75'),'channel':_0x5f3943[_0x834e('0x6a')][_0x279ea1]['channel']})[_0x834e('0x76')](function(_0x3b0988){if(_0x3b0988['message']===_0x834e('0x77')){setTimeout(function(){if(_0x5f3943[_0x834e('0x6a')][_0x279ea1]){ut[_0x834e('0x78')](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]],_0x834e('0x79'));if(_0x5f3943['actions'][_0x279ea1][_0x834e('0x6f')]===!![]){ut[_0x834e('0x7a')](_0x5f3943[_0x834e('0x15')][_0x5f3943[_0x834e('0x6a')][_0x279ea1][_0x834e('0x6d')]],_0x834e('0x79'));ut[_0x834e('0x7b')](_0x834e('0x7c')+_0x279ea1,_0x5f3943['actions'][_0x279ea1][_0x834e('0x6d')]);}ut['loggerError'](_0x834e('0x7d')+_0x279ea1,_0x5f3943['actions'][_0x279ea1][_0x834e('0x6d')]);delete _0x5f3943['actions'][_0x279ea1];}},0x2328);}});}});};Preview['prototype'][_0x834e('0x65')]=function(){var _0x3e1bee=this;loggerAction['info']('[action]',_[_0x834e('0x7e')](this[_0x834e('0x6a')]));for(var _0x138ed2 in this[_0x834e('0x6a')]){if(_0x3e1bee[_0x834e('0x6a')][_0x834e('0x63')](_0x138ed2)){_0x3e1bee[_0x834e('0x69')](_0x138ed2);}}};Preview[_0x834e('0x10')]['recallMe']=function(_0x142334){var _0x3c70bf=this;rpcDb['getContactRecallMe'](_0x142334['id'],ut[_0x834e('0x7f')](this['agents']))[_0x834e('0x80')](function(_0x45eceb){if(!_['isNil'](_0x45eceb)){for(var _0x41ef86=0x0;_0x41ef86<_0x45eceb[_0x834e('0x81')];_0x41ef86+=0x1){if(ut[_0x834e('0x82')](_0x45eceb[_0x41ef86][_0x834e('0x83')])<_0x142334['dialRecallMeTimeout']*0x3c){if(_0x45eceb[_0x41ef86][_0x834e('0x84')]&&!_0x45eceb[_0x41ef86][_0x834e('0x84')][_0x834e('0x85')]){_0x3c70bf['run'](_0x45eceb[_0x41ef86]['id'])[_0x834e('0x80')](ut[_0x834e('0x86')](_0x834e('0x87')))[_0x834e('0x76')](ut[_0x834e('0x86')](_0x834e('0x87')));}else{rpcDb[_0x834e('0x88')](_0x45eceb[_0x41ef86]['id']);}}else{var _0x1def00=new Action(_0x45eceb[_0x41ef86],_0x142334);_0x1def00[_0x834e('0x89')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));_0x142334[_0x834e('0x3b')]+=0x1;ut[_0x834e('0x8b')](_0x1def00,0x17,_0x834e('0x8c'));if(_0x142334[_0x834e('0x8d')]){rpcDb[_0x834e('0x8e')](ut[_0x834e('0x8f')](_0x45eceb[_0x41ef86]));rpcDb[_0x834e('0x90')](_0x1def00,_0x834e('0x91'));}else{ut[_0x834e('0x8b')](_0x1def00,0x16,_0x834e('0x92'));rpcDb[_0x834e('0x90')](_0x1def00,'[HistoryRecallClose]');rpcDb[_0x834e('0x93')](_0x1def00,_0x834e('0x94'));}}}}})[_0x834e('0x76')](ut[_0x834e('0x86')]('[getContactRecallMe]'));};Preview[_0x834e('0x10')]['setMessage']=function(_0x56a152){_0x56a152[_0x834e('0x5a')]=!![];if(ut[_0x834e('0x95')](_0x56a152[_0x834e('0x29')])){_0x56a152[_0x834e('0x49')]=_0x834e('0x96');}else if(!ut[_0x834e('0x97')](_0x56a152[_0x834e('0x66')])){_0x56a152[_0x834e('0x49')]='NOT_ACTIVE';}else if(!this[_0x834e('0x98')](_0x56a152['Trunk'])){if(!this[_0x834e('0x98')](_0x56a152[_0x834e('0x99')])){_0x56a152['message']='TRUNK_IS_NOT_REACHABLE';}else{_0x56a152[_0x834e('0x49')]=_0x834e('0x9a');}}else{_0x56a152[_0x834e('0x49')]=_0x834e('0x9a');}emitCampaignPreview(_0x56a152);};Preview[_0x834e('0x10')]['callProgressDetectingCustomer']=function(_0x2b0d93,_0x15018f,_0x2df64f){var _0x228a60=this;var _0x3181af=this[_0x834e('0x6a')][_0x15018f];var _0x87818b=this[_0x834e('0x15')][_0x3181af[_0x834e('0x6d')]];var _0x324f67;if(_0x87818b){switch(_0x2df64f){case'1':_0x87818b['outboundNoSuchCallsDay']+=0x1;_0x3181af[_0x834e('0x9b')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x0,'NoSuchNumber');ami[_0x834e('0x9e')]('custom:agentnosuchnumber',ut['buildObj'](_0x3181af,'nosuchnumber'));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0x9f'));if(ut['totalGlobal'](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,'Global');rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xa2'));}else{if(_0x3181af['countnosuchnumberretry']>=_0x87818b['dialNoSuchNumberMaxRetry']){rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xa2'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0x9b'),_0x87818b['dialNoSuchNumberRetryFrequency']),_0x3181af[_0x834e('0xa5')],_0x3181af['activeContact']);}}delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xa6')]];break;case _0x834e('0xa7'):var _0x5afb41=moment()[_0x834e('0x58')](_0x834e('0x8a'));_0x3181af['responsetime']=_0x5afb41;_0x3181af[_0x834e('0xa8')]=_0x5afb41;_0x3181af[_0x834e('0x6f')]=!![];_0x87818b[_0x834e('0x2a')]+=0x1;logger['info'](_0x834e('0xa9'),_0x3181af[_0x834e('0xaa')],_0x834e('0xab'),_0x87818b[_0x834e('0x54')],_0x834e('0x6e'),_0x87818b[_0x834e('0x2a')]);ami[_0x834e('0x9e')](_0x834e('0xac'),ut[_0x834e('0xad')](_0x3181af,_0x834e('0xae'),this['campaignsPreview'][_0x3181af['queue']]));if(_0x87818b['acw']){ami[_0x834e('0x9e')](_0x834e('0xaf'),ut[_0x834e('0xb0')](_0x3181af));}break;case'16':ami[_0x834e('0x9e')](_0x834e('0xb1'),ut['buildObj'](_0x3181af,'complete',this[_0x834e('0x15')][_0x3181af[_0x834e('0x6d')]]));emitVoiceQueueChannelRemove(ut[_0x834e('0xad')](_0x3181af,_0x834e('0xb2')));_0x87818b[_0x834e('0xb3')]+=0x1;_0x87818b['total']+=0x1;_0x87818b[_0x834e('0x28')]+=0x1;ut[_0x834e('0x7a')](_0x87818b,_0x834e('0xb4'));_0x3181af['countglobal']=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x4,_0x834e('0xb5'));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xb6'));rpcDb['createCustomerFinal'](_0x3181af,'[callProgressDetectingCustomer][logAnswerGlobal]');rpcDb[_0x834e('0xb7')](_0x3181af);_0x87818b[_0x834e('0x2b')]+=_0x3181af['talktime'];_0x87818b[_0x834e('0xb8')]+=_0x3181af['talktime'];logger[_0x834e('0x55')](_0x834e('0xb9'),_0x3181af[_0x834e('0xaa')],'\x20Queue',_0x87818b[_0x834e('0x54')],'pTalking:\x20',_0x87818b['pTalking']);delete this['actions'][_0x2b0d93[_0x834e('0xa6')]];break;case _0x834e('0xba'):_0x87818b[_0x834e('0xbb')]+=0x1;_0x3181af[_0x834e('0xbc')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x5,_0x834e('0xbd'));ami[_0x834e('0x9e')]('custom:agentbusy',ut[_0x834e('0xad')](_0x3181af,'busy'));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xbe'));if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb['createCustomerFinal'](_0x324f67,'[callProgressDetectingCustomer][logBusyGlobal]');}else{if(_0x3181af[_0x834e('0xbc')]>=_0x87818b[_0x834e('0xc0')]){rpcDb['createCustomerFinal'](_0x3181af,_0x834e('0xbe'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xbc'),_0x87818b[_0x834e('0xc1')]),_0x3181af['unlockAgent'],_0x3181af[_0x834e('0xc2')]);}}break;case _0x834e('0xc3'):_0x87818b['outboundNoAnswerCallsDay']+=0x1;_0x3181af['countnoanswerretry']+=0x1;_0x3181af['countglobal']=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x3,'NoAnswer');ami[_0x834e('0x9e')](_0x834e('0xc4'),ut['buildObj'](_0x3181af,_0x834e('0xc5')));rpcDb['createCustomerHistory'](_0x3181af,'[callProgressDetectingCustomer][logNoAnswer]');if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb['createCustomerFinal'](_0x324f67,_0x834e('0xc6'));}else{if(_0x3181af[_0x834e('0xc7')]>=_0x87818b[_0x834e('0xc8')]){rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xc9'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xc7'),_0x87818b[_0x834e('0xca')]),_0x3181af[_0x834e('0xa5')],_0x3181af[_0x834e('0xc2')]);}}break;case _0x834e('0xcb'):_0x87818b[_0x834e('0xcc')]+=0x1;_0x3181af[_0x834e('0xcd')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x8,_0x834e('0xce'));ami[_0x834e('0x9e')](_0x834e('0xcf'),ut[_0x834e('0xad')](_0x3181af,_0x834e('0xd0')));rpcDb['createCustomerHistory'](_0x3181af,_0x834e('0xd1'));if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xd2'));}else{if(_0x3181af[_0x834e('0xcd')]>=_0x87818b[_0x834e('0xd3')]){rpcDb['createCustomerFinal'](_0x3181af,'[callProgressDetectingCustomer][logCongestion]');}else{rpcDb['rescheduleContact'](ut[_0x834e('0xa4')](_0x3181af,'countcongestionretry',_0x87818b[_0x834e('0xc1')]),_0x3181af[_0x834e('0xa5')],_0x3181af[_0x834e('0xc2')]);}}break;case'CANCEL':_0x87818b[_0x834e('0x3c')]+=0x1;_0x3181af[_0x834e('0xd4')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0x14,_0x834e('0xd5'));ami['emit'](_0x834e('0xd6'),ut[_0x834e('0xad')](_0x3181af,_0x834e('0xd7')));rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xd8'));if(ut['totalGlobal'](_0x3181af)>=_0x87818b['dialGlobalMaxRetry']){_0x324f67=ut['cloneAction'](_0x3181af,0x14,'AgentReject');rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xd9'));}else{if(_0x3181af['countagentrejectretry']>=_0x87818b[_0x834e('0xda')]){rpcDb[_0x834e('0x93')](_0x3181af,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xd4'),_0x87818b[_0x834e('0xdb')]),_0x3181af[_0x834e('0xa5')],_0x3181af[_0x834e('0xc2')]);}}break;case'ABANDONED':_0x87818b['outboundAbandonedCallsDay']+=0x1;_0x3181af[_0x834e('0xdc')]+=0x1;_0x3181af[_0x834e('0x9c')]=ut[_0x834e('0x9d')](_0x3181af);ut['logCustomer'](_0x3181af,0xb,_0x834e('0xdd'));rpcDb[_0x834e('0x90')](_0x3181af,'[callProgressDetectingCustomer][logAbandoned]');if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb['createCustomerFinal'](_0x324f67,_0x834e('0xde'));}else{if(_0x3181af['countabandonedetry']>=_0x87818b['dialAbandonedMaxRety']){rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xde'));}else{rpcDb[_0x834e('0xa3')](ut[_0x834e('0xa4')](_0x3181af,_0x834e('0xdc'),_0x87818b[_0x834e('0xdf')]),_0x3181af['unlockAgent'],_0x3181af['activeContact']);}}break;default:if(_0x3181af[_0x834e('0x6f')]){ut[_0x834e('0x7a')](_0x87818b,_0x834e('0xe0'));ut[_0x834e('0x7b')](_0x834e('0xe1')+_0x87818b[_0x834e('0x54')],_0x2b0d93);}_0x87818b[_0x834e('0x3d')]+=0x1;_0x3181af['countglobal']=ut[_0x834e('0x9d')](_0x3181af);ut[_0x834e('0x8b')](_0x3181af,0xc,_0x2b0d93['cause-txt']||_0x2b0d93[_0x834e('0xe2')]);rpcDb[_0x834e('0x90')](_0x3181af,_0x834e('0xe3'));if(ut[_0x834e('0x9d')](_0x3181af)>=_0x87818b[_0x834e('0xa0')]){_0x324f67=ut[_0x834e('0xa1')](_0x3181af,0xf,_0x834e('0xbf'));rpcDb[_0x834e('0x93')](_0x324f67,_0x834e('0xe4'));}else{rpcDb[_0x834e('0x93')](_0x3181af,_0x834e('0xe4'));}delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xa6')]];}if(!(_0x3181af[_0x834e('0x6f')]&&_0x2df64f==='16')){ut['updateOriginated'](_0x87818b,_0x834e('0xe5'));logger[_0x834e('0x55')]('[originated][decrement][callProgressDetectingCustomer]',_0x3181af[_0x834e('0xaa')],'\x20Queue',_0x87818b[_0x834e('0x54')],'originated:\x20',_0x87818b[_0x834e('0x4a')]);}if(_0x2df64f!=='ANSWER'){delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xa6')]];delete this[_0x834e('0x6a')][_0x2b0d93[_0x834e('0xe6')]];}}};Preview['prototype'][_0x834e('0xe7')]=function(_0x38085e,_0x375fec,_0x2247f7){if(_[_0x834e('0xe8')](_0x375fec)&&_0x834e('0xe9')!==typeof _0x375fec){return;}if(_[_0x834e('0xe8')](_0x2247f7)&&_0x834e('0xe9')!==typeof _0x2247f7){return;}switch(_0x2247f7[_0x834e('0xea')]){case'0':ut[_0x834e('0xeb')](_0x38085e,0x0,_0x834e('0xec'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xee'));break;case'3':ut[_0x834e('0xeb')](_0x38085e,0x3,_0x834e('0xef'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf0'));break;case'5':ut['logAgent'](_0x38085e,0x5,'Busy');rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf1'));break;case'8':ut[_0x834e('0xeb')](_0x38085e,0x8,_0x834e('0xce'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf2'));break;case'22':ut[_0x834e('0xeb')](_0x38085e,0x16,_0x834e('0xf3'));rpcDb[_0x834e('0xed')](_0x38085e,_0x834e('0xf4'));break;default:ut[_0x834e('0xeb')](_0x38085e,0xc,_0x2247f7[_0x834e('0xea')]);rpcDb['createAgentHistory'](_0x38085e,_0x834e('0xf2'));}ut['updateOriginated'](_0x375fec,_0x834e('0xf5'));logger[_0x834e('0x55')](_0x834e('0xf6'),_0x38085e['uniqueid'],_0x834e('0xab'),_0x375fec[_0x834e('0x54')],'originated:\x20',_0x375fec['originated']);delete this[_0x834e('0x6a')][_0x38085e[_0x834e('0xaa')]];};Preview['prototype'][_0x834e('0xf7')]=function(_0x132edd,_0x4643d9,_0x135219,_0x170ec2,_0x5e6fff){var _0x4e7545=this;return new BPromise(function(_0x453e58,_0x5dd31e){if(_['isNil'](_0x4643d9)||_['isNil'](_0x4643d9[_0x834e('0xf8')])||_[_0x834e('0xf9')](_0x4643d9['Contact'][_0x834e('0xfa')])||_[_0x834e('0xf9')](_0x4643d9[_0x834e('0x73')])){_0x5dd31e(ut[_0x834e('0x49')]('Contact\x20is\x20undefined',_0x170ec2,_0x5e6fff));return;}var _0x1998ba=uuid['v4']();var _0x288eb1=_0x4e7545[_0x834e('0x15')][_0x4643d9['Queue'][_0x834e('0x54')]];var _0x5f3b7d=_0x135219?_0x4e7545[_0x834e('0x17')][_0x135219]['id']:undefined;_0x4e7545['actions'][_0x1998ba]=new Action(_0x4643d9,_0x288eb1,_0x1998ba,_0x135219,_0x5f3b7d);var _0x461420=_0x4e7545[_0x834e('0x6a')][_0x1998ba];_0x461420['unlockAgent']=_0x170ec2;_0x461420[_0x834e('0xc2')]=_0x5e6fff;_0x461420[_0x834e('0xfb')]=_0x135219;if(_[_0x834e('0xfc')](_0x132edd)){_0x4e7545[_0x834e('0xfd')](_0x461420,_0x288eb1,_0x4643d9,_0x135219)[_0x834e('0x80')](function(_0x24d77c){logger['info'](_0x834e('0xfe'),_0x834e('0xff')+_0x461420[_0x834e('0x6d')]+_0x834e('0x100')+_0x461420[_0x834e('0x101')],JSON[_0x834e('0x57')](_0x24d77c));ami['emit'](_0x834e('0x102'),ut['buildObj'](_0x461420,'called',_0x4e7545[_0x834e('0x15')][_0x461420['queue']]));_0x453e58(ut['message'](_0x834e('0x103')));})[_0x834e('0x76')](function(_0x257fed){ut[_0x834e('0x61')](_0x834e('0x104'),_0x257fed);_0x5dd31e(ut[_0x834e('0x49')](_0x834e('0x105'),_0x170ec2,_0x5e6fff));});}else{_0x288eb1[_0x834e('0x106')]+=0x1;ut[_0x834e('0x107')](_0x461420);rpcDb[_0x834e('0x108')](_0x461420,_0x834e('0x109'));delete _0x4e7545[_0x834e('0x6a')][_0x1998ba];_0x5dd31e(ut[_0x834e('0x49')](_0x834e('0x10a'),_0x170ec2,_0x5e6fff));}});};Preview['prototype'][_0x834e('0x98')]=function(_0x4874e1){return!_[_0x834e('0xf9')](_0x4874e1)&&!_[_0x834e('0xf9')](_0x4874e1[_0x834e('0x54')])&&!_[_0x834e('0xf9')](_0x4874e1['active'])&&_0x4874e1['active']&&!_[_0x834e('0xf9')](this[_0x834e('0x16')][util['format'](_0x834e('0x10b'),_0x4874e1[_0x834e('0x54')])])&&!_['isNil'](this[_0x834e('0x16')][util[_0x834e('0x58')](_0x834e('0x10b'),_0x4874e1[_0x834e('0x54')])]['status'])&&(this['trunks'][util['format']('SIP/%s',_0x4874e1[_0x834e('0x54')])][_0x834e('0x75')]==='reachable'||this[_0x834e('0x16')][util['format'](_0x834e('0x10b'),_0x4874e1[_0x834e('0x54')])][_0x834e('0x75')]===_0x834e('0x10c'));};Preview[_0x834e('0x10')][_0x834e('0x10d')]=function(_0x3c775f,_0x4fc61d){var _0x12a0f3=this;return new BPromise(function(_0x20d52f,_0x59ac23){_0x12a0f3[_0x834e('0x10e')](_0x3c775f,_0x4fc61d)[_0x834e('0x80')](function(_0x536f66){_0x20d52f(_['pick'](_0x536f66,['message']));})[_0x834e('0x76')](function(_0x19e17b){if(_0x19e17b[_0x834e('0x10f')]){rpcDb['unlockContact'](_0x3c775f);}if(_0x19e17b[_0x834e('0x110')]){rpcDb[_0x834e('0x88')](_0x3c775f);}_0x59ac23(_[_0x834e('0x70')](_0x19e17b,[_0x834e('0x49')]));});});};Preview[_0x834e('0x10')][_0x834e('0x10e')]=function(_0x19cb0b,_0x13af70){var _0x8804a8=this;return new BPromise(function(_0x102640,_0x48b6c4){var _0x5d6b66,_0x117e8f;rpcDb[_0x834e('0x111')](_0x19cb0b)[_0x834e('0x80')](function(_0x3eda93){if(!_[_0x834e('0xf9')](_0x3eda93[0x0])){_0x117e8f=_0x3eda93[0x0][_0x834e('0x112')]?![]:!![];_0x5d6b66=_0x3eda93[0x0][_0x834e('0x112')]?!![]:![];_0x5d6b66=_0x13af70?!![]:_0x5d6b66;}var _0x39210f=_0x8804a8[_0x834e('0x113')](_0x3eda93);if(_0x39210f[_0x834e('0x114')]){rpcDb[_0x834e('0x115')](_[_0x834e('0x70')](_0x3eda93[0x0],[_0x834e('0x73'),'Contact.phone']))[_0x834e('0x80')](function(_0x3b13be){_0x8804a8[_0x834e('0xf7')](_0x3b13be,_0x3eda93[0x0],_0x13af70,_0x117e8f,_0x5d6b66)[_0x834e('0x80')](function(_0x495697){_0x102640(_0x495697);})['catch'](function(_0x4e7c43){_0x48b6c4(_0x4e7c43);});})[_0x834e('0x76')](function(_0xf98fb4){ut[_0x834e('0x61')](_0x834e('0x116'),_0xf98fb4);_0x48b6c4(ut[_0x834e('0x49')](_0x834e('0x117'),_0x117e8f,_0x5d6b66));});}else{_0x48b6c4(ut[_0x834e('0x49')](_0x39210f[_0x834e('0x49')],_0x117e8f,_0x5d6b66));}})['catch'](function(_0x58ff66){ut['logger']('[Preview][getContactPreview]',_0x58ff66);_0x48b6c4(ut[_0x834e('0x49')](_0x834e('0x117'),![],!![]));});});};Preview[_0x834e('0x10')][_0x834e('0x113')]=function(_0x72f950){if(_[_0x834e('0xf9')](_0x72f950)||_[_0x834e('0xfc')](_0x72f950)||!_[_0x834e('0xf9')](_0x72f950[0x0][_0x834e('0x84')])&&_['isNil'](_0x72f950[0x0]['Agent']['name'])){ut['logger'](_0x834e('0x118'),_0x72f950);return{'isValid':![],'message':_0x834e('0x119')};}var _0x284183=this[_0x834e('0x15')][_0x72f950[0x0][_0x834e('0x6c')][_0x834e('0x54')]];_0x284183[_0x834e('0x49')]=_0x834e('0x9a');if(_[_0x834e('0xf9')](_0x284183)){ut[_0x834e('0x61')](_0x834e('0x11a'),_0x284183);return{'isValid':![],'message':_0x834e('0x11b')};}if(!this[_0x834e('0x98')](_0x284183[_0x834e('0x50')])){ut[_0x834e('0x61')](_0x834e('0x11c'),'campaign\x20Name:\x20'+_0x284183[_0x834e('0x54')]+'\x20Trunk\x20is\x20not\x20active');if(!this[_0x834e('0x98')](_0x284183[_0x834e('0x99')])){ut[_0x834e('0x61')]('[Preview][validateContact][Trunk\x20not\x20work]',_0x284183[_0x834e('0x54')]+_0x834e('0x11d'));return{'isValid':![],'message':'Trunk\x20not\x20work'};}}if(!ut['isActive'](_0x284183[_0x834e('0x66')])){ut[_0x834e('0x61')](_0x834e('0x11e'),_0x284183[_0x834e('0x54')]+_0x834e('0x11f'));return{'isValid':![],'message':_0x834e('0x120')+_0x284183[_0x834e('0x54')]+_0x834e('0x11f')};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview[_0x834e('0x10')][_0x834e('0xfd')]=function(_0x375e40,_0x1d4947,_0x1912e6,_0x614e15){var _0x17aaae=this;return new BPromise(function(_0x58ebc8,_0x40a92a){var _0x59e298=_0x375e40['uniqueid'];var _0x1115b7=_0x17aaae[_0x834e('0x98')](_0x1d4947['Trunk'])?util[_0x834e('0x58')](_0x834e('0x121'),_0x1d4947['Trunk'][_0x834e('0x54')],_[_0x834e('0xf9')](_0x1d4947['dialPrefix'])?'':_0x1d4947['dialPrefix'][_0x834e('0x122')]()||'',_0x1d4947[_0x834e('0x123')]>0x0?_0x1912e6['Contact']['phone'][_0x834e('0x124')](_0x1d4947[_0x834e('0x123')]):_0x1912e6['Contact']['phone']):util['format']('SIP/%s/%s%s',_[_0x834e('0xf9')](_0x1d4947['TrunkBackup'])?_0x1d4947[_0x834e('0x50')]['name']:_0x1d4947[_0x834e('0x99')][_0x834e('0x54')],_[_0x834e('0xf9')](_0x1d4947[_0x834e('0x34')])?'':_0x1d4947['dialPrefix'][_0x834e('0x122')]()||'',_0x1d4947[_0x834e('0x123')]>0x0?_0x1912e6[_0x834e('0xf8')][_0x834e('0xfa')][_0x834e('0x124')](_0x1d4947[_0x834e('0x123')]):_0x1912e6[_0x834e('0xf8')][_0x834e('0xfa')]);var _0x464ae6=_0x17aaae[_0x834e('0x98')](_0x1d4947['Trunk'])?ut[_0x834e('0x125')](_0x1d4947['Trunk'][_0x834e('0x51')],_0x1d4947[_0x834e('0x31')],_0x1d4947[_0x834e('0x126')]>0x0?ut[_0x834e('0x127')](_0x1d4947[_0x834e('0x32')],_0x1d4947['dialRandomLastDigitCallerIdNumber']):_0x1d4947[_0x834e('0x32')]):ut['getCallerId'](_['isNil'](_0x1d4947[_0x834e('0x99')])?_0x1d4947[_0x834e('0x50')][_0x834e('0x51')]:_0x1d4947['TrunkBackup'][_0x834e('0x51')],_0x1d4947[_0x834e('0x31')],_0x1d4947[_0x834e('0x126')]>0x0?ut[_0x834e('0x127')](_0x1d4947[_0x834e('0x32')],_0x1d4947[_0x834e('0x126')]):_0x1d4947[_0x834e('0x32')]);if(_0x464ae6){_0x375e40[_0x834e('0x128')]=ut[_0x834e('0x129')](_0x464ae6);_0x375e40[_0x834e('0x12a')]=ut[_0x834e('0x12b')](_0x464ae6);}var _0x578204=ut[_0x834e('0x12c')](_0x1d4947,_0x1912e6,_0x1115b7,_0x464ae6,_0x59e298,_0x375e40);_[_0x834e('0x12d')](_0x375e40,ut[_0x834e('0x12e')](_0x578204));_0x375e40[_0x834e('0x89')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));ami['Action'](ut[_0x834e('0x12f')](_0x375e40,_0x1d4947,_0x578204,_0x375e40[_0x834e('0xc2')],_0x614e15))[_0x834e('0x80')](function(_0x37dea1){_0x1d4947[_0x834e('0x4a')]+=0x1;logger[_0x834e('0x55')](_0x834e('0x130'),_0x59e298,_0x834e('0xab'),_0x1d4947[_0x834e('0x54')],_0x834e('0x131'),_0x1d4947['originated']);_0x58ebc8(_0x37dea1);})['catch'](function(_0x5f339f){ut['logAgent'](_0x375e40,0xe,_0x834e('0x132'));rpcDb[_0x834e('0xed')](_0x375e40,_0x834e('0x133'));_0x40a92a(_0x5f339f);});});};Preview[_0x834e('0x10')][_0x834e('0x134')]=function(_0x1d53c6){if(this['actions'][_0x1d53c6[_0x834e('0xa6')]]){this['actions'][_0x1d53c6['linkedid']]['channel']=_0x1d53c6[_0x834e('0x135')];}};Preview[_0x834e('0x10')]['syncOriginateResponse']=function(_0x5cb379){var _0x494e08=this;var _0x2515f6=this[_0x834e('0x6a')][_0x5cb379[_0x834e('0x136')]];if(_0x2515f6){if(_0x2515f6['lookAgent']&&this[_0x834e('0x17')][_0x2515f6[_0x834e('0xfb')]]){ut[_0x834e('0x137')](_0x2515f6,this[_0x834e('0x17')][_0x2515f6[_0x834e('0xfb')]][_0x834e('0x54')],this['agents'][_0x2515f6['lookAgent']]['id']);}var _0x5c7fe3=_['clone'](_0x2515f6);_0x5c7fe3[_0x834e('0x138')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));var _0xfa95ad=_0x494e08[_0x834e('0x15')][_0x2515f6[_0x834e('0x6d')]];if(ut[_0x834e('0x139')](_0x5cb379[_0x834e('0x13a')])){if(_0x2515f6[_0x834e('0xa5')]){rpcDb[_0x834e('0x13b')](_0x2515f6[_0x834e('0x101')]);}if(_0x2515f6[_0x834e('0xc2')]){rpcDb[_0x834e('0x88')](_0x2515f6[_0x834e('0x101')]);}ami[_0x834e('0x9e')]('custom:agentringnoanswer',ut['buildObj'](_0x2515f6,_0x834e('0x13c'),this[_0x834e('0x15')][_0x2515f6[_0x834e('0x6d')]]));this['callProgressDetectingAgent'](_0x5c7fe3,_0xfa95ad,_0x5cb379);}else{_0x2515f6[_0x834e('0x89')]=moment()[_0x834e('0x58')](_0x834e('0x8a'));ut[_0x834e('0xeb')](_0x5c7fe3,0x4,_0x834e('0xb5'));rpcDb[_0x834e('0xed')](_0x5c7fe3,_0x834e('0x13d'));}}};Preview[_0x834e('0x10')][_0x834e('0x13e')]=function(_0x53850c){var _0x1785ca=this;var _0x2e0674=this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]];var _0x4b6834;if(_0x2e0674){_0x4b6834=this[_0x834e('0x15')][_0x2e0674[_0x834e('0x6d')]];logger[_0x834e('0x55')](_0x834e('0x13f'),_0x53850c[_0x834e('0xa6')],_0x834e('0xab'),_0x4b6834[_0x834e('0x54')],_0x834e('0x6e'),_0x4b6834[_0x834e('0x2a')]);}if(this['actions'][_0x53850c[_0x834e('0xa6')]]&&_0x53850c['linkedid']!==_0x53850c[_0x834e('0xaa')]){if(_0x53850c['cause']==='16'&&this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]][_0x834e('0x6f')]){this[_0x834e('0x140')](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c['cause']);}else if(this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]]['dialAnswer']){logger['info'](_0x834e('0x141'),_0x53850c['linkedid'],_0x53850c['cause'],'\x20Queue',_0x4b6834[_0x834e('0x54')],_0x834e('0x6e'),_0x4b6834[_0x834e('0x2a')]);this[_0x834e('0x140')](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')]);}}else if(_0x2e0674&&_[_0x834e('0xf9')](_0x2e0674['statedesc'])&&_0x4b6834[_0x834e('0x143')]&&_0x53850c[_0x834e('0xa6')]===_0x53850c['uniqueid']&&_['isNil'](_0x53850c[_0x834e('0xea')])&&_0x53850c[_0x834e('0x142')]==='16'&&_0x53850c['channelstate']==='6'&&_['isUndefined'](_0x2e0674[_0x834e('0x144')])){if(_0x2e0674[_0x834e('0xa5')]){rpcDb[_0x834e('0x13b')](_0x2e0674['idContact']);}if(_0x2e0674[_0x834e('0xc2')]){rpcDb[_0x834e('0x88')](_0x2e0674[_0x834e('0x101')]);}_0x53850c['reason']='22';this[_0x834e('0xe7')](_0x2e0674,_0x4b6834,_0x53850c);}else if(_0x2e0674&&_0x2e0674['transfer']){if(_0x53850c[_0x834e('0x142')]==='16'&&this[_0x834e('0x6a')][_0x53850c[_0x834e('0xa6')]][_0x834e('0x6f')]){logger[_0x834e('0x55')]('[syncHangup][talking][transfer]',_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')],_0x834e('0xab'),_0x4b6834[_0x834e('0x54')],_0x834e('0x6e'),_0x4b6834['pTalking']);this['callProgressDetectingCustomer'](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')]);}else if(this[_0x834e('0x6a')][_0x53850c['linkedid']][_0x834e('0x6f')]){logger[_0x834e('0x55')](_0x834e('0x141'),_0x53850c[_0x834e('0xa6')],_0x53850c['cause'],_0x834e('0xab'),_0x4b6834[_0x834e('0x54')],'pTalking:\x20',_0x4b6834[_0x834e('0x2a')]);this[_0x834e('0x140')](_0x53850c,_0x53850c[_0x834e('0xa6')],_0x53850c[_0x834e('0x142')]);}}};Preview['prototype'][_0x834e('0x1d')]=function(_0x52a673){if(this[_0x834e('0x6a')][_0x52a673[_0x834e('0xe6')]]&&_0x52a673[_0x834e('0xe6')]!==_0x52a673[_0x834e('0x145')]){this[_0x834e('0x140')](_0x52a673,_0x52a673[_0x834e('0xe6')],_0x52a673['dialstatus']);}};Preview['prototype'][_0x834e('0x1c')]=function(_0x3f2c59){if(this['actions'][_0x3f2c59[_0x834e('0xa6')]]&&_0x3f2c59['linkedid']!==_0x3f2c59[_0x834e('0xaa')]&&!this[_0x834e('0x6a')][_0x3f2c59[_0x834e('0xa6')]][_0x834e('0x6f')]){if(_0x3f2c59[_0x834e('0x142')]==='1'){this[_0x834e('0x140')](_0x3f2c59,_0x3f2c59[_0x834e('0xa6')],_0x3f2c59['cause']);}}};Preview[_0x834e('0x10')][_0x834e('0x146')]=function(_0x2a6bca,_0x223d48,_0x1c03bc){if(this['actions'][_0x2a6bca]){if(_[_0x834e('0xf9')](this[_0x834e('0x6a')][_0x2a6bca][_0x834e('0x147')])){this['actions'][_0x2a6bca]['variables']={};}this['actions'][_0x2a6bca][_0x834e('0x147')][_0x223d48]=_0x1c03bc;}};Preview[_0x834e('0x10')][_0x834e('0x20')]=function(_0xd6f2cc){try{if(!_[_0x834e('0xf9')](_0xd6f2cc)){if(ut[_0x834e('0x148')](_[_0x834e('0x149')](_0xd6f2cc[_0x834e('0x14a')])[0x0])){this[_0x834e('0x146')](_0xd6f2cc[_0x834e('0xaa')],_[_0x834e('0x149')](_0xd6f2cc['variable'])[0x0],_0xd6f2cc[_0x834e('0x14b')]);}}}catch(_0x3552b1){logger[_0x834e('0x14c')](_0x834e('0x14d'),util[_0x834e('0x14e')](_0x3552b1,{'showHidden':![],'depth':null}));}};Preview[_0x834e('0x10')][_0x834e('0x22')]=function(_0xa4bb26){if(_0xa4bb26){if(this['actions'][_0xa4bb26[_0x834e('0x14f')]]){this[_0x834e('0x6a')][_0xa4bb26['transfertargetlinkedid']][_0x834e('0x144')]=!![];}}};Preview[_0x834e('0x10')][_0x834e('0x23')]=function(_0x3fba1d){if(_0x3fba1d){if(this['actions'][_0x3fba1d['transfererlinkedid']]){this[_0x834e('0x6a')][_0x3fba1d['transfererlinkedid']][_0x834e('0x144')]=!![];}}};module[_0x834e('0x150')]=Preview; \ No newline at end of file diff --git a/server/services/ami/preview/rpcDb.js b/server/services/ami/preview/rpcDb.js index 8f1e8a6..d98983c 100644 --- a/server/services/ami/preview/rpcDb.js +++ b/server/services/ami/preview/rpcDb.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1b20=['inspect','then','catch','[createHistory]\x20','resolve','createHistory','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallerleaveAt','queuecallercompleteAt','endtime','connectedlinename','membername','context','from-sip','holdtime','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/agentReportPreview','../rpc/voiceQueueReport','error'];(function(_0x18c231,_0xb1d34b){var _0x4f6f32=function(_0x144f47){while(--_0x144f47){_0x18c231['push'](_0x18c231['shift']());}};_0x4f6f32(++_0xb1d34b);}(_0x1b20,0x66));var _0x01b2=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x1b20[_0x502c7d];return _0x30b7ed;};'use strict';var util=require('util');var BPromise=require(_0x01b2('0x0'));var logger=require(_0x01b2('0x1'))('preview');var _=require('lodash');var cmHopper=require(_0x01b2('0x2'));var cmHopperFinal=require(_0x01b2('0x3'));var cmHopperHistory=require(_0x01b2('0x4'));var cmHopperBlack=require(_0x01b2('0x5'));var voiceQueueRt=require(_0x01b2('0x6'));var agentReportPreview=require(_0x01b2('0x7'));var voiceQueueReport=require(_0x01b2('0x8'));function loggerCatch(_0x28de4a){return function(_0x46e745){logger[_0x01b2('0x9')](_0x28de4a,util[_0x01b2('0xa')](_0x46e745,{'showHidden':![],'depth':null}));};}function create(_0x323470){return BPromise['resolve']()[_0x01b2('0xb')](cmHopperHistory['createHistory'](_0x323470))[_0x01b2('0xc')](loggerCatch(_0x01b2('0xd')));}function createAgent(_0x3bad99){return BPromise[_0x01b2('0xe')]()[_0x01b2('0xb')](agentReportPreview[_0x01b2('0xf')](_0x3bad99))[_0x01b2('0xc')](loggerCatch(_0x01b2('0xd')));}function moveContact(_0x55804c){return BPromise[_0x01b2('0xe')]()['then'](cmHopper[_0x01b2('0x10')](_0x55804c,!![]))['catch'](loggerCatch(_0x01b2('0x11')));}exports[_0x01b2('0x12')]=function(_0x2c6d4d){return BPromise[_0x01b2('0xe')]()['then'](cmHopperBlack[_0x01b2('0x12')](_0x2c6d4d))[_0x01b2('0xc')](loggerCatch(_0x01b2('0x13')));};exports[_0x01b2('0x14')]=function(_0x3bb071){return BPromise['resolve']()[_0x01b2('0xb')](cmHopper[_0x01b2('0x14')](_0x3bb071))[_0x01b2('0xc')](loggerCatch(_0x01b2('0x15')));};exports['createHistory']=function(_0x523b80,_0x2a8458){create(_0x523b80)[_0x01b2('0xc')](loggerCatch(_0x2a8458));moveContact(_0x523b80)['catch'](loggerCatch(_0x2a8458));};exports[_0x01b2('0x16')]=function(_0x444236,_0x27a0bc){createAgent(_0x444236)['catch'](loggerCatch(_0x27a0bc));};exports[_0x01b2('0x17')]=function(_0x9f182b,_0x38c4c8){create(_0x9f182b)[_0x01b2('0xc')](loggerCatch(_0x38c4c8));};exports[_0x01b2('0x18')]=function(_0x56ea3c,_0xfbd5db){moveContact(_0x56ea3c)['catch'](loggerCatch(_0xfbd5db));};exports[_0x01b2('0x19')]=function(_0x4c0008,_0x400f80,_0x266264){if(_0x400f80){_0x4c0008[_0x01b2('0x1a')]=null;}if(_0x266264){_0x4c0008['active']=![];}return BPromise[_0x01b2('0xe')]()[_0x01b2('0xb')](cmHopper[_0x01b2('0x19')](_0x4c0008))[_0x01b2('0xc')](loggerCatch(_0x01b2('0x1b')));};exports['countReScheduled']=function(_0x1874b9){return BPromise['resolve']()['then'](cmHopper[_0x01b2('0x1c')](_0x1874b9))[_0x01b2('0xc')](loggerCatch(_0x01b2('0x1d')));};exports[_0x01b2('0x1e')]=function(_0x2e32c1){return BPromise[_0x01b2('0xe')]()['then'](cmHopper[_0x01b2('0x1e')]({'UserId':null},_0x2e32c1,0x1))[_0x01b2('0xc')](loggerCatch(_0x01b2('0x1f')));};exports[_0x01b2('0x20')]=function(_0x54543b){return BPromise[_0x01b2('0xe')]()['then'](cmHopper[_0x01b2('0x1e')]({'active':![]},_0x54543b,0x1))[_0x01b2('0xc')](loggerCatch('[activeContact]\x20'));};exports[_0x01b2('0x21')]=function(_0x5efdda){var _0x487c49={};_0x487c49[_0x01b2('0x22')]=_0x5efdda[_0x01b2('0x22')];_0x487c49['uniqueid']=_0x5efdda[_0x01b2('0x23')];_0x487c49[_0x01b2('0x24')]=_0x5efdda[_0x01b2('0x24')];_0x487c49[_0x01b2('0x25')]=_0x5efdda[_0x01b2('0x25')];_0x487c49[_0x01b2('0x26')]=_0x5efdda[_0x01b2('0x26')];_0x487c49[_0x01b2('0x27')]=_0x5efdda[_0x01b2('0x28')];_0x487c49[_0x01b2('0x29')]=_0x5efdda[_0x01b2('0x28')];_0x487c49['queuecallercomplete']=0x1;_0x487c49[_0x01b2('0x2a')]=_0x5efdda[_0x01b2('0x2b')];_0x487c49[_0x01b2('0x2c')]=_0x5efdda[_0x01b2('0x2d')];_0x487c49[_0x01b2('0x2e')]=_0x01b2('0x2f');_0x487c49['exten']='xcally-motion-preview';_0x487c49[_0x01b2('0x30')]=0x0;_0x487c49['assigned']=0x1;_0x487c49['lastAssignedTo']=_0x5efdda[_0x01b2('0x2d')];_0x487c49[_0x01b2('0x31')]=_0x01b2('0x32');return BPromise[_0x01b2('0xe')]()['then'](voiceQueueReport[_0x01b2('0x33')](_0x487c49))['catch'](loggerCatch(_0x01b2('0x34')));};exports['getContactRecallMe']=function(_0x5af6ff,_0x5e23dd){return BPromise[_0x01b2('0xe')]()[_0x01b2('0xb')](cmHopper[_0x01b2('0x35')](_0x5af6ff,_0x5e23dd))[_0x01b2('0xc')](loggerCatch('[GetContactRecallMe]\x20'));};exports[_0x01b2('0x36')]=function(_0x2bd252){return BPromise['resolve']()[_0x01b2('0xb')](cmHopper[_0x01b2('0x19')](_0x2bd252,!![],!![]))[_0x01b2('0xc')](loggerCatch(_0x01b2('0x37')));}; \ No newline at end of file +var _0xeec6=['getContactPreview','[getContactPreview]\x20','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','type','uniqueid','calleridnum','calleridname','queue','answertime','queuecallercomplete','queuecallercompleteAt','context','from-sip','exten','xcally-motion-preview','holdtime','assigned','lastAssignedTo','membername','queuecallerexitreason','COMPLETED','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','preview','../rpc/cmHopper','../rpc/cmHopperFinal','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/agentReportPreview','inspect','resolve','then','catch','[createHistory]\x20','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20'];(function(_0xfd949d,_0x4e7e33){var _0x117fb6=function(_0x52e343){while(--_0x52e343){_0xfd949d['push'](_0xfd949d['shift']());}};_0x117fb6(++_0x4e7e33);}(_0xeec6,0x1c2));var _0x6eec=function(_0x56418e,_0x362812){_0x56418e=_0x56418e-0x0;var _0x5b160c=_0xeec6[_0x56418e];return _0x5b160c;};'use strict';var util=require(_0x6eec('0x0'));var BPromise=require(_0x6eec('0x1'));var logger=require(_0x6eec('0x2'))(_0x6eec('0x3'));var _=require('lodash');var cmHopper=require(_0x6eec('0x4'));var cmHopperFinal=require(_0x6eec('0x5'));var cmHopperHistory=require(_0x6eec('0x6'));var cmHopperBlack=require(_0x6eec('0x7'));var voiceQueueRt=require(_0x6eec('0x8'));var agentReportPreview=require(_0x6eec('0x9'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x185f31){return function(_0x3c6eda){logger['error'](_0x185f31,util[_0x6eec('0xa')](_0x3c6eda,{'showHidden':![],'depth':null}));};}function create(_0x1c810e){return BPromise[_0x6eec('0xb')]()[_0x6eec('0xc')](cmHopperHistory['createHistory'](_0x1c810e))[_0x6eec('0xd')](loggerCatch(_0x6eec('0xe')));}function createAgent(_0x1c774d){return BPromise['resolve']()['then'](agentReportPreview['createHistory'](_0x1c774d))[_0x6eec('0xd')](loggerCatch(_0x6eec('0xe')));}function moveContact(_0x51a9e3){return BPromise['resolve']()[_0x6eec('0xc')](cmHopper['moveContactManagedDialer'](_0x51a9e3,!![]))[_0x6eec('0xd')](loggerCatch(_0x6eec('0xf')));}exports[_0x6eec('0x10')]=function(_0x3fe94b){return BPromise[_0x6eec('0xb')]()['then'](cmHopperBlack[_0x6eec('0x10')](_0x3fe94b))[_0x6eec('0xd')](loggerCatch(_0x6eec('0x11')));};exports[_0x6eec('0x12')]=function(_0x3d653b){return BPromise[_0x6eec('0xb')]()[_0x6eec('0xc')](cmHopper[_0x6eec('0x12')](_0x3d653b))[_0x6eec('0xd')](loggerCatch(_0x6eec('0x13')));};exports['createHistory']=function(_0x3c0c1b,_0x5f1f33){create(_0x3c0c1b)[_0x6eec('0xd')](loggerCatch(_0x5f1f33));moveContact(_0x3c0c1b)[_0x6eec('0xd')](loggerCatch(_0x5f1f33));};exports['createAgentHistory']=function(_0x3ee353,_0x80736b){createAgent(_0x3ee353)[_0x6eec('0xd')](loggerCatch(_0x80736b));};exports['createCustomerHistory']=function(_0x87f3be,_0x1ed94c){create(_0x87f3be)[_0x6eec('0xd')](loggerCatch(_0x1ed94c));};exports[_0x6eec('0x14')]=function(_0xd86135,_0x1761f4){moveContact(_0xd86135)['catch'](loggerCatch(_0x1761f4));};exports[_0x6eec('0x15')]=function(_0x2f843e,_0x132652,_0x34522a){if(_0x132652){_0x2f843e[_0x6eec('0x16')]=null;}if(_0x34522a){_0x2f843e[_0x6eec('0x17')]=![];}return BPromise['resolve']()[_0x6eec('0xc')](cmHopper[_0x6eec('0x15')](_0x2f843e))[_0x6eec('0xd')](loggerCatch(_0x6eec('0x18')));};exports[_0x6eec('0x19')]=function(_0x13863c){return BPromise['resolve']()[_0x6eec('0xc')](cmHopper[_0x6eec('0x19')](_0x13863c))[_0x6eec('0xd')](loggerCatch(_0x6eec('0x1a')));};exports[_0x6eec('0x1b')]=function(_0x1f386c){return BPromise[_0x6eec('0xb')]()[_0x6eec('0xc')](cmHopper[_0x6eec('0x1b')]({'UserId':null},_0x1f386c,0x1))['catch'](loggerCatch(_0x6eec('0x1c')));};exports[_0x6eec('0x1d')]=function(_0x30eb98){return BPromise[_0x6eec('0xb')]()['then'](cmHopper[_0x6eec('0x1b')]({'active':![]},_0x30eb98,0x1))[_0x6eec('0xd')](loggerCatch('[activeContact]\x20'));};exports['crateCustomerReportQueue']=function(_0x3240c3){var _0x47ed95={};_0x47ed95[_0x6eec('0x1e')]=_0x3240c3[_0x6eec('0x1e')];_0x47ed95[_0x6eec('0x1f')]=_0x3240c3[_0x6eec('0x1f')];_0x47ed95[_0x6eec('0x20')]=_0x3240c3[_0x6eec('0x20')];_0x47ed95[_0x6eec('0x21')]=_0x3240c3[_0x6eec('0x21')];_0x47ed95[_0x6eec('0x22')]=_0x3240c3[_0x6eec('0x22')];_0x47ed95['queuecallerjoinAt']=_0x3240c3[_0x6eec('0x23')];_0x47ed95['queuecallerleaveAt']=_0x3240c3[_0x6eec('0x23')];_0x47ed95[_0x6eec('0x24')]=0x1;_0x47ed95[_0x6eec('0x25')]=_0x3240c3['endtime'];_0x47ed95['connectedlinename']=_0x3240c3['membername'];_0x47ed95[_0x6eec('0x26')]=_0x6eec('0x27');_0x47ed95[_0x6eec('0x28')]=_0x6eec('0x29');_0x47ed95[_0x6eec('0x2a')]=0x0;_0x47ed95[_0x6eec('0x2b')]=0x1;_0x47ed95[_0x6eec('0x2c')]=_0x3240c3[_0x6eec('0x2d')];_0x47ed95[_0x6eec('0x2e')]=_0x6eec('0x2f');return BPromise[_0x6eec('0xb')]()[_0x6eec('0xc')](voiceQueueReport['create'](_0x47ed95))[_0x6eec('0xd')](loggerCatch(_0x6eec('0x30')));};exports[_0x6eec('0x31')]=function(_0x47e169,_0x2ce8c3){return BPromise[_0x6eec('0xb')]()[_0x6eec('0xc')](cmHopper[_0x6eec('0x31')](_0x47e169,_0x2ce8c3))[_0x6eec('0xd')](loggerCatch(_0x6eec('0x32')));};exports['rescheduleContactInQueue']=function(_0x45cfb6){return BPromise[_0x6eec('0xb')]()[_0x6eec('0xc')](cmHopper['rescheduleContact'](_0x45cfb6,!![],!![]))['catch'](loggerCatch(_0x6eec('0x33')));}; \ No newline at end of file diff --git a/server/services/ami/preview/util/util.js b/server/services/ami/preview/util/util.js index 3b7acdb..2c68b7b 100644 --- a/server/services/ami/preview/util/util.js +++ b/server/services/ami/preview/util/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0a3e=['xmd-queue','xmd-phone','xmd-dialoptions','xmd-dialid','xmd-contactid','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqosjitter','bridgepeer','bridgepvtcallid','getCallerIdRandom','pow','replace','random','extractCalleridName','match','util','lodash','moment','../../../../config/logger','env','XCALLY_IP_AGI','127.0.0.1','milliseconds','diff','seconds','loggerCatch','inspect','loggerError','error','info','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialer','VoiceQueueId','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridnum','originatecalleridname','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','Contact','isNil','tags','createdAt','updatedAt','%s%s','XMD-','toLowerVariables','hasOwnProperty','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','statedesc','Blacklist','responsetime','endtime','logAgent','state','ringtime','starttime','logLookAgent','membername','UserId','talktime','answertime','isFailure','Failure','RECALL','BOOKED','uniqueid','originate','channelAgent','from-sip','timeout','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','countagentrejectretry','countnosuchnumberretry','Global','scheduledAt','active','scheduledat','add','ListId','decrementTalkink','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','buildObj','lastevent','queue','interface','mandatoryDisposition','buildAcw','agentReadyId','not_inuse','status','reachable','push','createBody','CampaignId','filterKey','idContact','type','campaigntype','dialAnswer','countglobal','callbackuniqueid','callbackat','recallme','sipcallid'];(function(_0xdb703c,_0x2feb75){var _0x31bb23=function(_0x4ae204){while(--_0x4ae204){_0xdb703c['push'](_0xdb703c['shift']());}};_0x31bb23(++_0x2feb75);}(_0x0a3e,0xa6));var _0xe0a3=function(_0xa77639,_0x5281ad){_0xa77639=_0xa77639-0x0;var _0x10c447=_0x0a3e[_0xa77639];return _0x10c447;};'use strict';var util=require(_0xe0a3('0x0'));var _=require(_0xe0a3('0x1'));var moment=require(_0xe0a3('0x2'));var logger=require(_0xe0a3('0x3'))('preview');var ipAgi=process[_0xe0a3('0x4')][_0xe0a3('0x5')]||_0xe0a3('0x6');function getSeconds(_0x488d65,_0x37c8c6){var _0x32c8df=moment(_0x488d65)[_0xe0a3('0x7')](0x0);var _0x2fde75=moment(_0x37c8c6)[_0xe0a3('0x7')](0x0);return _0x32c8df[_0xe0a3('0x8')](_0x2fde75,_0xe0a3('0x9'));}exports[_0xe0a3('0xa')]=function(_0x195c4d){return function(_0x5eb862){logger['error'](_0x195c4d,util[_0xe0a3('0xb')](_0x5eb862,{'showHidden':![],'depth':null}));};};exports['logger']=function(_0x290e13,_0x21a6fe){logger['info'](_0x290e13,util[_0xe0a3('0xb')](_0x21a6fe,{'showHidden':![],'depth':null}));};exports[_0xe0a3('0xc')]=function(_0x13f002,_0x3cc2bb){logger[_0xe0a3('0xd')](_0x13f002,util['inspect'](_0x3cc2bb,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0x57b22b){return function(_0x345b66){logger[_0xe0a3('0xe')](_0x57b22b,util[_0xe0a3('0xb')](_0x345b66,{'showHidden':![],'depth':null}));};};exports['message']=function(_0x263d41,_0xe56d19,_0x2de1c2){return{'message':_0x263d41,'unlock':_0xe56d19,'active':_0x2de1c2};};exports['getCallerId']=function(_0xe48f02,_0xf25971,_0x49650f){if(!_[_0xe0a3('0xf')](_0x49650f)&&_0xe0a3('0x10')===typeof _0x49650f&&!_[_0xe0a3('0x11')](_0x49650f)){if(!_[_0xe0a3('0xf')](_0xf25971)&&_0xe0a3('0x10')===typeof _0xf25971&&!_['isEmpty'](_0xf25971)){return util[_0xe0a3('0x12')](_0xe0a3('0x13'),_0xf25971,_0x49650f);}return util[_0xe0a3('0x12')](_0xe0a3('0x13'),_0x49650f,_0x49650f);}if(!_[_0xe0a3('0xf')](_0xe48f02)&&'string'===typeof _0xe48f02&&!_[_0xe0a3('0x11')](_0xe48f02)){return _0xe48f02;}return _0xe0a3('0x14');};exports[_0xe0a3('0x15')]=function(_0x45a811){if(_['isNil'](_0x45a811)){return![];}return _0x45a811;};exports[_0xe0a3('0x16')]=function(_0x16156a,_0x55f3e5,_0x2266cc,_0x1bfbe9,_0x46ad39,_0x5653a4){var _0x121996={'XMD-QUEUE':_0x55f3e5['Queue']?_0x55f3e5[_0xe0a3('0x17')][_0xe0a3('0x18')]:'','XMD-CALLERID':_0x1bfbe9,'XMD-CALLERID-PREVIEW':_0x5653a4?util[_0xe0a3('0x12')](_0xe0a3('0x13'),_0x5653a4[_0xe0a3('0x19')],_0x5653a4[_0xe0a3('0x1a')]):_0x1bfbe9,'XMD-DIALID':_0x46ad39,'XMD-CONTACTID':_0x55f3e5[_0xe0a3('0x1b')],'XMD-CDRTYPE':_0xe0a3('0x1c'),'CALLERID(all)':_0x1bfbe9,'XMD-VOICEQUEUEID':_0x55f3e5[_0xe0a3('0x1d')],'XMD-DIALCHANNEL':_0x2266cc,'XMD-DIALTIMEOUT':_0x16156a['dialOriginateTimeout']||0x1e,'XMD-DIALOPTIONS':util[_0xe0a3('0x12')](_0xe0a3('0x1e'),_0x16156a[_0xe0a3('0x1f')]?'g':'',_[_0xe0a3('0x11')](_0x16156a[_0xe0a3('0x20')])?'':_0xe0a3('0x21')),'XMD-DIALURL':_0x16156a[_0xe0a3('0x22')]||'','XMD-AGI':_0x16156a[_0xe0a3('0x23')]?util[_0xe0a3('0x12')](_0xe0a3('0x24'),ipAgi,_0x16156a[_0xe0a3('0x23')]):_0xe0a3('0x25'),'XMD-AGIAFTER':_0x16156a[_0xe0a3('0x1f')]?util[_0xe0a3('0x12')]('\x22agi://%s/square,%s\x22',ipAgi,_0x16156a['dialQueueProject2']):_0xe0a3('0x25'),'XMD-ORIGINATECALLERIDNUM':_0x5653a4?_0x5653a4[_0xe0a3('0x26')]:'','XMD-ORIGINATECALLERIDNAME':_0x5653a4?_0x5653a4[_0xe0a3('0x27')]:'','XMD-DESTINATION':_0xe0a3('0x28')};if(!_['isEmpty'](_0x16156a['monitor_format'])){_0x121996[util[_0xe0a3('0x12')]('%s',_0xe0a3('0x29'))]=_0x16156a[_0xe0a3('0x20')];_0x121996[util[_0xe0a3('0x12')]('%s','_XCALLY_MIXMONITOR_UNIQUEID')]=_0x46ad39;}if(_0x55f3e5&&_0x55f3e5[_0xe0a3('0x2a')]){for(var _0x4c6f40 in _0x55f3e5[_0xe0a3('0x2a')]){if(_0x55f3e5[_0xe0a3('0x2a')]['hasOwnProperty'](_0x4c6f40)){if(!_[_0xe0a3('0x2b')](_0x55f3e5['Contact'][_0x4c6f40])&&_0x4c6f40!=='id'&&_0x4c6f40!==_0xe0a3('0x2c')&&_0x4c6f40!==_0xe0a3('0x2d')&&_0x4c6f40!==_0xe0a3('0x2e')){_0x121996[util[_0xe0a3('0x12')](_0xe0a3('0x2f'),_0xe0a3('0x30'),_['toUpper'](_0x4c6f40))]=_0x55f3e5['Contact'][_0x4c6f40];}}}}return _0x121996;};exports[_0xe0a3('0x31')]=function(_0x21eee4){var _0x548d79={};for(var _0x2af29d in _0x21eee4){if(_0x21eee4[_0xe0a3('0x32')](_0x2af29d)){_0x548d79[util[_0xe0a3('0x12')]('%s',_[_0xe0a3('0x33')](_0x2af29d))]=_0x21eee4[_0x2af29d];}}return{'variables':_0x548d79};};exports[_0xe0a3('0x34')]=function(_0x599889,_0x764905){if(!_[_0xe0a3('0x2b')](_0x599889)){if(_0x599889[_0xe0a3('0x32')]('originated')){if(_0x599889[_0xe0a3('0x35')]>0x0){_0x599889[_0xe0a3('0x35')]-=0x1;}else{logger[_0xe0a3('0xd')](_0xe0a3('0x36'),_0x764905);}}}else{logger[_0xe0a3('0xd')](_0xe0a3('0x37'),_0x764905);}};exports[_0xe0a3('0x38')]=function(_0x236601){var _0xb986fd=moment()[_0xe0a3('0x12')](_0xe0a3('0x39'));_0x236601['state']=0xd;_0x236601[_0xe0a3('0x3a')]=_0xe0a3('0x3b');_0x236601['starttime']=_0xb986fd;_0x236601[_0xe0a3('0x3c')]=_0xb986fd;_0x236601[_0xe0a3('0x3d')]=_0xb986fd;};exports[_0xe0a3('0x3e')]=function(_0x1a4eab,_0x497aa4,_0x32edc8){var _0x1ca3aa=moment()['format'](_0xe0a3('0x39'));_0x1a4eab[_0xe0a3('0x3f')]=_0x497aa4;_0x1a4eab[_0xe0a3('0x3a')]=_0x32edc8;_0x1a4eab[_0xe0a3('0x3c')]=_0x1ca3aa;_0x1a4eab[_0xe0a3('0x40')]=getSeconds(_0x1a4eab[_0xe0a3('0x3c')],_0x1a4eab[_0xe0a3('0x41')]);};exports[_0xe0a3('0x42')]=function(_0x212d0b,_0x3cab1d,_0x104a76){_0x212d0b[_0xe0a3('0x43')]=_0x3cab1d;_0x212d0b[_0xe0a3('0x44')]=_0x104a76;};exports['logCustomer']=function(_0x476a74,_0x3a5e0e,_0x3ed541){var _0x51c51a=moment()[_0xe0a3('0x12')]('YYYY-MM-DD\x20HH:mm:ss');_0x476a74[_0xe0a3('0x3f')]=_0x3a5e0e;_0x476a74[_0xe0a3('0x3a')]=_0x3ed541;_0x476a74[_0xe0a3('0x3c')]=_0x476a74['responsetime']?_0x476a74[_0xe0a3('0x3c')]:_0x51c51a;_0x476a74['endtime']=_0x476a74[_0xe0a3('0x3d')]?_0x476a74[_0xe0a3('0x3d')]:_0x51c51a;_0x476a74[_0xe0a3('0x40')]=getSeconds(_0x476a74[_0xe0a3('0x3c')]||0x0,_0x476a74[_0xe0a3('0x41')]||0x0);_0x476a74[_0xe0a3('0x45')]=_0x476a74[_0xe0a3('0x46')]?getSeconds(_0x476a74[_0xe0a3('0x3d')],_0x476a74[_0xe0a3('0x46')]):0x0;};exports[_0xe0a3('0x47')]=function(_0xe6b611){return _0xe6b611===_0xe0a3('0x48');};exports['variablesAction']=function(_0x4e6ee8,_0x564250,_0x3702f8,_0xbaf7be,_0x3be6f1){var _0x30e27e=_0xbaf7be?_0xe0a3('0x49'):_0x4e6ee8[_0xe0a3('0x19')];_0x30e27e=_0x3be6f1?_0xe0a3('0x4a'):_0x30e27e;return{'actionid':_0x4e6ee8[_0xe0a3('0x4b')],'action':_0xe0a3('0x4c'),'channel':_0x4e6ee8[_0xe0a3('0x4d')],'callerid':util[_0xe0a3('0x12')](_0xe0a3('0x13'),_0x30e27e,_0x4e6ee8['calleridnum']),'Exten':_0xe0a3('0x28'),'Context':_0xe0a3('0x4e'),'Priority':'1','variable':_0x3702f8,'timeout':(_0x564250[_0xe0a3('0x4f')]||0x1e)*0x3e8,'async':!![],'channelid':_0x4e6ee8[_0xe0a3('0x4b')]};};exports[_0xe0a3('0x50')]=function(_0x8a96cd){return _0x8a96cd[_0xe0a3('0x51')]+_0x8a96cd[_0xe0a3('0x52')]+_0x8a96cd[_0xe0a3('0x53')]+_0x8a96cd[_0xe0a3('0x54')]+_0x8a96cd[_0xe0a3('0x55')];};exports['cloneAction']=function(_0x16484f){var _0x26f3af=_['clone'](_0x16484f);_0x26f3af[_0xe0a3('0x3f')]=0xf;_0x26f3af[_0xe0a3('0x3a')]=_0xe0a3('0x56');return _0x26f3af;};exports[_0xe0a3('0x57')]=function(_0x215ae3,_0x38fe9b,_0x93b87b){var _0x17b7a6={};_0x17b7a6[_0x38fe9b]=_0x215ae3[_0x38fe9b];_0x17b7a6[_0xe0a3('0x58')]=![];_0x17b7a6[_0xe0a3('0x59')]=moment()[_0xe0a3('0x5a')](_0x93b87b,'minutes')[_0xe0a3('0x12')](_0xe0a3('0x39'));_0x17b7a6[_0xe0a3('0x1b')]=_0x215ae3[_0xe0a3('0x1b')];_0x17b7a6[_0xe0a3('0x5b')]=_0x215ae3[_0xe0a3('0x5b')];_0x17b7a6[_0xe0a3('0x1d')]=_0x215ae3['VoiceQueueId']||undefined;return _0x17b7a6;};exports[_0xe0a3('0x5c')]=function(_0xc15b9,_0x44872b){if(!_['isNil'](_0xc15b9)){if(_0xc15b9['pTalking']>0x0){_0xc15b9['pTalking']-=0x1;}else{logger[_0xe0a3('0xd')](_0x44872b,'[decrementTalkink]\x20object\x20talking\x20is\x20negative');}}else{logger['error'](_0x44872b,_0xe0a3('0x5d'));}};exports[_0xe0a3('0x5e')]=function(_0x3c75d8){if(_0x3c75d8<=0x0){return!![];}return![];};exports[_0xe0a3('0x5f')]=function(_0x3de5e3,_0x2f0306,_0x3bf541){_0x3de5e3[_0xe0a3('0x60')]=_0x2f0306;_0x3de5e3[_0xe0a3('0x18')]=_0x3de5e3[_0xe0a3('0x61')];_0x3de5e3[_0xe0a3('0x62')]=_0x3de5e3[_0xe0a3('0x4d')];if(_0x3bf541){_0x3de5e3[_0xe0a3('0x63')]=_0x3bf541['mandatoryDisposition'];}return _0x3de5e3;};exports[_0xe0a3('0x64')]=function(_0x2140f1){var _0x23e6bd={};_0x23e6bd['queue']=_0x2140f1[_0xe0a3('0x61')];_0x23e6bd[_0xe0a3('0x62')]=_0x2140f1[_0xe0a3('0x4d')];_0x23e6bd['uniqueid']=_0x2140f1[_0xe0a3('0x4b')];return _0x23e6bd;};exports[_0xe0a3('0x65')]=function(_0x4ef133){var _0x72bbdc=[];for(var _0x188100 in _0x4ef133){if(_0x4ef133[_0xe0a3('0x32')](_0x188100)){if(!_[_0xe0a3('0x2b')](_0x4ef133[_0x188100])&&_0x4ef133[_0x188100]['state']===_0xe0a3('0x66')&&_0x4ef133[_0x188100][_0xe0a3('0x67')]===_0xe0a3('0x68')){_0x72bbdc[_0xe0a3('0x69')](_0x4ef133[_0x188100]['id']);}}}return _0x72bbdc;};exports['getDiff']=function(_0x574891){var _0x5861fd=moment()[_0xe0a3('0x7')](0x0);var _0xbb1bf5=moment(_0x574891)['milliseconds'](0x0);return _0x5861fd[_0xe0a3('0x8')](_0xbb1bf5,'seconds');};exports[_0xe0a3('0x6a')]=function(_0xd1e1a5){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0xd1e1a5[_0xe0a3('0x1b')],'ListId':_0xd1e1a5['ListId'],'VoiceQueueId':_0xd1e1a5[_0xe0a3('0x1d')]||undefined,'CampaignId':_0xd1e1a5[_0xe0a3('0x6b')]||undefined};};exports[_0xe0a3('0x6c')]=function(_0x1bae8b){if(_0x1bae8b===_0xe0a3('0x4b')||_0x1bae8b===_0xe0a3('0x6d')||_0x1bae8b===_0xe0a3('0x61')||_0x1bae8b===_0xe0a3('0x6e')||_0x1bae8b===_0xe0a3('0x6f')||_0x1bae8b===_0xe0a3('0x70')||_0x1bae8b===_0xe0a3('0x43')||_0x1bae8b===_0xe0a3('0x4d')||_0x1bae8b===_0xe0a3('0x19')||_0x1bae8b===_0xe0a3('0x58')||_0x1bae8b===_0xe0a3('0x1a')||_0x1bae8b==='scheduledat'||_0x1bae8b===_0xe0a3('0x51')||_0x1bae8b===_0xe0a3('0x52')||_0x1bae8b===_0xe0a3('0x53')||_0x1bae8b===_0xe0a3('0x71')||_0x1bae8b==='callback'||_0x1bae8b===_0xe0a3('0x72')||_0x1bae8b===_0xe0a3('0x73')||_0x1bae8b===_0xe0a3('0x74')||_0x1bae8b===_0xe0a3('0x1b')||_0x1bae8b===_0xe0a3('0x5b')||_0x1bae8b===_0xe0a3('0x44')||_0x1bae8b===_0xe0a3('0x1d')||_0x1bae8b===_0xe0a3('0x75')||_0x1bae8b==='xmd-voicequeueid'||_0x1bae8b===_0xe0a3('0x76')||_0x1bae8b===_0xe0a3('0x77')||_0x1bae8b==='xmd-listid'||_0x1bae8b==='xmd-dialurl'||_0x1bae8b==='xmd-dialtimeout'||_0x1bae8b===_0xe0a3('0x78')||_0x1bae8b===_0xe0a3('0x79')||_0x1bae8b==='xmd-dialchannel'||_0x1bae8b===_0xe0a3('0x7a')||_0x1bae8b==='xmd-cdrtype'||_0x1bae8b===_0xe0a3('0x7b')||_0x1bae8b===_0xe0a3('0x7c')||_0x1bae8b===_0xe0a3('0x7d')||_0x1bae8b===_0xe0a3('0x7e')||_0x1bae8b===_0xe0a3('0x7f')||_0x1bae8b==='rtpaudioqosjitter'||_0x1bae8b===_0xe0a3('0x80')||_0x1bae8b===_0xe0a3('0x81')||_0x1bae8b===_0xe0a3('0x82')||_0x1bae8b===_0xe0a3('0x83')||_0x1bae8b===_0xe0a3('0x84')||_0x1bae8b===_0xe0a3('0x7e')||_0x1bae8b==='rtpaudioqosbridged'||_0x1bae8b===_0xe0a3('0x85')||_0x1bae8b===_0xe0a3('0x80')||_0x1bae8b==='rtpaudioqosloss'||_0x1bae8b===_0xe0a3('0x82')||_0x1bae8b===_0xe0a3('0x83')||_0x1bae8b===_0xe0a3('0x84')||_0x1bae8b===_0xe0a3('0x86')||_0x1bae8b===_0xe0a3('0x87')||_0x1bae8b===_0xe0a3('0x3f')||_0x1bae8b===_0xe0a3('0x3a')){return![];}return!![];};exports[_0xe0a3('0x88')]=function(_0x52e0e4,_0x3bb630){var _0x2116b7,_0x1494b6,_0x446385;if(_0x3bb630<=0x0){_0x3bb630=0x1;}_0x2116b7=new RegExp('\x5cw{0,'+_0x3bb630+'}$');_0x1494b6=Math[_0xe0a3('0x89')](0xa,_0x3bb630-0x1);_0x446385=Math[_0xe0a3('0x89')](0xa,_0x3bb630)-0x1;return util['format']('%s',_[_0xe0a3('0x8a')](_0x52e0e4,_0x2116b7,_[_0xe0a3('0x8b')](_0x1494b6,_0x446385)));};exports[_0xe0a3('0x8c')]=function(_0x3f18d1){var _0x1e7454=_0x3f18d1[_0xe0a3('0x8d')](/"(.*?)"/);return _0x1e7454?_0x1e7454[0x1]:_0x3f18d1;};exports['extractCalleridNumber']=function(_0x3cd952){var _0xc305f0=_0x3cd952[_0xe0a3('0x8d')](/<(.*?)>/);return _0xc305f0?_0xc305f0[0x1]:_0x3cd952;}; \ No newline at end of file +var _0x3a6a=['random','match','extractCalleridNumber','util','lodash','moment','env','XCALLY_IP_AGI','127.0.0.1','milliseconds','diff','error','inspect','info','loggerError','logger2','message','getCallerId','isUndefined','string','isEmpty','\x22%s\x22\x20<%s>','format','isActive','isNil','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialer','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','dialQueueProject','NONE','\x22agi://%s/square,%s\x22','originatecalleridnum','originatecalleridname','xcally-motion-preview','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','createdAt','updatedAt','%s%s','XMD-','toUpper','toLowerVariables','toLower','updateOriginated','originated','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','Blacklist','starttime','responsetime','endtime','logAgent','logLookAgent','membername','UserId','ringtime','talktime','answertime','isFailure','Failure','variablesAction','RECALL','uniqueid','channelAgent','from-sip','timeout','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','cloneAction','Global','active','add','minutes','ListId','VoiceQueueId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','buildObj','lastevent','mandatoryDisposition','buildAcw','queue','interface','agentReadyId','not_inuse','reachable','push','getDiff','createBody','dialAnswer','scheduledat','countglobal','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-phone','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agiafter','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqosrttbridged','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','getCallerIdRandom','\x5cw{0,','pow'];(function(_0x164eca,_0x555e28){var _0x2ce562=function(_0x148ca6){while(--_0x148ca6){_0x164eca['push'](_0x164eca['shift']());}};_0x2ce562(++_0x555e28);}(_0x3a6a,0x10d));var _0xa3a6=function(_0x365e54,_0x44be74){_0x365e54=_0x365e54-0x0;var _0x13317a=_0x3a6a[_0x365e54];return _0x13317a;};'use strict';var util=require(_0xa3a6('0x0'));var _=require(_0xa3a6('0x1'));var moment=require(_0xa3a6('0x2'));var logger=require('../../../../config/logger')('preview');var ipAgi=process[_0xa3a6('0x3')][_0xa3a6('0x4')]||_0xa3a6('0x5');function getSeconds(_0x4a79f6,_0x2210f4){var _0x47fde1=moment(_0x4a79f6)[_0xa3a6('0x6')](0x0);var _0x45d200=moment(_0x2210f4)['milliseconds'](0x0);return _0x47fde1[_0xa3a6('0x7')](_0x45d200,'seconds');}exports['loggerCatch']=function(_0x56b9a6){return function(_0x1740d6){logger[_0xa3a6('0x8')](_0x56b9a6,util[_0xa3a6('0x9')](_0x1740d6,{'showHidden':![],'depth':null}));};};exports['logger']=function(_0x32fb18,_0x38dedb){logger[_0xa3a6('0xa')](_0x32fb18,util['inspect'](_0x38dedb,{'showHidden':![],'depth':null}));};exports[_0xa3a6('0xb')]=function(_0x7f8c7b,_0x17a043){logger['error'](_0x7f8c7b,util[_0xa3a6('0x9')](_0x17a043,{'showHidden':![],'depth':null}));};exports[_0xa3a6('0xc')]=function(_0x1ba0ad){return function(_0xde43dd){logger[_0xa3a6('0xa')](_0x1ba0ad,util['inspect'](_0xde43dd,{'showHidden':![],'depth':null}));};};exports[_0xa3a6('0xd')]=function(_0x30b03f,_0x1a8bbc,_0x50eba0){return{'message':_0x30b03f,'unlock':_0x1a8bbc,'active':_0x50eba0};};exports[_0xa3a6('0xe')]=function(_0x44bf14,_0x3efd60,_0x573e98){if(!_[_0xa3a6('0xf')](_0x573e98)&&_0xa3a6('0x10')===typeof _0x573e98&&!_[_0xa3a6('0x11')](_0x573e98)){if(!_[_0xa3a6('0xf')](_0x3efd60)&&_0xa3a6('0x10')===typeof _0x3efd60&&!_[_0xa3a6('0x11')](_0x3efd60)){return util['format'](_0xa3a6('0x12'),_0x3efd60,_0x573e98);}return util[_0xa3a6('0x13')](_0xa3a6('0x12'),_0x573e98,_0x573e98);}if(!_[_0xa3a6('0xf')](_0x44bf14)&&_0xa3a6('0x10')===typeof _0x44bf14&&!_['isEmpty'](_0x44bf14)){return _0x44bf14;}return'\x22\x22\x20<>';};exports[_0xa3a6('0x14')]=function(_0x86df0){if(_[_0xa3a6('0x15')](_0x86df0)){return![];}return _0x86df0;};exports[_0xa3a6('0x16')]=function(_0x4d3dcf,_0x51f2ce,_0x469723,_0x29426f,_0x474388,_0x8128){var _0x344e67={'XMD-QUEUE':_0x51f2ce[_0xa3a6('0x17')]?_0x51f2ce[_0xa3a6('0x17')][_0xa3a6('0x18')]:'','XMD-CALLERID':_0x29426f,'XMD-CALLERID-PREVIEW':_0x8128?util[_0xa3a6('0x13')]('\x22%s\x22\x20<%s>',_0x8128[_0xa3a6('0x19')],_0x8128[_0xa3a6('0x1a')]):_0x29426f,'XMD-DIALID':_0x474388,'XMD-CONTACTID':_0x51f2ce[_0xa3a6('0x1b')],'XMD-CDRTYPE':_0xa3a6('0x1c'),'CALLERID(all)':_0x29426f,'XMD-VOICEQUEUEID':_0x51f2ce['VoiceQueueId'],'XMD-DIALCHANNEL':_0x469723,'XMD-DIALTIMEOUT':_0x4d3dcf[_0xa3a6('0x1d')]||0x1e,'XMD-DIALOPTIONS':util[_0xa3a6('0x13')](_0xa3a6('0x1e'),_0x4d3dcf[_0xa3a6('0x1f')]?'g':'',_[_0xa3a6('0x11')](_0x4d3dcf[_0xa3a6('0x20')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x4d3dcf['dialPreviewUrl']||'','XMD-AGI':_0x4d3dcf['dialQueueProject']?util[_0xa3a6('0x13')]('\x22agi://%s/square,%s\x22',ipAgi,_0x4d3dcf[_0xa3a6('0x21')]):_0xa3a6('0x22'),'XMD-AGIAFTER':_0x4d3dcf[_0xa3a6('0x1f')]?util['format'](_0xa3a6('0x23'),ipAgi,_0x4d3dcf[_0xa3a6('0x1f')]):_0xa3a6('0x22'),'XMD-ORIGINATECALLERIDNUM':_0x8128?_0x8128[_0xa3a6('0x24')]:'','XMD-ORIGINATECALLERIDNAME':_0x8128?_0x8128[_0xa3a6('0x25')]:'','XMD-DESTINATION':_0xa3a6('0x26')};if(!_['isEmpty'](_0x4d3dcf['monitor_format'])){_0x344e67[util['format']('%s','_XCALLY_MIXMONITOR_FORMAT')]=_0x4d3dcf['monitor_format'];_0x344e67[util[_0xa3a6('0x13')]('%s',_0xa3a6('0x27'))]=_0x474388;}if(_0x51f2ce&&_0x51f2ce[_0xa3a6('0x28')]){for(var _0xa60a7e in _0x51f2ce[_0xa3a6('0x28')]){if(_0x51f2ce['Contact'][_0xa3a6('0x29')](_0xa60a7e)){if(!_[_0xa3a6('0x15')](_0x51f2ce['Contact'][_0xa60a7e])&&_0xa60a7e!=='id'&&_0xa60a7e!=='tags'&&_0xa60a7e!==_0xa3a6('0x2a')&&_0xa60a7e!==_0xa3a6('0x2b')){_0x344e67[util[_0xa3a6('0x13')](_0xa3a6('0x2c'),_0xa3a6('0x2d'),_[_0xa3a6('0x2e')](_0xa60a7e))]=_0x51f2ce[_0xa3a6('0x28')][_0xa60a7e];}}}}return _0x344e67;};exports[_0xa3a6('0x2f')]=function(_0x4fe989){var _0xe0c890={};for(var _0xdc107e in _0x4fe989){if(_0x4fe989['hasOwnProperty'](_0xdc107e)){_0xe0c890[util[_0xa3a6('0x13')]('%s',_[_0xa3a6('0x30')](_0xdc107e))]=_0x4fe989[_0xdc107e];}}return{'variables':_0xe0c890};};exports[_0xa3a6('0x31')]=function(_0x427834,_0x56a765){if(!_[_0xa3a6('0x15')](_0x427834)){if(_0x427834[_0xa3a6('0x29')](_0xa3a6('0x32'))){if(_0x427834[_0xa3a6('0x32')]>0x0){_0x427834[_0xa3a6('0x32')]-=0x1;}else{logger[_0xa3a6('0x8')]('[updateOriginated]\x20object\x20originated\x20is\x20negative',_0x56a765);}}}else{logger['error']('[updateOriginated]\x20is\x20null\x20or\x20undefined',_0x56a765);}};exports[_0xa3a6('0x33')]=function(_0x168f08){var _0x380790=moment()[_0xa3a6('0x13')](_0xa3a6('0x34'));_0x168f08[_0xa3a6('0x35')]=0xd;_0x168f08[_0xa3a6('0x36')]=_0xa3a6('0x37');_0x168f08[_0xa3a6('0x38')]=_0x380790;_0x168f08[_0xa3a6('0x39')]=_0x380790;_0x168f08[_0xa3a6('0x3a')]=_0x380790;};exports[_0xa3a6('0x3b')]=function(_0x562afb,_0x3becd4,_0x44476b){var _0x178a51=moment()[_0xa3a6('0x13')](_0xa3a6('0x34'));_0x562afb[_0xa3a6('0x35')]=_0x3becd4;_0x562afb[_0xa3a6('0x36')]=_0x44476b;_0x562afb[_0xa3a6('0x39')]=_0x178a51;_0x562afb['ringtime']=getSeconds(_0x562afb[_0xa3a6('0x39')],_0x562afb[_0xa3a6('0x38')]);};exports[_0xa3a6('0x3c')]=function(_0x1ea217,_0x2be35c,_0x25ac6d){_0x1ea217[_0xa3a6('0x3d')]=_0x2be35c;_0x1ea217[_0xa3a6('0x3e')]=_0x25ac6d;};exports['logCustomer']=function(_0x560a26,_0x3fd7b3,_0x1c90cd){var _0x2486f0=moment()[_0xa3a6('0x13')]('YYYY-MM-DD\x20HH:mm:ss');_0x560a26[_0xa3a6('0x35')]=_0x3fd7b3;_0x560a26[_0xa3a6('0x36')]=_0x1c90cd;_0x560a26[_0xa3a6('0x39')]=_0x560a26[_0xa3a6('0x39')]?_0x560a26[_0xa3a6('0x39')]:_0x2486f0;_0x560a26[_0xa3a6('0x3a')]=_0x560a26[_0xa3a6('0x3a')]?_0x560a26[_0xa3a6('0x3a')]:_0x2486f0;_0x560a26[_0xa3a6('0x3f')]=getSeconds(_0x560a26[_0xa3a6('0x39')]||0x0,_0x560a26['starttime']||0x0);_0x560a26[_0xa3a6('0x40')]=_0x560a26['answertime']?getSeconds(_0x560a26[_0xa3a6('0x3a')],_0x560a26[_0xa3a6('0x41')]):0x0;};exports[_0xa3a6('0x42')]=function(_0x477a61){return _0x477a61===_0xa3a6('0x43');};exports[_0xa3a6('0x44')]=function(_0x6ad0f6,_0x246574,_0x27b6a,_0x11d601,_0x474df9){var _0x2a364d=_0x11d601?_0xa3a6('0x45'):_0x6ad0f6[_0xa3a6('0x19')];_0x2a364d=_0x474df9?'BOOKED':_0x2a364d;return{'actionid':_0x6ad0f6[_0xa3a6('0x46')],'action':'originate','channel':_0x6ad0f6[_0xa3a6('0x47')],'callerid':util[_0xa3a6('0x13')](_0xa3a6('0x12'),_0x2a364d,_0x6ad0f6['calleridnum']),'Exten':_0xa3a6('0x26'),'Context':_0xa3a6('0x48'),'Priority':'1','variable':_0x27b6a,'timeout':(_0x246574[_0xa3a6('0x49')]||0x1e)*0x3e8,'async':!![],'channelid':_0x6ad0f6[_0xa3a6('0x46')]};};exports[_0xa3a6('0x4a')]=function(_0x17ec47){return _0x17ec47[_0xa3a6('0x4b')]+_0x17ec47[_0xa3a6('0x4c')]+_0x17ec47[_0xa3a6('0x4d')]+_0x17ec47['countagentrejectretry']+_0x17ec47[_0xa3a6('0x4e')];};exports[_0xa3a6('0x4f')]=function(_0x254500){var _0x13eeb8=_['clone'](_0x254500);_0x13eeb8[_0xa3a6('0x35')]=0xf;_0x13eeb8['statedesc']=_0xa3a6('0x50');return _0x13eeb8;};exports['scheduledAt']=function(_0x13c4f8,_0x59e236,_0x2e46f3){var _0x535a0a={};_0x535a0a[_0x59e236]=_0x13c4f8[_0x59e236];_0x535a0a[_0xa3a6('0x51')]=![];_0x535a0a['scheduledat']=moment()[_0xa3a6('0x52')](_0x2e46f3,_0xa3a6('0x53'))[_0xa3a6('0x13')]('YYYY-MM-DD\x20HH:mm:ss');_0x535a0a[_0xa3a6('0x1b')]=_0x13c4f8[_0xa3a6('0x1b')];_0x535a0a[_0xa3a6('0x54')]=_0x13c4f8[_0xa3a6('0x54')];_0x535a0a[_0xa3a6('0x55')]=_0x13c4f8['VoiceQueueId']||undefined;return _0x535a0a;};exports[_0xa3a6('0x56')]=function(_0x2ce995,_0x599dbc){if(!_[_0xa3a6('0x15')](_0x2ce995)){if(_0x2ce995[_0xa3a6('0x57')]>0x0){_0x2ce995[_0xa3a6('0x57')]-=0x1;}else{logger[_0xa3a6('0x8')](_0x599dbc,_0xa3a6('0x58'));}}else{logger[_0xa3a6('0x8')](_0x599dbc,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0xa3a6('0x59')]=function(_0x449016){if(_0x449016<=0x0){return!![];}return![];};exports[_0xa3a6('0x5a')]=function(_0x31af4a,_0x439193,_0x24fb69){_0x31af4a[_0xa3a6('0x5b')]=_0x439193;_0x31af4a[_0xa3a6('0x18')]=_0x31af4a['queue'];_0x31af4a['interface']=_0x31af4a[_0xa3a6('0x47')];if(_0x24fb69){_0x31af4a[_0xa3a6('0x5c')]=_0x24fb69[_0xa3a6('0x5c')];}return _0x31af4a;};exports[_0xa3a6('0x5d')]=function(_0x59b332){var _0x39d8c1={};_0x39d8c1[_0xa3a6('0x5e')]=_0x59b332[_0xa3a6('0x5e')];_0x39d8c1[_0xa3a6('0x5f')]=_0x59b332[_0xa3a6('0x47')];_0x39d8c1[_0xa3a6('0x46')]=_0x59b332[_0xa3a6('0x46')];return _0x39d8c1;};exports[_0xa3a6('0x60')]=function(_0x592430){var _0x1c7145=[];for(var _0x50a755 in _0x592430){if(_0x592430[_0xa3a6('0x29')](_0x50a755)){if(!_[_0xa3a6('0x15')](_0x592430[_0x50a755])&&_0x592430[_0x50a755][_0xa3a6('0x35')]===_0xa3a6('0x61')&&_0x592430[_0x50a755]['status']===_0xa3a6('0x62')){_0x1c7145[_0xa3a6('0x63')](_0x592430[_0x50a755]['id']);}}}return _0x1c7145;};exports[_0xa3a6('0x64')]=function(_0x2e1090){var _0x20b54c=moment()['milliseconds'](0x0);var _0xc05243=moment(_0x2e1090)[_0xa3a6('0x6')](0x0);return _0x20b54c['diff'](_0xc05243,'seconds');};exports[_0xa3a6('0x65')]=function(_0x488f84){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x488f84[_0xa3a6('0x1b')],'ListId':_0x488f84[_0xa3a6('0x54')],'VoiceQueueId':_0x488f84[_0xa3a6('0x55')]||undefined,'CampaignId':_0x488f84['CampaignId']||undefined};};exports['filterKey']=function(_0x31119a){if(_0x31119a===_0xa3a6('0x46')||_0x31119a==='idContact'||_0x31119a==='queue'||_0x31119a==='type'||_0x31119a==='campaigntype'||_0x31119a===_0xa3a6('0x66')||_0x31119a===_0xa3a6('0x3d')||_0x31119a==='channelAgent'||_0x31119a===_0xa3a6('0x19')||_0x31119a===_0xa3a6('0x51')||_0x31119a===_0xa3a6('0x1a')||_0x31119a===_0xa3a6('0x67')||_0x31119a===_0xa3a6('0x4b')||_0x31119a===_0xa3a6('0x4c')||_0x31119a===_0xa3a6('0x4d')||_0x31119a===_0xa3a6('0x68')||_0x31119a===_0xa3a6('0x69')||_0x31119a===_0xa3a6('0x6a')||_0x31119a===_0xa3a6('0x6b')||_0x31119a===_0xa3a6('0x6c')||_0x31119a===_0xa3a6('0x1b')||_0x31119a===_0xa3a6('0x54')||_0x31119a===_0xa3a6('0x3e')||_0x31119a===_0xa3a6('0x55')||_0x31119a===_0xa3a6('0x6d')||_0x31119a==='xmd-voicequeueid'||_0x31119a==='xmd-queue'||_0x31119a===_0xa3a6('0x6e')||_0x31119a==='xmd-listid'||_0x31119a===_0xa3a6('0x6f')||_0x31119a===_0xa3a6('0x70')||_0x31119a===_0xa3a6('0x71')||_0x31119a===_0xa3a6('0x72')||_0x31119a===_0xa3a6('0x73')||_0x31119a===_0xa3a6('0x74')||_0x31119a===_0xa3a6('0x75')||_0x31119a===_0xa3a6('0x76')||_0x31119a===_0xa3a6('0x77')||_0x31119a==='xmd-agi'||_0x31119a==='rtpaudioqos'||_0x31119a===_0xa3a6('0x78')||_0x31119a===_0xa3a6('0x79')||_0x31119a==='rtpaudioqosjitterbridged'||_0x31119a===_0xa3a6('0x7a')||_0x31119a==='rtpaudioqoslossbridged'||_0x31119a==='rtpaudioqosrtt'||_0x31119a===_0xa3a6('0x7b')||_0x31119a==='rtpaudioqos'||_0x31119a===_0xa3a6('0x78')||_0x31119a===_0xa3a6('0x79')||_0x31119a===_0xa3a6('0x7c')||_0x31119a===_0xa3a6('0x7a')||_0x31119a===_0xa3a6('0x7d')||_0x31119a===_0xa3a6('0x7e')||_0x31119a==='rtpaudioqosrttbridged'||_0x31119a==='bridgepeer'||_0x31119a==='bridgepvtcallid'||_0x31119a===_0xa3a6('0x35')||_0x31119a===_0xa3a6('0x36')){return![];}return!![];};exports[_0xa3a6('0x7f')]=function(_0x4506fa,_0x55c208){var _0x2eaea7,_0x32aa5f,_0x42ba84;if(_0x55c208<=0x0){_0x55c208=0x1;}_0x2eaea7=new RegExp(_0xa3a6('0x80')+_0x55c208+'}$');_0x32aa5f=Math[_0xa3a6('0x81')](0xa,_0x55c208-0x1);_0x42ba84=Math[_0xa3a6('0x81')](0xa,_0x55c208)-0x1;return util[_0xa3a6('0x13')]('%s',_['replace'](_0x4506fa,_0x2eaea7,_[_0xa3a6('0x82')](_0x32aa5f,_0x42ba84)));};exports['extractCalleridName']=function(_0x2fc5b4){var _0x36d193=_0x2fc5b4[_0xa3a6('0x83')](/"(.*?)"/);return _0x36d193?_0x36d193[0x1]:_0x2fc5b4;};exports[_0xa3a6('0x84')]=function(_0x57c4ed){var _0x4bc569=_0x57c4ed['match'](/<(.*?)>/);return _0x4bc569?_0x4bc569[0x1]:_0x57c4ed;}; \ No newline at end of file diff --git a/server/services/ami/properties.js b/server/services/ami/properties.js index 687f36d..6966894 100644 --- a/server/services/ami/properties.js +++ b/server/services/ami/properties.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f2f=['number','boolean','queueremove','reload','voicequeuechannel','voicechannel','voicequeuechannelhangup','queueadd','string'];(function(_0x20a56e,_0x2a7c8e){var _0x45acfc=function(_0x156f2f){while(--_0x156f2f){_0x20a56e['push'](_0x20a56e['shift']());}};_0x45acfc(++_0x2a7c8e);}(_0x5f2f,0x73));var _0xf5f2=function(_0x41ce5f,_0x233698){_0x41ce5f=_0x41ce5f-0x0;var _0x29f927=_0x5f2f[_0x41ce5f];return _0x29f927;};'use strict';exports[_0xf5f2('0x0')]={'queue':{'type':_0xf5f2('0x1'),'required':!![]},'interface':{'type':_0xf5f2('0x1'),'required':!![]},'membername':{'type':_0xf5f2('0x1'),'required':!![]},'penalty':{'type':_0xf5f2('0x2'),'required':![]},'paused':{'type':_0xf5f2('0x3'),'required':![]}};exports[_0xf5f2('0x4')]={'queue':{'type':_0xf5f2('0x1'),'required':!![]},'interface':{'type':'string','required':!![]}};exports['queuepause']={'interface':{'type':_0xf5f2('0x1'),'required':!![]},'paused':{'type':_0xf5f2('0x3')},'reason':{'type':_0xf5f2('0x1'),'required':![]}};exports[_0xf5f2('0x5')]={'module':{'type':_0xf5f2('0x1'),'required':![]}};exports[_0xf5f2('0x6')]={'uniqueid':{'type':'string','required':!![]}};exports[_0xf5f2('0x7')]={'uniqueid':{'type':_0xf5f2('0x1'),'required':!![]},'filename':{'type':_0xf5f2('0x1')},'format':{'type':'string'},'mixmonitorid':{'type':_0xf5f2('0x1')}};exports[_0xf5f2('0x8')]={'uniqueid':{'type':_0xf5f2('0x1'),'required':!![]}};exports['voicequeuechannelredirect']={'uniqueid':{'type':_0xf5f2('0x1'),'required':!![]},'exten':{'type':'string','required':!![]},'context':{'type':'string'}}; \ No newline at end of file +var _0xb10b=['voicequeuechannelhangup','queueadd','string','number','queueremove','queuepause','boolean','reload','voicechannel'];(function(_0x428f8c,_0x5a4846){var _0x872e18=function(_0x29cbf7){while(--_0x29cbf7){_0x428f8c['push'](_0x428f8c['shift']());}};_0x872e18(++_0x5a4846);}(_0xb10b,0x12a));var _0xbb10=function(_0x1c60ef,_0x51da79){_0x1c60ef=_0x1c60ef-0x0;var _0x5b6b80=_0xb10b[_0x1c60ef];return _0x5b6b80;};'use strict';exports[_0xbb10('0x0')]={'queue':{'type':'string','required':!![]},'interface':{'type':_0xbb10('0x1'),'required':!![]},'membername':{'type':_0xbb10('0x1'),'required':!![]},'penalty':{'type':_0xbb10('0x2'),'required':![]},'paused':{'type':'boolean','required':![]}};exports[_0xbb10('0x3')]={'queue':{'type':_0xbb10('0x1'),'required':!![]},'interface':{'type':_0xbb10('0x1'),'required':!![]}};exports[_0xbb10('0x4')]={'interface':{'type':_0xbb10('0x1'),'required':!![]},'paused':{'type':_0xbb10('0x5')},'reason':{'type':'string','required':![]}};exports[_0xbb10('0x6')]={'module':{'type':_0xbb10('0x1'),'required':![]}};exports['voicequeuechannel']={'uniqueid':{'type':_0xbb10('0x1'),'required':!![]}};exports[_0xbb10('0x7')]={'uniqueid':{'type':_0xbb10('0x1'),'required':!![]},'filename':{'type':_0xbb10('0x1')},'format':{'type':_0xbb10('0x1')},'mixmonitorid':{'type':_0xbb10('0x1')}};exports[_0xbb10('0x8')]={'uniqueid':{'type':_0xbb10('0x1'),'required':!![]}};exports['voicequeuechannelredirect']={'uniqueid':{'type':'string','required':!![]},'exten':{'type':_0xbb10('0x1'),'required':!![]},'context':{'type':_0xbb10('0x1')}}; \ No newline at end of file diff --git a/server/services/ami/realtime/index.js b/server/services/ami/realtime/index.js index 578d75c..743742a 100644 --- a/server/services/ami/realtime/index.js +++ b/server/services/ami/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf33=['initVtigerAccounts','initDynamics365Accounts','initFreshsalesAccounts','initVoiceQueueHopperHistory','merge','groupBy','uniqueid','queue','queuecallerexit','queuecallerabandon','seconds','queuecallerabandonAt','queuecallerexitAt','diff','queuecallercomplete','queuecallercompleteAt','queuecallerleaveAt','initVoiceCallReports','disposition','ANSWERED','SquareProject','voiceExtensions','initFaxAccounts','exports','bluebird','util','moment','../model/agent','../model/telephone','../model/trunk','../model/voiceQueue','../model/trigger','../model/template','../model/voiceExtension','../model/zendeskAccount','../model/salesforceAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/vtigerAccount','../model/dynamics365Account','../model/faxAccount','agents','telephones','trunks','triggers','campaigns','templates','outbound','queueChannels','outboundChannels','timers','zendeskAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','faxAccounts','mapKeys','hasOwnProperty','format','SIP/%s','name','interface','total','answered','sumHoldTime','sumDuration','isEmpty','ivrAnswerCallsDay','unmanaged','abandoned','sumBillable','outboundAnswerAgiCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','prototype','mergeFromDatabase','initAgents','length','isNil','isUndefined','initTelephones','initTrunks','initVoiceQueues','voiceQueues','initTriggers','initTemplates','initZendeskAccounts','initSalesforceAccounts','salesforceAccounts','initFreshdeskAccounts','initZohoAccounts','initDeskAccounts'];(function(_0x31fcc0,_0x3c0495){var _0x106572=function(_0x52294b){while(--_0x52294b){_0x31fcc0['push'](_0x31fcc0['shift']());}};_0x106572(++_0x3c0495);}(_0xbf33,0x82));var _0x3bf3=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0xbf33[_0x4243a3];return _0x1b2a33;};'use strict';var BPromise=require(_0x3bf3('0x0'));var util=require(_0x3bf3('0x1'));var _=require('lodash');var moment=require(_0x3bf3('0x2'));var Agent=require(_0x3bf3('0x3'));var Telephone=require(_0x3bf3('0x4'));var Trunk=require(_0x3bf3('0x5'));var VoiceQueue=require(_0x3bf3('0x6'));var Trigger=require(_0x3bf3('0x7'));var Template=require(_0x3bf3('0x8'));var Campaign=require('../model/campaign');var VoiceExtension=require(_0x3bf3('0x9'));var ZendeskAccount=require(_0x3bf3('0xa'));var SalesforceAccount=require(_0x3bf3('0xb'));var FreshdeskAccount=require(_0x3bf3('0xc'));var SugarcrmAccount=require(_0x3bf3('0xd'));var ZohoAccount=require(_0x3bf3('0xe'));var DeskAccount=require('../model/deskAccount');var VtigerAccount=require(_0x3bf3('0xf'));var ServicenowAccount=require('../model/servicenowAccount');var Dynamics365Account=require(_0x3bf3('0x10'));var FreshsalesAccount=require('../model/freshsalesAccount');var FaxAccount=require(_0x3bf3('0x11'));var Realtime=function(){this[_0x3bf3('0x12')]={};this[_0x3bf3('0x13')]={};this[_0x3bf3('0x14')]={};this['voiceQueues']={};this[_0x3bf3('0x15')]={};this[_0x3bf3('0x16')]={};this[_0x3bf3('0x17')]={};this[_0x3bf3('0x18')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this['channels']={};this[_0x3bf3('0x19')]={};this[_0x3bf3('0x1a')]={};this[_0x3bf3('0x1b')]={};this[_0x3bf3('0x1c')]={};this['salesforceAccounts']={};this[_0x3bf3('0x1d')]={};this[_0x3bf3('0x1e')]={};this[_0x3bf3('0x1f')]={};this[_0x3bf3('0x20')]={};this[_0x3bf3('0x21')]={};this[_0x3bf3('0x22')]={};this[_0x3bf3('0x23')]={};this[_0x3bf3('0x24')]={};this[_0x3bf3('0x25')]={};};function freeIsNotKey(_0x21d76b,_0x57b99b,_0x8f738d){var _0x363ef8=_[_0x3bf3('0x26')](_0x21d76b,function(_0x3356ff,_0x129819){return _0x3356ff[_0x8f738d];});for(var _0x531c39 in _0x57b99b){if(_0x57b99b[_0x3bf3('0x27')](_0x531c39)){if(!_0x363ef8[_0x531c39]){delete _0x57b99b[_0x531c39];}}}}function freeIsNotKeySip(_0x42c271,_0xdfa4d9){var _0x5707fa=_['mapKeys'](_0x42c271,function(_0x1eab8c,_0x2774c7){return util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x1eab8c[_0x3bf3('0x2a')]);});for(var _0x3f3952 in _0xdfa4d9){if(_0xdfa4d9[_0x3bf3('0x27')](_0x3f3952)){if(!_0x5707fa[_0x3f3952]){delete _0xdfa4d9[_0x3f3952];}}}}function freeIsNotKeyAgent(_0x1b1494,_0x24d106){var _0x57e507=_[_0x3bf3('0x26')](_0x1b1494,function(_0x258f4a,_0x2da7c5){var _0x36c8e8=_['isNil'](_0x258f4a[_0x3bf3('0x2b')])?util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x258f4a[_0x3bf3('0x2a')]):_0x258f4a[_0x3bf3('0x2b')];return _0x36c8e8;});for(var _0x5b4e1e in _0x24d106){if(_0x24d106['hasOwnProperty'](_0x5b4e1e)){if(!_0x57e507[_0x5b4e1e]){delete _0x24d106[_0x5b4e1e];}}}}function clearVoiceCallReports(_0x35ebab){_0x35ebab[_0x3bf3('0x2c')]=0x0;_0x35ebab[_0x3bf3('0x2d')]=0x0;_0x35ebab[_0x3bf3('0x2e')]=0x0;_0x35ebab[_0x3bf3('0x2f')]=0x0;_0x35ebab['sumBillable']=0x0;}function clearCampaigns(_0x3c30cf){if(!_[_0x3bf3('0x30')](_0x3c30cf)){for(var _0x2a7d5b in _0x3c30cf){if(_0x3c30cf[_0x3bf3('0x27')](_0x2a7d5b)){_0x3c30cf[_0x2a7d5b]['ivrTotalCallsDays']=0x0;_0x3c30cf[_0x2a7d5b][_0x3bf3('0x31')]=0x0;}}}}function clearVoiceQueues(_0x20b215){if(!_[_0x3bf3('0x30')](_0x20b215)){for(var _0x55aa06 in _0x20b215){if(_0x20b215[_0x3bf3('0x27')](_0x55aa06)){_0x20b215[_0x55aa06]['total']=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x2d')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x32')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x33')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x2e')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x2f')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x34')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x35')]=0x0;_0x20b215[_0x55aa06]['outboundNoAnswerCallsDay']=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x36')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x37')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x38')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x39')]=0x0;_0x20b215[_0x55aa06]['outboundDropCallsDayTimeout']=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x3a')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x3b')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x3c')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x3d')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x3e')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x35')]=0x0;_0x20b215[_0x55aa06][_0x3bf3('0x3f')]=0x0;_0x20b215[_0x55aa06]['queueStatusComplete']=!![];}}}}Realtime[_0x3bf3('0x40')][_0x3bf3('0x41')]=function(_0x370a9d,_0x2a92c7){for(var _0x27ff72 in _0x2a92c7){if(_0x370a9d[_0x3bf3('0x27')](_0x27ff72)){_0x370a9d[_0x27ff72]=_0x2a92c7[_0x27ff72];}}};Realtime[_0x3bf3('0x40')][_0x3bf3('0x42')]=function(){var _0x16a416=this;return function(_0x3e18d8){if(_0x3e18d8){freeIsNotKeyAgent(_0x3e18d8,_0x16a416['agents']);for(var _0x4d530a=0x0,_0x35cb81={},_0x457332={};_0x4d530a<_0x3e18d8[_0x3bf3('0x43')];_0x4d530a+=0x1){_0x35cb81=_0x3e18d8[_0x4d530a];var _0x51821d=_[_0x3bf3('0x44')](_0x35cb81[_0x3bf3('0x2b')])?util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x35cb81['name']):_0x35cb81[_0x3bf3('0x2b')];if(_[_0x3bf3('0x45')](_0x16a416['agents'][_0x51821d])){_0x16a416[_0x3bf3('0x12')][_0x51821d]=new Agent(_0x35cb81);}else{_0x16a416[_0x3bf3('0x41')](_0x16a416[_0x3bf3('0x12')][_0x51821d],_0x35cb81);}}}return _0x16a416[_0x3bf3('0x12')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x46')]=function(){var _0x2bb7a6=this;return function(_0x33b444){if(_0x33b444){freeIsNotKeySip(_0x33b444,_0x2bb7a6[_0x3bf3('0x13')]);for(var _0x9515c1=0x0,_0x35f94a={},_0x2cd966={};_0x9515c1<_0x33b444['length'];_0x9515c1+=0x1){_0x35f94a=_0x33b444[_0x9515c1];if(_[_0x3bf3('0x45')](_0x2bb7a6[_0x3bf3('0x13')][util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x35f94a[_0x3bf3('0x2a')])])){_0x2bb7a6[_0x3bf3('0x13')][util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x35f94a[_0x3bf3('0x2a')])]=new Telephone(_0x35f94a);}else{_0x2bb7a6[_0x3bf3('0x41')](_0x2bb7a6[_0x3bf3('0x13')][util[_0x3bf3('0x28')]('SIP/%s',_0x35f94a[_0x3bf3('0x2a')])],_0x35f94a);}}}return _0x2bb7a6[_0x3bf3('0x13')];};};Realtime['prototype'][_0x3bf3('0x47')]=function(){var _0x44c2fa=this;return function(_0x5412b1){if(_0x5412b1){freeIsNotKeySip(_0x5412b1,_0x44c2fa[_0x3bf3('0x14')]);for(var _0x15f415=0x0,_0x4c8f02={},_0x959ac5={};_0x15f415<_0x5412b1[_0x3bf3('0x43')];_0x15f415+=0x1){_0x4c8f02=_0x5412b1[_0x15f415];if(_[_0x3bf3('0x45')](_0x44c2fa['trunks'][util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x4c8f02[_0x3bf3('0x2a')])])){_0x44c2fa[_0x3bf3('0x14')][util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x4c8f02['name'])]=new Trunk(_0x4c8f02);}else{_0x44c2fa[_0x3bf3('0x41')](_0x44c2fa[_0x3bf3('0x14')][util[_0x3bf3('0x28')](_0x3bf3('0x29'),_0x4c8f02[_0x3bf3('0x2a')])],_0x4c8f02);}}}return _0x44c2fa[_0x3bf3('0x14')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x48')]=function(){var _0x2b15d0=this;return function(_0x2f3380){if(_0x2f3380){freeIsNotKey(_0x2f3380,_0x2b15d0[_0x3bf3('0x49')],_0x3bf3('0x2a'));for(var _0x5ded38=0x0,_0x43a74b={},_0x50e35d={};_0x5ded38<_0x2f3380[_0x3bf3('0x43')];_0x5ded38+=0x1){_0x43a74b=_0x2f3380[_0x5ded38];if(_[_0x3bf3('0x45')](_0x2b15d0[_0x3bf3('0x49')][_0x43a74b[_0x3bf3('0x2a')]])){_0x2b15d0[_0x3bf3('0x49')][_0x43a74b[_0x3bf3('0x2a')]]=new VoiceQueue(_0x43a74b);}else{_0x2b15d0[_0x3bf3('0x41')](_0x2b15d0[_0x3bf3('0x49')][_0x43a74b[_0x3bf3('0x2a')]],_0x43a74b);}}}return _0x2b15d0['voiceQueues'];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x4a')]=function(){var _0x24e384=this;return function(_0x54ee20){if(_0x54ee20){freeIsNotKey(_0x54ee20,_0x24e384['triggers'],'id');for(var _0x2105ef=0x0,_0x26b357={},_0x43f696={};_0x2105ef<_0x54ee20['length'];_0x2105ef+=0x1){_0x26b357=_0x54ee20[_0x2105ef];if(_[_0x3bf3('0x45')](_0x24e384[_0x3bf3('0x15')][_0x26b357['id']])){_0x24e384[_0x3bf3('0x15')][_0x26b357['id']]=new Trigger(_0x26b357);}else{_0x24e384[_0x3bf3('0x41')](_0x24e384[_0x3bf3('0x15')][_0x26b357['id']],_0x26b357);}}}return _0x24e384[_0x3bf3('0x15')];};};Realtime['prototype'][_0x3bf3('0x4b')]=function(){var _0x5cf226=this;return function(_0x288102){if(_0x288102){freeIsNotKey(_0x288102,_0x5cf226[_0x3bf3('0x17')],'id');for(var _0x52be7e=0x0,_0x2019f3={},_0xc6d3f3={};_0x52be7e<_0x288102['length'];_0x52be7e+=0x1){_0x2019f3=_0x288102[_0x52be7e];if(_['isUndefined'](_0x5cf226['templates'][_0x2019f3['id']])){_0x5cf226[_0x3bf3('0x17')][_0x2019f3['id']]=new Template(_0x2019f3);}else{_0x5cf226[_0x3bf3('0x41')](_0x5cf226['templates'][_0x2019f3['id']],_0x2019f3);}}}return _0x5cf226[_0x3bf3('0x17')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x4c')]=function(){var _0x4a7ea4=this;return function(_0x94224){if(_0x94224){freeIsNotKey(_0x94224,_0x4a7ea4[_0x3bf3('0x1c')],'id');for(var _0x553603=0x0,_0x3ca212={},_0x5015ac={};_0x553603<_0x94224['length'];_0x553603+=0x1){_0x3ca212=_0x94224[_0x553603];if(_[_0x3bf3('0x45')](_0x4a7ea4['zendeskAccounts'][_0x3ca212['id']])){_0x4a7ea4[_0x3bf3('0x1c')][_0x3ca212['id']]=new ZendeskAccount(_0x3ca212);}else{_0x4a7ea4[_0x3bf3('0x41')](_0x4a7ea4[_0x3bf3('0x1c')][_0x3ca212['id']],_0x3ca212);}}}return _0x4a7ea4[_0x3bf3('0x1c')];};};Realtime['prototype'][_0x3bf3('0x4d')]=function(){var _0x3cfd4c=this;return function(_0x37a702){if(_0x37a702){freeIsNotKey(_0x37a702,_0x3cfd4c[_0x3bf3('0x4e')],'id');for(var _0xc39bbf=0x0,_0x1e9e60={},_0x508e0a={};_0xc39bbf<_0x37a702[_0x3bf3('0x43')];_0xc39bbf+=0x1){_0x1e9e60=_0x37a702[_0xc39bbf];if(_[_0x3bf3('0x45')](_0x3cfd4c[_0x3bf3('0x4e')][_0x1e9e60['id']])){_0x3cfd4c[_0x3bf3('0x4e')][_0x1e9e60['id']]=new SalesforceAccount(_0x1e9e60);}else{_0x3cfd4c[_0x3bf3('0x41')](_0x3cfd4c[_0x3bf3('0x4e')][_0x1e9e60['id']],_0x1e9e60);}}}return _0x3cfd4c['salesforceAccounts'];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x4f')]=function(){var _0x5273e3=this;return function(_0xcd6b77){if(_0xcd6b77){freeIsNotKey(_0xcd6b77,_0x5273e3[_0x3bf3('0x1e')],'id');for(var _0x41c659=0x0,_0x26624f={},_0x315f72={};_0x41c659<_0xcd6b77[_0x3bf3('0x43')];_0x41c659+=0x1){_0x26624f=_0xcd6b77[_0x41c659];if(_[_0x3bf3('0x45')](_0x5273e3[_0x3bf3('0x1e')][_0x26624f['id']])){_0x5273e3[_0x3bf3('0x1e')][_0x26624f['id']]=new FreshdeskAccount(_0x26624f);}else{_0x5273e3['mergeFromDatabase'](_0x5273e3[_0x3bf3('0x1e')][_0x26624f['id']],_0x26624f);}}}return _0x5273e3['freshdeskAccounts'];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x50')]=function(){var _0x4357bd=this;return function(_0x1e5fe4){if(_0x1e5fe4){freeIsNotKey(_0x1e5fe4,_0x4357bd['zohoAccounts'],'id');for(var _0x22a539=0x0,_0x29ea3b={},_0x3325d0={};_0x22a539<_0x1e5fe4['length'];_0x22a539+=0x1){_0x29ea3b=_0x1e5fe4[_0x22a539];if(_[_0x3bf3('0x45')](_0x4357bd[_0x3bf3('0x1f')][_0x29ea3b['id']])){_0x4357bd[_0x3bf3('0x1f')][_0x29ea3b['id']]=new ZohoAccount(_0x29ea3b);}else{_0x4357bd[_0x3bf3('0x41')](_0x4357bd['zohoAccounts'][_0x29ea3b['id']],_0x29ea3b);}}}return _0x4357bd[_0x3bf3('0x1f')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x51')]=function(){var _0x5d9768=this;return function(_0x43d3ac){if(_0x43d3ac){freeIsNotKey(_0x43d3ac,_0x5d9768[_0x3bf3('0x20')],'id');for(var _0x295374=0x0,_0x4d606b={},_0x3e9abc={};_0x295374<_0x43d3ac[_0x3bf3('0x43')];_0x295374+=0x1){_0x4d606b=_0x43d3ac[_0x295374];if(_[_0x3bf3('0x45')](_0x5d9768[_0x3bf3('0x20')][_0x4d606b['id']])){_0x5d9768[_0x3bf3('0x20')][_0x4d606b['id']]=new DeskAccount(_0x4d606b);}else{_0x5d9768['mergeFromDatabase'](_0x5d9768['deskAccounts'][_0x4d606b['id']],_0x4d606b);}}}return _0x5d9768[_0x3bf3('0x20')];};};Realtime['prototype']['initSugarcrmAccounts']=function(){var _0x171ea8=this;return function(_0x2d8920){if(_0x2d8920){freeIsNotKey(_0x2d8920,_0x171ea8[_0x3bf3('0x1d')],'id');for(var _0x1a439f=0x0,_0x4978b0={},_0x183e92={};_0x1a439f<_0x2d8920[_0x3bf3('0x43')];_0x1a439f+=0x1){_0x4978b0=_0x2d8920[_0x1a439f];if(_['isUndefined'](_0x171ea8[_0x3bf3('0x1d')][_0x4978b0['id']])){_0x171ea8['sugarcrmAccounts'][_0x4978b0['id']]=new SugarcrmAccount(_0x4978b0);}else{_0x171ea8[_0x3bf3('0x41')](_0x171ea8[_0x3bf3('0x1d')][_0x4978b0['id']],_0x4978b0);}}}return _0x171ea8[_0x3bf3('0x1d')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x52')]=function(){var _0x328f4f=this;return function(_0x3363b2){if(_0x3363b2){freeIsNotKey(_0x3363b2,_0x328f4f[_0x3bf3('0x21')],'id');for(var _0x5458b9=0x0,_0x34e3e4={},_0xef0134={};_0x5458b9<_0x3363b2['length'];_0x5458b9+=0x1){_0x34e3e4=_0x3363b2[_0x5458b9];if(_[_0x3bf3('0x45')](_0x328f4f[_0x3bf3('0x21')][_0x34e3e4['id']])){_0x328f4f['vtigerAccounts'][_0x34e3e4['id']]=new VtigerAccount(_0x34e3e4);}else{_0x328f4f[_0x3bf3('0x41')](_0x328f4f[_0x3bf3('0x21')][_0x34e3e4['id']],_0x34e3e4);}}}return _0x328f4f[_0x3bf3('0x21')];};};Realtime['prototype']['initServicenowAccounts']=function(){var _0xc2a2fb=this;return function(_0x12ae4c){if(_0x12ae4c){freeIsNotKey(_0x12ae4c,_0xc2a2fb[_0x3bf3('0x22')],'id');for(var _0x250b19=0x0,_0x5249ca={},_0x3edca4={};_0x250b19<_0x12ae4c[_0x3bf3('0x43')];_0x250b19+=0x1){_0x5249ca=_0x12ae4c[_0x250b19];if(_[_0x3bf3('0x45')](_0xc2a2fb[_0x3bf3('0x22')][_0x5249ca['id']])){_0xc2a2fb[_0x3bf3('0x22')][_0x5249ca['id']]=new ServicenowAccount(_0x5249ca);}else{_0xc2a2fb['mergeFromDatabase'](_0xc2a2fb[_0x3bf3('0x22')][_0x5249ca['id']],_0x5249ca);}}}return _0xc2a2fb[_0x3bf3('0x22')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x53')]=function(){var _0x38a1e6=this;return function(_0x62005d){if(_0x62005d){freeIsNotKey(_0x62005d,_0x38a1e6['dynamics365Accounts'],'id');for(var _0x407559=0x0,_0x10847={},_0x5d6c94={};_0x407559<_0x62005d[_0x3bf3('0x43')];_0x407559+=0x1){_0x10847=_0x62005d[_0x407559];if(_['isUndefined'](_0x38a1e6[_0x3bf3('0x23')][_0x10847['id']])){_0x38a1e6[_0x3bf3('0x23')][_0x10847['id']]=new Dynamics365Account(_0x10847);}else{_0x38a1e6[_0x3bf3('0x41')](_0x38a1e6['dynamics365Accounts'][_0x10847['id']],_0x10847);}}}return _0x38a1e6[_0x3bf3('0x23')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x54')]=function(){var _0x4f55ad=this;return function(_0x3a5257){if(_0x3a5257){freeIsNotKey(_0x3a5257,_0x4f55ad['freshsalesAccounts'],'id');for(var _0x37b782=0x0,_0x5f3dde={},_0xfb9a6b={};_0x37b782<_0x3a5257[_0x3bf3('0x43')];_0x37b782+=0x1){_0x5f3dde=_0x3a5257[_0x37b782];if(_[_0x3bf3('0x45')](_0x4f55ad['freshsalesAccounts'][_0x5f3dde['id']])){_0x4f55ad[_0x3bf3('0x24')][_0x5f3dde['id']]=new FreshsalesAccount(_0x5f3dde);}else{_0x4f55ad[_0x3bf3('0x41')](_0x4f55ad[_0x3bf3('0x24')][_0x5f3dde['id']],_0x5f3dde);}}}return _0x4f55ad[_0x3bf3('0x24')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x55')]=function(){var _0x3535f1=this;return function(_0x3aa530){for(var _0x265913=0x0;_0x265913<_0x3aa530[_0x3bf3('0x43')];_0x265913+=0x1){_[_0x3bf3('0x56')](_0x3535f1[_0x3bf3('0x49')][_0x3aa530[_0x265913][_0x3bf3('0x2a')]],_0x3aa530[_0x265913]);}return _0x3535f1[_0x3bf3('0x49')];};};Realtime['prototype']['initVoiceQueueReports']=function(){var _0xadef40=this;return function(_0x320cee){clearVoiceQueues(_0xadef40[_0x3bf3('0x49')]);if(_0x320cee){_0x320cee=_[_0x3bf3('0x57')](_0x320cee,_0x3bf3('0x58'));for(var _0x3518e3 in _0x320cee){if(_0x320cee['hasOwnProperty'](_0x3518e3)){var _0x45eb93={};for(var _0x1cd924=0x0;_0x1cd924<_0x320cee[_0x3518e3][_0x3bf3('0x43')];_0x1cd924+=0x1){var _0x7e7f5a=_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x59')];if(_0xadef40[_0x3bf3('0x49')][_0x7e7f5a]){if(_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x5a')]){_0xadef40['voiceQueues'][_0x7e7f5a][_0x3bf3('0x32')]+=0x1;}if(_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x5b')]){_0xadef40['voiceQueues'][_0x7e7f5a][_0x3bf3('0x33')]+=0x1;}_0xadef40['voiceQueues'][_0x7e7f5a][_0x3bf3('0x2e')]+=moment(_0x320cee[_0x3518e3][_0x1cd924]['queuecallerleaveAt'])['diff'](moment(_0x320cee[_0x3518e3][_0x1cd924]['queuecallerjoinAt']),_0x3bf3('0x5c'))||0x0;if(_0x1cd924===_0x320cee[_0x3518e3][_0x3bf3('0x43')]-0x1){_0xadef40[_0x3bf3('0x49')][_0x7e7f5a][_0x3bf3('0x2f')]+=moment(_0x320cee[_0x3518e3][_0x1cd924]['queuecallercompleteAt']||_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x5d')]||_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x5e')])[_0x3bf3('0x5f')](moment(_0x320cee[_0x3518e3][_0x1cd924]['queuecallerjoinAt']),_0x3bf3('0x5c'))||0x0;_0xadef40[_0x3bf3('0x49')][_0x7e7f5a][_0x3bf3('0x2c')]+=0x1;if(_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x60')]){_0xadef40[_0x3bf3('0x49')][_0x7e7f5a][_0x3bf3('0x2d')]+=0x1;_0xadef40[_0x3bf3('0x49')][_0x7e7f5a][_0x3bf3('0x34')]+=moment(_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x61')])[_0x3bf3('0x5f')](moment(_0x320cee[_0x3518e3][_0x1cd924][_0x3bf3('0x62')]),'seconds')||0x0;}}else{_0xadef40[_0x3bf3('0x49')][_0x7e7f5a][_0x3bf3('0x2f')]+=_0xadef40[_0x3bf3('0x49')][_0x7e7f5a][_0x3bf3('0x2e')]||0x0;}}}}}}return _0xadef40[_0x3bf3('0x49')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x63')]=function(){var _0x8ca9f0=this;return function(_0x1a6089){clearVoiceCallReports(_0x8ca9f0[_0x3bf3('0x18')]);if(_0x1a6089){for(var _0x51b238=0x0;_0x51b238<_0x1a6089[_0x3bf3('0x43')];_0x51b238+=0x1){_0x8ca9f0[_0x3bf3('0x18')][_0x3bf3('0x2c')]+=0x1;_0x8ca9f0[_0x3bf3('0x18')][_0x3bf3('0x2f')]+=_0x1a6089[_0x51b238]['duration'];if(_0x1a6089[_0x51b238][_0x3bf3('0x64')]===_0x3bf3('0x65')){_0x8ca9f0[_0x3bf3('0x18')]['answered']+=0x1;_0x8ca9f0[_0x3bf3('0x18')]['sumHoldTime']+=_0x1a6089[_0x51b238]['duration']-_0x1a6089[_0x51b238]['billableseconds']||0x0;_0x8ca9f0[_0x3bf3('0x18')]['sumBillable']+=_0x1a6089[_0x51b238]['billableseconds'];}}}return _0x8ca9f0[_0x3bf3('0x18')];};};Realtime[_0x3bf3('0x40')]['initCampaigns']=function(){var _0x504545=this;return function(_0xffd6b0){if(_0xffd6b0){freeIsNotKey(_0xffd6b0,_0x504545[_0x3bf3('0x16')],_0x3bf3('0x2a'));for(var _0x13cca6=0x0,_0x2d3bad={};_0x13cca6<_0xffd6b0[_0x3bf3('0x43')];_0x13cca6+=0x1){_0x2d3bad=_0xffd6b0[_0x13cca6];if(_[_0x3bf3('0x45')](_0x504545[_0x3bf3('0x16')][_0x2d3bad[_0x3bf3('0x2a')]])){_0x504545['campaigns'][_0x2d3bad['name']]=new Campaign(_0x2d3bad);}else{_0x504545[_0x3bf3('0x41')](_0x504545['campaigns'][_0x2d3bad[_0x3bf3('0x2a')]],_0x2d3bad);_0x504545[_0x3bf3('0x16')][_0x2d3bad[_0x3bf3('0x2a')]]['dialQueueProject']=_0x2d3bad[_0x3bf3('0x66')]?_0x2d3bad[_0x3bf3('0x66')][_0x3bf3('0x2a')]:undefined;}}}return _0x504545[_0x3bf3('0x16')];};};Realtime[_0x3bf3('0x40')]['initVoiceExtensions']=function(){var _0xab2219=this;return function(_0x52feed){if(_0x52feed){freeIsNotKey(_0x52feed,_0xab2219[_0x3bf3('0x67')],'id');for(var _0x5d16f8=0x0,_0x1915c8={};_0x5d16f8<_0x52feed[_0x3bf3('0x43')];_0x5d16f8+=0x1){_0x1915c8=_0x52feed[_0x5d16f8];if(_['isUndefined'](_0xab2219['voiceExtensions'][_0x1915c8['id']])){_0xab2219[_0x3bf3('0x67')][_0x1915c8['id']]=new VoiceExtension(_0x1915c8);}else{_0xab2219['mergeFromDatabase'](_0xab2219[_0x3bf3('0x67')][_0x1915c8['id']],_0x1915c8);}}}return _0xab2219[_0x3bf3('0x67')];};};Realtime['prototype']['initCampaignHopperHistory']=function(){var _0x164be7=this;return function(_0x1980f2){clearCampaigns(_0x164be7[_0x3bf3('0x16')]);for(var _0x5c5494=0x0;_0x5c5494<_0x1980f2[_0x3bf3('0x43')];_0x5c5494+=0x1){_[_0x3bf3('0x56')](_0x164be7[_0x3bf3('0x16')][_0x1980f2[_0x5c5494]['name']],_0x1980f2[_0x5c5494]);}return _0x164be7[_0x3bf3('0x16')];};};Realtime[_0x3bf3('0x40')][_0x3bf3('0x68')]=function(){var _0x5b4a83=this;return function(_0x461453){if(_0x461453){freeIsNotKey(_0x461453,_0x5b4a83[_0x3bf3('0x25')],'id');for(var _0x19bdde=0x0,_0x1caaee={},_0x2b9f0a={};_0x19bdde<_0x461453[_0x3bf3('0x43')];_0x19bdde+=0x1){_0x1caaee=_0x461453[_0x19bdde];if(_['isUndefined'](_0x5b4a83[_0x3bf3('0x25')][_0x1caaee['id']])){_0x5b4a83[_0x3bf3('0x25')][_0x1caaee['id']]=new FaxAccount(_0x1caaee);}else{_0x5b4a83[_0x3bf3('0x41')](_0x5b4a83[_0x3bf3('0x25')][_0x1caaee['id']],_0x1caaee);}}}return _0x5b4a83[_0x3bf3('0x25')];};};module[_0x3bf3('0x69')]=Realtime; \ No newline at end of file +var _0xa4b0=['sumBillable','isEmpty','ivrAnswerCallsDay','unmanaged','sumHoldTime','sumDuration','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundNoSuchCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','length','isNil','isUndefined','initTelephones','initTrunks','initVoiceQueues','voiceQueues','initTriggers','triggers','initTemplates','initZendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','initZohoAccounts','initDeskAccounts','initSugarcrmAccounts','sugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','initDynamics365Accounts','initVoiceQueueHopperHistory','groupBy','queue','queuecallerexit','queuecallerabandon','abandoned','diff','queuecallerjoinAt','seconds','queuecallercompleteAt','queuecallerexitAt','total','queuecallercomplete','queuecallerleaveAt','initVoiceCallReports','duration','disposition','ANSWERED','billableseconds','SquareProject','initVoiceExtensions','merge','initFaxAccounts','exports','bluebird','../model/agent','../model/telephone','../model/trunk','../model/voiceQueue','../model/template','../model/campaign','../model/voiceExtension','../model/zendeskAccount','../model/salesforceAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/vtigerAccount','../model/freshsalesAccount','../model/faxAccount','agents','telephones','trunks','campaigns','templates','outbound','voiceExtensions','queueChannels','outboundChannels','timers','zendeskAccounts','salesforceAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','faxAccounts','mapKeys','hasOwnProperty','format','SIP/%s','interface','name','answered'];(function(_0x304655,_0x15b109){var _0x2fa58a=function(_0x7d144){while(--_0x7d144){_0x304655['push'](_0x304655['shift']());}};_0x2fa58a(++_0x15b109);}(_0xa4b0,0x1e8));var _0x0a4b=function(_0x162703,_0x57b788){_0x162703=_0x162703-0x0;var _0x5e7f4a=_0xa4b0[_0x162703];return _0x5e7f4a;};'use strict';var BPromise=require(_0x0a4b('0x0'));var util=require('util');var _=require('lodash');var moment=require('moment');var Agent=require(_0x0a4b('0x1'));var Telephone=require(_0x0a4b('0x2'));var Trunk=require(_0x0a4b('0x3'));var VoiceQueue=require(_0x0a4b('0x4'));var Trigger=require('../model/trigger');var Template=require(_0x0a4b('0x5'));var Campaign=require(_0x0a4b('0x6'));var VoiceExtension=require(_0x0a4b('0x7'));var ZendeskAccount=require(_0x0a4b('0x8'));var SalesforceAccount=require(_0x0a4b('0x9'));var FreshdeskAccount=require('../model/freshdeskAccount');var SugarcrmAccount=require(_0x0a4b('0xa'));var ZohoAccount=require(_0x0a4b('0xb'));var DeskAccount=require('../model/deskAccount');var VtigerAccount=require(_0x0a4b('0xc'));var ServicenowAccount=require('../model/servicenowAccount');var Dynamics365Account=require('../model/dynamics365Account');var FreshsalesAccount=require(_0x0a4b('0xd'));var FaxAccount=require(_0x0a4b('0xe'));var Realtime=function(){this[_0x0a4b('0xf')]={};this[_0x0a4b('0x10')]={};this[_0x0a4b('0x11')]={};this['voiceQueues']={};this['triggers']={};this[_0x0a4b('0x12')]={};this[_0x0a4b('0x13')]={};this[_0x0a4b('0x14')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0x0a4b('0x15')]={};this['channels']={};this[_0x0a4b('0x16')]={};this[_0x0a4b('0x17')]={};this[_0x0a4b('0x18')]={};this[_0x0a4b('0x19')]={};this[_0x0a4b('0x1a')]={};this['sugarcrmAccounts']={};this[_0x0a4b('0x1b')]={};this[_0x0a4b('0x1c')]={};this[_0x0a4b('0x1d')]={};this[_0x0a4b('0x1e')]={};this[_0x0a4b('0x1f')]={};this[_0x0a4b('0x20')]={};this[_0x0a4b('0x21')]={};this[_0x0a4b('0x22')]={};};function freeIsNotKey(_0x320b57,_0x4cc13b,_0x2be559){var _0x4065da=_[_0x0a4b('0x23')](_0x320b57,function(_0x552473,_0x42eb96){return _0x552473[_0x2be559];});for(var _0x1e5da7 in _0x4cc13b){if(_0x4cc13b[_0x0a4b('0x24')](_0x1e5da7)){if(!_0x4065da[_0x1e5da7]){delete _0x4cc13b[_0x1e5da7];}}}}function freeIsNotKeySip(_0x266503,_0x2fd5fd){var _0x4c583e=_['mapKeys'](_0x266503,function(_0x18feff,_0x262e32){return util[_0x0a4b('0x25')](_0x0a4b('0x26'),_0x18feff['name']);});for(var _0x1810a5 in _0x2fd5fd){if(_0x2fd5fd['hasOwnProperty'](_0x1810a5)){if(!_0x4c583e[_0x1810a5]){delete _0x2fd5fd[_0x1810a5];}}}}function freeIsNotKeyAgent(_0x1b9641,_0x5d5cb0){var _0x43a7ce=_[_0x0a4b('0x23')](_0x1b9641,function(_0x8531da,_0x2f21eb){var _0x50d82f=_['isNil'](_0x8531da[_0x0a4b('0x27')])?util['format'](_0x0a4b('0x26'),_0x8531da[_0x0a4b('0x28')]):_0x8531da['interface'];return _0x50d82f;});for(var _0x2df4ea in _0x5d5cb0){if(_0x5d5cb0['hasOwnProperty'](_0x2df4ea)){if(!_0x43a7ce[_0x2df4ea]){delete _0x5d5cb0[_0x2df4ea];}}}}function clearVoiceCallReports(_0x1b8566){_0x1b8566['total']=0x0;_0x1b8566[_0x0a4b('0x29')]=0x0;_0x1b8566['sumHoldTime']=0x0;_0x1b8566['sumDuration']=0x0;_0x1b8566[_0x0a4b('0x2a')]=0x0;}function clearCampaigns(_0x27f902){if(!_[_0x0a4b('0x2b')](_0x27f902)){for(var _0x4dbac7 in _0x27f902){if(_0x27f902[_0x0a4b('0x24')](_0x4dbac7)){_0x27f902[_0x4dbac7]['ivrTotalCallsDays']=0x0;_0x27f902[_0x4dbac7][_0x0a4b('0x2c')]=0x0;}}}}function clearVoiceQueues(_0x1390a1){if(!_['isEmpty'](_0x1390a1)){for(var _0x138150 in _0x1390a1){if(_0x1390a1[_0x0a4b('0x24')](_0x138150)){_0x1390a1[_0x138150]['total']=0x0;_0x1390a1[_0x138150][_0x0a4b('0x29')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x2d')]=0x0;_0x1390a1[_0x138150]['abandoned']=0x0;_0x1390a1[_0x138150][_0x0a4b('0x2e')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x2f')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x2a')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x30')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x31')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x32')]=0x0;_0x1390a1[_0x138150]['outboundCongestionCallsDay']=0x0;_0x1390a1[_0x138150][_0x0a4b('0x33')]=0x0;_0x1390a1[_0x138150]['outboundUnknownCallsDay']=0x0;_0x1390a1[_0x138150][_0x0a4b('0x34')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x35')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x36')]=0x0;_0x1390a1[_0x138150]['outboundOriginateFailureCallsDay']=0x0;_0x1390a1[_0x138150][_0x0a4b('0x37')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x38')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x30')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x39')]=0x0;_0x1390a1[_0x138150][_0x0a4b('0x3a')]=!![];}}}}Realtime[_0x0a4b('0x3b')][_0x0a4b('0x3c')]=function(_0x164952,_0x31de91){for(var _0x236997 in _0x31de91){if(_0x164952[_0x0a4b('0x24')](_0x236997)){_0x164952[_0x236997]=_0x31de91[_0x236997];}}};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x3d')]=function(){var _0x471b70=this;return function(_0x42a459){if(_0x42a459){freeIsNotKeyAgent(_0x42a459,_0x471b70['agents']);for(var _0x21d783=0x0,_0x399bab={},_0x119a0f={};_0x21d783<_0x42a459[_0x0a4b('0x3e')];_0x21d783+=0x1){_0x399bab=_0x42a459[_0x21d783];var _0x17e9d2=_[_0x0a4b('0x3f')](_0x399bab[_0x0a4b('0x27')])?util[_0x0a4b('0x25')](_0x0a4b('0x26'),_0x399bab['name']):_0x399bab['interface'];if(_[_0x0a4b('0x40')](_0x471b70['agents'][_0x17e9d2])){_0x471b70[_0x0a4b('0xf')][_0x17e9d2]=new Agent(_0x399bab);}else{_0x471b70[_0x0a4b('0x3c')](_0x471b70['agents'][_0x17e9d2],_0x399bab);}}}return _0x471b70[_0x0a4b('0xf')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x41')]=function(){var _0x418a75=this;return function(_0x22a3dc){if(_0x22a3dc){freeIsNotKeySip(_0x22a3dc,_0x418a75[_0x0a4b('0x10')]);for(var _0x4cbb65=0x0,_0x4f082b={},_0x190b80={};_0x4cbb65<_0x22a3dc[_0x0a4b('0x3e')];_0x4cbb65+=0x1){_0x4f082b=_0x22a3dc[_0x4cbb65];if(_[_0x0a4b('0x40')](_0x418a75[_0x0a4b('0x10')][util[_0x0a4b('0x25')](_0x0a4b('0x26'),_0x4f082b[_0x0a4b('0x28')])])){_0x418a75[_0x0a4b('0x10')][util[_0x0a4b('0x25')](_0x0a4b('0x26'),_0x4f082b[_0x0a4b('0x28')])]=new Telephone(_0x4f082b);}else{_0x418a75[_0x0a4b('0x3c')](_0x418a75[_0x0a4b('0x10')][util[_0x0a4b('0x25')]('SIP/%s',_0x4f082b[_0x0a4b('0x28')])],_0x4f082b);}}}return _0x418a75[_0x0a4b('0x10')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x42')]=function(){var _0x5caae=this;return function(_0x23a001){if(_0x23a001){freeIsNotKeySip(_0x23a001,_0x5caae['trunks']);for(var _0x278fc4=0x0,_0x88fce7={},_0x396c94={};_0x278fc4<_0x23a001[_0x0a4b('0x3e')];_0x278fc4+=0x1){_0x88fce7=_0x23a001[_0x278fc4];if(_['isUndefined'](_0x5caae[_0x0a4b('0x11')][util['format'](_0x0a4b('0x26'),_0x88fce7['name'])])){_0x5caae[_0x0a4b('0x11')][util[_0x0a4b('0x25')](_0x0a4b('0x26'),_0x88fce7[_0x0a4b('0x28')])]=new Trunk(_0x88fce7);}else{_0x5caae[_0x0a4b('0x3c')](_0x5caae['trunks'][util[_0x0a4b('0x25')](_0x0a4b('0x26'),_0x88fce7[_0x0a4b('0x28')])],_0x88fce7);}}}return _0x5caae['trunks'];};};Realtime['prototype'][_0x0a4b('0x43')]=function(){var _0xbb255d=this;return function(_0x452b0d){if(_0x452b0d){freeIsNotKey(_0x452b0d,_0xbb255d[_0x0a4b('0x44')],_0x0a4b('0x28'));for(var _0x51c8a3=0x0,_0x4ac0e4={},_0x2bf6e1={};_0x51c8a3<_0x452b0d['length'];_0x51c8a3+=0x1){_0x4ac0e4=_0x452b0d[_0x51c8a3];if(_[_0x0a4b('0x40')](_0xbb255d[_0x0a4b('0x44')][_0x4ac0e4[_0x0a4b('0x28')]])){_0xbb255d[_0x0a4b('0x44')][_0x4ac0e4[_0x0a4b('0x28')]]=new VoiceQueue(_0x4ac0e4);}else{_0xbb255d[_0x0a4b('0x3c')](_0xbb255d[_0x0a4b('0x44')][_0x4ac0e4[_0x0a4b('0x28')]],_0x4ac0e4);}}}return _0xbb255d[_0x0a4b('0x44')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x45')]=function(){var _0x4924dd=this;return function(_0x5cc8b0){if(_0x5cc8b0){freeIsNotKey(_0x5cc8b0,_0x4924dd[_0x0a4b('0x46')],'id');for(var _0x55d082=0x0,_0x590b5a={},_0xf2d5b8={};_0x55d082<_0x5cc8b0[_0x0a4b('0x3e')];_0x55d082+=0x1){_0x590b5a=_0x5cc8b0[_0x55d082];if(_['isUndefined'](_0x4924dd[_0x0a4b('0x46')][_0x590b5a['id']])){_0x4924dd[_0x0a4b('0x46')][_0x590b5a['id']]=new Trigger(_0x590b5a);}else{_0x4924dd[_0x0a4b('0x3c')](_0x4924dd[_0x0a4b('0x46')][_0x590b5a['id']],_0x590b5a);}}}return _0x4924dd['triggers'];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x47')]=function(){var _0x476045=this;return function(_0x4ab2c2){if(_0x4ab2c2){freeIsNotKey(_0x4ab2c2,_0x476045[_0x0a4b('0x13')],'id');for(var _0x3490e5=0x0,_0x2dd888={},_0x11b9da={};_0x3490e5<_0x4ab2c2['length'];_0x3490e5+=0x1){_0x2dd888=_0x4ab2c2[_0x3490e5];if(_['isUndefined'](_0x476045[_0x0a4b('0x13')][_0x2dd888['id']])){_0x476045[_0x0a4b('0x13')][_0x2dd888['id']]=new Template(_0x2dd888);}else{_0x476045[_0x0a4b('0x3c')](_0x476045[_0x0a4b('0x13')][_0x2dd888['id']],_0x2dd888);}}}return _0x476045['templates'];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x48')]=function(){var _0x519fee=this;return function(_0x39605c){if(_0x39605c){freeIsNotKey(_0x39605c,_0x519fee[_0x0a4b('0x19')],'id');for(var _0x35afbd=0x0,_0x175a81={},_0x180dc1={};_0x35afbd<_0x39605c[_0x0a4b('0x3e')];_0x35afbd+=0x1){_0x175a81=_0x39605c[_0x35afbd];if(_[_0x0a4b('0x40')](_0x519fee['zendeskAccounts'][_0x175a81['id']])){_0x519fee[_0x0a4b('0x19')][_0x175a81['id']]=new ZendeskAccount(_0x175a81);}else{_0x519fee[_0x0a4b('0x3c')](_0x519fee[_0x0a4b('0x19')][_0x175a81['id']],_0x175a81);}}}return _0x519fee[_0x0a4b('0x19')];};};Realtime['prototype'][_0x0a4b('0x49')]=function(){var _0x1155de=this;return function(_0x5e33d1){if(_0x5e33d1){freeIsNotKey(_0x5e33d1,_0x1155de[_0x0a4b('0x1a')],'id');for(var _0x50a98c=0x0,_0x2f7f30={},_0x3936ab={};_0x50a98c<_0x5e33d1[_0x0a4b('0x3e')];_0x50a98c+=0x1){_0x2f7f30=_0x5e33d1[_0x50a98c];if(_['isUndefined'](_0x1155de['salesforceAccounts'][_0x2f7f30['id']])){_0x1155de[_0x0a4b('0x1a')][_0x2f7f30['id']]=new SalesforceAccount(_0x2f7f30);}else{_0x1155de[_0x0a4b('0x3c')](_0x1155de[_0x0a4b('0x1a')][_0x2f7f30['id']],_0x2f7f30);}}}return _0x1155de['salesforceAccounts'];};};Realtime['prototype'][_0x0a4b('0x4a')]=function(){var _0x47b759=this;return function(_0x48e25a){if(_0x48e25a){freeIsNotKey(_0x48e25a,_0x47b759[_0x0a4b('0x1b')],'id');for(var _0x44660e=0x0,_0x285a32={},_0x48afa5={};_0x44660e<_0x48e25a[_0x0a4b('0x3e')];_0x44660e+=0x1){_0x285a32=_0x48e25a[_0x44660e];if(_[_0x0a4b('0x40')](_0x47b759[_0x0a4b('0x1b')][_0x285a32['id']])){_0x47b759['freshdeskAccounts'][_0x285a32['id']]=new FreshdeskAccount(_0x285a32);}else{_0x47b759[_0x0a4b('0x3c')](_0x47b759[_0x0a4b('0x1b')][_0x285a32['id']],_0x285a32);}}}return _0x47b759['freshdeskAccounts'];};};Realtime['prototype'][_0x0a4b('0x4b')]=function(){var _0x4c39ba=this;return function(_0x41f7c4){if(_0x41f7c4){freeIsNotKey(_0x41f7c4,_0x4c39ba[_0x0a4b('0x1c')],'id');for(var _0x38847d=0x0,_0x99aea2={},_0x2c4550={};_0x38847d<_0x41f7c4[_0x0a4b('0x3e')];_0x38847d+=0x1){_0x99aea2=_0x41f7c4[_0x38847d];if(_[_0x0a4b('0x40')](_0x4c39ba['zohoAccounts'][_0x99aea2['id']])){_0x4c39ba[_0x0a4b('0x1c')][_0x99aea2['id']]=new ZohoAccount(_0x99aea2);}else{_0x4c39ba[_0x0a4b('0x3c')](_0x4c39ba['zohoAccounts'][_0x99aea2['id']],_0x99aea2);}}}return _0x4c39ba[_0x0a4b('0x1c')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x4c')]=function(){var _0x4c10ee=this;return function(_0x774c85){if(_0x774c85){freeIsNotKey(_0x774c85,_0x4c10ee[_0x0a4b('0x1d')],'id');for(var _0x406db0=0x0,_0x18f770={},_0x48d071={};_0x406db0<_0x774c85[_0x0a4b('0x3e')];_0x406db0+=0x1){_0x18f770=_0x774c85[_0x406db0];if(_[_0x0a4b('0x40')](_0x4c10ee[_0x0a4b('0x1d')][_0x18f770['id']])){_0x4c10ee[_0x0a4b('0x1d')][_0x18f770['id']]=new DeskAccount(_0x18f770);}else{_0x4c10ee['mergeFromDatabase'](_0x4c10ee[_0x0a4b('0x1d')][_0x18f770['id']],_0x18f770);}}}return _0x4c10ee[_0x0a4b('0x1d')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x4d')]=function(){var _0x331fc0=this;return function(_0x143bbb){if(_0x143bbb){freeIsNotKey(_0x143bbb,_0x331fc0[_0x0a4b('0x4e')],'id');for(var _0x5ad713=0x0,_0x4a61b9={},_0x548f52={};_0x5ad713<_0x143bbb[_0x0a4b('0x3e')];_0x5ad713+=0x1){_0x4a61b9=_0x143bbb[_0x5ad713];if(_[_0x0a4b('0x40')](_0x331fc0[_0x0a4b('0x4e')][_0x4a61b9['id']])){_0x331fc0[_0x0a4b('0x4e')][_0x4a61b9['id']]=new SugarcrmAccount(_0x4a61b9);}else{_0x331fc0[_0x0a4b('0x3c')](_0x331fc0['sugarcrmAccounts'][_0x4a61b9['id']],_0x4a61b9);}}}return _0x331fc0[_0x0a4b('0x4e')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x4f')]=function(){var _0x35aec0=this;return function(_0x23072d){if(_0x23072d){freeIsNotKey(_0x23072d,_0x35aec0[_0x0a4b('0x1e')],'id');for(var _0xc48d6f=0x0,_0x2ecfac={},_0x55ea11={};_0xc48d6f<_0x23072d[_0x0a4b('0x3e')];_0xc48d6f+=0x1){_0x2ecfac=_0x23072d[_0xc48d6f];if(_[_0x0a4b('0x40')](_0x35aec0[_0x0a4b('0x1e')][_0x2ecfac['id']])){_0x35aec0['vtigerAccounts'][_0x2ecfac['id']]=new VtigerAccount(_0x2ecfac);}else{_0x35aec0[_0x0a4b('0x3c')](_0x35aec0[_0x0a4b('0x1e')][_0x2ecfac['id']],_0x2ecfac);}}}return _0x35aec0[_0x0a4b('0x1e')];};};Realtime['prototype'][_0x0a4b('0x50')]=function(){var _0x14d7b6=this;return function(_0x5b0818){if(_0x5b0818){freeIsNotKey(_0x5b0818,_0x14d7b6[_0x0a4b('0x1f')],'id');for(var _0x376bf0=0x0,_0x293d6c={},_0x1e8a20={};_0x376bf0<_0x5b0818[_0x0a4b('0x3e')];_0x376bf0+=0x1){_0x293d6c=_0x5b0818[_0x376bf0];if(_[_0x0a4b('0x40')](_0x14d7b6['servicenowAccounts'][_0x293d6c['id']])){_0x14d7b6[_0x0a4b('0x1f')][_0x293d6c['id']]=new ServicenowAccount(_0x293d6c);}else{_0x14d7b6[_0x0a4b('0x3c')](_0x14d7b6['servicenowAccounts'][_0x293d6c['id']],_0x293d6c);}}}return _0x14d7b6[_0x0a4b('0x1f')];};};Realtime['prototype'][_0x0a4b('0x51')]=function(){var _0x1adf6e=this;return function(_0x1b2af0){if(_0x1b2af0){freeIsNotKey(_0x1b2af0,_0x1adf6e[_0x0a4b('0x20')],'id');for(var _0x4d878c=0x0,_0x1260c7={},_0x4b4e1f={};_0x4d878c<_0x1b2af0[_0x0a4b('0x3e')];_0x4d878c+=0x1){_0x1260c7=_0x1b2af0[_0x4d878c];if(_['isUndefined'](_0x1adf6e[_0x0a4b('0x20')][_0x1260c7['id']])){_0x1adf6e[_0x0a4b('0x20')][_0x1260c7['id']]=new Dynamics365Account(_0x1260c7);}else{_0x1adf6e[_0x0a4b('0x3c')](_0x1adf6e[_0x0a4b('0x20')][_0x1260c7['id']],_0x1260c7);}}}return _0x1adf6e['dynamics365Accounts'];};};Realtime[_0x0a4b('0x3b')]['initFreshsalesAccounts']=function(){var _0x31639f=this;return function(_0x50394d){if(_0x50394d){freeIsNotKey(_0x50394d,_0x31639f[_0x0a4b('0x21')],'id');for(var _0x2e4b9b=0x0,_0x58967c={},_0x361a1e={};_0x2e4b9b<_0x50394d[_0x0a4b('0x3e')];_0x2e4b9b+=0x1){_0x58967c=_0x50394d[_0x2e4b9b];if(_['isUndefined'](_0x31639f[_0x0a4b('0x21')][_0x58967c['id']])){_0x31639f['freshsalesAccounts'][_0x58967c['id']]=new FreshsalesAccount(_0x58967c);}else{_0x31639f[_0x0a4b('0x3c')](_0x31639f[_0x0a4b('0x21')][_0x58967c['id']],_0x58967c);}}}return _0x31639f['freshsalesAccounts'];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x52')]=function(){var _0x186094=this;return function(_0x5c80d0){for(var _0x5a5509=0x0;_0x5a5509<_0x5c80d0[_0x0a4b('0x3e')];_0x5a5509+=0x1){_['merge'](_0x186094[_0x0a4b('0x44')][_0x5c80d0[_0x5a5509]['name']],_0x5c80d0[_0x5a5509]);}return _0x186094['voiceQueues'];};};Realtime[_0x0a4b('0x3b')]['initVoiceQueueReports']=function(){var _0x51605d=this;return function(_0x4ab43b){clearVoiceQueues(_0x51605d[_0x0a4b('0x44')]);if(_0x4ab43b){_0x4ab43b=_[_0x0a4b('0x53')](_0x4ab43b,'uniqueid');for(var _0x5814b8 in _0x4ab43b){if(_0x4ab43b[_0x0a4b('0x24')](_0x5814b8)){var _0x257992={};for(var _0x497409=0x0;_0x497409<_0x4ab43b[_0x5814b8][_0x0a4b('0x3e')];_0x497409+=0x1){var _0x1c33c4=_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x54')];if(_0x51605d[_0x0a4b('0x44')][_0x1c33c4]){if(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x55')]){_0x51605d[_0x0a4b('0x44')][_0x1c33c4][_0x0a4b('0x2d')]+=0x1;}if(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x56')]){_0x51605d[_0x0a4b('0x44')][_0x1c33c4][_0x0a4b('0x57')]+=0x1;}_0x51605d[_0x0a4b('0x44')][_0x1c33c4]['sumHoldTime']+=moment(_0x4ab43b[_0x5814b8][_0x497409]['queuecallerleaveAt'])[_0x0a4b('0x58')](moment(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x59')]),_0x0a4b('0x5a'))||0x0;if(_0x497409===_0x4ab43b[_0x5814b8][_0x0a4b('0x3e')]-0x1){_0x51605d[_0x0a4b('0x44')][_0x1c33c4][_0x0a4b('0x2f')]+=moment(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x5b')]||_0x4ab43b[_0x5814b8][_0x497409]['queuecallerabandonAt']||_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x5c')])[_0x0a4b('0x58')](moment(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x59')]),'seconds')||0x0;_0x51605d[_0x0a4b('0x44')][_0x1c33c4][_0x0a4b('0x5d')]+=0x1;if(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x5e')]){_0x51605d[_0x0a4b('0x44')][_0x1c33c4][_0x0a4b('0x29')]+=0x1;_0x51605d['voiceQueues'][_0x1c33c4][_0x0a4b('0x2a')]+=moment(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x5b')])['diff'](moment(_0x4ab43b[_0x5814b8][_0x497409][_0x0a4b('0x5f')]),_0x0a4b('0x5a'))||0x0;}}else{_0x51605d[_0x0a4b('0x44')][_0x1c33c4]['sumDuration']+=_0x51605d[_0x0a4b('0x44')][_0x1c33c4][_0x0a4b('0x2e')]||0x0;}}}}}}return _0x51605d[_0x0a4b('0x44')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x60')]=function(){var _0x7607ba=this;return function(_0x435a47){clearVoiceCallReports(_0x7607ba[_0x0a4b('0x14')]);if(_0x435a47){for(var _0x336399=0x0;_0x336399<_0x435a47[_0x0a4b('0x3e')];_0x336399+=0x1){_0x7607ba[_0x0a4b('0x14')][_0x0a4b('0x5d')]+=0x1;_0x7607ba[_0x0a4b('0x14')][_0x0a4b('0x2f')]+=_0x435a47[_0x336399][_0x0a4b('0x61')];if(_0x435a47[_0x336399][_0x0a4b('0x62')]===_0x0a4b('0x63')){_0x7607ba[_0x0a4b('0x14')]['answered']+=0x1;_0x7607ba[_0x0a4b('0x14')][_0x0a4b('0x2e')]+=_0x435a47[_0x336399][_0x0a4b('0x61')]-_0x435a47[_0x336399][_0x0a4b('0x64')]||0x0;_0x7607ba[_0x0a4b('0x14')][_0x0a4b('0x2a')]+=_0x435a47[_0x336399][_0x0a4b('0x64')];}}}return _0x7607ba[_0x0a4b('0x14')];};};Realtime['prototype']['initCampaigns']=function(){var _0x10e5b5=this;return function(_0x2f63c2){if(_0x2f63c2){freeIsNotKey(_0x2f63c2,_0x10e5b5[_0x0a4b('0x12')],_0x0a4b('0x28'));for(var _0x4f0ad1=0x0,_0x3b9814={};_0x4f0ad1<_0x2f63c2[_0x0a4b('0x3e')];_0x4f0ad1+=0x1){_0x3b9814=_0x2f63c2[_0x4f0ad1];if(_[_0x0a4b('0x40')](_0x10e5b5[_0x0a4b('0x12')][_0x3b9814[_0x0a4b('0x28')]])){_0x10e5b5[_0x0a4b('0x12')][_0x3b9814[_0x0a4b('0x28')]]=new Campaign(_0x3b9814);}else{_0x10e5b5['mergeFromDatabase'](_0x10e5b5['campaigns'][_0x3b9814[_0x0a4b('0x28')]],_0x3b9814);_0x10e5b5[_0x0a4b('0x12')][_0x3b9814['name']]['dialQueueProject']=_0x3b9814[_0x0a4b('0x65')]?_0x3b9814[_0x0a4b('0x65')][_0x0a4b('0x28')]:undefined;}}}return _0x10e5b5['campaigns'];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x66')]=function(){var _0x3b1986=this;return function(_0x495679){if(_0x495679){freeIsNotKey(_0x495679,_0x3b1986['voiceExtensions'],'id');for(var _0x1e2afa=0x0,_0x4f238a={};_0x1e2afa<_0x495679[_0x0a4b('0x3e')];_0x1e2afa+=0x1){_0x4f238a=_0x495679[_0x1e2afa];if(_['isUndefined'](_0x3b1986[_0x0a4b('0x15')][_0x4f238a['id']])){_0x3b1986[_0x0a4b('0x15')][_0x4f238a['id']]=new VoiceExtension(_0x4f238a);}else{_0x3b1986['mergeFromDatabase'](_0x3b1986[_0x0a4b('0x15')][_0x4f238a['id']],_0x4f238a);}}}return _0x3b1986['voiceExtensions'];};};Realtime['prototype']['initCampaignHopperHistory']=function(){var _0x367aba=this;return function(_0x2a3c55){clearCampaigns(_0x367aba[_0x0a4b('0x12')]);for(var _0x31dfb4=0x0;_0x31dfb4<_0x2a3c55[_0x0a4b('0x3e')];_0x31dfb4+=0x1){_[_0x0a4b('0x67')](_0x367aba[_0x0a4b('0x12')][_0x2a3c55[_0x31dfb4][_0x0a4b('0x28')]],_0x2a3c55[_0x31dfb4]);}return _0x367aba[_0x0a4b('0x12')];};};Realtime[_0x0a4b('0x3b')][_0x0a4b('0x68')]=function(){var _0x1f9498=this;return function(_0x164cff){if(_0x164cff){freeIsNotKey(_0x164cff,_0x1f9498['faxAccounts'],'id');for(var _0x37379b=0x0,_0x751efc={},_0x469e98={};_0x37379b<_0x164cff[_0x0a4b('0x3e')];_0x37379b+=0x1){_0x751efc=_0x164cff[_0x37379b];if(_['isUndefined'](_0x1f9498[_0x0a4b('0x22')][_0x751efc['id']])){_0x1f9498['faxAccounts'][_0x751efc['id']]=new FaxAccount(_0x751efc);}else{_0x1f9498['mergeFromDatabase'](_0x1f9498[_0x0a4b('0x22')][_0x751efc['id']],_0x751efc);}}}return _0x1f9498['faxAccounts'];};};module[_0x0a4b('0x69')]=Realtime; \ No newline at end of file diff --git a/server/services/ami/report/index.js b/server/services/ami/report/index.js index 45245d1..2306257 100644 --- a/server/services/ami/report/index.js +++ b/server/services/ami/report/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4f06=['xcally-motion-dialer','voiceAgentReport','isArray','startsWith','Local','substring','indexOf','lastIndexOf','exports','moment','util','../../../config/environment','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','./voiceQueueReport','./voiceCallReport','./voiceDialReport','./userReport','realtime','agents','telephones','prototype','sync','xdr','custom:voiceQueueReport','custom:voiceCallReport','voiceCallReport','bind','custom:voiceDialReport','voiceDialReport','blindtransfer','blindTransfer','attendedTransfer','findAgent','find','name','isNil','accountcode','interface','format','SIP/%s','voiceQueueReport','assigned','lastAssignedTo','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','create','destination','exten','type','dialer','lastapplication','queue','context','xcally-motion-preview','calleridpreview','originatecalleridnum','destinationchannel','channel','calleridnum','connectedlinenum','\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','transfereelinkedid','uniqueid','length','monitorFilename','filename','monitors','membername'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4f06,0x18f));var _0x64f0=function(_0x2e07b8,_0x44d712){_0x2e07b8=_0x2e07b8-0x0;var _0x16c432=_0x4f06[_0x2e07b8];return _0x16c432;};'use strict';var _=require('lodash');var moment=require(_0x64f0('0x0'));var util=require(_0x64f0('0x1'));var config=require(_0x64f0('0x2'));var ami=require('../ami');var RpcVoiceAgentReport=require(_0x64f0('0x3'));var RpcVoiceCallReport=require(_0x64f0('0x4'));var RpcVoiceDialReport=require(_0x64f0('0x5'));var RpcMemberReport=require(_0x64f0('0x6'));var RpcVoiceQueueReport=require(_0x64f0('0x7'));var RpcVoiceRecording=require(_0x64f0('0x8'));var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require(_0x64f0('0x9'));var VoiceCallReport=require(_0x64f0('0xa'));var VoiceAgentReport=require('./voiceAgentReport');var VoiceDialReport=require(_0x64f0('0xb'));var UserReport=require(_0x64f0('0xc'));function Report(_0x57cdba){this[_0x64f0('0xd')]=_0x57cdba;this['agents']=_0x57cdba[_0x64f0('0xe')];this[_0x64f0('0xf')]=_0x57cdba[_0x64f0('0xf')];}Report[_0x64f0('0x10')][_0x64f0('0x11')]=function(_0x11e8b4){var _0x3cfef5=new VoiceQueueReport(this[_0x64f0('0xd')]);var _0x58608b=new VoiceAgentReport(this[_0x64f0('0xd')]);var _0x780ad4=new VoiceDialReport(this[_0x64f0('0xd')]);var _0x588311=new VoiceCallReport(this[_0x64f0('0xd')]);var _0x8fda35=new UserReport(this[_0x64f0('0xd')]);if(config[_0x64f0('0x12')]&&config[_0x64f0('0x12')]['disabled']){ami['on'](_0x64f0('0x13'),this['voiceQueueReport']['bind'](this));ami['on'](_0x64f0('0x14'),this[_0x64f0('0x15')][_0x64f0('0x16')](this));ami['on']('custom:voiceAgentReport',this['voiceAgentReport'][_0x64f0('0x16')](this));ami['on'](_0x64f0('0x17'),this[_0x64f0('0x18')][_0x64f0('0x16')](this));ami['on'](_0x64f0('0x19'),this[_0x64f0('0x1a')][_0x64f0('0x16')](this));ami['on']('attendedtransfer',this[_0x64f0('0x1b')][_0x64f0('0x16')](this));}};Report['prototype'][_0x64f0('0x1c')]=function(_0x179ee5){var _0xee2ff2;_0xee2ff2=_[_0x64f0('0x1d')](this['agents'],function(_0x1f51be){return _0x1f51be['accountcode']==_0x179ee5||_0x1f51be[_0x64f0('0x1e')]==_0x179ee5;});if(_[_0x64f0('0x1f')](_0xee2ff2)){var _0x43c831=_[_0x64f0('0x1d')](this[_0x64f0('0xf')],function(_0x3b7180){return _0x3b7180[_0x64f0('0x20')]==_0x179ee5||_0x3b7180['name']==_0x179ee5;});if(_0x43c831){_0xee2ff2=_[_0x64f0('0x1d')](this[_0x64f0('0xe')],function(_0x4c03f5){return _0x4c03f5[_0x64f0('0x21')]==util[_0x64f0('0x22')](_0x64f0('0x23'),_0x43c831[_0x64f0('0x1e')]);});}}return _0xee2ff2;};Report['prototype'][_0x64f0('0x24')]=function(_0xc305b8){for(var _0x3d6dcd=0x0;_0x3d6dcd<_0xc305b8['length'];_0x3d6dcd+=0x1){var _0x441f3f=this[_0x64f0('0x1c')](_0xc305b8[_0x3d6dcd]['connectedlinenum']);if(_0x441f3f){_0xc305b8[_0x3d6dcd][_0x64f0('0x20')]=_0x441f3f['accountcode'];_0xc305b8[_0x3d6dcd][_0x64f0('0x25')]=!![];_0xc305b8[_0x3d6dcd][_0x64f0('0x26')]=_0x441f3f[_0x64f0('0x1e')];_0xc305b8[_0x3d6dcd][_0x64f0('0x21')]=_[_0x64f0('0x1f')](_0x441f3f[_0x64f0('0x21')])?util[_0x64f0('0x22')](_0x64f0('0x23'),_0x441f3f['name']):_0x441f3f[_0x64f0('0x21')];if(_0xc305b8[_0x3d6dcd][_0x64f0('0x27')]){_0xc305b8[_0x3d6dcd][_0x64f0('0x28')]=moment()[_0x64f0('0x22')](_0x64f0('0x29'));}if(_0xc305b8[_0x3d6dcd][_0x64f0('0x2a')]){_0xc305b8[_0x3d6dcd]['queuecallerexitAt']=moment()[_0x64f0('0x22')](_0x64f0('0x29'));}RpcMemberReport[_0x64f0('0x24')](_0xc305b8[_0x3d6dcd]);}RpcVoiceQueueReport[_0x64f0('0x2b')](_0xc305b8[_0x3d6dcd]);}};function extractCalleridNumber(_0x3860ef){var _0x736eb5=_0x3860ef['match'](/<(.*?)>/);return _0x736eb5?_0x736eb5[0x1]:_0x3860ef;}Report[_0x64f0('0x10')][_0x64f0('0x15')]=function(_0x287194){_0x287194[_0x64f0('0x2c')]=_0x287194[_0x64f0('0x2c')]||_0x287194[_0x64f0('0x2d')];if(_0x287194[_0x64f0('0x2e')]==_0x64f0('0x2f')){_0x287194[_0x64f0('0x30')]=_0x64f0('0x31');_0x287194['lastdata']=_0x287194[_0x64f0('0x31')];if(_0x287194[_0x64f0('0x32')]=='from-voip-provider'){_0x287194[_0x64f0('0x20')]='';_0x287194[_0x64f0('0x2c')]=extractCalleridNumber(_0x287194['callerid']);}else if(_0x287194[_0x64f0('0x32')]=='from-sip'){if(_0x287194[_0x64f0('0x2c')]==_0x64f0('0x33')){_0x287194[_0x64f0('0x2c')]=extractCalleridNumber(_0x287194[_0x64f0('0x34')]);_0x287194['calleridnum']=_0x287194[_0x64f0('0x35')];_0x287194[_0x64f0('0x36')]=[_0x287194[_0x64f0('0x37')],_0x287194['channel']=_0x287194[_0x64f0('0x36')]][0x0];_0x287194['callerid']=_0x287194[_0x64f0('0x34')];}else{_0x287194[_0x64f0('0x2c')]=_0x287194[_0x64f0('0x38')];_0x287194['calleridnum']=_0x287194[_0x64f0('0x35')];if(_0x287194['disposition']=='ANSWERED'){_0x287194['accountcode']=_0x287194[_0x64f0('0x39')];}else{_0x287194['accountcode']='';}}}}else{_0x287194['callerid']=util[_0x64f0('0x22')](_0x64f0('0x3a'),_0x287194[_0x64f0('0x3b')],_0x287194[_0x64f0('0x38')]);}if(RpcVoiceTransferReport[_0x64f0('0x3c')][_0x287194[_0x64f0('0x3d')]]){var _0xc8946=RpcVoiceTransferReport['transfers'][_0x287194['linkedid']];_0xc8946[_0x64f0('0x3e')]=_0x287194[_0x64f0('0x3f')];RpcVoiceTransferReport[_0x64f0('0x1a')](_0xc8946);delete RpcVoiceTransferReport[_0x64f0('0x3c')][_0x287194[_0x64f0('0x3d')]];}RpcVoiceCallReport[_0x64f0('0x2b')](_0x287194);if(_0x287194['monitor']){for(var _0x53a004=0x0;_0x53a004<_0x287194['monitors'][_0x64f0('0x40')];_0x53a004+=0x1){_0x287194[_0x64f0('0x41')]=_0x287194['monitors'][_0x53a004][_0x64f0('0x42')];_0x287194['createdAt']=_0x287194[_0x64f0('0x43')][_0x53a004]['createdAt'];if(_0x287194[_0x64f0('0x2d')]==_0x64f0('0x33')){_0x287194['calleridnum']=_0x287194['connectedlinenum'];_0x287194[_0x64f0('0x3b')]=_0x287194['connectedlinename'];_0x287194[_0x64f0('0x39')]=_0x287194[_0x64f0('0x20')];_0x287194['connectedlinename']=_0x287194[_0x64f0('0x44')];_0x287194[_0x64f0('0x2d')]=_0x287194[_0x64f0('0x35')];}else if(_0x287194[_0x64f0('0x2d')]==_0x64f0('0x45')){_0x287194[_0x64f0('0x38')]=_0x287194[_0x64f0('0x2c')];_0x287194[_0x64f0('0x2d')]=_0x287194[_0x64f0('0x35')];}RpcVoiceRecording[_0x64f0('0x2b')](_0x287194);}}};Report[_0x64f0('0x10')][_0x64f0('0x46')]=function(_0x2ea9e9){if(_[_0x64f0('0x47')](_0x2ea9e9)){_0x2ea9e9['forEach'](function(_0x3de9d5){RpcVoiceAgentReport['create'](_0x3de9d5);});}else{RpcVoiceAgentReport['create'](_0x2ea9e9);}};Report[_0x64f0('0x10')][_0x64f0('0x18')]=function(_0x55f15d){RpcVoiceDialReport[_0x64f0('0x2b')](_0x55f15d);var _0x588767;var _0x2385cd;var _0x190125=_0x55f15d['channel'];if(_[_0x64f0('0x48')](_0x190125,_0x64f0('0x49'))){_0x2385cd=_0x190125[_0x64f0('0x4a')](_0x190125[_0x64f0('0x4b')]('/')+0x1,_0x190125['indexOf']('@'));_0x588767=_[_0x64f0('0x1d')](this[_0x64f0('0xe')],function(_0x3cb150){return _0x3cb150['mobile']==_0x2385cd||_0x3cb150['phone']==_0x2385cd||_0x3cb150['accountcode']==_0x2385cd;});}else{_0x2385cd=_0x190125['substring'](_0x190125[_0x64f0('0x4b')]('/')+0x1,_0x190125[_0x64f0('0x4c')]('-'));_0x588767=this[_0x64f0('0x1c')](_0x2385cd);}if(_0x588767){_0x55f15d[_0x64f0('0x21')]=_[_0x64f0('0x1f')](_0x588767[_0x64f0('0x21')])?util[_0x64f0('0x22')](_0x64f0('0x23'),_0x588767[_0x64f0('0x1e')]):_0x588767[_0x64f0('0x21')];_0x55f15d[_0x64f0('0x44')]=_0x588767[_0x64f0('0x1e')];_0x55f15d[_0x64f0('0x20')]=_0x588767[_0x64f0('0x20')];RpcMemberReport[_0x64f0('0x18')](_0x55f15d);}};Report[_0x64f0('0x10')][_0x64f0('0x1a')]=function(_0x31ccfb){RpcVoiceTransferReport[_0x64f0('0x3c')][_0x31ccfb['transfererlinkedid']]=_0x31ccfb;};Report[_0x64f0('0x10')][_0x64f0('0x1b')]=function(_0x417df6){RpcVoiceTransferReport[_0x64f0('0x1b')](_0x417df6);};module[_0x64f0('0x4d')]=Report; \ No newline at end of file +var _0xea8d=['assigned','lastAssignedTo','interface','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','create','match','destination','queue','lastdata','context','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','destinationchannel','channel','ANSWERED','calleridname','transfers','linkedid','uniqueid','monitor','monitors','length','monitorFilename','createdAt','exten','connectedlinename','membername','forEach','startsWith','Local','substring','indexOf','phone','lastIndexOf','exports','lodash','moment','../../../config/environment','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','./userReport','agents','telephones','sync','realtime','disabled','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindtransfer','blindTransfer','attendedTransfer','prototype','findAgent','find','name','isNil','format','SIP/%s','connectedlinenum','accountcode'];(function(_0x16a244,_0x31d392){var _0x374334=function(_0x1f7ac5){while(--_0x1f7ac5){_0x16a244['push'](_0x16a244['shift']());}};_0x374334(++_0x31d392);}(_0xea8d,0x121));var _0xdea8=function(_0x50cf7e,_0x50787b){_0x50cf7e=_0x50cf7e-0x0;var _0x1d74ec=_0xea8d[_0x50cf7e];return _0x1d74ec;};'use strict';var _=require(_0xdea8('0x0'));var moment=require(_0xdea8('0x1'));var util=require('util');var config=require(_0xdea8('0x2'));var ami=require('../ami');var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0xdea8('0x3'));var RpcVoiceDialReport=require(_0xdea8('0x4'));var RpcMemberReport=require(_0xdea8('0x5'));var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require(_0xdea8('0x6'));var RpcVoiceTransferReport=require(_0xdea8('0x7'));var VoiceQueueReport=require(_0xdea8('0x8'));var VoiceCallReport=require(_0xdea8('0x9'));var VoiceAgentReport=require(_0xdea8('0xa'));var VoiceDialReport=require(_0xdea8('0xb'));var UserReport=require(_0xdea8('0xc'));function Report(_0x50f674){this['realtime']=_0x50f674;this[_0xdea8('0xd')]=_0x50f674[_0xdea8('0xd')];this[_0xdea8('0xe')]=_0x50f674[_0xdea8('0xe')];}Report['prototype'][_0xdea8('0xf')]=function(_0x38545e){var _0x8c410e=new VoiceQueueReport(this[_0xdea8('0x10')]);var _0x2e8a9c=new VoiceAgentReport(this[_0xdea8('0x10')]);var _0x54550f=new VoiceDialReport(this[_0xdea8('0x10')]);var _0x2a82e3=new VoiceCallReport(this[_0xdea8('0x10')]);var _0x5746be=new UserReport(this['realtime']);if(config['xdr']&&config['xdr'][_0xdea8('0x11')]){ami['on'](_0xdea8('0x12'),this[_0xdea8('0x13')][_0xdea8('0x14')](this));ami['on'](_0xdea8('0x15'),this[_0xdea8('0x16')][_0xdea8('0x14')](this));ami['on'](_0xdea8('0x17'),this[_0xdea8('0x18')][_0xdea8('0x14')](this));ami['on'](_0xdea8('0x19'),this[_0xdea8('0x1a')]['bind'](this));ami['on'](_0xdea8('0x1b'),this[_0xdea8('0x1c')][_0xdea8('0x14')](this));ami['on']('attendedtransfer',this[_0xdea8('0x1d')][_0xdea8('0x14')](this));}};Report[_0xdea8('0x1e')][_0xdea8('0x1f')]=function(_0x10cf11){var _0x4eb88f;_0x4eb88f=_[_0xdea8('0x20')](this[_0xdea8('0xd')],function(_0x5e4eae){return _0x5e4eae['accountcode']==_0x10cf11||_0x5e4eae[_0xdea8('0x21')]==_0x10cf11;});if(_[_0xdea8('0x22')](_0x4eb88f)){var _0x124a88=_['find'](this['telephones'],function(_0x34b177){return _0x34b177['accountcode']==_0x10cf11||_0x34b177[_0xdea8('0x21')]==_0x10cf11;});if(_0x124a88){_0x4eb88f=_[_0xdea8('0x20')](this[_0xdea8('0xd')],function(_0x54c762){return _0x54c762['interface']==util[_0xdea8('0x23')](_0xdea8('0x24'),_0x124a88['name']);});}}return _0x4eb88f;};Report[_0xdea8('0x1e')]['voiceQueueReport']=function(_0x460277){for(var _0x7781c3=0x0;_0x7781c3<_0x460277['length'];_0x7781c3+=0x1){var _0x5d9442=this['findAgent'](_0x460277[_0x7781c3][_0xdea8('0x25')]);if(_0x5d9442){_0x460277[_0x7781c3]['accountcode']=_0x5d9442[_0xdea8('0x26')];_0x460277[_0x7781c3][_0xdea8('0x27')]=!![];_0x460277[_0x7781c3][_0xdea8('0x28')]=_0x5d9442[_0xdea8('0x21')];_0x460277[_0x7781c3][_0xdea8('0x29')]=_[_0xdea8('0x22')](_0x5d9442[_0xdea8('0x29')])?util[_0xdea8('0x23')](_0xdea8('0x24'),_0x5d9442['name']):_0x5d9442['interface'];if(_0x460277[_0x7781c3][_0xdea8('0x2a')]){_0x460277[_0x7781c3][_0xdea8('0x2b')]=moment()[_0xdea8('0x23')](_0xdea8('0x2c'));}if(_0x460277[_0x7781c3][_0xdea8('0x2d')]){_0x460277[_0x7781c3]['queuecallerexitAt']=moment()[_0xdea8('0x23')](_0xdea8('0x2c'));}RpcMemberReport[_0xdea8('0x13')](_0x460277[_0x7781c3]);}RpcVoiceQueueReport[_0xdea8('0x2e')](_0x460277[_0x7781c3]);}};function extractCalleridNumber(_0x5d4f8e){var _0x2671a0=_0x5d4f8e[_0xdea8('0x2f')](/<(.*?)>/);return _0x2671a0?_0x2671a0[0x1]:_0x5d4f8e;}Report['prototype'][_0xdea8('0x16')]=function(_0x27db33){_0x27db33[_0xdea8('0x30')]=_0x27db33[_0xdea8('0x30')]||_0x27db33['exten'];if(_0x27db33['type']=='dialer'){_0x27db33['lastapplication']=_0xdea8('0x31');_0x27db33[_0xdea8('0x32')]=_0x27db33['queue'];if(_0x27db33[_0xdea8('0x33')]==_0xdea8('0x34')){_0x27db33[_0xdea8('0x26')]='';_0x27db33['destination']=extractCalleridNumber(_0x27db33[_0xdea8('0x35')]);}else if(_0x27db33['context']==_0xdea8('0x36')){if(_0x27db33[_0xdea8('0x30')]==_0xdea8('0x37')){_0x27db33[_0xdea8('0x30')]=extractCalleridNumber(_0x27db33[_0xdea8('0x38')]);_0x27db33[_0xdea8('0x39')]=_0x27db33[_0xdea8('0x3a')];_0x27db33[_0xdea8('0x3b')]=[_0x27db33['channel'],_0x27db33[_0xdea8('0x3c')]=_0x27db33[_0xdea8('0x3b')]][0x0];_0x27db33['callerid']=_0x27db33[_0xdea8('0x38')];}else{_0x27db33[_0xdea8('0x30')]=_0x27db33[_0xdea8('0x39')];_0x27db33[_0xdea8('0x39')]=_0x27db33[_0xdea8('0x3a')];if(_0x27db33['disposition']==_0xdea8('0x3d')){_0x27db33[_0xdea8('0x26')]=_0x27db33[_0xdea8('0x25')];}else{_0x27db33[_0xdea8('0x26')]='';}}}}else{_0x27db33[_0xdea8('0x35')]=util[_0xdea8('0x23')]('\x22%s\x22\x20<%s>',_0x27db33[_0xdea8('0x3e')],_0x27db33['calleridnum']);}if(RpcVoiceTransferReport[_0xdea8('0x3f')][_0x27db33[_0xdea8('0x40')]]){var _0x368bd3=RpcVoiceTransferReport[_0xdea8('0x3f')][_0x27db33[_0xdea8('0x40')]];_0x368bd3['transfereelinkedid']=_0x27db33[_0xdea8('0x41')];RpcVoiceTransferReport[_0xdea8('0x1c')](_0x368bd3);delete RpcVoiceTransferReport[_0xdea8('0x3f')][_0x27db33[_0xdea8('0x40')]];}RpcVoiceCallReport[_0xdea8('0x2e')](_0x27db33);if(_0x27db33[_0xdea8('0x42')]){for(var _0x22fe13=0x0;_0x22fe13<_0x27db33[_0xdea8('0x43')][_0xdea8('0x44')];_0x22fe13+=0x1){_0x27db33[_0xdea8('0x45')]=_0x27db33['monitors'][_0x22fe13]['filename'];_0x27db33['createdAt']=_0x27db33[_0xdea8('0x43')][_0x22fe13][_0xdea8('0x46')];if(_0x27db33[_0xdea8('0x47')]=='xcally-motion-preview'){_0x27db33['calleridnum']=_0x27db33[_0xdea8('0x25')];_0x27db33[_0xdea8('0x3e')]=_0x27db33[_0xdea8('0x48')];_0x27db33[_0xdea8('0x25')]=_0x27db33[_0xdea8('0x26')];_0x27db33[_0xdea8('0x48')]=_0x27db33[_0xdea8('0x49')];_0x27db33[_0xdea8('0x47')]=_0x27db33[_0xdea8('0x3a')];}else if(_0x27db33[_0xdea8('0x47')]=='xcally-motion-dialer'){_0x27db33[_0xdea8('0x39')]=_0x27db33[_0xdea8('0x30')];_0x27db33[_0xdea8('0x47')]=_0x27db33['originatecalleridnum'];}RpcVoiceRecording['create'](_0x27db33);}}};Report[_0xdea8('0x1e')]['voiceAgentReport']=function(_0x1a8794){if(_['isArray'](_0x1a8794)){_0x1a8794[_0xdea8('0x4a')](function(_0x1cc58b){RpcVoiceAgentReport[_0xdea8('0x2e')](_0x1cc58b);});}else{RpcVoiceAgentReport[_0xdea8('0x2e')](_0x1a8794);}};Report[_0xdea8('0x1e')][_0xdea8('0x1a')]=function(_0x3364dc){RpcVoiceDialReport[_0xdea8('0x2e')](_0x3364dc);var _0x10a5fe;var _0x4f53e8;var _0x34daf3=_0x3364dc[_0xdea8('0x3c')];if(_[_0xdea8('0x4b')](_0x34daf3,_0xdea8('0x4c'))){_0x4f53e8=_0x34daf3[_0xdea8('0x4d')](_0x34daf3[_0xdea8('0x4e')]('/')+0x1,_0x34daf3[_0xdea8('0x4e')]('@'));_0x10a5fe=_[_0xdea8('0x20')](this['agents'],function(_0x2d4a69){return _0x2d4a69['mobile']==_0x4f53e8||_0x2d4a69[_0xdea8('0x4f')]==_0x4f53e8||_0x2d4a69['accountcode']==_0x4f53e8;});}else{_0x4f53e8=_0x34daf3[_0xdea8('0x4d')](_0x34daf3[_0xdea8('0x4e')]('/')+0x1,_0x34daf3[_0xdea8('0x50')]('-'));_0x10a5fe=this[_0xdea8('0x1f')](_0x4f53e8);}if(_0x10a5fe){_0x3364dc[_0xdea8('0x29')]=_[_0xdea8('0x22')](_0x10a5fe[_0xdea8('0x29')])?util[_0xdea8('0x23')](_0xdea8('0x24'),_0x10a5fe['name']):_0x10a5fe[_0xdea8('0x29')];_0x3364dc[_0xdea8('0x49')]=_0x10a5fe[_0xdea8('0x21')];_0x3364dc['accountcode']=_0x10a5fe[_0xdea8('0x26')];RpcMemberReport[_0xdea8('0x1a')](_0x3364dc);}};Report[_0xdea8('0x1e')][_0xdea8('0x1c')]=function(_0x4de931){RpcVoiceTransferReport[_0xdea8('0x3f')][_0x4de931['transfererlinkedid']]=_0x4de931;};Report[_0xdea8('0x1e')][_0xdea8('0x1d')]=function(_0x41c57d){RpcVoiceTransferReport[_0xdea8('0x1d')](_0x41c57d);};module[_0xdea8('0x51')]=Report; \ No newline at end of file diff --git a/server/services/ami/report/userReport.js b/server/services/ami/report/userReport.js index ac1900c..65dc8d7 100644 --- a/server/services/ami/report/userReport.js +++ b/server/services/ami/report/userReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4328=['prototype','isNotNull','isUndefined','emit','info','username','debug','find','stateRegistry','state','merge','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','trunk:%s','name','trunk:save','[userReport][registry]','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','local','inuse','toLowerCase','toNumber','updateStatusRealtime','format','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','telephone:save','stateTime','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','Local','indexOf','mobile','phone','accountcode','[userReport][devicestatechange]','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','address','[userReport][peerstatus]','peer','registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','exports','moment','util','ioredis','bluebird','../../../config/environment','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','bind','devicestatechange','syncDeviceState','peerstatus','syncPeerStatus','syncRealtimeShow','resolve','then','actionSipShowRegistry','catch','error','[userReport][sipshowregistry]','inspect','[userReport][devicestatelist]','[userReport][sippeerstatus]'];(function(_0x33c349,_0x371084){var _0x16c6eb=function(_0x20e726){while(--_0x20e726){_0x33c349['push'](_0x33c349['shift']());}};_0x16c6eb(++_0x371084);}(_0x4328,0x7b));var _0x8432=function(_0x13a064,_0x10f3ad){_0x13a064=_0x13a064-0x0;var _0x4cf273=_0x4328[_0x13a064];return _0x4cf273;};'use strict';var _=require('lodash');var moment=require(_0x8432('0x0'));var util=require(_0x8432('0x1'));var Redis=require(_0x8432('0x2'));var BPromise=require(_0x8432('0x3'));var config=require(_0x8432('0x4'));var logger=require(_0x8432('0x5'))(_0x8432('0x6'));var ami=require('../ami');config[_0x8432('0x7')]=_[_0x8432('0x8')](config[_0x8432('0x7')],{'host':_0x8432('0x9'),'port':0x18eb});var io=require(_0x8432('0xa'))(new Redis(config[_0x8432('0x7')]));function UserReport(_0x1061ff){this[_0x8432('0xb')]=_0x1061ff[_0x8432('0xb')];this[_0x8432('0xc')]=_0x1061ff['agents'];this[_0x8432('0xd')]=_0x1061ff[_0x8432('0xd')];ami['on'](_0x8432('0xe'),this['syncRegistry']['bind'](this));ami['on']('registry',this[_0x8432('0xf')][_0x8432('0x10')](this));ami['on'](_0x8432('0x11'),this[_0x8432('0x12')]['bind'](this));ami['on'](_0x8432('0x13'),this[_0x8432('0x14')][_0x8432('0x10')](this));return this[_0x8432('0x15')]();}function showSipRegistrations(){Promise[_0x8432('0x16')]()[_0x8432('0x17')](ami[_0x8432('0x18')]())[_0x8432('0x19')](function(_0x3af2c7){logger[_0x8432('0x1a')](_0x8432('0x1b'),util[_0x8432('0x1c')](_0x3af2c7,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise[_0x8432('0x16')]()[_0x8432('0x17')](ami['actionDeviceStateList']())[_0x8432('0x19')](function(_0x1894ab){logger[_0x8432('0x1a')](_0x8432('0x1d'),util[_0x8432('0x1c')](_0x1894ab,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise[_0x8432('0x16')]()[_0x8432('0x17')](ami['actionSipPeerStatus']())[_0x8432('0x19')](function(_0x23d695){logger['error'](_0x8432('0x1e'),util[_0x8432('0x1c')](_0x23d695,{'showHidden':![],'depth':null}));});}UserReport['prototype'][_0x8432('0x15')]=function(){setInterval(function(){BPromise[_0x8432('0x16')]()[_0x8432('0x17')](showSipRegistrations())[_0x8432('0x17')](listDeviceStates())[_0x8432('0x17')](showPeersStatus());},0x32c8);};UserReport[_0x8432('0x1f')][_0x8432('0x20')]=function(_0x37ba2f){return _0x37ba2f!==null&&!_[_0x8432('0x21')](_0x37ba2f);};UserReport[_0x8432('0x1f')][_0x8432('0x22')]=function(_0xf4b6b4,_0x5bc225,_0x1a23fc){io['to'](_0xf4b6b4)['emit'](_0x5bc225,_0x1a23fc);};UserReport[_0x8432('0x1f')][_0x8432('0xf')]=function(_0x5efef5){try{if(this[_0x8432('0x20')](_0x5efef5)){logger[_0x8432('0x23')]('[userReport][registry]\x20registry:%s\x20state:%s',_0x5efef5[_0x8432('0x24')],_0x5efef5['state']);logger[_0x8432('0x25')]('[userReport][registry]',util[_0x8432('0x1c')](_0x5efef5,{'showHidden':![],'depth':null}));var _0xc22292=_[_0x8432('0x26')](this[_0x8432('0xb')],{'registry':_0x5efef5['username']});if(_0xc22292){_0x5efef5[_0x8432('0x27')]=_0x5efef5[_0x8432('0x28')];_[_0x8432('0x29')](_0xc22292,_['omit'](_0x5efef5,[_0x8432('0x2a'),_0x8432('0x2b'),'username',_0x8432('0x28')]));logger[_0x8432('0x25')](_0x8432('0x2c'),util['inspect'](_0xc22292,{'showHidden':![],'depth':null}));this[_0x8432('0x22')](util['format'](_0x8432('0x2d'),_0xc22292[_0x8432('0x2e')]),_0x8432('0x2f'),_0xc22292);}}}catch(_0x45076f){logger['error'](_0x8432('0x30'),util[_0x8432('0x1c')](_0x45076f,{'showHidden':![],'depth':null}));}};UserReport['prototype'][_0x8432('0x12')]=function(_0x242b46){try{if(this['isNotNull'](_0x242b46)){logger[_0x8432('0x23')](_0x8432('0x31'),_0x242b46[_0x8432('0x32')],_0x242b46[_0x8432('0x28')]);logger['debug']('[userReport][devicestatechange]',util['inspect'](_0x242b46,{'showHidden':![],'depth':null}));if(this[_0x8432('0xc')][_0x242b46[_0x8432('0x32')]]){if(!this[_0x8432('0xc')][_0x242b46[_0x8432('0x32')]][_0x8432('0x33')]||_0x242b46[_0x8432('0x28')]['toLowerCase']()==_0x8432('0x34')){this[_0x8432('0xc')][_0x242b46[_0x8432('0x32')]][_0x8432('0x33')]=![];if(this[_0x8432('0xc')][_0x242b46[_0x8432('0x32')]][_0x8432('0x28')]!==_0x242b46['state'][_0x8432('0x35')]()){this[_0x8432('0xc')][_0x242b46[_0x8432('0x32')]]['stateTime']=_[_0x8432('0x36')](moment()['format']('x'));}this[_0x8432('0xc')][_0x242b46[_0x8432('0x32')]][_0x8432('0x28')]=_0x242b46[_0x8432('0x28')][_0x8432('0x35')]();this['agents'][_0x242b46['device']][_0x8432('0x37')](_0x242b46);}}else if(this[_0x8432('0xd')][_0x242b46['device']]){if(this[_0x8432('0xd')][_0x242b46[_0x8432('0x32')]]['state']!==_0x242b46[_0x8432('0x28')][_0x8432('0x35')]()){this[_0x8432('0xd')][_0x242b46['device']]['stateTime']=_[_0x8432('0x36')](moment()[_0x8432('0x38')]('x'));}this[_0x8432('0xd')][_0x242b46[_0x8432('0x32')]]['state']=_0x242b46[_0x8432('0x28')]['toLowerCase']();logger['debug'](_0x8432('0x39'),util[_0x8432('0x1c')](this[_0x8432('0xd')][_0x242b46['device']],{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x8432('0x3a'),this[_0x8432('0xd')][_0x242b46[_0x8432('0x32')]]['name']),_0x8432('0x3b'),this[_0x8432('0xd')][_0x242b46[_0x8432('0x32')]]);}else if(this[_0x8432('0xb')][_0x242b46[_0x8432('0x32')]]){if(this[_0x8432('0xb')][_0x242b46[_0x8432('0x32')]][_0x8432('0x28')]!==_0x242b46[_0x8432('0x28')][_0x8432('0x35')]()){this[_0x8432('0xb')][_0x242b46['device']][_0x8432('0x3c')]=_[_0x8432('0x36')](moment()['format']('x'));}this[_0x8432('0xb')][_0x242b46['device']][_0x8432('0x28')]=_0x242b46[_0x8432('0x28')][_0x8432('0x35')]();logger[_0x8432('0x25')](_0x8432('0x3d'),util[_0x8432('0x1c')](this[_0x8432('0xb')][_0x242b46[_0x8432('0x32')]],{'showHidden':![],'depth':null}));this[_0x8432('0x22')](util[_0x8432('0x38')](_0x8432('0x2d'),this[_0x8432('0xb')][_0x242b46[_0x8432('0x32')]][_0x8432('0x2e')]),'trunk:save',this[_0x8432('0xb')][_0x242b46['device']]);}else if(_['startsWith'](_0x242b46[_0x8432('0x32')],_0x8432('0x3e'))){var _0x51d6c3=_0x242b46['device'];var _0x15eb0e=_0x51d6c3['substring'](_0x51d6c3[_0x8432('0x3f')]('/')+0x1,_0x51d6c3[_0x8432('0x3f')]('@'));var _0xf76346=_[_0x8432('0x26')](this[_0x8432('0xc')],function(_0x1492a9){return _0x1492a9[_0x8432('0x40')]==_0x15eb0e||_0x1492a9[_0x8432('0x41')]==_0x15eb0e||_0x1492a9[_0x8432('0x42')]==_0x15eb0e;});if(_0xf76346){if(_0xf76346['state']!==_0x242b46['state']['toLowerCase']()){_0xf76346[_0x8432('0x3c')]=_[_0x8432('0x36')](moment()['format']('x'));}_0xf76346[_0x8432('0x28')]=_0x242b46['state'][_0x8432('0x35')]();_0xf76346[_0x8432('0x33')]=!![];_0xf76346[_0x8432('0x37')](_0x242b46);}}}}catch(_0x1a2c72){logger[_0x8432('0x1a')](_0x8432('0x43'),util[_0x8432('0x1c')](_0x1a2c72,{'showHidden':![],'depth':null}));}};UserReport[_0x8432('0x1f')][_0x8432('0x14')]=function(_0x4dbda1){try{if(this[_0x8432('0x20')](_0x4dbda1)&&this['isNotNull'](_0x4dbda1[_0x8432('0x13')])){logger['info'](_0x8432('0x44'),_0x4dbda1['peer'],_0x4dbda1[_0x8432('0x45')],_0x4dbda1['peerstatus']);logger[_0x8432('0x25')](_0x8432('0x46'),util['inspect'](_0x4dbda1,{'showHidden':![],'depth':null}));if(this['agents'][_0x4dbda1[_0x8432('0x47')]]){if(!this['agents'][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x33')]||_0x4dbda1['peerstatus'][_0x8432('0x35')]()==_0x8432('0x48')){this[_0x8432('0xc')][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x33')]=![];this['agents'][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x49')]=_0x4dbda1[_0x8432('0x13')][_0x8432('0x35')]();this[_0x8432('0xc')][_0x4dbda1[_0x8432('0x47')]]['address']=_0x4dbda1['address'];this[_0x8432('0xc')][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x37')](_0x4dbda1);}}else if(this['telephones'][_0x4dbda1['peer']]){this[_0x8432('0xd')][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x49')]=_0x4dbda1[_0x8432('0x13')][_0x8432('0x35')]();this[_0x8432('0xd')][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x45')]=_0x4dbda1[_0x8432('0x45')];logger[_0x8432('0x25')](_0x8432('0x4a'),util[_0x8432('0x1c')](this[_0x8432('0xd')][_0x4dbda1[_0x8432('0x47')]],{'showHidden':![],'depth':null}));this[_0x8432('0x22')](util[_0x8432('0x38')](_0x8432('0x3a'),this['telephones'][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x2e')]),'telephone:save',this[_0x8432('0xd')][_0x4dbda1[_0x8432('0x47')]]);}else if(this[_0x8432('0xb')][_0x4dbda1[_0x8432('0x47')]]){this[_0x8432('0xb')][_0x4dbda1[_0x8432('0x47')]]['status']=_0x4dbda1['peerstatus'][_0x8432('0x35')]();this[_0x8432('0xb')][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x45')]=_0x4dbda1['address'];logger[_0x8432('0x25')](_0x8432('0x4b'),util[_0x8432('0x1c')](this[_0x8432('0xb')][_0x4dbda1[_0x8432('0x47')]],{'showHidden':![],'depth':null}));this[_0x8432('0x22')](util[_0x8432('0x38')](_0x8432('0x2d'),this['trunks'][_0x4dbda1[_0x8432('0x47')]][_0x8432('0x2e')]),_0x8432('0x2f'),this[_0x8432('0xb')][_0x4dbda1[_0x8432('0x47')]]);}}}catch(_0x40a6fb){logger['error'](_0x8432('0x46'),util['inspect'](_0x40a6fb,{'showHidden':![],'depth':null}));}};module[_0x8432('0x4c')]=UserReport; \ No newline at end of file +var _0xa423=['registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','lodash','moment','util','ioredis','bluebird','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','bind','registry','devicestatechange','syncDeviceState','resolve','then','actionSipShowRegistry','catch','error','inspect','actionSipPeerStatus','prototype','syncRealtimeShow','isNotNull','isUndefined','emit','info','[userReport][registry]\x20registry:%s\x20state:%s','username','state','debug','[userReport][registry]','find','stateRegistry','merge','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','format','trunk:%s','name','trunk:save','device','[userReport][devicestatechange]','local','toLowerCase','stateTime','toNumber','updateStatusRealtime','telephone:%s','telephone:save','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','startsWith','substring','indexOf','mobile','phone','syncPeerStatus','peerstatus','peer','address','[userReport][peerstatus]'];(function(_0x4d613c,_0x55f220){var _0x301fe3=function(_0x5eec0b){while(--_0x5eec0b){_0x4d613c['push'](_0x4d613c['shift']());}};_0x301fe3(++_0x55f220);}(_0xa423,0x16c));var _0x3a42=function(_0x19b5a0,_0x22be6a){_0x19b5a0=_0x19b5a0-0x0;var _0x3535d4=_0xa423[_0x19b5a0];return _0x3535d4;};'use strict';var _=require(_0x3a42('0x0'));var moment=require(_0x3a42('0x1'));var util=require(_0x3a42('0x2'));var Redis=require(_0x3a42('0x3'));var BPromise=require(_0x3a42('0x4'));var config=require('../../../config/environment');var logger=require(_0x3a42('0x5'))(_0x3a42('0x6'));var ami=require('../ami');config[_0x3a42('0x7')]=_[_0x3a42('0x8')](config[_0x3a42('0x7')],{'host':_0x3a42('0x9'),'port':0x18eb});var io=require(_0x3a42('0xa'))(new Redis(config['redis']));function UserReport(_0x65e0ba){this[_0x3a42('0xb')]=_0x65e0ba[_0x3a42('0xb')];this[_0x3a42('0xc')]=_0x65e0ba[_0x3a42('0xc')];this[_0x3a42('0xd')]=_0x65e0ba[_0x3a42('0xd')];ami['on'](_0x3a42('0xe'),this[_0x3a42('0xf')][_0x3a42('0x10')](this));ami['on'](_0x3a42('0x11'),this['syncRegistry'][_0x3a42('0x10')](this));ami['on'](_0x3a42('0x12'),this[_0x3a42('0x13')][_0x3a42('0x10')](this));ami['on']('peerstatus',this['syncPeerStatus'][_0x3a42('0x10')](this));return this['syncRealtimeShow']();}function showSipRegistrations(){Promise[_0x3a42('0x14')]()[_0x3a42('0x15')](ami[_0x3a42('0x16')]())[_0x3a42('0x17')](function(_0x891963){logger[_0x3a42('0x18')]('[userReport][sipshowregistry]',util[_0x3a42('0x19')](_0x891963,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise['resolve']()[_0x3a42('0x15')](ami['actionDeviceStateList']())[_0x3a42('0x17')](function(_0x5895a8){logger[_0x3a42('0x18')]('[userReport][devicestatelist]',util['inspect'](_0x5895a8,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()[_0x3a42('0x15')](ami[_0x3a42('0x1a')]())[_0x3a42('0x17')](function(_0x39e620){logger[_0x3a42('0x18')]('[userReport][sippeerstatus]',util[_0x3a42('0x19')](_0x39e620,{'showHidden':![],'depth':null}));});}UserReport[_0x3a42('0x1b')][_0x3a42('0x1c')]=function(){setInterval(function(){BPromise[_0x3a42('0x14')]()[_0x3a42('0x15')](showSipRegistrations())[_0x3a42('0x15')](listDeviceStates())['then'](showPeersStatus());},0x32c8);};UserReport[_0x3a42('0x1b')][_0x3a42('0x1d')]=function(_0x3bb792){return _0x3bb792!==null&&!_[_0x3a42('0x1e')](_0x3bb792);};UserReport[_0x3a42('0x1b')]['emit']=function(_0x34927a,_0x42b40f,_0x379fe6){io['to'](_0x34927a)[_0x3a42('0x1f')](_0x42b40f,_0x379fe6);};UserReport[_0x3a42('0x1b')]['syncRegistry']=function(_0xab8ab7){try{if(this[_0x3a42('0x1d')](_0xab8ab7)){logger[_0x3a42('0x20')](_0x3a42('0x21'),_0xab8ab7[_0x3a42('0x22')],_0xab8ab7[_0x3a42('0x23')]);logger[_0x3a42('0x24')](_0x3a42('0x25'),util[_0x3a42('0x19')](_0xab8ab7,{'showHidden':![],'depth':null}));var _0x3a3f87=_[_0x3a42('0x26')](this['trunks'],{'registry':_0xab8ab7[_0x3a42('0x22')]});if(_0x3a3f87){_0xab8ab7[_0x3a42('0x27')]=_0xab8ab7['state'];_[_0x3a42('0x28')](_0x3a3f87,_['omit'](_0xab8ab7,[_0x3a42('0x29'),_0x3a42('0x2a'),_0x3a42('0x22'),_0x3a42('0x23')]));logger[_0x3a42('0x24')](_0x3a42('0x2b'),util['inspect'](_0x3a3f87,{'showHidden':![],'depth':null}));this[_0x3a42('0x1f')](util[_0x3a42('0x2c')](_0x3a42('0x2d'),_0x3a3f87[_0x3a42('0x2e')]),_0x3a42('0x2f'),_0x3a3f87);}}}catch(_0x44ef39){logger[_0x3a42('0x18')]('[userReport][registry]',util[_0x3a42('0x19')](_0x44ef39,{'showHidden':![],'depth':null}));}};UserReport[_0x3a42('0x1b')][_0x3a42('0x13')]=function(_0x69e4f7){try{if(this[_0x3a42('0x1d')](_0x69e4f7)){logger['info']('[userReport][devicestatechange]\x20device:%s\x20state:%s',_0x69e4f7[_0x3a42('0x30')],_0x69e4f7['state']);logger[_0x3a42('0x24')](_0x3a42('0x31'),util[_0x3a42('0x19')](_0x69e4f7,{'showHidden':![],'depth':null}));if(this[_0x3a42('0xc')][_0x69e4f7[_0x3a42('0x30')]]){if(!this[_0x3a42('0xc')][_0x69e4f7['device']][_0x3a42('0x32')]||_0x69e4f7[_0x3a42('0x23')][_0x3a42('0x33')]()=='inuse'){this['agents'][_0x69e4f7[_0x3a42('0x30')]][_0x3a42('0x32')]=![];if(this[_0x3a42('0xc')][_0x69e4f7[_0x3a42('0x30')]][_0x3a42('0x23')]!==_0x69e4f7['state']['toLowerCase']()){this[_0x3a42('0xc')][_0x69e4f7[_0x3a42('0x30')]][_0x3a42('0x34')]=_[_0x3a42('0x35')](moment()['format']('x'));}this[_0x3a42('0xc')][_0x69e4f7[_0x3a42('0x30')]]['state']=_0x69e4f7['state']['toLowerCase']();this[_0x3a42('0xc')][_0x69e4f7['device']][_0x3a42('0x36')](_0x69e4f7);}}else if(this[_0x3a42('0xd')][_0x69e4f7[_0x3a42('0x30')]]){if(this[_0x3a42('0xd')][_0x69e4f7[_0x3a42('0x30')]][_0x3a42('0x23')]!==_0x69e4f7[_0x3a42('0x23')][_0x3a42('0x33')]()){this[_0x3a42('0xd')][_0x69e4f7['device']][_0x3a42('0x34')]=_[_0x3a42('0x35')](moment()[_0x3a42('0x2c')]('x'));}this[_0x3a42('0xd')][_0x69e4f7[_0x3a42('0x30')]]['state']=_0x69e4f7[_0x3a42('0x23')]['toLowerCase']();logger['debug']('[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:',util['inspect'](this[_0x3a42('0xd')][_0x69e4f7['device']],{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x3a42('0x37'),this['telephones'][_0x69e4f7['device']][_0x3a42('0x2e')]),_0x3a42('0x38'),this[_0x3a42('0xd')][_0x69e4f7[_0x3a42('0x30')]]);}else if(this[_0x3a42('0xb')][_0x69e4f7[_0x3a42('0x30')]]){if(this['trunks'][_0x69e4f7[_0x3a42('0x30')]][_0x3a42('0x23')]!==_0x69e4f7[_0x3a42('0x23')]['toLowerCase']()){this[_0x3a42('0xb')][_0x69e4f7[_0x3a42('0x30')]]['stateTime']=_[_0x3a42('0x35')](moment()[_0x3a42('0x2c')]('x'));}this[_0x3a42('0xb')][_0x69e4f7[_0x3a42('0x30')]][_0x3a42('0x23')]=_0x69e4f7[_0x3a42('0x23')][_0x3a42('0x33')]();logger['debug'](_0x3a42('0x39'),util[_0x3a42('0x19')](this[_0x3a42('0xb')][_0x69e4f7[_0x3a42('0x30')]],{'showHidden':![],'depth':null}));this[_0x3a42('0x1f')](util['format'](_0x3a42('0x2d'),this[_0x3a42('0xb')][_0x69e4f7[_0x3a42('0x30')]]['name']),_0x3a42('0x2f'),this[_0x3a42('0xb')][_0x69e4f7[_0x3a42('0x30')]]);}else if(_[_0x3a42('0x3a')](_0x69e4f7[_0x3a42('0x30')],'Local')){var _0x40c746=_0x69e4f7[_0x3a42('0x30')];var _0x3a3293=_0x40c746[_0x3a42('0x3b')](_0x40c746['indexOf']('/')+0x1,_0x40c746[_0x3a42('0x3c')]('@'));var _0x486472=_[_0x3a42('0x26')](this[_0x3a42('0xc')],function(_0x8e5316){return _0x8e5316[_0x3a42('0x3d')]==_0x3a3293||_0x8e5316[_0x3a42('0x3e')]==_0x3a3293||_0x8e5316['accountcode']==_0x3a3293;});if(_0x486472){if(_0x486472[_0x3a42('0x23')]!==_0x69e4f7[_0x3a42('0x23')][_0x3a42('0x33')]()){_0x486472[_0x3a42('0x34')]=_[_0x3a42('0x35')](moment()[_0x3a42('0x2c')]('x'));}_0x486472['state']=_0x69e4f7[_0x3a42('0x23')]['toLowerCase']();_0x486472[_0x3a42('0x32')]=!![];_0x486472[_0x3a42('0x36')](_0x69e4f7);}}}}catch(_0x458d47){logger[_0x3a42('0x18')](_0x3a42('0x31'),util[_0x3a42('0x19')](_0x458d47,{'showHidden':![],'depth':null}));}};UserReport[_0x3a42('0x1b')][_0x3a42('0x3f')]=function(_0x32552f){try{if(this['isNotNull'](_0x32552f)&&this[_0x3a42('0x1d')](_0x32552f[_0x3a42('0x40')])){logger['info']('[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s',_0x32552f[_0x3a42('0x41')],_0x32552f[_0x3a42('0x42')],_0x32552f['peerstatus']);logger[_0x3a42('0x24')](_0x3a42('0x43'),util[_0x3a42('0x19')](_0x32552f,{'showHidden':![],'depth':null}));if(this['agents'][_0x32552f[_0x3a42('0x41')]]){if(!this[_0x3a42('0xc')][_0x32552f['peer']][_0x3a42('0x32')]||_0x32552f['peerstatus'][_0x3a42('0x33')]()==_0x3a42('0x44')){this['agents'][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x32')]=![];this[_0x3a42('0xc')][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x45')]=_0x32552f[_0x3a42('0x40')][_0x3a42('0x33')]();this[_0x3a42('0xc')][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x42')]=_0x32552f['address'];this[_0x3a42('0xc')][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x36')](_0x32552f);}}else if(this[_0x3a42('0xd')][_0x32552f[_0x3a42('0x41')]]){this['telephones'][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x45')]=_0x32552f[_0x3a42('0x40')]['toLowerCase']();this[_0x3a42('0xd')][_0x32552f[_0x3a42('0x41')]]['address']=_0x32552f[_0x3a42('0x42')];logger[_0x3a42('0x24')](_0x3a42('0x46'),util[_0x3a42('0x19')](this[_0x3a42('0xd')][_0x32552f[_0x3a42('0x41')]],{'showHidden':![],'depth':null}));this['emit'](util['format']('telephone:%s',this[_0x3a42('0xd')][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x2e')]),_0x3a42('0x38'),this['telephones'][_0x32552f[_0x3a42('0x41')]]);}else if(this[_0x3a42('0xb')][_0x32552f[_0x3a42('0x41')]]){this['trunks'][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x45')]=_0x32552f['peerstatus'][_0x3a42('0x33')]();this[_0x3a42('0xb')][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x42')]=_0x32552f[_0x3a42('0x42')];logger[_0x3a42('0x24')](_0x3a42('0x47'),util[_0x3a42('0x19')](this[_0x3a42('0xb')][_0x32552f[_0x3a42('0x41')]],{'showHidden':![],'depth':null}));this[_0x3a42('0x1f')](util[_0x3a42('0x2c')](_0x3a42('0x2d'),this[_0x3a42('0xb')][_0x32552f[_0x3a42('0x41')]][_0x3a42('0x2e')]),_0x3a42('0x2f'),this[_0x3a42('0xb')][_0x32552f['peer']]);}}}catch(_0x253c2d){logger[_0x3a42('0x18')](_0x3a42('0x43'),util['inspect'](_0x253c2d,{'showHidden':![],'depth':null}));}};module['exports']=UserReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceAgentReport.js b/server/services/ami/report/voiceAgentReport.js index 0062965..242517c 100644 --- a/server/services/ami/report/voiceAgentReport.js +++ b/server/services/ami/report/voiceAgentReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0d67=['[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','destuniqueid','debug','[%s][voiceAgentReport][agentcalled]\x20event:','inspect','YYYY-MM-DD\x20HH:mm:ss','called','queue','type','inbound','merge','omit','event','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','format','user:%s','membername','[%s][voiceAgentReport][agentcalled]','[%s][voiceAgentReport][agentconnect]\x20event:','hasOwnProperty','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','interface','pick','destconnectedlinenum','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentconnect\x20event:','custom:agentconnect','user:agentconnect','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answered_elsewhere','reason','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','error','[%s][voiceAgentReport][agentconnect]','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','rejected','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','[%s][voiceAgentReport][queuecallerabandon]\x20event:','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','transfer','agent','talktime','acw','acwtime','acwTimeout','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','variable','value','keys','[%s][voiceAgentReport][varset]','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','memberdynamic','memberpenalty','memberrealtime','isNil','includes','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','agentcompleteAt','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','complete','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','[%s][voiceAgentReport][blindtransfer]','syncMusicOnHoldStart','channel','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','onhold','[%s][voiceAgentReport][musiconholdstart]','syncMusicOnHoldStop','[%s][voiceAgentReport][musiconholdstop]\x20event:','substring','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','lodash','util','../../../config/environment','ami','../ami','redis','defaults','socket.io-emitter','channels','voiceQueues','agents','variables','syncAgentCalled','bind','syncAgentConnect','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','varset','syncVarSet','syncHangup','musiconholdstart','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isUndefined','isNotNull','info'];(function(_0x23c965,_0x2029b6){var _0x197c94=function(_0x1e71f7){while(--_0x1e71f7){_0x23c965['push'](_0x23c965['shift']());}};_0x197c94(++_0x2029b6);}(_0x0d67,0x104));var _0x70d6=function(_0x278452,_0x117e29){_0x278452=_0x278452-0x0;var _0x3fbd3e=_0x0d67[_0x278452];return _0x3fbd3e;};'use strict';var _=require(_0x70d6('0x0'));var moment=require('moment');var util=require(_0x70d6('0x1'));var Redis=require('ioredis');var config=require(_0x70d6('0x2'));var logger=require('../../../config/logger')(_0x70d6('0x3'));var ami=require(_0x70d6('0x4'));config[_0x70d6('0x5')]=_[_0x70d6('0x6')](config[_0x70d6('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x70d6('0x7'))(new Redis(config['redis']));function VoiceAgentReport(_0x61b17c){this[_0x70d6('0x8')]={};this[_0x70d6('0x9')]=_0x61b17c['voiceQueues'];this[_0x70d6('0xa')]=_0x61b17c[_0x70d6('0xa')];this[_0x70d6('0xb')]={};ami['on']('agentcalled',this[_0x70d6('0xc')][_0x70d6('0xd')](this));ami['on']('agentconnect',this[_0x70d6('0xe')][_0x70d6('0xd')](this));ami['on'](_0x70d6('0xf'),this[_0x70d6('0x10')][_0x70d6('0xd')](this));ami['on'](_0x70d6('0x11'),this[_0x70d6('0x12')]['bind'](this));ami['on'](_0x70d6('0x13'),this[_0x70d6('0x14')][_0x70d6('0xd')](this));ami['on'](_0x70d6('0x15'),this[_0x70d6('0x16')]['bind'](this));ami['on']('hangup',this[_0x70d6('0x17')][_0x70d6('0xd')](this));ami['on'](_0x70d6('0x18'),this['syncMusicOnHoldStart'][_0x70d6('0xd')](this));ami['on']('musiconholdstop',this['syncMusicOnHoldStop'][_0x70d6('0xd')](this));ami['on'](_0x70d6('0x19'),this[_0x70d6('0x1a')][_0x70d6('0xd')](this));ami['on'](_0x70d6('0x1b'),this[_0x70d6('0x1c')][_0x70d6('0xd')](this));}VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x1e')]=function(_0x3f7958,_0x1108fd,_0x2a271e){io['to'](_0x3f7958)['emit'](_0x1108fd,_0x2a271e);};VoiceAgentReport['prototype']['isNotNull']=function(_0x2d1765){return _0x2d1765!==null&&!_[_0x70d6('0x1f')](_0x2d1765);};VoiceAgentReport['prototype'][_0x70d6('0xc')]=function(_0x1a5147){try{if(this[_0x70d6('0x20')](_0x1a5147)){logger[_0x70d6('0x21')](_0x70d6('0x22'),_0x1a5147[_0x70d6('0x23')],_0x1a5147['membername'],_0x1a5147[_0x70d6('0x24')]);logger[_0x70d6('0x25')](_0x70d6('0x26'),_0x1a5147[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x1a5147,{'showHidden':![],'depth':null}));if(_[_0x70d6('0x1f')](this['channels'][_0x1a5147['uniqueid']])){this[_0x70d6('0x8')][_0x1a5147[_0x70d6('0x23')]]={};}if(_['isUndefined'](this['channels'][_0x1a5147[_0x70d6('0x23')]][_0x1a5147[_0x70d6('0x24')]])){this['channels'][_0x1a5147[_0x70d6('0x23')]][_0x1a5147[_0x70d6('0x24')]]={'agentcalledAt':moment()['format'](_0x70d6('0x28')),'lastevent':_0x70d6('0x29'),'mandatoryDisposition':this[_0x70d6('0x9')][_0x1a5147[_0x70d6('0x2a')]]?this['voiceQueues'][_0x1a5147[_0x70d6('0x2a')]]['mandatoryDisposition']||![]:![],'type':this['voiceQueues'][_0x1a5147['queue']]?this['voiceQueues'][_0x1a5147['queue']][_0x70d6('0x2b')]||'inbound':_0x70d6('0x2c'),'variables':this[_0x70d6('0xb')][_0x1a5147[_0x70d6('0x23')]]};}_[_0x70d6('0x2d')](this[_0x70d6('0x8')][_0x1a5147[_0x70d6('0x23')]][_0x1a5147[_0x70d6('0x24')]],_[_0x70d6('0x2e')](_0x1a5147,[_0x70d6('0x2f'),_0x70d6('0x30')]));logger[_0x70d6('0x25')](_0x70d6('0x31'),_0x1a5147[_0x70d6('0x23')],util[_0x70d6('0x27')](this[_0x70d6('0x8')][_0x1a5147[_0x70d6('0x23')]][_0x1a5147['destuniqueid']],{'showHidden':![],'depth':null}));ami['emit']('custom:agentcalled',this['channels'][_0x1a5147[_0x70d6('0x23')]][_0x1a5147[_0x70d6('0x24')]]);logger['debug']('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:',_0x1a5147[_0x70d6('0x23')],util[_0x70d6('0x27')](this[_0x70d6('0x8')][_0x1a5147['uniqueid']][_0x1a5147[_0x70d6('0x24')]],{'showHidden':![],'depth':null}));this[_0x70d6('0x1e')](util[_0x70d6('0x32')](_0x70d6('0x33'),_0x1a5147[_0x70d6('0x34')]),'user:called',this[_0x70d6('0x8')][_0x1a5147[_0x70d6('0x23')]][_0x1a5147[_0x70d6('0x24')]]);}}catch(_0x29744d){logger['error'](_0x70d6('0x35'),_0x1a5147[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x29744d,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0xe')]=function(_0x45fbf8){try{if(this[_0x70d6('0x20')](_0x45fbf8)){if(this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]]){logger[_0x70d6('0x25')](_0x70d6('0x36'),_0x45fbf8[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x45fbf8,{'showHidden':![],'depth':null}));for(var _0x3d483e in this[_0x70d6('0x8')][_0x45fbf8['uniqueid']]){if(this['channels'][_0x45fbf8[_0x70d6('0x23')]][_0x70d6('0x37')](_0x3d483e)){if(_0x45fbf8[_0x70d6('0x24')]===_0x3d483e){logger['info'](_0x70d6('0x38'),_0x45fbf8[_0x70d6('0x23')],_0x45fbf8[_0x70d6('0x34')],_0x45fbf8[_0x70d6('0x24')]);this['channels'][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x39')]=moment()['format'](_0x70d6('0x28'));this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3a')]=_0x45fbf8['connectedlinename'];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3b')]=_0x45fbf8[_0x70d6('0x3b')];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3c')]=_0x45fbf8[_0x70d6('0x3c')];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3d')]=_0x45fbf8[_0x70d6('0x3d')];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3e')]=_0x45fbf8[_0x70d6('0x3e')];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3f')]='connect';_['merge'](this['agents'][_0x45fbf8[_0x70d6('0x40')]],_[_0x70d6('0x41')](_0x45fbf8,[_0x70d6('0x2a'),_0x70d6('0x42')]));logger[_0x70d6('0x25')](_0x70d6('0x43'),_0x45fbf8['uniqueid'],util[_0x70d6('0x27')](this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x45fbf8[_0x70d6('0x24')]],{'showHidden':![],'depth':null}));ami[_0x70d6('0x1e')](_0x70d6('0x44'),this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x45fbf8[_0x70d6('0x24')]]);logger[_0x70d6('0x25')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:agentconnect\x20event:',_0x45fbf8['uniqueid'],util['inspect'](this['channels'][_0x45fbf8[_0x70d6('0x23')]][_0x45fbf8[_0x70d6('0x24')]],{'showHidden':![],'depth':null}));this[_0x70d6('0x1e')](util[_0x70d6('0x32')]('user:%s',_0x45fbf8[_0x70d6('0x34')]),_0x70d6('0x45'),this[_0x70d6('0x8')][_0x45fbf8['uniqueid']][_0x45fbf8[_0x70d6('0x24')]]);}else if(!this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0xf')]&&!this['channels'][_0x45fbf8['uniqueid']][_0x3d483e][_0x70d6('0x13')]){logger[_0x70d6('0x21')](_0x70d6('0x46'),_0x45fbf8[_0x70d6('0x23')],this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x34')],_0x3d483e);this['channels'][_0x45fbf8['uniqueid']][_0x3d483e]['agentringnoanswer']=!![];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x47')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x48')]=_0x45fbf8[_0x70d6('0x24')];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e]['answeredelsewheremembername']=_0x45fbf8['membername'];this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x3f')]=_0x70d6('0x49');this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e][_0x70d6('0x4a')]='answered_elsewhere';logger['debug'](_0x70d6('0x4b'),_0x45fbf8[_0x70d6('0x23')],util['inspect'](this[_0x70d6('0x8')][_0x45fbf8['uniqueid']][_0x3d483e],{'showHidden':![],'depth':null}));ami[_0x70d6('0x1e')](_0x70d6('0x4c'),this[_0x70d6('0x8')][_0x45fbf8[_0x70d6('0x23')]][_0x3d483e]);}}}}}}catch(_0x3c1008){logger[_0x70d6('0x4d')](_0x70d6('0x4e'),_0x45fbf8[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x3c1008,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x10')]=function(_0x433d42){try{if(this[_0x70d6('0x20')](_0x433d42)){logger[_0x70d6('0x25')](_0x70d6('0x4f'),_0x433d42[_0x70d6('0x23')],util['inspect'](_0x433d42,{'showHidden':![],'depth':null}));if(this[_0x70d6('0x8')][_0x433d42[_0x70d6('0x23')]]&&this[_0x70d6('0x8')][_0x433d42[_0x70d6('0x23')]][_0x433d42[_0x70d6('0x24')]]){logger[_0x70d6('0x21')](_0x70d6('0x50'),_0x433d42[_0x70d6('0x23')],_0x433d42[_0x70d6('0x34')],_0x433d42[_0x70d6('0x24')]);this[_0x70d6('0x8')][_0x433d42['uniqueid']][_0x433d42[_0x70d6('0x24')]][_0x70d6('0xf')]=!![];this[_0x70d6('0x8')][_0x433d42['uniqueid']][_0x433d42[_0x70d6('0x24')]]['agentringnoanswerAt']=moment()[_0x70d6('0x32')](_0x70d6('0x28'));this['channels'][_0x433d42[_0x70d6('0x23')]][_0x433d42[_0x70d6('0x24')]][_0x70d6('0x3f')]=_0x70d6('0x51');this['channels'][_0x433d42[_0x70d6('0x23')]][_0x433d42['destuniqueid']]['reason']=_0x70d6('0x51');logger[_0x70d6('0x25')](_0x70d6('0x52'),_0x433d42[_0x70d6('0x23')],util[_0x70d6('0x27')](this['channels'][_0x433d42[_0x70d6('0x23')]][_0x433d42[_0x70d6('0x24')]],{'showHidden':![],'depth':null}));ami[_0x70d6('0x1e')]('custom:agentringnoanswer',this[_0x70d6('0x8')][_0x433d42['uniqueid']][_0x433d42['destuniqueid']]);}}}catch(_0x5a25ff){logger['error']('[%s][voiceAgentReport][agentringnoanswer]',_0x433d42['uniqueid'],util[_0x70d6('0x27')](_0x5a25ff,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x12')]=function(_0x2d6694){try{if(this[_0x70d6('0x20')](_0x2d6694)){logger[_0x70d6('0x25')](_0x70d6('0x53'),_0x2d6694[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x2d6694,{'showHidden':![],'depth':null}));if(this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]]){for(var _0x43f896 in this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]]){if(this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]]['hasOwnProperty'](_0x43f896)&&!this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]][_0x43f896][_0x70d6('0xf')]&&!this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]][_0x43f896][_0x70d6('0x13')]){logger[_0x70d6('0x21')]('[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x2d6694[_0x70d6('0x23')],this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]][_0x43f896][_0x70d6('0x34')],_0x43f896);this['channels'][_0x2d6694[_0x70d6('0x23')]][_0x43f896]['agentringnoanswer']=!![];this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]][_0x43f896]['agentringnoanswerAt']=moment()[_0x70d6('0x32')](_0x70d6('0x28'));this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]][_0x43f896][_0x70d6('0x3f')]='abandoned';this[_0x70d6('0x8')][_0x2d6694['uniqueid']][_0x43f896][_0x70d6('0x4a')]=_0x70d6('0x54');logger[_0x70d6('0x25')](_0x70d6('0x55'),_0x2d6694['uniqueid'],util[_0x70d6('0x27')](this[_0x70d6('0x8')][_0x2d6694[_0x70d6('0x23')]][_0x43f896],{'showHidden':![],'depth':null}));ami[_0x70d6('0x1e')](_0x70d6('0x56'),this[_0x70d6('0x8')][_0x2d6694['uniqueid']][_0x43f896]);}}}}}catch(_0x3c9afe){logger[_0x70d6('0x4d')](_0x70d6('0x57'),_0x2d6694[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x3c9afe,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')]['syncAgentComplete']=function(_0x2f6b7e){try{if(this[_0x70d6('0x20')](_0x2f6b7e)){logger[_0x70d6('0x25')](_0x70d6('0x58'),_0x2f6b7e[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x2f6b7e,{'showHidden':![],'depth':null}));if(this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]]){for(var _0x22e0c2 in this['channels'][_0x2f6b7e['uniqueid']]){if(this['channels'][_0x2f6b7e['uniqueid']][_0x70d6('0x37')](_0x22e0c2)){if(this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2][_0x70d6('0x39')]&&!this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2]['agentcomplete']){logger[_0x70d6('0x21')](_0x70d6('0x59'),_0x2f6b7e[_0x70d6('0x23')],this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2][_0x70d6('0x34')],_0x22e0c2);this['channels'][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2]['agentcomplete']=!![];this['channels'][_0x2f6b7e['uniqueid']][_0x22e0c2]['agentcompleteAt']=moment()['format'](_0x70d6('0x28'));this['channels'][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2][_0x70d6('0x3f')]='complete';this[_0x70d6('0x8')][_0x2f6b7e['uniqueid']][_0x22e0c2][_0x70d6('0x4a')]=_0x2f6b7e[_0x70d6('0x4a')]==_0x70d6('0x5a')?_0x70d6('0x5b'):_0x2f6b7e[_0x70d6('0x4a')];this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2][_0x70d6('0x5c')]=_0x2f6b7e[_0x70d6('0x5c')];if(this[_0x70d6('0x9')][_0x2f6b7e[_0x70d6('0x2a')]]&&this['voiceQueues'][_0x2f6b7e[_0x70d6('0x2a')]][_0x70d6('0x5d')]){this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2][_0x70d6('0x5e')]=this[_0x70d6('0x9')][_0x2f6b7e[_0x70d6('0x2a')]][_0x70d6('0x5f')];this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2][_0x70d6('0x60')]=!![];}this[_0x70d6('0xa')][_0x2f6b7e[_0x70d6('0x40')]]=_[_0x70d6('0x2e')](this[_0x70d6('0xa')][_0x2f6b7e['interface']],[_0x70d6('0x2a'),_0x70d6('0x42')]);logger['debug'](_0x70d6('0x61'),_0x2f6b7e[_0x70d6('0x23')],util[_0x70d6('0x27')](this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2],{'showHidden':![],'depth':null}));ami[_0x70d6('0x1e')]('custom:agentcomplete',this[_0x70d6('0x8')][_0x2f6b7e['uniqueid']][_0x22e0c2]);logger[_0x70d6('0x25')]('[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:',_0x2f6b7e[_0x70d6('0x23')],util['inspect'](this['channels'][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2],{'showHidden':![],'depth':null}));this[_0x70d6('0x1e')](util[_0x70d6('0x32')](_0x70d6('0x33'),_0x2f6b7e[_0x70d6('0x34')]),_0x70d6('0x62'),this[_0x70d6('0x8')][_0x2f6b7e[_0x70d6('0x23')]][_0x22e0c2]);}}}}}}catch(_0x12f350){logger[_0x70d6('0x4d')](_0x70d6('0x63'),_0x2f6b7e[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x12f350,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x16')]=function(_0x106294){try{if(this[_0x70d6('0x20')](_0x106294)){logger[_0x70d6('0x25')](_0x70d6('0x64'),_0x106294[_0x70d6('0x23')],util['inspect'](_0x106294,{'showHidden':![],'depth':null}));this['addVariable'](_0x106294[_0x70d6('0x23')],_['keys'](_0x106294[_0x70d6('0x65')])[0x0],_0x106294[_0x70d6('0x66')]);if(this[_0x70d6('0x8')][_0x106294['uniqueid']]){for(var _0x2d5611 in this['channels'][_0x106294[_0x70d6('0x23')]]){if(this[_0x70d6('0x8')][_0x106294['uniqueid']][_0x70d6('0x37')](_0x2d5611)){logger[_0x70d6('0x21')]('[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s',_0x106294[_0x70d6('0x23')],_0x2d5611,_[_0x70d6('0x67')](_0x106294['variable'])[0x0],_0x106294[_0x70d6('0x66')]);if(_[_0x70d6('0x1f')](this['channels'][_0x106294[_0x70d6('0x23')]][_0x2d5611]['variables'])){this[_0x70d6('0x8')][_0x106294['uniqueid']][_0x2d5611][_0x70d6('0xb')]={};}this[_0x70d6('0x8')][_0x106294['uniqueid']][_0x2d5611][_0x70d6('0xb')]=this['variables'][_0x106294[_0x70d6('0x23')]];}}}}}catch(_0x43c18e){logger[_0x70d6('0x4d')](_0x70d6('0x68'),_0x106294[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x43c18e,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x69')]=function(_0x2ae583,_0x2590d1,_0x3f6a45){var _0x49ca20=[_0x70d6('0x6a'),_0x70d6('0x6b'),_0x70d6('0x6c'),_0x70d6('0x6d'),_0x70d6('0x6e'),'rtpaudioqoslossbridged','rtpaudioqosrtt',_0x70d6('0x6f'),_0x70d6('0x70'),_0x70d6('0x71'),_0x70d6('0x72'),_0x70d6('0x73'),'membercalls',_0x70d6('0x74'),'memberinterface','memberlastcall',_0x70d6('0x34'),_0x70d6('0x75'),_0x70d6('0x76')];if(!_[_0x70d6('0x77')](_0x2590d1)&&!_[_0x70d6('0x78')](_0x49ca20,_0x2590d1)){if(_[_0x70d6('0x1f')](this[_0x70d6('0xb')][_0x2ae583])){this['variables'][_0x2ae583]={};}this['variables'][_0x2ae583][_0x2590d1]=_0x3f6a45;}};VoiceAgentReport[_0x70d6('0x1d')]['syncHangup']=function(_0xa91dc1){try{if(this[_0x70d6('0x20')](_0xa91dc1)){logger[_0x70d6('0x25')]('[%s][voiceAgentReport][hangup]\x20event:',_0xa91dc1[_0x70d6('0x23')],util[_0x70d6('0x27')](_0xa91dc1,{'showHidden':![],'depth':null}));if(this[_0x70d6('0x8')][_0xa91dc1[_0x70d6('0x23')]]){for(var _0x244220 in this[_0x70d6('0x8')][_0xa91dc1['uniqueid']]){if(this[_0x70d6('0x8')][_0xa91dc1[_0x70d6('0x23')]]['hasOwnProperty'](_0x244220)){if(this[_0x70d6('0x8')][_0xa91dc1[_0x70d6('0x23')]][_0x244220]['reason']==_0x70d6('0x5a')&&this[_0x70d6('0x8')][_0xa91dc1['uniqueid']][_0x244220][_0x70d6('0x13')]){logger[_0x70d6('0x21')](_0x70d6('0x79'),_0xa91dc1[_0x70d6('0x23')],_0x244220);this['channels'][_0xa91dc1[_0x70d6('0x23')]][_0x244220][_0x70d6('0x7a')]=moment()[_0x70d6('0x32')](_0x70d6('0x28'));}}}logger[_0x70d6('0x25')](_0x70d6('0x7b'),_0xa91dc1['uniqueid'],util[_0x70d6('0x27')](_[_0x70d6('0x7c')](this[_0x70d6('0x8')][_0xa91dc1[_0x70d6('0x23')]]),{'showHidden':![],'depth':null}));ami[_0x70d6('0x1e')]('custom:voiceAgentReport',_['values'](this[_0x70d6('0x8')][_0xa91dc1[_0x70d6('0x23')]]));delete this['channels'][_0xa91dc1[_0x70d6('0x23')]];}if(this[_0x70d6('0xb')][_0xa91dc1[_0x70d6('0x23')]]){delete this[_0x70d6('0xb')][_0xa91dc1['uniqueid']];}}}catch(_0x2a9e09){logger[_0x70d6('0x4d')](_0x70d6('0x7d'),_0xa91dc1[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x2a9e09,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x1a')]=function(_0x5366d8){try{if(this[_0x70d6('0x20')](_0x5366d8)){logger[_0x70d6('0x25')](_0x70d6('0x7e'),_0x5366d8[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x5366d8,{'showHidden':![],'depth':null}));if(this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]]){for(var _0x14ddf2 in this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]]){if(this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]][_0x70d6('0x37')](_0x14ddf2)){if(_0x5366d8['origtransfereruniqueid']===_0x14ddf2){logger['info'](_0x70d6('0x80'),_0x5366d8['uniqueid'],this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]][_0x14ddf2][_0x70d6('0x34')],_0x14ddf2);var _0x4adcc7=moment();this['channels'][_0x5366d8[_0x70d6('0x7f')]][_0x14ddf2][_0x70d6('0x13')]=!![];this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]][_0x14ddf2][_0x70d6('0x7a')]=moment()[_0x70d6('0x32')](_0x70d6('0x28'));this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]][_0x14ddf2][_0x70d6('0x3f')]=_0x70d6('0x81');this[_0x70d6('0x8')][_0x5366d8['transfereeuniqueid']][_0x14ddf2][_0x70d6('0x4a')]='transfer';this[_0x70d6('0x8')][_0x5366d8['transfereeuniqueid']][_0x14ddf2][_0x70d6('0x5c')]=_0x4adcc7[_0x70d6('0x82')](this[_0x70d6('0x8')][_0x5366d8['transfereeuniqueid']][_0x14ddf2][_0x70d6('0x39')],_0x70d6('0x83'));}}}}if(this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x84')]]){var _0x45423e=this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x84')]];this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x84')]]=this[_0x70d6('0x8')][_0x5366d8['transfereeuniqueid']];this[_0x70d6('0x8')][_0x5366d8[_0x70d6('0x7f')]]=_0x45423e;}}}catch(_0x356a96){logger['error']('[%s][voiceAgentReport][attendedtransfer]',_0x5366d8[_0x70d6('0x23')],util['inspect'](_0x356a96,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x1c')]=function(_0x1fd723){try{if(this[_0x70d6('0x20')](_0x1fd723)){logger[_0x70d6('0x25')](_0x70d6('0x85'),_0x1fd723[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x1fd723,{'showHidden':![],'depth':null}));if(this[_0x70d6('0x8')][_0x1fd723[_0x70d6('0x7f')]]){for(var _0xd8ef05 in this[_0x70d6('0x8')][_0x1fd723['transfereeuniqueid']]){if(this['channels'][_0x1fd723[_0x70d6('0x7f')]][_0x70d6('0x37')](_0xd8ef05)){if(_0x1fd723[_0x70d6('0x86')]===_0xd8ef05){logger['info'](_0x70d6('0x87'),_0x1fd723[_0x70d6('0x23')],this['channels'][_0x1fd723['transfereeuniqueid']][_0xd8ef05][_0x70d6('0x34')],_0xd8ef05);var _0x79ebeb=moment();this['channels'][_0x1fd723['transfereeuniqueid']][_0xd8ef05][_0x70d6('0x13')]=!![];this[_0x70d6('0x8')][_0x1fd723['transfereeuniqueid']][_0xd8ef05][_0x70d6('0x7a')]=_0x79ebeb;this[_0x70d6('0x8')][_0x1fd723['transfereeuniqueid']][_0xd8ef05][_0x70d6('0x3f')]='complete';this[_0x70d6('0x8')][_0x1fd723[_0x70d6('0x7f')]][_0xd8ef05][_0x70d6('0x4a')]=_0x70d6('0x5a');this[_0x70d6('0x8')][_0x1fd723[_0x70d6('0x7f')]][_0xd8ef05]['talktime']=_0x79ebeb[_0x70d6('0x82')](this[_0x70d6('0x8')][_0x1fd723['transfereeuniqueid']][_0xd8ef05]['agentconnectAt'],_0x70d6('0x83'));}}}}}}catch(_0x498490){logger[_0x70d6('0x4d')](_0x70d6('0x88'),_0x1fd723[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x498490,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x89')]=function(_0x323d79){var _0x431dd4='';try{if(this[_0x70d6('0x20')](_0x323d79)){logger[_0x70d6('0x25')]('[%s][voiceAgentReport][musiconholdstart]\x20event:',_0x323d79[_0x70d6('0x23')],util[_0x70d6('0x27')](_0x323d79,{'showHidden':![],'depth':null}));if(_0x323d79[_0x70d6('0x8a')]){_0x431dd4=_0x323d79[_0x70d6('0x8a')]['substring'](0x0,_0x323d79['channel'][_0x70d6('0x8b')]('-'));if(this[_0x70d6('0xa')][_0x431dd4]){logger['info'](_0x70d6('0x8c'),_0x323d79[_0x70d6('0x23')],_0x431dd4);this['agents'][_0x431dd4][_0x70d6('0x8d')]=!![];}}}}catch(_0x54a2cd){logger[_0x70d6('0x4d')](_0x70d6('0x8e'),_0x323d79['uniqueid'],util[_0x70d6('0x27')](_0x54a2cd,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x70d6('0x1d')][_0x70d6('0x8f')]=function(_0x551570){var _0x470d2d='';try{if(this[_0x70d6('0x20')](_0x551570)){logger[_0x70d6('0x25')](_0x70d6('0x90'),_0x551570[_0x70d6('0x23')],util['inspect'](_0x551570,{'showHidden':![],'depth':null}));if(_0x551570['channel']){_0x470d2d=_0x551570['channel'][_0x70d6('0x91')](0x0,_0x551570[_0x70d6('0x8a')]['lastIndexOf']('-'));if(this[_0x70d6('0xa')][_0x470d2d]){logger['info'](_0x70d6('0x92'),_0x551570['uniqueid'],_0x470d2d);this[_0x70d6('0xa')][_0x470d2d]['onhold']=![];}}}}catch(_0x121372){logger[_0x70d6('0x4d')]('[%s][voiceAgentReport][musiconholdstop]',_0x551570['uniqueid'],util[_0x70d6('0x27')](_0x121372,{'showHidden':![],'depth':null}));}};module['exports']=VoiceAgentReport; \ No newline at end of file +var _0x3672=['destconnectedlinenum','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','keys','variable','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','value','[%s][voiceAgentReport][varset]','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','membercalls','memberdynamic','memberlastcall','isNil','includes','syncHangup','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','custom:voiceAgentReport','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20event:','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','[%s][voiceAgentReport][blindtransfer]','syncMusicOnHoldStart','channel','substring','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','onhold','lodash','moment','ioredis','../../../config/logger','ami','../ami','defaults','localhost','socket.io-emitter','redis','channels','voiceQueues','agents','variables','agentcalled','agentconnect','bind','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncVarSet','hangup','musiconholdstart','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','syncAgentCalled','info','membername','debug','[%s][voiceAgentReport][agentcalled]\x20event:','inspect','uniqueid','destuniqueid','YYYY-MM-DD\x20HH:mm:ss','called','queue','mandatoryDisposition','type','inbound','omit','event','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','custom:agentcalled','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','format','user:%s','error','[%s][voiceAgentReport][agentconnect]\x20event:','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','merge','interface','pick','user:agentconnect','agentringnoanswer','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answeredelsewheremembername','reason','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','rejected','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','hasOwnProperty','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','complete','transfer','agent','talktime','acw','acwtime','acwTimeout','agentacw'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x3672,0x149));var _0x2367=function(_0x28611e,_0x586726){_0x28611e=_0x28611e-0x0;var _0x530f69=_0x3672[_0x28611e];return _0x530f69;};'use strict';var _=require(_0x2367('0x0'));var moment=require(_0x2367('0x1'));var util=require('util');var Redis=require(_0x2367('0x2'));var config=require('../../../config/environment');var logger=require(_0x2367('0x3'))(_0x2367('0x4'));var ami=require(_0x2367('0x5'));config['redis']=_[_0x2367('0x6')](config['redis'],{'host':_0x2367('0x7'),'port':0x18eb});var io=require(_0x2367('0x8'))(new Redis(config[_0x2367('0x9')]));function VoiceAgentReport(_0x117064){this[_0x2367('0xa')]={};this[_0x2367('0xb')]=_0x117064[_0x2367('0xb')];this[_0x2367('0xc')]=_0x117064[_0x2367('0xc')];this[_0x2367('0xd')]={};ami['on'](_0x2367('0xe'),this['syncAgentCalled']['bind'](this));ami['on'](_0x2367('0xf'),this['syncAgentConnect'][_0x2367('0x10')](this));ami['on']('agentringnoanswer',this[_0x2367('0x11')]['bind'](this));ami['on'](_0x2367('0x12'),this[_0x2367('0x13')][_0x2367('0x10')](this));ami['on'](_0x2367('0x14'),this['syncAgentComplete']['bind'](this));ami['on']('varset',this[_0x2367('0x15')][_0x2367('0x10')](this));ami['on'](_0x2367('0x16'),this['syncHangup'][_0x2367('0x10')](this));ami['on'](_0x2367('0x17'),this['syncMusicOnHoldStart'][_0x2367('0x10')](this));ami['on']('musiconholdstop',this[_0x2367('0x18')]['bind'](this));ami['on'](_0x2367('0x19'),this[_0x2367('0x1a')][_0x2367('0x10')](this));ami['on'](_0x2367('0x1b'),this[_0x2367('0x1c')][_0x2367('0x10')](this));}VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x1e')]=function(_0x5f055e,_0x5f4a06,_0x48aecf){io['to'](_0x5f055e)[_0x2367('0x1e')](_0x5f4a06,_0x48aecf);};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x1f')]=function(_0x2239ad){return _0x2239ad!==null&&!_[_0x2367('0x20')](_0x2239ad);};VoiceAgentReport['prototype'][_0x2367('0x21')]=function(_0x304049){try{if(this[_0x2367('0x1f')](_0x304049)){logger[_0x2367('0x22')]('[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called',_0x304049['uniqueid'],_0x304049[_0x2367('0x23')],_0x304049['destuniqueid']);logger[_0x2367('0x24')](_0x2367('0x25'),_0x304049['uniqueid'],util[_0x2367('0x26')](_0x304049,{'showHidden':![],'depth':null}));if(_[_0x2367('0x20')](this[_0x2367('0xa')][_0x304049[_0x2367('0x27')]])){this[_0x2367('0xa')][_0x304049[_0x2367('0x27')]]={};}if(_[_0x2367('0x20')](this[_0x2367('0xa')][_0x304049['uniqueid']][_0x304049['destuniqueid']])){this[_0x2367('0xa')][_0x304049[_0x2367('0x27')]][_0x304049[_0x2367('0x28')]]={'agentcalledAt':moment()['format'](_0x2367('0x29')),'lastevent':_0x2367('0x2a'),'mandatoryDisposition':this[_0x2367('0xb')][_0x304049['queue']]?this[_0x2367('0xb')][_0x304049[_0x2367('0x2b')]][_0x2367('0x2c')]||![]:![],'type':this[_0x2367('0xb')][_0x304049[_0x2367('0x2b')]]?this[_0x2367('0xb')][_0x304049[_0x2367('0x2b')]][_0x2367('0x2d')]||_0x2367('0x2e'):'inbound','variables':this['variables'][_0x304049[_0x2367('0x27')]]};}_['merge'](this[_0x2367('0xa')][_0x304049[_0x2367('0x27')]][_0x304049[_0x2367('0x28')]],_[_0x2367('0x2f')](_0x304049,[_0x2367('0x30'),_0x2367('0x31')]));logger[_0x2367('0x24')](_0x2367('0x32'),_0x304049[_0x2367('0x27')],util['inspect'](this['channels'][_0x304049['uniqueid']][_0x304049[_0x2367('0x28')]],{'showHidden':![],'depth':null}));ami[_0x2367('0x1e')](_0x2367('0x33'),this['channels'][_0x304049[_0x2367('0x27')]][_0x304049['destuniqueid']]);logger[_0x2367('0x24')](_0x2367('0x34'),_0x304049[_0x2367('0x27')],util['inspect'](this[_0x2367('0xa')][_0x304049[_0x2367('0x27')]][_0x304049[_0x2367('0x28')]],{'showHidden':![],'depth':null}));this[_0x2367('0x1e')](util[_0x2367('0x35')](_0x2367('0x36'),_0x304049[_0x2367('0x23')]),'user:called',this[_0x2367('0xa')][_0x304049[_0x2367('0x27')]][_0x304049['destuniqueid']]);}}catch(_0x1e4a3f){logger[_0x2367('0x37')]('[%s][voiceAgentReport][agentcalled]',_0x304049['uniqueid'],util[_0x2367('0x26')](_0x1e4a3f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')]['syncAgentConnect']=function(_0x1f399e){try{if(this['isNotNull'](_0x1f399e)){if(this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]]){logger[_0x2367('0x24')](_0x2367('0x38'),_0x1f399e[_0x2367('0x27')],util['inspect'](_0x1f399e,{'showHidden':![],'depth':null}));for(var _0x3f52a6 in this['channels'][_0x1f399e['uniqueid']]){if(this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]]['hasOwnProperty'](_0x3f52a6)){if(_0x1f399e['destuniqueid']===_0x3f52a6){logger['info'](_0x2367('0x39'),_0x1f399e['uniqueid'],_0x1f399e['membername'],_0x1f399e['destuniqueid']);this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x3a')]=moment()[_0x2367('0x35')](_0x2367('0x29'));this['channels'][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x3b')]=_0x1f399e['connectedlinename'];this[_0x2367('0xa')][_0x1f399e['uniqueid']][_0x3f52a6][_0x2367('0x3c')]=_0x1f399e[_0x2367('0x3c')];this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x3d')]=_0x1f399e['destchannelstate'];this[_0x2367('0xa')][_0x1f399e['uniqueid']][_0x3f52a6]['destchannelstatedesc']=_0x1f399e[_0x2367('0x3e')];this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x3f')]=_0x1f399e[_0x2367('0x3f')];this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x40')]='connect';_[_0x2367('0x41')](this['agents'][_0x1f399e[_0x2367('0x42')]],_[_0x2367('0x43')](_0x1f399e,['queue','destconnectedlinenum']));logger[_0x2367('0x24')]('[%s][voiceAgentReport][agentconnect]\x20sending\x20agentconnect\x20event:',_0x1f399e[_0x2367('0x27')],util[_0x2367('0x26')](this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x1f399e[_0x2367('0x28')]],{'showHidden':![],'depth':null}));ami[_0x2367('0x1e')]('custom:agentconnect',this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x1f399e['destuniqueid']]);logger[_0x2367('0x24')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:agentconnect\x20event:',_0x1f399e[_0x2367('0x27')],util['inspect'](this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x1f399e[_0x2367('0x28')]],{'showHidden':![],'depth':null}));this[_0x2367('0x1e')](util[_0x2367('0x35')]('user:%s',_0x1f399e['membername']),_0x2367('0x44'),this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x1f399e[_0x2367('0x28')]]);}else if(!this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x45')]&&!this['channels'][_0x1f399e['uniqueid']][_0x3f52a6][_0x2367('0x14')]){logger['info'](_0x2367('0x46'),_0x1f399e[_0x2367('0x27')],this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x23')],_0x3f52a6);this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x45')]=!![];this[_0x2367('0xa')][_0x1f399e['uniqueid']][_0x3f52a6][_0x2367('0x47')]=moment()[_0x2367('0x35')](_0x2367('0x29'));this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x48')]=_0x1f399e[_0x2367('0x28')];this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6][_0x2367('0x49')]=_0x1f399e['membername'];this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6]['lastevent']='answered_elsewhere';this['channels'][_0x1f399e['uniqueid']][_0x3f52a6][_0x2367('0x4a')]=_0x2367('0x4b');logger[_0x2367('0x24')](_0x2367('0x4c'),_0x1f399e[_0x2367('0x27')],util[_0x2367('0x26')](this['channels'][_0x1f399e[_0x2367('0x27')]][_0x3f52a6],{'showHidden':![],'depth':null}));ami[_0x2367('0x1e')]('custom:agentansweredelsewhere',this[_0x2367('0xa')][_0x1f399e[_0x2367('0x27')]][_0x3f52a6]);}}}}}}catch(_0x252d9d){logger['error']('[%s][voiceAgentReport][agentconnect]',_0x1f399e[_0x2367('0x27')],util['inspect'](_0x252d9d,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x2367('0x11')]=function(_0xcfc03e){try{if(this[_0x2367('0x1f')](_0xcfc03e)){logger[_0x2367('0x24')](_0x2367('0x4d'),_0xcfc03e[_0x2367('0x27')],util[_0x2367('0x26')](_0xcfc03e,{'showHidden':![],'depth':null}));if(this[_0x2367('0xa')][_0xcfc03e['uniqueid']]&&this[_0x2367('0xa')][_0xcfc03e[_0x2367('0x27')]][_0xcfc03e['destuniqueid']]){logger['info'](_0x2367('0x4e'),_0xcfc03e[_0x2367('0x27')],_0xcfc03e[_0x2367('0x23')],_0xcfc03e['destuniqueid']);this['channels'][_0xcfc03e[_0x2367('0x27')]][_0xcfc03e['destuniqueid']]['agentringnoanswer']=!![];this[_0x2367('0xa')][_0xcfc03e[_0x2367('0x27')]][_0xcfc03e[_0x2367('0x28')]][_0x2367('0x47')]=moment()[_0x2367('0x35')](_0x2367('0x29'));this[_0x2367('0xa')][_0xcfc03e[_0x2367('0x27')]][_0xcfc03e['destuniqueid']]['lastevent']=_0x2367('0x4f');this[_0x2367('0xa')][_0xcfc03e[_0x2367('0x27')]][_0xcfc03e[_0x2367('0x28')]][_0x2367('0x4a')]=_0x2367('0x4f');logger['debug'](_0x2367('0x50'),_0xcfc03e[_0x2367('0x27')],util['inspect'](this[_0x2367('0xa')][_0xcfc03e['uniqueid']][_0xcfc03e[_0x2367('0x28')]],{'showHidden':![],'depth':null}));ami['emit']('custom:agentringnoanswer',this['channels'][_0xcfc03e[_0x2367('0x27')]][_0xcfc03e[_0x2367('0x28')]]);}}}catch(_0x3e8b8f){logger[_0x2367('0x37')]('[%s][voiceAgentReport][agentringnoanswer]',_0xcfc03e[_0x2367('0x27')],util[_0x2367('0x26')](_0x3e8b8f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x13')]=function(_0x4e7ec6){try{if(this[_0x2367('0x1f')](_0x4e7ec6)){logger[_0x2367('0x24')]('[%s][voiceAgentReport][queuecallerabandon]\x20event:',_0x4e7ec6[_0x2367('0x27')],util[_0x2367('0x26')](_0x4e7ec6,{'showHidden':![],'depth':null}));if(this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]]){for(var _0x531ba1 in this['channels'][_0x4e7ec6[_0x2367('0x27')]]){if(this['channels'][_0x4e7ec6[_0x2367('0x27')]][_0x2367('0x51')](_0x531ba1)&&!this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1][_0x2367('0x45')]&&!this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1][_0x2367('0x14')]){logger[_0x2367('0x22')](_0x2367('0x52'),_0x4e7ec6[_0x2367('0x27')],this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1]['membername'],_0x531ba1);this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1][_0x2367('0x45')]=!![];this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1]['agentringnoanswerAt']=moment()[_0x2367('0x35')](_0x2367('0x29'));this[_0x2367('0xa')][_0x4e7ec6['uniqueid']][_0x531ba1][_0x2367('0x40')]=_0x2367('0x53');this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1][_0x2367('0x4a')]=_0x2367('0x53');logger['debug'](_0x2367('0x54'),_0x4e7ec6[_0x2367('0x27')],util['inspect'](this[_0x2367('0xa')][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1],{'showHidden':![],'depth':null}));ami[_0x2367('0x1e')]('custom:agentqueuecallerabandon',this['channels'][_0x4e7ec6[_0x2367('0x27')]][_0x531ba1]);}}}}}catch(_0xca98e2){logger['error'](_0x2367('0x55'),_0x4e7ec6['uniqueid'],util[_0x2367('0x26')](_0xca98e2,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')]['syncAgentComplete']=function(_0x2b54b7){try{if(this['isNotNull'](_0x2b54b7)){logger[_0x2367('0x24')](_0x2367('0x56'),_0x2b54b7[_0x2367('0x27')],util[_0x2367('0x26')](_0x2b54b7,{'showHidden':![],'depth':null}));if(this['channels'][_0x2b54b7[_0x2367('0x27')]]){for(var _0x265a5a in this['channels'][_0x2b54b7[_0x2367('0x27')]]){if(this['channels'][_0x2b54b7[_0x2367('0x27')]][_0x2367('0x51')](_0x265a5a)){if(this['channels'][_0x2b54b7['uniqueid']][_0x265a5a][_0x2367('0x3a')]&&!this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x14')]){logger['info'](_0x2367('0x57'),_0x2b54b7[_0x2367('0x27')],this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a]['membername'],_0x265a5a);this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x14')]=!![];this[_0x2367('0xa')][_0x2b54b7['uniqueid']][_0x265a5a][_0x2367('0x58')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x40')]=_0x2367('0x59');this['channels'][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x4a')]=_0x2b54b7[_0x2367('0x4a')]==_0x2367('0x5a')?_0x2367('0x5b'):_0x2b54b7[_0x2367('0x4a')];this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x5c')]=_0x2b54b7[_0x2367('0x5c')];if(this[_0x2367('0xb')][_0x2b54b7[_0x2367('0x2b')]]&&this[_0x2367('0xb')][_0x2b54b7['queue']][_0x2367('0x5d')]){this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x5e')]=this[_0x2367('0xb')][_0x2b54b7[_0x2367('0x2b')]][_0x2367('0x5f')];this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a][_0x2367('0x60')]=!![];}this[_0x2367('0xc')][_0x2b54b7['interface']]=_['omit'](this[_0x2367('0xc')][_0x2b54b7[_0x2367('0x42')]],[_0x2367('0x2b'),_0x2367('0x61')]);logger[_0x2367('0x24')](_0x2367('0x62'),_0x2b54b7['uniqueid'],util[_0x2367('0x26')](this['channels'][_0x2b54b7[_0x2367('0x27')]][_0x265a5a],{'showHidden':![],'depth':null}));ami[_0x2367('0x1e')](_0x2367('0x63'),this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a]);logger['debug']('[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:',_0x2b54b7[_0x2367('0x27')],util[_0x2367('0x26')](this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a],{'showHidden':![],'depth':null}));this[_0x2367('0x1e')](util[_0x2367('0x35')](_0x2367('0x36'),_0x2b54b7[_0x2367('0x23')]),_0x2367('0x64'),this[_0x2367('0xa')][_0x2b54b7[_0x2367('0x27')]][_0x265a5a]);}}}}}}catch(_0x1ef344){logger[_0x2367('0x37')](_0x2367('0x65'),_0x2b54b7[_0x2367('0x27')],util[_0x2367('0x26')](_0x1ef344,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x15')]=function(_0x423350){try{if(this[_0x2367('0x1f')](_0x423350)){logger[_0x2367('0x24')]('[%s][voiceAgentReport][varset]\x20event:',_0x423350['uniqueid'],util[_0x2367('0x26')](_0x423350,{'showHidden':![],'depth':null}));this['addVariable'](_0x423350[_0x2367('0x27')],_[_0x2367('0x66')](_0x423350[_0x2367('0x67')])[0x0],_0x423350['value']);if(this['channels'][_0x423350[_0x2367('0x27')]]){for(var _0x5e5783 in this[_0x2367('0xa')][_0x423350[_0x2367('0x27')]]){if(this[_0x2367('0xa')][_0x423350[_0x2367('0x27')]][_0x2367('0x51')](_0x5e5783)){logger[_0x2367('0x22')](_0x2367('0x68'),_0x423350[_0x2367('0x27')],_0x5e5783,_[_0x2367('0x66')](_0x423350['variable'])[0x0],_0x423350[_0x2367('0x69')]);if(_['isUndefined'](this[_0x2367('0xa')][_0x423350['uniqueid']][_0x5e5783][_0x2367('0xd')])){this[_0x2367('0xa')][_0x423350[_0x2367('0x27')]][_0x5e5783]['variables']={};}this[_0x2367('0xa')][_0x423350[_0x2367('0x27')]][_0x5e5783][_0x2367('0xd')]=this[_0x2367('0xd')][_0x423350['uniqueid']];}}}}}catch(_0x4efd30){logger[_0x2367('0x37')](_0x2367('0x6a'),_0x423350[_0x2367('0x27')],util['inspect'](_0x4efd30,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x6b')]=function(_0x46d8f,_0x2f5d1c,_0x5d0e80){var _0xbea3f3=[_0x2367('0x6c'),_0x2367('0x6d'),'rtpaudioqosjitter',_0x2367('0x6e'),_0x2367('0x6f'),'rtpaudioqoslossbridged',_0x2367('0x70'),_0x2367('0x71'),_0x2367('0x72'),_0x2367('0x73'),'bridgepeer','bridgepvtcallid',_0x2367('0x74'),_0x2367('0x75'),'memberinterface',_0x2367('0x76'),'membername','memberpenalty','memberrealtime'];if(!_[_0x2367('0x77')](_0x2f5d1c)&&!_[_0x2367('0x78')](_0xbea3f3,_0x2f5d1c)){if(_['isUndefined'](this[_0x2367('0xd')][_0x46d8f])){this[_0x2367('0xd')][_0x46d8f]={};}this[_0x2367('0xd')][_0x46d8f][_0x2f5d1c]=_0x5d0e80;}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x79')]=function(_0x225537){try{if(this[_0x2367('0x1f')](_0x225537)){logger[_0x2367('0x24')]('[%s][voiceAgentReport][hangup]\x20event:',_0x225537['uniqueid'],util[_0x2367('0x26')](_0x225537,{'showHidden':![],'depth':null}));if(this[_0x2367('0xa')][_0x225537[_0x2367('0x27')]]){for(var _0x2687a7 in this[_0x2367('0xa')][_0x225537[_0x2367('0x27')]]){if(this['channels'][_0x225537['uniqueid']][_0x2367('0x51')](_0x2687a7)){if(this[_0x2367('0xa')][_0x225537[_0x2367('0x27')]][_0x2687a7][_0x2367('0x4a')]==_0x2367('0x5a')&&this['channels'][_0x225537[_0x2367('0x27')]][_0x2687a7]['agentcomplete']){logger['info'](_0x2367('0x7a'),_0x225537[_0x2367('0x27')],_0x2687a7);this[_0x2367('0xa')][_0x225537[_0x2367('0x27')]][_0x2687a7][_0x2367('0x58')]=moment()['format'](_0x2367('0x29'));}}}logger[_0x2367('0x24')](_0x2367('0x7b'),_0x225537[_0x2367('0x27')],util[_0x2367('0x26')](_['values'](this[_0x2367('0xa')][_0x225537[_0x2367('0x27')]]),{'showHidden':![],'depth':null}));ami[_0x2367('0x1e')](_0x2367('0x7c'),_['values'](this[_0x2367('0xa')][_0x225537['uniqueid']]));delete this[_0x2367('0xa')][_0x225537[_0x2367('0x27')]];}if(this[_0x2367('0xd')][_0x225537[_0x2367('0x27')]]){delete this[_0x2367('0xd')][_0x225537[_0x2367('0x27')]];}}}catch(_0x459f07){logger[_0x2367('0x37')](_0x2367('0x7d'),_0x225537[_0x2367('0x27')],util[_0x2367('0x26')](_0x459f07,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x1a')]=function(_0x3204d9){try{if(this[_0x2367('0x1f')](_0x3204d9)){logger[_0x2367('0x24')](_0x2367('0x7e'),_0x3204d9[_0x2367('0x27')],util[_0x2367('0x26')](_0x3204d9,{'showHidden':![],'depth':null}));if(this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]]){for(var _0x95b96d in this[_0x2367('0xa')][_0x3204d9['transfereeuniqueid']]){if(this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]][_0x2367('0x51')](_0x95b96d)){if(_0x3204d9['origtransfereruniqueid']===_0x95b96d){logger['info'](_0x2367('0x80'),_0x3204d9[_0x2367('0x27')],this[_0x2367('0xa')][_0x3204d9['transfereeuniqueid']][_0x95b96d][_0x2367('0x23')],_0x95b96d);var _0x17dbef=moment();this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]][_0x95b96d][_0x2367('0x14')]=!![];this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]][_0x95b96d][_0x2367('0x58')]=moment()[_0x2367('0x35')](_0x2367('0x29'));this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]][_0x95b96d][_0x2367('0x40')]=_0x2367('0x59');this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]][_0x95b96d]['reason']=_0x2367('0x5a');this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]][_0x95b96d][_0x2367('0x5c')]=_0x17dbef[_0x2367('0x81')](this['channels'][_0x3204d9[_0x2367('0x7f')]][_0x95b96d][_0x2367('0x3a')],_0x2367('0x82'));}}}}if(this[_0x2367('0xa')][_0x3204d9[_0x2367('0x83')]]){var _0x48d770=this['channels'][_0x3204d9[_0x2367('0x83')]];this[_0x2367('0xa')][_0x3204d9[_0x2367('0x83')]]=this['channels'][_0x3204d9[_0x2367('0x7f')]];this[_0x2367('0xa')][_0x3204d9[_0x2367('0x7f')]]=_0x48d770;}}}catch(_0x1adfc4){logger['error']('[%s][voiceAgentReport][attendedtransfer]',_0x3204d9['uniqueid'],util['inspect'](_0x1adfc4,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x1c')]=function(_0x7e98d8){try{if(this['isNotNull'](_0x7e98d8)){logger[_0x2367('0x24')](_0x2367('0x84'),_0x7e98d8[_0x2367('0x27')],util[_0x2367('0x26')](_0x7e98d8,{'showHidden':![],'depth':null}));if(this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]]){for(var _0x2a05ce in this[_0x2367('0xa')][_0x7e98d8['transfereeuniqueid']]){if(this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]][_0x2367('0x51')](_0x2a05ce)){if(_0x7e98d8['transfereruniqueid']===_0x2a05ce){logger['info'](_0x2367('0x85'),_0x7e98d8[_0x2367('0x27')],this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]][_0x2a05ce][_0x2367('0x23')],_0x2a05ce);var _0xec6787=moment();this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]][_0x2a05ce][_0x2367('0x14')]=!![];this['channels'][_0x7e98d8[_0x2367('0x7f')]][_0x2a05ce]['agentcompleteAt']=_0xec6787;this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]][_0x2a05ce]['lastevent']=_0x2367('0x59');this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]][_0x2a05ce]['reason']=_0x2367('0x5a');this[_0x2367('0xa')][_0x7e98d8[_0x2367('0x7f')]][_0x2a05ce][_0x2367('0x5c')]=_0xec6787[_0x2367('0x81')](this[_0x2367('0xa')][_0x7e98d8['transfereeuniqueid']][_0x2a05ce]['agentconnectAt'],_0x2367('0x82'));}}}}}}catch(_0x38f994){logger[_0x2367('0x37')](_0x2367('0x86'),_0x7e98d8['uniqueid'],util[_0x2367('0x26')](_0x38f994,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x87')]=function(_0x565b5f){var _0x2bed25='';try{if(this[_0x2367('0x1f')](_0x565b5f)){logger[_0x2367('0x24')]('[%s][voiceAgentReport][musiconholdstart]\x20event:',_0x565b5f[_0x2367('0x27')],util[_0x2367('0x26')](_0x565b5f,{'showHidden':![],'depth':null}));if(_0x565b5f['channel']){_0x2bed25=_0x565b5f[_0x2367('0x88')][_0x2367('0x89')](0x0,_0x565b5f[_0x2367('0x88')][_0x2367('0x8a')]('-'));if(this['agents'][_0x2bed25]){logger[_0x2367('0x22')]('[%s][voiceAgentReport][musiconholdstart]\x20interface:%s',_0x565b5f[_0x2367('0x27')],_0x2bed25);this['agents'][_0x2bed25]['onhold']=!![];}}}}catch(_0xdab5ca){logger[_0x2367('0x37')](_0x2367('0x8b'),_0x565b5f['uniqueid'],util[_0x2367('0x26')](_0xdab5ca,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2367('0x1d')][_0x2367('0x18')]=function(_0x507ed1){var _0x3d2655='';try{if(this['isNotNull'](_0x507ed1)){logger['debug'](_0x2367('0x8c'),_0x507ed1[_0x2367('0x27')],util[_0x2367('0x26')](_0x507ed1,{'showHidden':![],'depth':null}));if(_0x507ed1[_0x2367('0x88')]){_0x3d2655=_0x507ed1['channel'][_0x2367('0x89')](0x0,_0x507ed1[_0x2367('0x88')][_0x2367('0x8a')]('-'));if(this[_0x2367('0xc')][_0x3d2655]){logger['info']('[%s][voiceAgentReport][musiconholdstop]\x20interface:%s',_0x507ed1[_0x2367('0x27')],_0x3d2655);this[_0x2367('0xc')][_0x3d2655][_0x2367('0x8d')]=![];}}}}catch(_0x50263a){logger['error']('[%s][voiceAgentReport][musiconholdstop]',_0x507ed1[_0x2367('0x27')],util[_0x2367('0x26')](_0x50263a,{'showHidden':![],'depth':null}));}};module['exports']=VoiceAgentReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceCallReport.js b/server/services/ami/report/voiceCallReport.js index 83e9730..71666f6 100644 --- a/server/services/ami/report/voiceCallReport.js +++ b/server/services/ami/report/voiceCallReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4be5=['[%s][voiceCallReport][mixMonitorFilename]','variable','mixmonitor_filename','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','value','xmd-phone','xmd-callerid','callerid','xmd-cdrtype','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s','xmd-originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s','destination','xmd-callerid-preview','[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s','calleridpreview','xmcs-queue','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','parse','sipcalllinkedid','[%s][voiceCallReport][varset]','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','holdtime','omit','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','BlindTransfer','type','outbound','custom:voiceCallReport','[%s][voiceCallReport][hangup]','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','origtransferercalleridnum','transfercalleridnum','transfereeuniqueid','transferconnectedlinenum','transfertargetcalleridnum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[%s][voiceCallReport][attendedtransfer]','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','[%s][voiceCallReport][blindtransfer]\x20event:','extension','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstart]','syncMusicOnHoldStop','[%s][voiceCallReport][musiconholdstop]\x20event:','mohstarttime','mohtime','milliseconds','diff','[%s][voiceCallReport][musiconholdstop]','exports','lodash','moment','util','path','ioredis','../../../config/environment','../../../config/logger','ami','../model/channel','unknown','busy','invalid','ringing','set','agi','playback','voicemail','NO\x20ANSWER','FAILED','BUSY','redis','defaults','socket.io-emitter','channels','agents','blindTransfers','bind','newexten','syncNewExten','syncNewChannel','newstate','syncNewState','varset','syncVarSet','hangup','syncHangup','newcallerid','syncNewCallerId','syncAttendedTransfer','blindtransfer','syncBlindTransfer','syncMusicOnHoldStart','musiconholdstop','info','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','inspect','prototype','isUndefined','emit','isNotNull','uniqueid','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','linkedid','merge','pick','keys','error','[%s][voiceCallReport][newchannel]\x20event:','channel','OutgoingSpoolFailed','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','context','exten','starttime','format','YYYY-MM-DD\x20HH:mm:ss','toNumber','channelstate','from-sip','split','destconnectedlinenum','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','accountcode','user:%s','user:agentconnect','[%s][voiceCallReport][newchannel]','application','toLowerCase','appdata','applicationdata','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','subtract','duration','seconds','disposition','includes','lastapplication','lastdata','startsWith','cdr(','queue','[%s][voiceCallReport][newexten]','[%s][voiceCallReport][newstate]\x20event:','answered','answertime','xcally-motion-preview','connectedlinenum','connectedlinename','destinationchannel','UserId','membername','name','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','monitor','endsWith','.wav49','replace','.WAV','monitorFilename','find','monitors','isNil','push','rec'];(function(_0x5cc71f,_0x4f6f52){var _0x4e1b52=function(_0x1bea3b){while(--_0x1bea3b){_0x5cc71f['push'](_0x5cc71f['shift']());}};_0x4e1b52(++_0x4f6f52);}(_0x4be5,0xef));var _0x54be=function(_0x4099ee,_0x38495a){_0x4099ee=_0x4099ee-0x0;var _0x1b7bfc=_0x4be5[_0x4099ee];return _0x1b7bfc;};'use strict';var BPromise=require('bluebird');var _=require(_0x54be('0x0'));var moment=require(_0x54be('0x1'));var util=require(_0x54be('0x2'));var path=require(_0x54be('0x3'));var Redis=require(_0x54be('0x4'));var config=require(_0x54be('0x5'));var logger=require(_0x54be('0x6'))(_0x54be('0x7'));var ami=require('../ami');var Channel=require(_0x54be('0x8'));var statusDesc=[_0x54be('0x9'),'not_inuse','inuse',_0x54be('0xa'),_0x54be('0xb'),'unavailable',_0x54be('0xc'),'ringinuse','onhold'];var applications=[_0x54be('0xd'),'queue',_0x54be('0xe'),'dial',_0x54be('0xf'),_0x54be('0x10')];var dispositions=[_0x54be('0x11'),_0x54be('0x12'),_0x54be('0x12'),'NO\x20ANSWER',_0x54be('0x11'),_0x54be('0x11'),'ANSWERED',_0x54be('0x13'),_0x54be('0x12'),_0x54be('0x12'),'FAILED'];var actions={};config[_0x54be('0x14')]=_[_0x54be('0x15')](config[_0x54be('0x14')],{'host':'localhost','port':0x18eb});var io=require(_0x54be('0x16'))(new Redis(config[_0x54be('0x14')]));function VoiceCallReport(_0x1ca9e9){this['channels']=_0x1ca9e9[_0x54be('0x17')];this['agents']=_0x1ca9e9[_0x54be('0x18')];this[_0x54be('0x19')]={};ami['on']('coreshowchannel',this['syncNewExten'][_0x54be('0x1a')](this));ami['on'](_0x54be('0x1b'),this[_0x54be('0x1c')][_0x54be('0x1a')](this));ami['on']('newchannel',this[_0x54be('0x1d')]['bind'](this));ami['on'](_0x54be('0x1e'),this[_0x54be('0x1f')]['bind'](this));ami['on'](_0x54be('0x20'),this[_0x54be('0x21')][_0x54be('0x1a')](this));ami['on'](_0x54be('0x22'),this[_0x54be('0x23')][_0x54be('0x1a')](this));ami['on'](_0x54be('0x24'),this[_0x54be('0x25')][_0x54be('0x1a')](this));ami['on']('attendedtransfer',this[_0x54be('0x26')][_0x54be('0x1a')](this));ami['on'](_0x54be('0x27'),this[_0x54be('0x28')][_0x54be('0x1a')](this));ami['on']('musiconholdstart',this[_0x54be('0x29')][_0x54be('0x1a')](this));ami['on'](_0x54be('0x2a'),this['syncMusicOnHoldStop'][_0x54be('0x1a')](this));try{logger[_0x54be('0x2b')](_0x54be('0x2c'));ami[_0x54be('0x2d')]();}catch(_0x7b0ff9){logger['error']('[voiceCallReport][coreshowchannels]',util[_0x54be('0x2e')](_0x7b0ff9,{'showHidden':![],'depth':null}));}}VoiceCallReport[_0x54be('0x2f')]['isNotNull']=function(_0x815b7){return _0x815b7!==null&&!_[_0x54be('0x30')](_0x815b7);};VoiceCallReport['prototype'][_0x54be('0x31')]=function(_0x2970b9,_0x177877,_0x4b7188){io['to'](_0x2970b9)['emit'](_0x177877,_0x4b7188);};VoiceCallReport[_0x54be('0x2f')]['syncNewCallerId']=function(_0x3eca1a){try{if(this[_0x54be('0x32')](_0x3eca1a)){logger[_0x54be('0x2b')]('[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s',_0x3eca1a[_0x54be('0x33')],_0x3eca1a[_0x54be('0x34')],_0x3eca1a[_0x54be('0x35')]);logger[_0x54be('0x36')](_0x54be('0x37'),_0x3eca1a[_0x54be('0x33')],util[_0x54be('0x2e')](_0x3eca1a,{'showHidden':![],'depth':null}));if(_0x3eca1a[_0x54be('0x33')]===_0x3eca1a[_0x54be('0x38')]){if(!_['isUndefined'](this['channels'][_0x3eca1a[_0x54be('0x33')]])){_[_0x54be('0x39')](this[_0x54be('0x17')][_0x3eca1a[_0x54be('0x33')]],_[_0x54be('0x3a')](_0x3eca1a,_[_0x54be('0x3b')](this[_0x54be('0x17')][_0x3eca1a[_0x54be('0x33')]])));}}}}catch(_0xb097ad){logger[_0x54be('0x3c')]('[%s][voiceCallReport][newcallerid]',_0x3eca1a['uniqueid'],util[_0x54be('0x2e')](_0xb097ad,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x54be('0x2f')]['syncNewChannel']=function(_0xa0062e){try{if(this['isNotNull'](_0xa0062e)){logger[_0x54be('0x36')](_0x54be('0x3d'),_0xa0062e[_0x54be('0x33')],util['inspect'](_0xa0062e,{'showHidden':![],'depth':null}));if(_0xa0062e['uniqueid']===_0xa0062e[_0x54be('0x38')]&&_0xa0062e[_0x54be('0x3e')]!=_0x54be('0x3f')){if(_[_0x54be('0x30')](this[_0x54be('0x17')][_0xa0062e['uniqueid']])){logger[_0x54be('0x2b')](_0x54be('0x40'),_0xa0062e[_0x54be('0x33')],_0xa0062e[_0x54be('0x41')],_0xa0062e[_0x54be('0x42')]);this[_0x54be('0x17')][_0xa0062e[_0x54be('0x33')]]=new Channel();this[_0x54be('0x17')][_0xa0062e[_0x54be('0x33')]][_0x54be('0x43')]=moment()[_0x54be('0x44')](_0x54be('0x45'));this[_0x54be('0x17')][_0xa0062e[_0x54be('0x33')]]['disposition']=dispositions[_[_0x54be('0x46')](_0xa0062e[_0x54be('0x47')])];_['merge'](this[_0x54be('0x17')][_0xa0062e[_0x54be('0x33')]],_[_0x54be('0x3a')](_0xa0062e,_['keys'](this[_0x54be('0x17')][_0xa0062e[_0x54be('0x33')]])));if(_0xa0062e[_0x54be('0x41')]===_0x54be('0x48')){if(this[_0x54be('0x18')][_0xa0062e['channel'][_0x54be('0x49')]('-')[0x0]]){this[_0x54be('0x18')][_0xa0062e[_0x54be('0x3e')]['split']('-')[0x0]][_0x54be('0x4a')]=_0xa0062e[_0x54be('0x42')];logger[_0x54be('0x36')](_0x54be('0x4b'),_0xa0062e[_0x54be('0x33')],util[_0x54be('0x2e')]({'destaccountcode':this[_0x54be('0x18')][_0xa0062e[_0x54be('0x3e')]['split']('-')[0x0]][_0x54be('0x4c')],'destconnectedlinenum':_0xa0062e[_0x54be('0x42')]},{'showHidden':![],'depth':null}));this[_0x54be('0x31')](util['format'](_0x54be('0x4d'),this[_0x54be('0x18')][_0xa0062e[_0x54be('0x3e')]['split']('-')[0x0]]['name']),_0x54be('0x4e'),{'destaccountcode':this[_0x54be('0x18')][_0xa0062e[_0x54be('0x3e')]['split']('-')[0x0]][_0x54be('0x4c')],'destconnectedlinenum':_0xa0062e['exten']});}}}}}}catch(_0x2d285b){logger[_0x54be('0x3c')](_0x54be('0x4f'),_0xa0062e['uniqueid'],util[_0x54be('0x2e')](_0x2d285b,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncNewExten']=function(_0x2b0877){try{if(this['isNotNull'](_0x2b0877)){logger[_0x54be('0x36')]('[%s][voiceCallReport][newexten]\x20event:',_0x2b0877[_0x54be('0x33')],util[_0x54be('0x2e')](_0x2b0877,{'showHidden':![],'depth':null}));if(_0x2b0877[_0x54be('0x33')]===_0x2b0877[_0x54be('0x38')]&&_0x2b0877[_0x54be('0x42')]!='h'&&_0x2b0877[_0x54be('0x3e')]!=_0x54be('0x3f')){_0x2b0877[_0x54be('0x50')]=_0x2b0877[_0x54be('0x50')][_0x54be('0x51')]();_0x2b0877['applicationdata']=(_0x2b0877[_0x54be('0x52')]||_0x2b0877[_0x54be('0x53')])[_0x54be('0x51')]();logger['info'](_0x54be('0x54'),_0x2b0877[_0x54be('0x33')],_0x2b0877[_0x54be('0x50')],_0x2b0877[_0x54be('0x53')]);if(_[_0x54be('0x30')](this[_0x54be('0x17')][_0x2b0877['uniqueid']])){this[_0x54be('0x17')][_0x2b0877[_0x54be('0x33')]]=new Channel();this[_0x54be('0x17')][_0x2b0877['uniqueid']][_0x54be('0x43')]=_0x2b0877['duration']?moment()[_0x54be('0x55')](moment['duration'](_0x2b0877[_0x54be('0x56')])[_0x54be('0x57')](),_0x54be('0x57'))[_0x54be('0x44')](_0x54be('0x45')):moment()[_0x54be('0x44')](_0x54be('0x45'));this[_0x54be('0x17')][_0x2b0877[_0x54be('0x33')]][_0x54be('0x58')]='NO\x20ANSWER';}_[_0x54be('0x39')](this[_0x54be('0x17')][_0x2b0877[_0x54be('0x33')]],_['pick'](_0x2b0877,_[_0x54be('0x3b')](this[_0x54be('0x17')][_0x2b0877['uniqueid']])));if(_[_0x54be('0x59')](applications,_0x2b0877[_0x54be('0x50')])){this['channels'][_0x2b0877[_0x54be('0x33')]][_0x54be('0x5a')]=_0x2b0877[_0x54be('0x50')];this[_0x54be('0x17')][_0x2b0877['uniqueid']][_0x54be('0x5b')]=_0x2b0877[_0x54be('0x53')];if(_0x2b0877[_0x54be('0x50')]===_0x54be('0xd')&&_[_0x54be('0x5c')](_0x2b0877[_0x54be('0x53')],_0x54be('0x5d'))){var _0x43f025=_0x2b0877['applicationdata'][_0x54be('0x49')]('=');var _0x1fccc1=_0x43f025[0x0]['match'](/cdr\((.*)\)/);if(_0x1fccc1){this[_0x54be('0x17')][_0x2b0877[_0x54be('0x33')]][_0x1fccc1[0x1]]=_0x43f025[0x1];}}else if(_0x2b0877['application']===_0x54be('0x5e')){this['channels'][_0x2b0877['uniqueid']][_0x54be('0x5e')]=_0x2b0877[_0x54be('0x53')][_0x54be('0x49')](',')[0x0];}}}}}catch(_0xc3fa60){logger[_0x54be('0x3c')](_0x54be('0x5f'),_0x2b0877[_0x54be('0x33')],util['inspect'](_0xc3fa60,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncNewState']=function(_0x108766){try{if(this['isNotNull'](_0x108766)){logger[_0x54be('0x2b')]('[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s',_0x108766[_0x54be('0x33')],_0x108766['linkedid'],_0x108766[_0x54be('0x34')],_0x108766[_0x54be('0x35')]);logger[_0x54be('0x36')](_0x54be('0x60'),_0x108766[_0x54be('0x33')],util[_0x54be('0x2e')](_0x108766,{'showHidden':![],'depth':null}));if(_0x108766[_0x54be('0x33')]!==_0x108766[_0x54be('0x38')]){if(this[_0x54be('0x17')][_0x108766['linkedid']]){if(_0x108766['channelstate']==='6'){if(!this[_0x54be('0x17')][_0x108766['linkedid']][_0x54be('0x61')]){var _0x6e48c5=moment();this['channels'][_0x108766[_0x54be('0x38')]][_0x54be('0x61')]=!![];this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]][_0x54be('0x62')]=_0x6e48c5['format'](_0x54be('0x45'));if(this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]][_0x54be('0x43')]){this['channels'][_0x108766[_0x54be('0x38')]]['holdtime']=_0x6e48c5['diff'](this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]]['starttime'],'seconds');}}this['channels'][_0x108766[_0x54be('0x38')]][_0x54be('0x38')]=_0x108766[_0x54be('0x33')];if(_0x108766[_0x54be('0x35')]!==_0x54be('0x63')){this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]][_0x54be('0x64')]=_0x108766[_0x54be('0x35')];}this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]][_0x54be('0x65')]=_0x108766['calleridname'];this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]][_0x54be('0x66')]=_0x108766[_0x54be('0x3e')];this['channels'][_0x108766[_0x54be('0x38')]][_0x54be('0x58')]=dispositions[_[_0x54be('0x46')](_0x108766['channelstate'])];if(this[_0x54be('0x18')][_0x108766['channel'][_0x54be('0x49')]('-')[0x0]]){this['channels'][_0x108766[_0x54be('0x38')]][_0x54be('0x67')]=this[_0x54be('0x18')][_0x108766[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]]['id'];this[_0x54be('0x17')][_0x108766[_0x54be('0x38')]][_0x54be('0x68')]=this[_0x54be('0x18')][_0x108766[_0x54be('0x3e')]['split']('-')[0x0]][_0x54be('0x69')];}}}}else{if(this[_0x54be('0x17')][_0x108766[_0x54be('0x33')]]){if(_0x108766[_0x54be('0x47')]==='6'){if(this['agents'][_0x108766[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]]){this[_0x54be('0x17')][_0x108766[_0x54be('0x33')]][_0x54be('0x67')]=this[_0x54be('0x18')][_0x108766[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]]['id'];this[_0x54be('0x17')][_0x108766[_0x54be('0x33')]][_0x54be('0x68')]=this[_0x54be('0x18')][_0x108766[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]]['name'];}}}}}}catch(_0xcf100){logger[_0x54be('0x3c')]('[%s][voiceCallReport][newstate]',_0x108766[_0x54be('0x33')],util[_0x54be('0x2e')](_0xcf100,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x54be('0x6a')]=function(_0x509ec0,_0x4b4a04){try{if(this[_0x54be('0x17')][_0x509ec0]){logger[_0x54be('0x2b')](_0x54be('0x6b'),_0x509ec0,_0x4b4a04);this[_0x54be('0x17')][_0x509ec0][_0x54be('0x6c')]=!![];if(_[_0x54be('0x6d')](_0x4b4a04,_0x54be('0x6e'))){_0x4b4a04=_0x4b4a04[_0x54be('0x6f')](_0x54be('0x6e'),_0x54be('0x70'));}this['channels'][_0x509ec0][_0x54be('0x71')]=_0x4b4a04;var _0x532e0b=_[_0x54be('0x72')](this[_0x54be('0x17')][_0x509ec0][_0x54be('0x73')],{'filename':_0x4b4a04});if(_[_0x54be('0x74')](_0x532e0b)){this['channels'][_0x509ec0][_0x54be('0x73')][_0x54be('0x75')]({'filename':_0x4b4a04,'createdAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':'','status':_0x54be('0x76')});}}}catch(_0x399688){logger['error'](_0x54be('0x77'),_0x509ec0,util[_0x54be('0x2e')](_0x399688,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x54be('0x2f')]['syncVarSet']=function(_0x2359fa){try{if(this[_0x54be('0x32')](_0x2359fa)){logger[_0x54be('0x36')]('[%s][voiceCallReport][varset]\x20event:',_0x2359fa['uniqueid'],util['inspect'](_0x2359fa,{'showHidden':![],'depth':null}));if(this[_0x54be('0x17')][_0x2359fa['uniqueid']]&&_0x2359fa[_0x54be('0x3e')]!=_0x54be('0x3f')){if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')])){if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')][_0x54be('0x79')])){logger[_0x54be('0x2b')](_0x54be('0x7a'),_0x2359fa[_0x54be('0x33')],_0x2359fa[_0x54be('0x7b')]);this['syncMixMonitorFilename'](_0x2359fa[_0x54be('0x33')],_0x2359fa[_0x54be('0x7b')]);}else if(this[_0x54be('0x32')](_0x2359fa['variable'][_0x54be('0x7c')])){logger[_0x54be('0x2b')]('[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s',_0x2359fa[_0x54be('0x33')],_0x2359fa['value']);this['channels'][_0x2359fa[_0x54be('0x33')]][_0x54be('0x35')]=_0x2359fa[_0x54be('0x7b')];}else if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')][_0x54be('0x7d')])){logger[_0x54be('0x2b')]('[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s',_0x2359fa[_0x54be('0x33')],_0x2359fa[_0x54be('0x7b')]);this['channels'][_0x2359fa[_0x54be('0x33')]][_0x54be('0x7e')]=_0x2359fa[_0x54be('0x7b')];}else if(this['isNotNull'](_0x2359fa[_0x54be('0x78')][_0x54be('0x7f')])){logger[_0x54be('0x2b')](_0x54be('0x80'),_0x2359fa[_0x54be('0x33')],_0x2359fa[_0x54be('0x7b')]);this[_0x54be('0x17')][_0x2359fa[_0x54be('0x33')]]['type']=_0x2359fa['value'];}else if(this['isNotNull'](_0x2359fa[_0x54be('0x78')]['xmd-queue'])){logger['info'](_0x54be('0x81'),_0x2359fa['uniqueid'],_0x2359fa[_0x54be('0x7b')][_0x54be('0x49')](',')[0x0]);this[_0x54be('0x17')][_0x2359fa['uniqueid']][_0x54be('0x5e')]=_0x2359fa[_0x54be('0x7b')][_0x54be('0x49')](',')[0x0];}else if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')][_0x54be('0x82')])){logger[_0x54be('0x2b')]('[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s',_0x2359fa[_0x54be('0x33')],_0x2359fa[_0x54be('0x7b')]);this['channels'][_0x2359fa[_0x54be('0x33')]]['originatecalleridnum']=_0x2359fa[_0x54be('0x7b')];}else if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')]['xmd-destination'])){logger[_0x54be('0x2b')](_0x54be('0x83'),_0x2359fa['uniqueid'],_0x2359fa[_0x54be('0x7b')]);this[_0x54be('0x17')][_0x2359fa['uniqueid']][_0x54be('0x84')]=_0x2359fa[_0x54be('0x7b')];}else if(this['isNotNull'](_0x2359fa[_0x54be('0x78')][_0x54be('0x85')])){logger['info'](_0x54be('0x86'),_0x2359fa[_0x54be('0x33')],_0x2359fa[_0x54be('0x7b')]);this['channels'][_0x2359fa['uniqueid']][_0x54be('0x87')]=_0x2359fa['value'];}else if(this['isNotNull'](_0x2359fa[_0x54be('0x78')][_0x54be('0x88')])){logger['info']('[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s',_0x2359fa[_0x54be('0x33')],_0x2359fa['value']);this[_0x54be('0x17')][_0x2359fa['uniqueid']][_0x54be('0x5e')]=_0x2359fa[_0x54be('0x7b')];}else if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')]['sipcallid'])){logger[_0x54be('0x2b')](_0x54be('0x89'),_0x2359fa['uniqueid'],_0x2359fa[_0x54be('0x7b')]);this[_0x54be('0x17')][_0x2359fa[_0x54be('0x33')]]['sipcalluniqueid']=_0x2359fa[_0x54be('0x7b')];}}}else if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')]['mixmonitor_filename'])){if(_0x2359fa[_0x54be('0x7b')]){var _0x1d6398=path[_0x54be('0x8a')](_0x2359fa[_0x54be('0x7b')])[_0x54be('0x69')];logger[_0x54be('0x2b')](_0x54be('0x7a'),_0x1d6398,_0x2359fa[_0x54be('0x7b')]);this['syncMixMonitorFilename'](_0x1d6398,_0x2359fa[_0x54be('0x7b')]);}}else if(this[_0x54be('0x17')][_0x2359fa[_0x54be('0x38')]]){if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')])){if(this[_0x54be('0x32')](_0x2359fa[_0x54be('0x78')]['sipcallid'])){logger[_0x54be('0x2b')](_0x54be('0x89'),_0x2359fa[_0x54be('0x38')],_0x2359fa[_0x54be('0x7b')]);this[_0x54be('0x17')][_0x2359fa['linkedid']][_0x54be('0x8b')]=_0x2359fa[_0x54be('0x7b')];}}}}}catch(_0x5bb2e9){logger[_0x54be('0x3c')](_0x54be('0x8c'),_0x2359fa[_0x54be('0x33')],util[_0x54be('0x2e')](_0x5bb2e9,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncHangup']=function(_0x2df722){try{if(this[_0x54be('0x32')](_0x2df722)){logger[_0x54be('0x36')](_0x54be('0x8d'),_0x2df722['uniqueid'],util[_0x54be('0x2e')](_0x2df722,{'showHidden':![],'depth':null}));if(this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]]){logger[_0x54be('0x2b')](_0x54be('0x8e'),_0x2df722[_0x54be('0x33')],_0x2df722[_0x54be('0x8f')]);var _0x4d2ef3=moment();this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]]['endtime']=_0x4d2ef3[_0x54be('0x44')](_0x54be('0x45'));this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x56')]=_0x4d2ef3['diff'](this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x43')],'seconds');if(this['channels'][_0x2df722[_0x54be('0x33')]][_0x54be('0x61')]){this['channels'][_0x2df722['uniqueid']]['billableseconds']=_0x4d2ef3['diff'](this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x62')],'seconds');this['channels'][_0x2df722[_0x54be('0x33')]][_0x54be('0x90')]=this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x56')]-this['channels'][_0x2df722[_0x54be('0x33')]]['billableseconds'];}if(_0x2df722[_0x54be('0x41')]===_0x54be('0x48')){if(this[_0x54be('0x18')][_0x2df722[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]]){this[_0x54be('0x18')][_0x2df722[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]]=_[_0x54be('0x91')](this[_0x54be('0x18')][_0x2df722[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]],['destconnectedlinenum']);logger['debug'](_0x54be('0x92'),_0x2df722[_0x54be('0x33')],util[_0x54be('0x2e')]({'destaccountcode':this[_0x54be('0x18')][_0x2df722[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]][_0x54be('0x4c')]},{'showHidden':![],'depth':null}));this[_0x54be('0x31')](util[_0x54be('0x44')](_0x54be('0x4d'),this['agents'][_0x2df722[_0x54be('0x3e')][_0x54be('0x49')]('-')[0x0]][_0x54be('0x69')]),_0x54be('0x93'),{'destaccountcode':this[_0x54be('0x18')][_0x2df722[_0x54be('0x3e')]['split']('-')[0x0]]['accountcode']});}}if(_0x2df722['event']===_0x54be('0x94')){this[_0x54be('0x19')][_0x2df722[_0x54be('0x33')]]=this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]];}else{if(this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x95')]===_0x54be('0x96')&&this[_0x54be('0x19')][_0x2df722[_0x54be('0x33')]]){this['channels'][_0x2df722[_0x54be('0x33')]][_0x54be('0x33')]=[this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x38')],this[_0x54be('0x17')][_0x2df722['uniqueid']][_0x54be('0x38')]=this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]][_0x54be('0x33')]][0x0];delete this['blindTransfers'][_0x2df722['uniqueid']];}}logger['debug']('[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:',_0x2df722[_0x54be('0x33')],util[_0x54be('0x2e')](this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]],{'showHidden':![],'depth':null}));ami[_0x54be('0x31')](_0x54be('0x97'),this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]]);delete this[_0x54be('0x17')][_0x2df722[_0x54be('0x33')]];}}}catch(_0x3ce310){logger['error'](_0x54be('0x98'),_0x2df722[_0x54be('0x33')],util[_0x54be('0x2e')](_0x3ce310,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x54be('0x2f')][_0x54be('0x26')]=function(_0x541b7d){try{if(this[_0x54be('0x32')](_0x541b7d)){logger[_0x54be('0x2b')](_0x54be('0x99'),_0x541b7d[_0x54be('0x33')],_0x541b7d[_0x54be('0x9a')],_0x541b7d['transfertargetcalleridnum']);logger[_0x54be('0x36')]('[%s][voiceCallReport][attendedtransfer]\x20event:',_0x541b7d[_0x54be('0x33')],util[_0x54be('0x2e')](_0x541b7d,{'showHidden':![],'depth':null}));if(this[_0x54be('0x17')][_0x541b7d['transfereeuniqueid']]){this[_0x54be('0x17')][_0x541b7d['transfereeuniqueid']][_0x54be('0x9b')]=_0x541b7d[_0x54be('0x9a')];this[_0x54be('0x17')][_0x541b7d[_0x54be('0x9c')]][_0x54be('0x9d')]=_0x541b7d[_0x54be('0x9e')];if(this[_0x54be('0x17')][_0x541b7d['secondtransfereruniqueid']]){var _0x43066f=this[_0x54be('0x17')][_0x541b7d[_0x54be('0x9f')]];this[_0x54be('0x17')][_0x541b7d[_0x54be('0x9f')]]=this['channels'][_0x541b7d['transfereeuniqueid']];this[_0x54be('0x17')][_0x541b7d[_0x54be('0x9c')]]=_0x43066f;}}else if(this['channels'][_0x541b7d['transfertargetuniqueid']]){this[_0x54be('0x17')][_0x541b7d['transfertargetuniqueid']][_0x54be('0x9b')]=_0x541b7d[_0x54be('0x9a')];this[_0x54be('0x17')][_0x541b7d[_0x54be('0xa0')]][_0x54be('0x9d')]=_0x541b7d[_0x54be('0x9e')];if(this[_0x54be('0x17')][_0x541b7d[_0x54be('0xa1')]]){var _0x43066f=this[_0x54be('0x17')][_0x541b7d[_0x54be('0xa1')]];this[_0x54be('0x17')][_0x541b7d[_0x54be('0xa1')]]=this[_0x54be('0x17')][_0x541b7d[_0x54be('0xa0')]];this[_0x54be('0x17')][_0x541b7d['transfertargetuniqueid']]=_0x43066f;}}}}catch(_0x5184c5){logger[_0x54be('0x3c')](_0x54be('0xa2'),_0x541b7d[_0x54be('0x33')],util['inspect'](_0x5184c5,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x54be('0x2f')][_0x54be('0x28')]=function(_0x42dbe0){try{if(this[_0x54be('0x32')](_0x42dbe0)){logger[_0x54be('0x2b')](_0x54be('0xa3'),_0x42dbe0[_0x54be('0x33')],_0x42dbe0[_0x54be('0xa4')],_0x42dbe0['extension']);logger[_0x54be('0x36')](_0x54be('0xa5'),_0x42dbe0[_0x54be('0x33')],util[_0x54be('0x2e')](_0x42dbe0,{'showHidden':![],'depth':null}));if(this['channels'][_0x42dbe0[_0x54be('0x9c')]]){this[_0x54be('0x17')][_0x42dbe0['transfereeuniqueid']][_0x54be('0x9b')]=_0x42dbe0[_0x54be('0xa4')];this[_0x54be('0x17')][_0x42dbe0['transfereeuniqueid']][_0x54be('0x9d')]=_0x42dbe0[_0x54be('0xa6')];this[_0x54be('0x23')]({'event':_0x54be('0x94'),'uniqueid':_0x42dbe0[_0x54be('0x9c')],'context':_0x42dbe0['context'],'channel':_0x42dbe0['transfererchannel']});}}}catch(_0x88b7d){logger[_0x54be('0x3c')](_0x54be('0xa7'),_0x42dbe0[_0x54be('0x33')],util[_0x54be('0x2e')](_0x88b7d,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x54be('0x2f')][_0x54be('0x29')]=function(_0x3df0bf){try{if(this[_0x54be('0x32')](_0x3df0bf)){logger[_0x54be('0x36')](_0x54be('0xa8'),_0x3df0bf[_0x54be('0x33')],util[_0x54be('0x2e')](_0x3df0bf,{'showHidden':![],'depth':null}));if(this[_0x54be('0x17')][_0x3df0bf[_0x54be('0x33')]]){if(!_[_0x54be('0x74')](this[_0x54be('0x17')][_0x3df0bf[_0x54be('0x33')]]['answertime'])){this['channels'][_0x3df0bf[_0x54be('0x33')]]['mohstarttime']=moment()[_0x54be('0x44')](_0x54be('0x45'));logger[_0x54be('0x2b')](_0x54be('0xa9'),_0x3df0bf[_0x54be('0x33')],this[_0x54be('0x17')][_0x3df0bf[_0x54be('0x33')]]['mohstarttime']);}}}}catch(_0x578f45){logger['error'](_0x54be('0xaa'),_0x3df0bf[_0x54be('0x33')],util[_0x54be('0x2e')](_0x578f45,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x54be('0x2f')][_0x54be('0xab')]=function(_0x2c3c2e){try{if(this['isNotNull'](_0x2c3c2e)){logger[_0x54be('0x36')](_0x54be('0xac'),_0x2c3c2e[_0x54be('0x33')],util[_0x54be('0x2e')](_0x2c3c2e,{'showHidden':![],'depth':null}));if(this['channels'][_0x2c3c2e[_0x54be('0x33')]]){if(!_[_0x54be('0x74')](this['channels'][_0x2c3c2e[_0x54be('0x33')]][_0x54be('0xad')])){this[_0x54be('0x17')][_0x2c3c2e['uniqueid']][_0x54be('0xae')]+=moment()[_0x54be('0xaf')](0x0)[_0x54be('0xb0')](this[_0x54be('0x17')][_0x2c3c2e[_0x54be('0x33')]]['mohstarttime'],'seconds');logger[_0x54be('0x2b')]('[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s',_0x2c3c2e[_0x54be('0x33')],this[_0x54be('0x17')][_0x2c3c2e[_0x54be('0x33')]][_0x54be('0xae')]);delete this[_0x54be('0x17')][_0x2c3c2e[_0x54be('0x33')]][_0x54be('0xad')];}}}}catch(_0x5ea23a){logger['error'](_0x54be('0xb1'),_0x2c3c2e['uniqueid'],util['inspect'](_0x5ea23a,{'showHidden':![],'depth':null}));}};module[_0x54be('0xb2')]=VoiceCallReport; \ No newline at end of file +var _0xedf7=['NO\x20ANSWER','ANSWERED','BUSY','localhost','socket.io-emitter','channels','agents','coreshowchannel','syncNewExten','bind','newchannel','newstate','syncNewState','syncVarSet','hangup','syncHangup','syncNewCallerId','attendedtransfer','blindtransfer','syncBlindTransfer','syncMusicOnHoldStart','syncMusicOnHoldStop','info','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','prototype','isNotNull','isUndefined','emit','uniqueid','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','linkedid','[%s][voiceCallReport][newcallerid]','syncNewChannel','[%s][voiceCallReport][newchannel]\x20event:','channel','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','exten','starttime','format','YYYY-MM-DD\x20HH:mm:ss','disposition','toNumber','merge','pick','keys','context','split','destconnectedlinenum','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','accountcode','user:%s','name','user:agentconnect','[%s][voiceCallReport][newchannel]','OutgoingSpoolFailed','application','applicationdata','appdata','toLowerCase','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','duration','subtract','seconds','includes','lastapplication','match','queue','[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s','calleridname','channelstate','answered','answertime','diff','xcally-motion-preview','connectedlinenum','connectedlinename','destinationchannel','UserId','membername','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','monitor','.wav49','replace','.WAV','monitorFilename','find','isNil','rec','[%s][voiceCallReport][mixMonitorFilename]','[%s][voiceCallReport][varset]\x20event:','variable','value','xmd-phone','xmd-callerid','[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s','xmd-cdrtype','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','type','xmd-queue','[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s','xmd-originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','originatecalleridnum','xmd-destination','[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s','destination','xmd-callerid-preview','calleridpreview','xmcs-queue','[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','sipcalluniqueid','mixmonitor_filename','parse','sipcalllinkedid','[%s][voiceCallReport][varset]','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','endtime','billableseconds','from-sip','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','event','BlindTransfer','blindTransfers','outbound','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','[%s][voiceCallReport][hangup]','syncAttendedTransfer','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','origtransferercalleridnum','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','transfercalleridnum','transferconnectedlinenum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[%s][voiceCallReport][attendedtransfer]','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','[%s][voiceCallReport][blindtransfer]\x20event:','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:','mohstarttime','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstart]','mohtime','milliseconds','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','[%s][voiceCallReport][musiconholdstop]','lodash','util','path','ioredis','../../../config/environment','ami','../ami','unknown','inuse','busy','invalid','ringinuse','onhold','set','agi','dial','playback','voicemail','FAILED'];(function(_0x3c6c7a,_0x4727d3){var _0x1f6f97=function(_0x3fed14){while(--_0x3fed14){_0x3c6c7a['push'](_0x3c6c7a['shift']());}};_0x1f6f97(++_0x4727d3);}(_0xedf7,0x155));var _0x7edf=function(_0x2ec5e7,_0x3572d7){_0x2ec5e7=_0x2ec5e7-0x0;var _0x389af5=_0xedf7[_0x2ec5e7];return _0x389af5;};'use strict';var BPromise=require('bluebird');var _=require(_0x7edf('0x0'));var moment=require('moment');var util=require(_0x7edf('0x1'));var path=require(_0x7edf('0x2'));var Redis=require(_0x7edf('0x3'));var config=require(_0x7edf('0x4'));var logger=require('../../../config/logger')(_0x7edf('0x5'));var ami=require(_0x7edf('0x6'));var Channel=require('../model/channel');var statusDesc=[_0x7edf('0x7'),'not_inuse',_0x7edf('0x8'),_0x7edf('0x9'),_0x7edf('0xa'),'unavailable','ringing',_0x7edf('0xb'),_0x7edf('0xc')];var applications=[_0x7edf('0xd'),'queue',_0x7edf('0xe'),_0x7edf('0xf'),_0x7edf('0x10'),_0x7edf('0x11')];var dispositions=['NO\x20ANSWER',_0x7edf('0x12'),_0x7edf('0x12'),'NO\x20ANSWER',_0x7edf('0x13'),'NO\x20ANSWER',_0x7edf('0x14'),_0x7edf('0x15'),'FAILED',_0x7edf('0x12'),'FAILED'];var actions={};config['redis']=_['defaults'](config['redis'],{'host':_0x7edf('0x16'),'port':0x18eb});var io=require(_0x7edf('0x17'))(new Redis(config['redis']));function VoiceCallReport(_0x37a1c2){this[_0x7edf('0x18')]=_0x37a1c2['channels'];this[_0x7edf('0x19')]=_0x37a1c2[_0x7edf('0x19')];this['blindTransfers']={};ami['on'](_0x7edf('0x1a'),this[_0x7edf('0x1b')][_0x7edf('0x1c')](this));ami['on']('newexten',this[_0x7edf('0x1b')]['bind'](this));ami['on'](_0x7edf('0x1d'),this['syncNewChannel'][_0x7edf('0x1c')](this));ami['on'](_0x7edf('0x1e'),this[_0x7edf('0x1f')][_0x7edf('0x1c')](this));ami['on']('varset',this[_0x7edf('0x20')][_0x7edf('0x1c')](this));ami['on'](_0x7edf('0x21'),this[_0x7edf('0x22')]['bind'](this));ami['on']('newcallerid',this[_0x7edf('0x23')]['bind'](this));ami['on'](_0x7edf('0x24'),this['syncAttendedTransfer'][_0x7edf('0x1c')](this));ami['on'](_0x7edf('0x25'),this[_0x7edf('0x26')][_0x7edf('0x1c')](this));ami['on']('musiconholdstart',this[_0x7edf('0x27')]['bind'](this));ami['on']('musiconholdstop',this[_0x7edf('0x28')][_0x7edf('0x1c')](this));try{logger[_0x7edf('0x29')]('[voiceCallReport][coreshowchannels]\x20started');ami[_0x7edf('0x2a')]();}catch(_0x592359){logger[_0x7edf('0x2b')](_0x7edf('0x2c'),util[_0x7edf('0x2d')](_0x592359,{'showHidden':![],'depth':null}));}}VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x2f')]=function(_0x5bb212){return _0x5bb212!==null&&!_[_0x7edf('0x30')](_0x5bb212);};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x31')]=function(_0x5eaf93,_0x28709d,_0x4a4a57){io['to'](_0x5eaf93)[_0x7edf('0x31')](_0x28709d,_0x4a4a57);};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x23')]=function(_0x5980cf){try{if(this[_0x7edf('0x2f')](_0x5980cf)){logger[_0x7edf('0x29')]('[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s',_0x5980cf[_0x7edf('0x32')],_0x5980cf['calleridname'],_0x5980cf[_0x7edf('0x33')]);logger[_0x7edf('0x34')](_0x7edf('0x35'),_0x5980cf[_0x7edf('0x32')],util['inspect'](_0x5980cf,{'showHidden':![],'depth':null}));if(_0x5980cf[_0x7edf('0x32')]===_0x5980cf[_0x7edf('0x36')]){if(!_[_0x7edf('0x30')](this[_0x7edf('0x18')][_0x5980cf[_0x7edf('0x32')]])){_['merge'](this[_0x7edf('0x18')][_0x5980cf['uniqueid']],_['pick'](_0x5980cf,_['keys'](this[_0x7edf('0x18')][_0x5980cf[_0x7edf('0x32')]])));}}}}catch(_0x138a90){logger[_0x7edf('0x2b')](_0x7edf('0x37'),_0x5980cf[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x138a90,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x38')]=function(_0x5421c2){try{if(this['isNotNull'](_0x5421c2)){logger['debug'](_0x7edf('0x39'),_0x5421c2[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x5421c2,{'showHidden':![],'depth':null}));if(_0x5421c2[_0x7edf('0x32')]===_0x5421c2[_0x7edf('0x36')]&&_0x5421c2[_0x7edf('0x3a')]!='OutgoingSpoolFailed'){if(_[_0x7edf('0x30')](this[_0x7edf('0x18')][_0x5421c2[_0x7edf('0x32')]])){logger[_0x7edf('0x29')](_0x7edf('0x3b'),_0x5421c2[_0x7edf('0x32')],_0x5421c2['context'],_0x5421c2[_0x7edf('0x3c')]);this[_0x7edf('0x18')][_0x5421c2[_0x7edf('0x32')]]=new Channel();this[_0x7edf('0x18')][_0x5421c2[_0x7edf('0x32')]][_0x7edf('0x3d')]=moment()[_0x7edf('0x3e')](_0x7edf('0x3f'));this[_0x7edf('0x18')][_0x5421c2['uniqueid']][_0x7edf('0x40')]=dispositions[_[_0x7edf('0x41')](_0x5421c2['channelstate'])];_[_0x7edf('0x42')](this[_0x7edf('0x18')][_0x5421c2[_0x7edf('0x32')]],_[_0x7edf('0x43')](_0x5421c2,_[_0x7edf('0x44')](this[_0x7edf('0x18')][_0x5421c2[_0x7edf('0x32')]])));if(_0x5421c2[_0x7edf('0x45')]==='from-sip'){if(this[_0x7edf('0x19')][_0x5421c2[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]]){this[_0x7edf('0x19')][_0x5421c2['channel'][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x47')]=_0x5421c2['exten'];logger['debug'](_0x7edf('0x48'),_0x5421c2[_0x7edf('0x32')],util['inspect']({'destaccountcode':this[_0x7edf('0x19')][_0x5421c2[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x49')],'destconnectedlinenum':_0x5421c2[_0x7edf('0x3c')]},{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x7edf('0x4a'),this[_0x7edf('0x19')][_0x5421c2[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x4b')]),_0x7edf('0x4c'),{'destaccountcode':this['agents'][_0x5421c2[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x49')],'destconnectedlinenum':_0x5421c2[_0x7edf('0x3c')]});}}}}}}catch(_0x34d1bf){logger[_0x7edf('0x2b')](_0x7edf('0x4d'),_0x5421c2['uniqueid'],util[_0x7edf('0x2d')](_0x34d1bf,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x1b')]=function(_0x40ec0f){try{if(this[_0x7edf('0x2f')](_0x40ec0f)){logger[_0x7edf('0x34')]('[%s][voiceCallReport][newexten]\x20event:',_0x40ec0f[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x40ec0f,{'showHidden':![],'depth':null}));if(_0x40ec0f['uniqueid']===_0x40ec0f[_0x7edf('0x36')]&&_0x40ec0f[_0x7edf('0x3c')]!='h'&&_0x40ec0f[_0x7edf('0x3a')]!=_0x7edf('0x4e')){_0x40ec0f[_0x7edf('0x4f')]=_0x40ec0f[_0x7edf('0x4f')]['toLowerCase']();_0x40ec0f[_0x7edf('0x50')]=(_0x40ec0f[_0x7edf('0x51')]||_0x40ec0f[_0x7edf('0x50')])[_0x7edf('0x52')]();logger[_0x7edf('0x29')](_0x7edf('0x53'),_0x40ec0f['uniqueid'],_0x40ec0f['application'],_0x40ec0f['applicationdata']);if(_[_0x7edf('0x30')](this['channels'][_0x40ec0f[_0x7edf('0x32')]])){this[_0x7edf('0x18')][_0x40ec0f[_0x7edf('0x32')]]=new Channel();this['channels'][_0x40ec0f[_0x7edf('0x32')]][_0x7edf('0x3d')]=_0x40ec0f[_0x7edf('0x54')]?moment()[_0x7edf('0x55')](moment[_0x7edf('0x54')](_0x40ec0f[_0x7edf('0x54')])['seconds'](),_0x7edf('0x56'))[_0x7edf('0x3e')](_0x7edf('0x3f')):moment()['format'](_0x7edf('0x3f'));this[_0x7edf('0x18')][_0x40ec0f['uniqueid']]['disposition']=_0x7edf('0x13');}_['merge'](this[_0x7edf('0x18')][_0x40ec0f[_0x7edf('0x32')]],_[_0x7edf('0x43')](_0x40ec0f,_['keys'](this['channels'][_0x40ec0f[_0x7edf('0x32')]])));if(_[_0x7edf('0x57')](applications,_0x40ec0f['application'])){this[_0x7edf('0x18')][_0x40ec0f[_0x7edf('0x32')]][_0x7edf('0x58')]=_0x40ec0f['application'];this[_0x7edf('0x18')][_0x40ec0f[_0x7edf('0x32')]]['lastdata']=_0x40ec0f['applicationdata'];if(_0x40ec0f[_0x7edf('0x4f')]==='set'&&_['startsWith'](_0x40ec0f[_0x7edf('0x50')],'cdr(')){var _0xe0fe7f=_0x40ec0f['applicationdata'][_0x7edf('0x46')]('=');var _0x3b2e70=_0xe0fe7f[0x0][_0x7edf('0x59')](/cdr\((.*)\)/);if(_0x3b2e70){this['channels'][_0x40ec0f['uniqueid']][_0x3b2e70[0x1]]=_0xe0fe7f[0x1];}}else if(_0x40ec0f[_0x7edf('0x4f')]==='queue'){this['channels'][_0x40ec0f[_0x7edf('0x32')]][_0x7edf('0x5a')]=_0x40ec0f[_0x7edf('0x50')][_0x7edf('0x46')](',')[0x0];}}}}}catch(_0xfd3a03){logger[_0x7edf('0x2b')]('[%s][voiceCallReport][newexten]',_0x40ec0f['uniqueid'],util['inspect'](_0xfd3a03,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncNewState']=function(_0x56d5e5){try{if(this[_0x7edf('0x2f')](_0x56d5e5)){logger[_0x7edf('0x29')](_0x7edf('0x5b'),_0x56d5e5['uniqueid'],_0x56d5e5[_0x7edf('0x36')],_0x56d5e5[_0x7edf('0x5c')],_0x56d5e5[_0x7edf('0x33')]);logger[_0x7edf('0x34')]('[%s][voiceCallReport][newstate]\x20event:',_0x56d5e5[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x56d5e5,{'showHidden':![],'depth':null}));if(_0x56d5e5['uniqueid']!==_0x56d5e5[_0x7edf('0x36')]){if(this['channels'][_0x56d5e5[_0x7edf('0x36')]]){if(_0x56d5e5[_0x7edf('0x5d')]==='6'){if(!this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]]['answered']){var _0x1d5d2b=moment();this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]][_0x7edf('0x5e')]=!![];this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]][_0x7edf('0x5f')]=_0x1d5d2b[_0x7edf('0x3e')]('YYYY-MM-DD\x20HH:mm:ss');if(this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]]['starttime']){this['channels'][_0x56d5e5['linkedid']]['holdtime']=_0x1d5d2b[_0x7edf('0x60')](this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]]['starttime'],_0x7edf('0x56'));}}this[_0x7edf('0x18')][_0x56d5e5['linkedid']][_0x7edf('0x36')]=_0x56d5e5[_0x7edf('0x32')];if(_0x56d5e5['calleridnum']!==_0x7edf('0x61')){this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]][_0x7edf('0x62')]=_0x56d5e5[_0x7edf('0x33')];}this[_0x7edf('0x18')][_0x56d5e5['linkedid']][_0x7edf('0x63')]=_0x56d5e5[_0x7edf('0x5c')];this[_0x7edf('0x18')][_0x56d5e5['linkedid']][_0x7edf('0x64')]=_0x56d5e5['channel'];this[_0x7edf('0x18')][_0x56d5e5['linkedid']]['disposition']=dispositions[_['toNumber'](_0x56d5e5['channelstate'])];if(this['agents'][_0x56d5e5[_0x7edf('0x3a')]['split']('-')[0x0]]){this['channels'][_0x56d5e5[_0x7edf('0x36')]][_0x7edf('0x65')]=this[_0x7edf('0x19')][_0x56d5e5['channel'][_0x7edf('0x46')]('-')[0x0]]['id'];this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x36')]][_0x7edf('0x66')]=this['agents'][_0x56d5e5[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x4b')];}}}}else{if(this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x32')]]){if(_0x56d5e5[_0x7edf('0x5d')]==='6'){if(this[_0x7edf('0x19')][_0x56d5e5[_0x7edf('0x3a')]['split']('-')[0x0]]){this[_0x7edf('0x18')][_0x56d5e5['uniqueid']][_0x7edf('0x65')]=this[_0x7edf('0x19')][_0x56d5e5['channel']['split']('-')[0x0]]['id'];this[_0x7edf('0x18')][_0x56d5e5[_0x7edf('0x32')]][_0x7edf('0x66')]=this['agents'][_0x56d5e5[_0x7edf('0x3a')]['split']('-')[0x0]]['name'];}}}}}}catch(_0x5213e5){logger[_0x7edf('0x2b')]('[%s][voiceCallReport][newstate]',_0x56d5e5[_0x7edf('0x32')],util['inspect'](_0x5213e5,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x67')]=function(_0x1bb45d,_0x151704){try{if(this[_0x7edf('0x18')][_0x1bb45d]){logger[_0x7edf('0x29')](_0x7edf('0x68'),_0x1bb45d,_0x151704);this[_0x7edf('0x18')][_0x1bb45d][_0x7edf('0x69')]=!![];if(_['endsWith'](_0x151704,_0x7edf('0x6a'))){_0x151704=_0x151704[_0x7edf('0x6b')](_0x7edf('0x6a'),_0x7edf('0x6c'));}this['channels'][_0x1bb45d][_0x7edf('0x6d')]=_0x151704;var _0x2c927b=_[_0x7edf('0x6e')](this['channels'][_0x1bb45d]['monitors'],{'filename':_0x151704});if(_[_0x7edf('0x6f')](_0x2c927b)){this[_0x7edf('0x18')][_0x1bb45d]['monitors']['push']({'filename':_0x151704,'createdAt':moment()[_0x7edf('0x3e')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':'','status':_0x7edf('0x70')});}}}catch(_0x4fdcfb){logger[_0x7edf('0x2b')](_0x7edf('0x71'),_0x1bb45d,util[_0x7edf('0x2d')](_0x4fdcfb,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x20')]=function(_0x468a75){try{if(this[_0x7edf('0x2f')](_0x468a75)){logger[_0x7edf('0x34')](_0x7edf('0x72'),_0x468a75[_0x7edf('0x32')],util['inspect'](_0x468a75,{'showHidden':![],'depth':null}));if(this[_0x7edf('0x18')][_0x468a75['uniqueid']]&&_0x468a75[_0x7edf('0x3a')]!=_0x7edf('0x4e')){if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')])){if(this[_0x7edf('0x2f')](_0x468a75['variable']['mixmonitor_filename'])){logger['info']('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x468a75[_0x7edf('0x32')],_0x468a75['value']);this[_0x7edf('0x67')](_0x468a75[_0x7edf('0x32')],_0x468a75[_0x7edf('0x74')]);}else if(this[_0x7edf('0x2f')](_0x468a75['variable'][_0x7edf('0x75')])){logger[_0x7edf('0x29')]('[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s',_0x468a75[_0x7edf('0x32')],_0x468a75[_0x7edf('0x74')]);this['channels'][_0x468a75[_0x7edf('0x32')]][_0x7edf('0x33')]=_0x468a75[_0x7edf('0x74')];}else if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')][_0x7edf('0x76')])){logger[_0x7edf('0x29')](_0x7edf('0x77'),_0x468a75[_0x7edf('0x32')],_0x468a75[_0x7edf('0x74')]);this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x32')]]['callerid']=_0x468a75[_0x7edf('0x74')];}else if(this['isNotNull'](_0x468a75[_0x7edf('0x73')][_0x7edf('0x78')])){logger['info'](_0x7edf('0x79'),_0x468a75[_0x7edf('0x32')],_0x468a75['value']);this['channels'][_0x468a75['uniqueid']][_0x7edf('0x7a')]=_0x468a75[_0x7edf('0x74')];}else if(this['isNotNull'](_0x468a75['variable'][_0x7edf('0x7b')])){logger[_0x7edf('0x29')](_0x7edf('0x7c'),_0x468a75['uniqueid'],_0x468a75['value'][_0x7edf('0x46')](',')[0x0]);this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x32')]]['queue']=_0x468a75[_0x7edf('0x74')]['split'](',')[0x0];}else if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')][_0x7edf('0x7d')])){logger[_0x7edf('0x29')](_0x7edf('0x7e'),_0x468a75[_0x7edf('0x32')],_0x468a75['value']);this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x32')]][_0x7edf('0x7f')]=_0x468a75[_0x7edf('0x74')];}else if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')][_0x7edf('0x80')])){logger[_0x7edf('0x29')](_0x7edf('0x81'),_0x468a75[_0x7edf('0x32')],_0x468a75['value']);this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x32')]][_0x7edf('0x82')]=_0x468a75[_0x7edf('0x74')];}else if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')][_0x7edf('0x83')])){logger[_0x7edf('0x29')]('[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s',_0x468a75[_0x7edf('0x32')],_0x468a75['value']);this['channels'][_0x468a75['uniqueid']][_0x7edf('0x84')]=_0x468a75['value'];}else if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')][_0x7edf('0x85')])){logger[_0x7edf('0x29')](_0x7edf('0x86'),_0x468a75[_0x7edf('0x32')],_0x468a75['value']);this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x32')]][_0x7edf('0x5a')]=_0x468a75[_0x7edf('0x74')];}else if(this['isNotNull'](_0x468a75[_0x7edf('0x73')][_0x7edf('0x87')])){logger[_0x7edf('0x29')](_0x7edf('0x88'),_0x468a75[_0x7edf('0x32')],_0x468a75[_0x7edf('0x74')]);this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x32')]][_0x7edf('0x89')]=_0x468a75[_0x7edf('0x74')];}}}else if(this[_0x7edf('0x2f')](_0x468a75['variable'][_0x7edf('0x8a')])){if(_0x468a75[_0x7edf('0x74')]){var _0x42f1be=path[_0x7edf('0x8b')](_0x468a75[_0x7edf('0x74')])[_0x7edf('0x4b')];logger[_0x7edf('0x29')]('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x42f1be,_0x468a75[_0x7edf('0x74')]);this[_0x7edf('0x67')](_0x42f1be,_0x468a75[_0x7edf('0x74')]);}}else if(this[_0x7edf('0x18')][_0x468a75[_0x7edf('0x36')]]){if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')])){if(this[_0x7edf('0x2f')](_0x468a75[_0x7edf('0x73')][_0x7edf('0x87')])){logger[_0x7edf('0x29')](_0x7edf('0x88'),_0x468a75[_0x7edf('0x36')],_0x468a75[_0x7edf('0x74')]);this[_0x7edf('0x18')][_0x468a75['linkedid']][_0x7edf('0x8c')]=_0x468a75['value'];}}}}}catch(_0x5cfe4e){logger[_0x7edf('0x2b')](_0x7edf('0x8d'),_0x468a75[_0x7edf('0x32')],util['inspect'](_0x5cfe4e,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x22')]=function(_0x343843){try{if(this['isNotNull'](_0x343843)){logger[_0x7edf('0x34')](_0x7edf('0x8e'),_0x343843['uniqueid'],util['inspect'](_0x343843,{'showHidden':![],'depth':null}));if(this['channels'][_0x343843[_0x7edf('0x32')]]){logger[_0x7edf('0x29')](_0x7edf('0x8f'),_0x343843[_0x7edf('0x32')],_0x343843[_0x7edf('0x90')]);var _0x2e910f=moment();this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]][_0x7edf('0x91')]=_0x2e910f[_0x7edf('0x3e')](_0x7edf('0x3f'));this[_0x7edf('0x18')][_0x343843['uniqueid']][_0x7edf('0x54')]=_0x2e910f[_0x7edf('0x60')](this['channels'][_0x343843['uniqueid']][_0x7edf('0x3d')],_0x7edf('0x56'));if(this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]]['answered']){this['channels'][_0x343843[_0x7edf('0x32')]][_0x7edf('0x92')]=_0x2e910f[_0x7edf('0x60')](this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]][_0x7edf('0x5f')],_0x7edf('0x56'));this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]]['holdtime']=this['channels'][_0x343843[_0x7edf('0x32')]]['duration']-this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]]['billableseconds'];}if(_0x343843[_0x7edf('0x45')]===_0x7edf('0x93')){if(this[_0x7edf('0x19')][_0x343843[_0x7edf('0x3a')]['split']('-')[0x0]]){this[_0x7edf('0x19')][_0x343843['channel'][_0x7edf('0x46')]('-')[0x0]]=_['omit'](this['agents'][_0x343843[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]],[_0x7edf('0x47')]);logger[_0x7edf('0x34')](_0x7edf('0x94'),_0x343843['uniqueid'],util[_0x7edf('0x2d')]({'destaccountcode':this[_0x7edf('0x19')][_0x343843[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x49')]},{'showHidden':![],'depth':null}));this['emit'](util[_0x7edf('0x3e')]('user:%s',this['agents'][_0x343843[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x4b')]),_0x7edf('0x95'),{'destaccountcode':this[_0x7edf('0x19')][_0x343843[_0x7edf('0x3a')][_0x7edf('0x46')]('-')[0x0]][_0x7edf('0x49')]});}}if(_0x343843[_0x7edf('0x96')]===_0x7edf('0x97')){this[_0x7edf('0x98')][_0x343843['uniqueid']]=this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]];}else{if(this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]]['type']===_0x7edf('0x99')&&this[_0x7edf('0x98')][_0x343843[_0x7edf('0x32')]]){this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]][_0x7edf('0x32')]=[this['channels'][_0x343843['uniqueid']][_0x7edf('0x36')],this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]][_0x7edf('0x36')]=this[_0x7edf('0x18')][_0x343843['uniqueid']][_0x7edf('0x32')]][0x0];delete this[_0x7edf('0x98')][_0x343843[_0x7edf('0x32')]];}}logger[_0x7edf('0x34')](_0x7edf('0x9a'),_0x343843[_0x7edf('0x32')],util[_0x7edf('0x2d')](this['channels'][_0x343843[_0x7edf('0x32')]],{'showHidden':![],'depth':null}));ami[_0x7edf('0x31')]('custom:voiceCallReport',this[_0x7edf('0x18')][_0x343843['uniqueid']]);delete this[_0x7edf('0x18')][_0x343843[_0x7edf('0x32')]];}}}catch(_0x55c8a9){logger[_0x7edf('0x2b')](_0x7edf('0x9b'),_0x343843[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x55c8a9,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x9c')]=function(_0x2185e0){try{if(this[_0x7edf('0x2f')](_0x2185e0)){logger[_0x7edf('0x29')](_0x7edf('0x9d'),_0x2185e0[_0x7edf('0x32')],_0x2185e0[_0x7edf('0x9e')],_0x2185e0[_0x7edf('0x9f')]);logger[_0x7edf('0x34')](_0x7edf('0xa0'),_0x2185e0[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x2185e0,{'showHidden':![],'depth':null}));if(this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa1')]]){this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa1')]][_0x7edf('0xa2')]=_0x2185e0[_0x7edf('0x9e')];this[_0x7edf('0x18')][_0x2185e0['transfereeuniqueid']][_0x7edf('0xa3')]=_0x2185e0[_0x7edf('0x9f')];if(this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa4')]]){var _0x12fdcb=this[_0x7edf('0x18')][_0x2185e0['secondtransfereruniqueid']];this['channels'][_0x2185e0[_0x7edf('0xa4')]]=this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa1')]];this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa1')]]=_0x12fdcb;}}else if(this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa5')]]){this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa5')]]['transfercalleridnum']=_0x2185e0[_0x7edf('0x9e')];this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa5')]][_0x7edf('0xa3')]=_0x2185e0['transfertargetcalleridnum'];if(this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa6')]]){var _0x12fdcb=this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa6')]];this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa6')]]=this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa5')]];this[_0x7edf('0x18')][_0x2185e0[_0x7edf('0xa5')]]=_0x12fdcb;}}}}catch(_0x2a147a){logger['error'](_0x7edf('0xa7'),_0x2185e0[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x2a147a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x26')]=function(_0x516cb6){try{if(this[_0x7edf('0x2f')](_0x516cb6)){logger[_0x7edf('0x29')](_0x7edf('0xa8'),_0x516cb6[_0x7edf('0x32')],_0x516cb6[_0x7edf('0xa9')],_0x516cb6['extension']);logger[_0x7edf('0x34')](_0x7edf('0xaa'),_0x516cb6[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x516cb6,{'showHidden':![],'depth':null}));if(this[_0x7edf('0x18')][_0x516cb6[_0x7edf('0xa1')]]){this[_0x7edf('0x18')][_0x516cb6['transfereeuniqueid']][_0x7edf('0xa2')]=_0x516cb6[_0x7edf('0xa9')];this[_0x7edf('0x18')][_0x516cb6[_0x7edf('0xa1')]][_0x7edf('0xa3')]=_0x516cb6['extension'];this[_0x7edf('0x22')]({'event':_0x7edf('0x97'),'uniqueid':_0x516cb6[_0x7edf('0xa1')],'context':_0x516cb6[_0x7edf('0x45')],'channel':_0x516cb6['transfererchannel']});}}}catch(_0xb3b1f0){logger['error'](_0x7edf('0xab'),_0x516cb6[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0xb3b1f0,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')]['syncMusicOnHoldStart']=function(_0x515282){try{if(this['isNotNull'](_0x515282)){logger[_0x7edf('0x34')](_0x7edf('0xac'),_0x515282['uniqueid'],util['inspect'](_0x515282,{'showHidden':![],'depth':null}));if(this[_0x7edf('0x18')][_0x515282[_0x7edf('0x32')]]){if(!_[_0x7edf('0x6f')](this['channels'][_0x515282[_0x7edf('0x32')]]['answertime'])){this['channels'][_0x515282['uniqueid']][_0x7edf('0xad')]=moment()[_0x7edf('0x3e')](_0x7edf('0x3f'));logger['info'](_0x7edf('0xae'),_0x515282[_0x7edf('0x32')],this[_0x7edf('0x18')][_0x515282[_0x7edf('0x32')]][_0x7edf('0xad')]);}}}}catch(_0xfa3ac8){logger['error'](_0x7edf('0xaf'),_0x515282[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0xfa3ac8,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7edf('0x2e')][_0x7edf('0x28')]=function(_0x164189){try{if(this[_0x7edf('0x2f')](_0x164189)){logger['debug']('[%s][voiceCallReport][musiconholdstop]\x20event:',_0x164189[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x164189,{'showHidden':![],'depth':null}));if(this[_0x7edf('0x18')][_0x164189[_0x7edf('0x32')]]){if(!_[_0x7edf('0x6f')](this[_0x7edf('0x18')][_0x164189[_0x7edf('0x32')]][_0x7edf('0xad')])){this[_0x7edf('0x18')][_0x164189[_0x7edf('0x32')]][_0x7edf('0xb0')]+=moment()[_0x7edf('0xb1')](0x0)['diff'](this['channels'][_0x164189['uniqueid']][_0x7edf('0xad')],_0x7edf('0x56'));logger[_0x7edf('0x29')](_0x7edf('0xb2'),_0x164189[_0x7edf('0x32')],this[_0x7edf('0x18')][_0x164189['uniqueid']][_0x7edf('0xb0')]);delete this['channels'][_0x164189[_0x7edf('0x32')]][_0x7edf('0xad')];}}}}catch(_0x508868){logger[_0x7edf('0x2b')](_0x7edf('0xb3'),_0x164189[_0x7edf('0x32')],util[_0x7edf('0x2d')](_0x508868,{'showHidden':![],'depth':null}));}};module['exports']=VoiceCallReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceDialReport.js b/server/services/ami/report/voiceDialReport.js index 91f3305..a7ffa2c 100644 --- a/server/services/ami/report/voiceDialReport.js +++ b/server/services/ami/report/voiceDialReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf44f=['total','answered','holdtime','billableseconds','sumBillable','sumDuration','duration','custom:voiceDialReport','[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','voice_outbound:save','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:','linkedid','destuniqueid','[%s][voiceDialReport][hangup]','exports','moment','util','ioredis','../../../config/logger','../ami','redis','defaults','localhost','channels','outboundChannels','outbound','variables','dialbegin','syncDialBegin','bind','dialend','syncDialEnd','varset','hangup','syncHangup','prototype','isNotNull','isUndefined','emit','debug','[%s][voiceDialReport][dialbegin]\x20event:','uniqueid','inspect','merge','called','channel','lastIndexOf','substring','omit','event','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','membername','[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:','voice:outbound','voice_outbound_channel:save','[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:','custom:dialbegin','error','[%s][voiceDialReport][dialbegin]','[%s][voiceDialReport][dialend]\x20event:','dialstatus','connectedlinenum','connectedlinename','answertime','format','YYYY-MM-DD\x20HH:mm:ss','lastevent','connect','[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect','[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:','custom:dialconnect','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','[%s][voiceDialReport][dialend]','syncVarSet','[%s][voiceDialReport][varset]\x20event:','addVariable','keys','variable','value','outboundrouteid','[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s','[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:','[%s][voiceDialReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipuri','bridgepeer','membercalls','memberdynamic','memberlastcall','memberpenalty','memberrealtime','isNil','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','endtime','diff','starttime','seconds','complete'];(function(_0x4c440b,_0x3ea627){var _0x2d48cf=function(_0x56bac7){while(--_0x56bac7){_0x4c440b['push'](_0x4c440b['shift']());}};_0x2d48cf(++_0x3ea627);}(_0xf44f,0x7f));var _0xff44=function(_0x235b06,_0x3ddca2){_0x235b06=_0x235b06-0x0;var _0xcd3900=_0xf44f[_0x235b06];return _0xcd3900;};'use strict';var _=require('lodash');var moment=require(_0xff44('0x0'));var util=require(_0xff44('0x1'));var Redis=require(_0xff44('0x2'));var config=require('../../../config/environment');var logger=require(_0xff44('0x3'))('ami');var ami=require(_0xff44('0x4'));config[_0xff44('0x5')]=_[_0xff44('0x6')](config['redis'],{'host':_0xff44('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xff44('0x5')]));function VoiceDialReport(_0x405325){this[_0xff44('0x8')]=_0x405325[_0xff44('0x9')];this[_0xff44('0xa')]=_0x405325[_0xff44('0xa')];this[_0xff44('0xb')]={};ami['on'](_0xff44('0xc'),this[_0xff44('0xd')][_0xff44('0xe')](this));ami['on'](_0xff44('0xf'),this[_0xff44('0x10')]['bind'](this));ami['on'](_0xff44('0x11'),this['syncVarSet']['bind'](this));ami['on'](_0xff44('0x12'),this[_0xff44('0x13')][_0xff44('0xe')](this));}VoiceDialReport[_0xff44('0x14')][_0xff44('0x15')]=function(_0x5e6d87){return _0x5e6d87!==null&&!_[_0xff44('0x16')](_0x5e6d87);};VoiceDialReport['prototype'][_0xff44('0x17')]=function(_0x2ef40f,_0x29f17,_0x102a6b){io['to'](_0x2ef40f)[_0xff44('0x17')](_0x29f17,_0x102a6b);};VoiceDialReport[_0xff44('0x14')][_0xff44('0xd')]=function(_0x5425bf){try{if(this[_0xff44('0x15')](_0x5425bf)){logger[_0xff44('0x18')](_0xff44('0x19'),_0x5425bf[_0xff44('0x1a')],util[_0xff44('0x1b')](_0x5425bf,{'showHidden':![],'depth':null}));if(this[_0xff44('0x8')][_0x5425bf[_0xff44('0x1a')]]){_[_0xff44('0x1c')](this['channels'][_0x5425bf['uniqueid']],{'starttime':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'lastevent':_0xff44('0x1d'),'interface':_0x5425bf['channel']['substring'](0x0,_0x5425bf[_0xff44('0x1e')][_0xff44('0x1f')]('-')),'membername':_0x5425bf['channel'][_0xff44('0x20')](_0x5425bf['channel'][_0xff44('0x1f')]('/')+0x1,_0x5425bf[_0xff44('0x1e')][_0xff44('0x1f')]('-'))},_[_0xff44('0x21')](_0x5425bf,[_0xff44('0x22'),'privilege']));logger[_0xff44('0x23')](_0xff44('0x24'),_0x5425bf[_0xff44('0x1a')],this[_0xff44('0x8')][_0x5425bf[_0xff44('0x1a')]][_0xff44('0x25')],this[_0xff44('0x8')][_0x5425bf['uniqueid']]['interface']);logger[_0xff44('0x18')](_0xff44('0x26'),_0x5425bf[_0xff44('0x1a')],util[_0xff44('0x1b')](this[_0xff44('0x8')][_0x5425bf['uniqueid']],{'showHidden':![],'depth':null}));this[_0xff44('0x17')](_0xff44('0x27'),_0xff44('0x28'),this[_0xff44('0x8')][_0x5425bf[_0xff44('0x1a')]]);logger[_0xff44('0x18')](_0xff44('0x29'),_0x5425bf[_0xff44('0x1a')],util[_0xff44('0x1b')](this[_0xff44('0x8')][_0x5425bf['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xff44('0x17')](_0xff44('0x2a'),this['channels'][_0x5425bf[_0xff44('0x1a')]]);}}}catch(_0x468e27){logger[_0xff44('0x2b')](_0xff44('0x2c'),_0x5425bf[_0xff44('0x1a')],util[_0xff44('0x1b')](_0x468e27,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xff44('0x14')][_0xff44('0x10')]=function(_0x59a1bf){try{if(this[_0xff44('0x15')](_0x59a1bf)){logger[_0xff44('0x18')](_0xff44('0x2d'),_0x59a1bf['uniqueid'],util[_0xff44('0x1b')](_0x59a1bf,{'showHidden':![],'depth':null}));if(this[_0xff44('0x8')][_0x59a1bf[_0xff44('0x1a')]]){this[_0xff44('0x8')][_0x59a1bf[_0xff44('0x1a')]][_0xff44('0x2e')]=_0x59a1bf[_0xff44('0x2e')];if(_0x59a1bf[_0xff44('0x2e')]==='ANSWER'){this[_0xff44('0x8')][_0x59a1bf[_0xff44('0x1a')]]['connectedlinenum']=_0x59a1bf[_0xff44('0x2f')];this['channels'][_0x59a1bf[_0xff44('0x1a')]]['connectedlinename']=_0x59a1bf[_0xff44('0x30')];this[_0xff44('0x8')][_0x59a1bf[_0xff44('0x1a')]][_0xff44('0x31')]=moment()[_0xff44('0x32')](_0xff44('0x33'));this[_0xff44('0x8')][_0x59a1bf['uniqueid']][_0xff44('0x34')]=_0xff44('0x35');logger[_0xff44('0x23')](_0xff44('0x36'),_0x59a1bf['uniqueid'],_0x59a1bf[_0xff44('0x1e')][_0xff44('0x20')](_0x59a1bf[_0xff44('0x1e')][_0xff44('0x1f')]('/')+0x1,_0x59a1bf[_0xff44('0x1e')][_0xff44('0x1f')]('-')));logger[_0xff44('0x18')](_0xff44('0x37'),_0x59a1bf[_0xff44('0x1a')],util[_0xff44('0x1b')](this['channels'][_0x59a1bf['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xff44('0x17')](_0xff44('0x38'),this[_0xff44('0x8')][_0x59a1bf[_0xff44('0x1a')]]);}logger[_0xff44('0x18')](_0xff44('0x39'),_0x59a1bf[_0xff44('0x1a')],util[_0xff44('0x1b')](this['channels'][_0x59a1bf[_0xff44('0x1a')]],{'showHidden':![],'depth':null}));this[_0xff44('0x17')]('voice:outbound',_0xff44('0x28'),this['channels'][_0x59a1bf[_0xff44('0x1a')]]);}}}catch(_0x297db2){logger['error'](_0xff44('0x3a'),_0x59a1bf[_0xff44('0x1a')],util[_0xff44('0x1b')](_0x297db2,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xff44('0x14')][_0xff44('0x3b')]=function(_0x1429ee){try{if(this[_0xff44('0x15')](_0x1429ee)){logger[_0xff44('0x18')](_0xff44('0x3c'),_0x1429ee[_0xff44('0x1a')],util[_0xff44('0x1b')](_0x1429ee,{'showHidden':![],'depth':null}));this[_0xff44('0x3d')](_0x1429ee['uniqueid'],_[_0xff44('0x3e')](_0x1429ee[_0xff44('0x3f')])[0x0],_0x1429ee[_0xff44('0x40')]);if(this[_0xff44('0x15')](_0x1429ee['variable'])&&this['isNotNull'](_0x1429ee[_0xff44('0x3f')][_0xff44('0x41')])){if(_['isUndefined'](this['channels'][_0x1429ee[_0xff44('0x1a')]])){this[_0xff44('0x8')][_0x1429ee['uniqueid']]={'routeId':_0x1429ee[_0xff44('0x40')],'variables':this[_0xff44('0xb')][_0x1429ee[_0xff44('0x1a')]]};logger['info'](_0xff44('0x42'),_0x1429ee[_0xff44('0x1a')],_0x1429ee[_0xff44('0x3f')][_0xff44('0x41')],_['keys'](_0x1429ee[_0xff44('0x3f')])[0x0],_0x1429ee[_0xff44('0x40')]);logger[_0xff44('0x18')](_0xff44('0x43'),_0x1429ee[_0xff44('0x1a')],util[_0xff44('0x1b')](this[_0xff44('0x8')][_0x1429ee[_0xff44('0x1a')]],{'showHidden':![],'depth':null}));this[_0xff44('0x17')](_0xff44('0x27'),_0xff44('0x28'),this[_0xff44('0x8')][_0x1429ee[_0xff44('0x1a')]]);}}}}catch(_0x2615f4){logger[_0xff44('0x2b')](_0xff44('0x44'),_0x1429ee[_0xff44('0x1a')],util[_0xff44('0x1b')](_0x2615f4,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xff44('0x14')][_0xff44('0x3d')]=function(_0x18c8ff,_0x266ef8,_0x10c9bd){var _0x1303f4=[_0xff44('0x45'),_0xff44('0x46'),_0xff44('0x47'),_0xff44('0x48'),_0xff44('0x49'),_0xff44('0x4a'),_0xff44('0x4b'),_0xff44('0x4c'),'sipcallid',_0xff44('0x4d'),_0xff44('0x4e'),'bridgepvtcallid',_0xff44('0x4f'),_0xff44('0x50'),'memberinterface',_0xff44('0x51'),_0xff44('0x25'),_0xff44('0x52'),_0xff44('0x53')];if(!_[_0xff44('0x54')](_0x266ef8)&&!_['includes'](_0x1303f4,_0x266ef8)){if(_['isUndefined'](this[_0xff44('0xb')][_0x18c8ff])){this[_0xff44('0xb')][_0x18c8ff]={};}this[_0xff44('0xb')][_0x18c8ff][_0x266ef8]=_0x10c9bd;}};VoiceDialReport[_0xff44('0x14')]['syncHangup']=function(_0x4f1465){try{if(this[_0xff44('0x15')](_0x4f1465)){logger['debug']('[%s][voiceDialReport][hangup]\x20event:',_0x4f1465['uniqueid'],util[_0xff44('0x1b')](_0x4f1465,{'showHidden':![],'depth':null}));if(this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]]){logger[_0xff44('0x23')](_0xff44('0x55'),_0x4f1465[_0xff44('0x1a')],_0x4f1465['cause-txt']);this[_0xff44('0x8')][_0x4f1465['uniqueid']][_0xff44('0x56')]=moment()[_0xff44('0x32')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]]['duration']=moment(this['channels'][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x56')])[_0xff44('0x57')](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x58')],_0xff44('0x59'));this[_0xff44('0x8')][_0x4f1465['uniqueid']]['lastevent']=_0xff44('0x5a');this[_0xff44('0xa')][_0xff44('0x5b')]+=0x1;if(this[_0xff44('0x8')][_0x4f1465['uniqueid']][_0xff44('0x31')]){this['outbound'][_0xff44('0x5c')]+=0x1;this[_0xff44('0x8')][_0x4f1465['uniqueid']][_0xff44('0x5d')]=moment(this[_0xff44('0x8')][_0x4f1465['uniqueid']][_0xff44('0x31')])['diff'](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x58')],_0xff44('0x59'));this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x5e')]=moment(this[_0xff44('0x8')][_0x4f1465['uniqueid']][_0xff44('0x56')])[_0xff44('0x57')](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x31')],'seconds');this[_0xff44('0xa')]['sumHoldTime']+=this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x5d')]||0x0;this[_0xff44('0xa')][_0xff44('0x5f')]+=this['channels'][_0x4f1465[_0xff44('0x1a')]]['billableseconds'];}this[_0xff44('0xa')][_0xff44('0x60')]+=this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]][_0xff44('0x61')];logger[_0xff44('0x18')]('[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:',_0x4f1465[_0xff44('0x1a')],util[_0xff44('0x1b')](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]],{'showHidden':![],'depth':null}));ami[_0xff44('0x17')](_0xff44('0x62'),this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]]);logger[_0xff44('0x18')](_0xff44('0x63'),_0x4f1465['uniqueid'],util[_0xff44('0x1b')](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]],{'showHidden':![],'depth':null}));ami[_0xff44('0x17')]('custom:dialend',this[_0xff44('0x8')][_0x4f1465['uniqueid']]);logger[_0xff44('0x18')](_0xff44('0x64'),_0x4f1465[_0xff44('0x1a')],util['inspect'](this['channels'][_0x4f1465['uniqueid']],{'showHidden':![],'depth':null}));this[_0xff44('0x17')]('voice:outbound',_0xff44('0x65'),this['outbound']);logger[_0xff44('0x23')](_0xff44('0x66'),JSON[_0xff44('0x67')](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]]));logger[_0xff44('0x18')](_0xff44('0x68'),_0x4f1465[_0xff44('0x1a')],util[_0xff44('0x1b')](this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]],{'showHidden':![],'depth':null}));this[_0xff44('0x17')]('voice:outbound','voice_outbound_channel:remove',this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]]);delete this[_0xff44('0x8')][_0x4f1465[_0xff44('0x1a')]];}else if(this[_0xff44('0x8')][_0x4f1465[_0xff44('0x69')]]){this[_0xff44('0x8')][_0x4f1465[_0xff44('0x69')]][_0xff44('0x1a')]=this[_0xff44('0x8')][_0x4f1465[_0xff44('0x69')]][_0xff44('0x6a')];}if(this[_0xff44('0xb')][_0x4f1465[_0xff44('0x1a')]]){delete this[_0xff44('0xb')][_0x4f1465[_0xff44('0x1a')]];}}}catch(_0x259330){logger[_0xff44('0x2b')](_0xff44('0x6b'),_0x4f1465['uniqueid'],util[_0xff44('0x1b')](_0x259330,{'showHidden':![],'depth':null}));}};module[_0xff44('0x6c')]=VoiceDialReport; \ No newline at end of file +var _0x4b33=['value','outboundrouteid','isUndefined','[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s','[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:','[%s][voiceDialReport][varset]','rtpaudioqos','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','membername','memberpenalty','memberrealtime','[%s][voiceDialReport][hangup]\x20event:','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','cause-txt','endtime','duration','seconds','diff','starttime','billableseconds','sumHoldTime','holdtime','sumBillable','sumDuration','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','custom:voiceDialReport','[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:','custom:dialend','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:','voice_outbound_channel:remove','linkedid','destuniqueid','moment','util','ioredis','../../../config/environment','../../../config/logger','../ami','redis','defaults','outbound','variables','dialbegin','syncDialBegin','bind','syncDialEnd','varset','syncVarSet','hangup','syncHangup','prototype','emit','isNotNull','[%s][voiceDialReport][dialbegin]\x20event:','uniqueid','merge','channels','format','YYYY-MM-DD\x20HH:mm:ss','called','channel','lastIndexOf','omit','privilege','info','debug','[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:','inspect','voice:outbound','voice_outbound_channel:save','[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:','[%s][voiceDialReport][dialbegin]','[%s][voiceDialReport][dialend]\x20event:','dialstatus','ANSWER','connectedlinename','answertime','lastevent','connect','substring','custom:dialconnect','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','error','[%s][voiceDialReport][dialend]','[%s][voiceDialReport][varset]\x20event:','addVariable','keys','variable'];(function(_0x568cfe,_0x39022c){var _0x598d17=function(_0x225ff7){while(--_0x225ff7){_0x568cfe['push'](_0x568cfe['shift']());}};_0x598d17(++_0x39022c);}(_0x4b33,0x1c6));var _0x34b3=function(_0x259a49,_0x192f2a){_0x259a49=_0x259a49-0x0;var _0x4e7cf9=_0x4b33[_0x259a49];return _0x4e7cf9;};'use strict';var _=require('lodash');var moment=require(_0x34b3('0x0'));var util=require(_0x34b3('0x1'));var Redis=require(_0x34b3('0x2'));var config=require(_0x34b3('0x3'));var logger=require(_0x34b3('0x4'))('ami');var ami=require(_0x34b3('0x5'));config[_0x34b3('0x6')]=_[_0x34b3('0x7')](config['redis'],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x34b3('0x6')]));function VoiceDialReport(_0x460661){this['channels']=_0x460661['outboundChannels'];this[_0x34b3('0x8')]=_0x460661[_0x34b3('0x8')];this[_0x34b3('0x9')]={};ami['on'](_0x34b3('0xa'),this[_0x34b3('0xb')][_0x34b3('0xc')](this));ami['on']('dialend',this[_0x34b3('0xd')][_0x34b3('0xc')](this));ami['on'](_0x34b3('0xe'),this[_0x34b3('0xf')][_0x34b3('0xc')](this));ami['on'](_0x34b3('0x10'),this[_0x34b3('0x11')][_0x34b3('0xc')](this));}VoiceDialReport[_0x34b3('0x12')]['isNotNull']=function(_0x2dede8){return _0x2dede8!==null&&!_['isUndefined'](_0x2dede8);};VoiceDialReport[_0x34b3('0x12')][_0x34b3('0x13')]=function(_0x2a549e,_0x353d39,_0x4f6c29){io['to'](_0x2a549e)[_0x34b3('0x13')](_0x353d39,_0x4f6c29);};VoiceDialReport[_0x34b3('0x12')][_0x34b3('0xb')]=function(_0x4dd01c){try{if(this[_0x34b3('0x14')](_0x4dd01c)){logger['debug'](_0x34b3('0x15'),_0x4dd01c[_0x34b3('0x16')],util['inspect'](_0x4dd01c,{'showHidden':![],'depth':null}));if(this['channels'][_0x4dd01c['uniqueid']]){_[_0x34b3('0x17')](this[_0x34b3('0x18')][_0x4dd01c[_0x34b3('0x16')]],{'starttime':moment()[_0x34b3('0x19')](_0x34b3('0x1a')),'lastevent':_0x34b3('0x1b'),'interface':_0x4dd01c[_0x34b3('0x1c')]['substring'](0x0,_0x4dd01c[_0x34b3('0x1c')][_0x34b3('0x1d')]('-')),'membername':_0x4dd01c[_0x34b3('0x1c')]['substring'](_0x4dd01c['channel'][_0x34b3('0x1d')]('/')+0x1,_0x4dd01c[_0x34b3('0x1c')]['lastIndexOf']('-'))},_[_0x34b3('0x1e')](_0x4dd01c,['event',_0x34b3('0x1f')]));logger[_0x34b3('0x20')]('[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called',_0x4dd01c[_0x34b3('0x16')],this[_0x34b3('0x18')][_0x4dd01c[_0x34b3('0x16')]]['membername'],this[_0x34b3('0x18')][_0x4dd01c[_0x34b3('0x16')]]['interface']);logger[_0x34b3('0x21')](_0x34b3('0x22'),_0x4dd01c[_0x34b3('0x16')],util[_0x34b3('0x23')](this[_0x34b3('0x18')][_0x4dd01c['uniqueid']],{'showHidden':![],'depth':null}));this['emit'](_0x34b3('0x24'),_0x34b3('0x25'),this[_0x34b3('0x18')][_0x4dd01c[_0x34b3('0x16')]]);logger['debug'](_0x34b3('0x26'),_0x4dd01c[_0x34b3('0x16')],util['inspect'](this['channels'][_0x4dd01c[_0x34b3('0x16')]],{'showHidden':![],'depth':null}));ami[_0x34b3('0x13')]('custom:dialbegin',this[_0x34b3('0x18')][_0x4dd01c[_0x34b3('0x16')]]);}}}catch(_0x2ee736){logger['error'](_0x34b3('0x27'),_0x4dd01c[_0x34b3('0x16')],util[_0x34b3('0x23')](_0x2ee736,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x34b3('0x12')][_0x34b3('0xd')]=function(_0x20ea7f){try{if(this[_0x34b3('0x14')](_0x20ea7f)){logger['debug'](_0x34b3('0x28'),_0x20ea7f['uniqueid'],util[_0x34b3('0x23')](_0x20ea7f,{'showHidden':![],'depth':null}));if(this[_0x34b3('0x18')][_0x20ea7f[_0x34b3('0x16')]]){this['channels'][_0x20ea7f['uniqueid']][_0x34b3('0x29')]=_0x20ea7f[_0x34b3('0x29')];if(_0x20ea7f[_0x34b3('0x29')]===_0x34b3('0x2a')){this['channels'][_0x20ea7f[_0x34b3('0x16')]]['connectedlinenum']=_0x20ea7f['connectedlinenum'];this[_0x34b3('0x18')][_0x20ea7f[_0x34b3('0x16')]][_0x34b3('0x2b')]=_0x20ea7f[_0x34b3('0x2b')];this[_0x34b3('0x18')][_0x20ea7f['uniqueid']][_0x34b3('0x2c')]=moment()[_0x34b3('0x19')](_0x34b3('0x1a'));this[_0x34b3('0x18')][_0x20ea7f[_0x34b3('0x16')]][_0x34b3('0x2d')]=_0x34b3('0x2e');logger[_0x34b3('0x20')]('[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect',_0x20ea7f[_0x34b3('0x16')],_0x20ea7f[_0x34b3('0x1c')][_0x34b3('0x2f')](_0x20ea7f[_0x34b3('0x1c')]['lastIndexOf']('/')+0x1,_0x20ea7f[_0x34b3('0x1c')]['lastIndexOf']('-')));logger[_0x34b3('0x21')]('[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:',_0x20ea7f[_0x34b3('0x16')],util['inspect'](this['channels'][_0x20ea7f[_0x34b3('0x16')]],{'showHidden':![],'depth':null}));ami[_0x34b3('0x13')](_0x34b3('0x30'),this['channels'][_0x20ea7f[_0x34b3('0x16')]]);}logger[_0x34b3('0x21')](_0x34b3('0x31'),_0x20ea7f[_0x34b3('0x16')],util[_0x34b3('0x23')](this[_0x34b3('0x18')][_0x20ea7f[_0x34b3('0x16')]],{'showHidden':![],'depth':null}));this['emit']('voice:outbound','voice_outbound_channel:save',this[_0x34b3('0x18')][_0x20ea7f[_0x34b3('0x16')]]);}}}catch(_0x4d2367){logger[_0x34b3('0x32')](_0x34b3('0x33'),_0x20ea7f['uniqueid'],util[_0x34b3('0x23')](_0x4d2367,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x34b3('0x12')][_0x34b3('0xf')]=function(_0x10ee1c){try{if(this[_0x34b3('0x14')](_0x10ee1c)){logger['debug'](_0x34b3('0x34'),_0x10ee1c['uniqueid'],util[_0x34b3('0x23')](_0x10ee1c,{'showHidden':![],'depth':null}));this[_0x34b3('0x35')](_0x10ee1c[_0x34b3('0x16')],_[_0x34b3('0x36')](_0x10ee1c[_0x34b3('0x37')])[0x0],_0x10ee1c[_0x34b3('0x38')]);if(this[_0x34b3('0x14')](_0x10ee1c[_0x34b3('0x37')])&&this[_0x34b3('0x14')](_0x10ee1c[_0x34b3('0x37')][_0x34b3('0x39')])){if(_[_0x34b3('0x3a')](this['channels'][_0x10ee1c['uniqueid']])){this[_0x34b3('0x18')][_0x10ee1c[_0x34b3('0x16')]]={'routeId':_0x10ee1c['value'],'variables':this[_0x34b3('0x9')][_0x10ee1c['uniqueid']]};logger[_0x34b3('0x20')](_0x34b3('0x3b'),_0x10ee1c[_0x34b3('0x16')],_0x10ee1c[_0x34b3('0x37')][_0x34b3('0x39')],_['keys'](_0x10ee1c[_0x34b3('0x37')])[0x0],_0x10ee1c[_0x34b3('0x38')]);logger[_0x34b3('0x21')](_0x34b3('0x3c'),_0x10ee1c['uniqueid'],util['inspect'](this[_0x34b3('0x18')][_0x10ee1c['uniqueid']],{'showHidden':![],'depth':null}));this['emit']('voice:outbound',_0x34b3('0x25'),this['channels'][_0x10ee1c[_0x34b3('0x16')]]);}}}}catch(_0x1be419){logger[_0x34b3('0x32')](_0x34b3('0x3d'),_0x10ee1c[_0x34b3('0x16')],util[_0x34b3('0x23')](_0x1be419,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x34b3('0x12')]['addVariable']=function(_0x475bf4,_0x3c6b77,_0x335e40){var _0x1158e4=[_0x34b3('0x3e'),'rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged',_0x34b3('0x3f'),_0x34b3('0x40'),_0x34b3('0x41'),_0x34b3('0x42'),_0x34b3('0x43'),_0x34b3('0x44'),_0x34b3('0x45'),_0x34b3('0x46'),_0x34b3('0x47'),_0x34b3('0x48'),_0x34b3('0x49'),_0x34b3('0x4a'),_0x34b3('0x4b'),_0x34b3('0x4c'),_0x34b3('0x4d')];if(!_['isNil'](_0x3c6b77)&&!_['includes'](_0x1158e4,_0x3c6b77)){if(_[_0x34b3('0x3a')](this[_0x34b3('0x9')][_0x475bf4])){this[_0x34b3('0x9')][_0x475bf4]={};}this[_0x34b3('0x9')][_0x475bf4][_0x3c6b77]=_0x335e40;}};VoiceDialReport[_0x34b3('0x12')]['syncHangup']=function(_0x304d3c){try{if(this[_0x34b3('0x14')](_0x304d3c)){logger[_0x34b3('0x21')](_0x34b3('0x4e'),_0x304d3c[_0x34b3('0x16')],util[_0x34b3('0x23')](_0x304d3c,{'showHidden':![],'depth':null}));if(this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]]){logger['info'](_0x34b3('0x4f'),_0x304d3c['uniqueid'],_0x304d3c[_0x34b3('0x50')]);this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x51')]=moment()[_0x34b3('0x19')](_0x34b3('0x1a'));this['channels'][_0x304d3c['uniqueid']][_0x34b3('0x52')]=moment(this['channels'][_0x304d3c['uniqueid']]['endtime'])['diff'](this[_0x34b3('0x18')][_0x304d3c['uniqueid']]['starttime'],_0x34b3('0x53'));this[_0x34b3('0x18')][_0x304d3c['uniqueid']][_0x34b3('0x2d')]='complete';this[_0x34b3('0x8')]['total']+=0x1;if(this['channels'][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x2c')]){this[_0x34b3('0x8')]['answered']+=0x1;this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]]['holdtime']=moment(this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x2c')])[_0x34b3('0x54')](this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x55')],_0x34b3('0x53'));this['channels'][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x56')]=moment(this['channels'][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x51')])[_0x34b3('0x54')](this[_0x34b3('0x18')][_0x304d3c['uniqueid']]['answertime'],'seconds');this['outbound'][_0x34b3('0x57')]+=this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x58')]||0x0;this[_0x34b3('0x8')][_0x34b3('0x59')]+=this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]][_0x34b3('0x56')];}this[_0x34b3('0x8')][_0x34b3('0x5a')]+=this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]]['duration'];logger[_0x34b3('0x21')](_0x34b3('0x5b'),_0x304d3c['uniqueid'],util[_0x34b3('0x23')](this[_0x34b3('0x18')][_0x304d3c['uniqueid']],{'showHidden':![],'depth':null}));ami[_0x34b3('0x13')](_0x34b3('0x5c'),this['channels'][_0x304d3c[_0x34b3('0x16')]]);logger[_0x34b3('0x21')](_0x34b3('0x5d'),_0x304d3c[_0x34b3('0x16')],util[_0x34b3('0x23')](this['channels'][_0x304d3c[_0x34b3('0x16')]],{'showHidden':![],'depth':null}));ami[_0x34b3('0x13')](_0x34b3('0x5e'),this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]]);logger[_0x34b3('0x21')](_0x34b3('0x5f'),_0x304d3c['uniqueid'],util[_0x34b3('0x23')](this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]],{'showHidden':![],'depth':null}));this[_0x34b3('0x13')](_0x34b3('0x24'),'voice_outbound:save',this[_0x34b3('0x8')]);logger[_0x34b3('0x20')](_0x34b3('0x60'),JSON[_0x34b3('0x61')](this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x16')]]));logger[_0x34b3('0x21')](_0x34b3('0x62'),_0x304d3c[_0x34b3('0x16')],util[_0x34b3('0x23')](this['channels'][_0x304d3c[_0x34b3('0x16')]],{'showHidden':![],'depth':null}));this['emit'](_0x34b3('0x24'),_0x34b3('0x63'),this['channels'][_0x304d3c[_0x34b3('0x16')]]);delete this['channels'][_0x304d3c['uniqueid']];}else if(this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x64')]]){this[_0x34b3('0x18')][_0x304d3c['linkedid']][_0x34b3('0x16')]=this[_0x34b3('0x18')][_0x304d3c[_0x34b3('0x64')]][_0x34b3('0x65')];}if(this[_0x34b3('0x9')][_0x304d3c[_0x34b3('0x16')]]){delete this[_0x34b3('0x9')][_0x304d3c[_0x34b3('0x16')]];}}}catch(_0x5ab16d){logger['error']('[%s][voiceDialReport][hangup]',_0x304d3c['uniqueid'],util[_0x34b3('0x23')](_0x5ab16d,{'showHidden':![],'depth':null}));}};module['exports']=VoiceDialReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceQueueReport.js b/server/services/ami/report/voiceQueueReport.js index 4dde33d..93e77f6 100644 --- a/server/services/ami/report/voiceQueueReport.js +++ b/server/services/ami/report/voiceQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf643=['[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','local/','linkedid','add','seconds','FORWARDTRANSFER','transfertype','destexten','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][agentcomplete]','[%s][voiceQueueReport][varset]','variable','value','queuestatus','TIMEOUT','lastevent','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','varset','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','sipcallid','sipuri','bridgepvtcallid','membercalls','memberdynamic','memberlastcall','memberpenalty','includes','[%s][voiceQueueReport][hangup]','diff','length','milliseconds','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','cause-txt','hangup','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','transferuniqueid','secondtransfereruniqueid','ATTENDEDTRANSFER','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transferexten','transfertargetuniqueid','origtransfereruniqueid','ATTENDED','syncBlindTransfer','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','extension','context','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','exports','lodash','moment','util','md5','../../../config/environment','../../../config/logger','../ami','../model/queueReport','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','sequence','queueReports','agents','channels','queueChannels','voiceQueues','flagQueueSummary','campaigns','variables','queuesummary','syncQueueSummary','bind','queuesummarycomplete','queuecallerjoin','syncQueueCallerJoin','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','syncVarSet','syncHangup','fullybooted','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','talking','pTalking','waiting','queueStatusComplete','unlockRR','switch','isNil','Action','status','channel','No\x20such\x20channel','[%s][voiceQueueReport][checkChannel]','inspect','[%s][voiceQueueReport][checkQueueReport]','[%s][voiceQueueReport][checkVariables]','syncFullyBooted','error','clearQueueReport','emitVoiceQueueChannelRemove','emit','emitVoiceQueueChannelSave','[%s][voiceQueueReport][','uniqueid','voice:queue:%s','name','voice_queue_channel:save','debug','voice_queue_channel:remove','emitVoiceQueueSummary','type','inbound','strategy','answered','available','loggedIn','sumBillable','sumDuration','sumHoldTime','unmanaged','abandoned','Trunk','active','callerid','Interval','stringify',']\x20sending\x20voice_queue:save\x20event:','format','isUndefined','clearZombieChannels','queues','then','catch','[voiceQueueReport][queuesummary]','isNotNull','queue','[voiceQueueReport][queuesummary]\x20event:','info','[voiceQueueReport][queuesummary]\x20name:%s','callers','toNumber','loggedin','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','syncQueueSummaryComplete','[voiceQueueReport][queuesummarycomplete]\x20event:','[%s][voiceQueueReport][queuecallerjoin]','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','pick','keys','push','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','queuecallerabandon','queuecallerabandonAt','queuecallerexitreason','ABANDONED','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','queuecallerleaveAt','connectedlinenum','connectedlinename','[%s][voiceQueueReport][queuecallerleave]','[%s][voiceQueueReport][agentconnect]','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','assigned','membername','queuecallerexit','queuecallerexitAt','reason','transfer'];(function(_0x21c778,_0x4b0f7d){var _0x1e7ab5=function(_0x583037){while(--_0x583037){_0x21c778['push'](_0x21c778['shift']());}};_0x1e7ab5(++_0x4b0f7d);}(_0xf643,0x122));var _0x3f64=function(_0x4fde9a,_0x5d1eda){_0x4fde9a=_0x4fde9a-0x0;var _0x58f321=_0xf643[_0x4fde9a];return _0x58f321;};'use strict';var _=require(_0x3f64('0x0'));var moment=require(_0x3f64('0x1'));var util=require(_0x3f64('0x2'));var md5=require(_0x3f64('0x3'));var Redis=require('ioredis');var config=require(_0x3f64('0x4'));var logger=require(_0x3f64('0x5'))('ami');var ami=require(_0x3f64('0x6'));var QueueReport=require(_0x3f64('0x7'));config[_0x3f64('0x8')]=_[_0x3f64('0x9')](config[_0x3f64('0x8')],{'host':_0x3f64('0xa'),'port':0x18eb});var io=require(_0x3f64('0xb'))(new Redis(config[_0x3f64('0x8')]));var Sequence=function(){};Sequence[_0x3f64('0xc')][_0x3f64('0xd')]=function(_0x219dcb){this[_0x3f64('0xe')]=this[_0x3f64('0xe')]?this[_0x3f64('0xe')][_0x3f64('0xf')](_0x219dcb):_0x219dcb();};function VoiceQueueReport(_0x4ff35e){this[_0x3f64('0x10')]=new Sequence();this[_0x3f64('0x11')]={};this[_0x3f64('0x12')]=_0x4ff35e['agents'];this[_0x3f64('0x13')]=_0x4ff35e[_0x3f64('0x14')];this[_0x3f64('0x15')]=_0x4ff35e[_0x3f64('0x15')];this[_0x3f64('0x16')]=!![];this[_0x3f64('0x17')]=_0x4ff35e[_0x3f64('0x17')];this[_0x3f64('0x18')]={};ami['on'](_0x3f64('0x19'),this[_0x3f64('0x1a')][_0x3f64('0x1b')](this));ami['on'](_0x3f64('0x1c'),this['syncQueueSummaryComplete'][_0x3f64('0x1b')](this));ami['on'](_0x3f64('0x1d'),this[_0x3f64('0x1e')][_0x3f64('0x1b')](this));ami['on']('queuecallerabandon',this[_0x3f64('0x1f')][_0x3f64('0x1b')](this));ami['on'](_0x3f64('0x20'),this[_0x3f64('0x21')][_0x3f64('0x1b')](this));ami['on'](_0x3f64('0x22'),this[_0x3f64('0x23')]['bind'](this));ami['on'](_0x3f64('0x24'),this[_0x3f64('0x25')][_0x3f64('0x1b')](this));ami['on']('varset',this[_0x3f64('0x26')]['bind'](this));ami['on']('hangup',this[_0x3f64('0x27')][_0x3f64('0x1b')](this));ami['on'](_0x3f64('0x28'),this['syncFullyBooted'][_0x3f64('0x1b')](this));ami['on'](_0x3f64('0x29'),this[_0x3f64('0x2a')]['bind'](this));ami['on'](_0x3f64('0x2b'),this[_0x3f64('0x2c')]['bind'](this));ami['on'](_0x3f64('0x2d'),this[_0x3f64('0x2e')]['bind'](this));ami['on']('blindtransfer',this['syncBlindTransfer'][_0x3f64('0x1b')](this));this[_0x3f64('0x2f')]();this[_0x3f64('0x30')]();}function clearChannels(_0x1b49fe){if(!_[_0x3f64('0x31')](_0x1b49fe)){for(var _0x48be0c in _0x1b49fe){if(_0x1b49fe[_0x3f64('0x32')](_0x48be0c)){delete _0x1b49fe[_0x48be0c];}}}}function clearCampaigns(_0x4702a3){if(!_[_0x3f64('0x31')](_0x4702a3)){for(var _0x142fe5 in _0x4702a3){if(_0x4702a3[_0x3f64('0x32')](_0x142fe5)){_0x4702a3[_0x142fe5][_0x3f64('0x33')]=0x0;}}}}function clearVoiceQueues(_0x1f0f91){if(!_[_0x3f64('0x31')](_0x1f0f91)){for(var _0x49f1ab in _0x1f0f91){if(_0x1f0f91[_0x3f64('0x32')](_0x49f1ab)){_0x1f0f91[_0x49f1ab]['originated']=0x0;_0x1f0f91[_0x49f1ab][_0x3f64('0x34')]=0x0;_0x1f0f91[_0x49f1ab][_0x3f64('0x35')]=0x0;_0x1f0f91[_0x49f1ab][_0x3f64('0x36')]=0x0;_0x1f0f91[_0x49f1ab][_0x3f64('0x37')]=!![];}}}}function clearAgentBooked(_0x191a2d){if(!_[_0x3f64('0x31')](_0x191a2d)){for(var _0x286b2a in _0x191a2d){if(_0x191a2d[_0x3f64('0x32')](_0x286b2a)){_0x191a2d[_0x286b2a][_0x3f64('0x38')]=!![];}}}}VoiceQueueReport[_0x3f64('0xc')]['clearZombieChannels']=function(){var _0x584a48=this;for(var _0x25ec96 in this['channels']){if(this[_0x3f64('0x13')][_0x3f64('0x32')](_0x25ec96)&&!this[_0x3f64('0x13')][_0x25ec96][_0x3f64('0x39')]){this['sequence']['enqueue'](function(){if(!_[_0x3f64('0x3a')](_0x584a48[_0x3f64('0x13')][_0x25ec96])){return ami[_0x3f64('0x3b')]({'action':_0x3f64('0x3c'),'channel':_0x584a48['channels'][_0x25ec96][_0x3f64('0x3d')]})['catch'](function(_0x5d3edc){if(_0x5d3edc['message']===_0x3f64('0x3e')){setTimeout(function(){if(_0x584a48['channels'][_0x25ec96]){delete _0x584a48[_0x3f64('0x13')][_0x25ec96];logger['error'](_0x3f64('0x3f'),_0x25ec96,util[_0x3f64('0x40')](_0x5d3edc,{'showHidden':![],'depth':null}));}if(_0x584a48[_0x3f64('0x11')][_0x25ec96]){delete _0x584a48[_0x3f64('0x11')][_0x25ec96];logger['error'](_0x3f64('0x41'),_0x25ec96,util[_0x3f64('0x40')](_0x5d3edc,{'showHidden':![],'depth':null}));}if(_0x584a48[_0x3f64('0x18')][_0x25ec96]){delete _0x584a48['variables'][_0x25ec96];logger['error'](_0x3f64('0x42'),_0x25ec96,util['inspect'](_0x5d3edc,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x43')]=function(){logger[_0x3f64('0x44')]('[FullyBooted]\x20clear\x20realtime');clearChannels(this[_0x3f64('0x13')]);this[_0x3f64('0x45')](this[_0x3f64('0x11')]);clearAgentBooked(this[_0x3f64('0x12')]);clearVoiceQueues(this[_0x3f64('0x15')]);clearCampaigns(this[_0x3f64('0x17')]);};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x45')]=function(_0x2817d3){var _0x29d7d3=this;if(!_[_0x3f64('0x31')](_0x2817d3)){for(var _0x44d8ce in _0x2817d3){if(_0x2817d3[_0x3f64('0x32')](_0x44d8ce)){_0x29d7d3[_0x3f64('0x46')](_0x2817d3[_0x44d8ce],'clearqueuereport');delete _0x2817d3[_0x44d8ce];}}}};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x47')]=function(_0x2a96a1,_0x566e49,_0x5ad469){io['to'](_0x2a96a1)[_0x3f64('0x47')](_0x566e49,_0x5ad469);};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x48')]=function(_0x2f15a7,_0x16e3f8){logger['debug'](_0x3f64('0x49')+_0x16e3f8+']\x20sending\x20voice_queue_channel:save\x20event:',_0x2f15a7[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x2f15a7,{'showHidden':![],'depth':null}));this[_0x3f64('0x47')](util['format'](_0x3f64('0x4b'),_0x2f15a7[_0x3f64('0x4c')]),_0x3f64('0x4d'),_0x2f15a7);};VoiceQueueReport[_0x3f64('0xc')]['emitVoiceQueueChannelRemove']=function(_0x70ba90,_0x788baf){logger[_0x3f64('0x4e')](_0x3f64('0x49')+_0x788baf+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x70ba90['uniqueid'],util[_0x3f64('0x40')](_0x70ba90,{'showHidden':![],'depth':null}));this[_0x3f64('0x47')](util['format'](_0x3f64('0x4b'),_0x70ba90[_0x3f64('0x4c')]),_0x3f64('0x4f'),_0x70ba90);};VoiceQueueReport['prototype'][_0x3f64('0x50')]=function(_0x1949ef,_0x48989a){if(_0x1949ef[_0x3f64('0x51')]===_0x3f64('0x52')){var _0x12a382={'id':_0x1949ef['id'],'name':_0x1949ef[_0x3f64('0x4c')],'strategy':_0x1949ef[_0x3f64('0x53')],'answered':_0x1949ef[_0x3f64('0x54')],'available':_0x1949ef[_0x3f64('0x55')],'loggedIn':_0x1949ef[_0x3f64('0x56')],'pTalking':_0x1949ef[_0x3f64('0x35')],'sumBillable':_0x1949ef[_0x3f64('0x57')],'sumDuration':_0x1949ef[_0x3f64('0x58')],'sumHoldTime':_0x1949ef[_0x3f64('0x59')]||0x0,'talking':_0x1949ef[_0x3f64('0x34')],'total':_0x1949ef['total'],'type':_0x1949ef['type'],'unmanaged':_0x1949ef[_0x3f64('0x5a')],'abandoned':_0x1949ef[_0x3f64('0x5b')],'waiting':_0x1949ef[_0x3f64('0x36')]};if(_0x1949ef[_0x3f64('0x5c')]){_0x12a382['Trunk']={'id':_0x1949ef[_0x3f64('0x5c')]['id'],'name':_0x1949ef[_0x3f64('0x5c')][_0x3f64('0x4c')],'active':_0x1949ef[_0x3f64('0x5c')][_0x3f64('0x5d')],'callerid':_0x1949ef[_0x3f64('0x5c')][_0x3f64('0x5e')]};}if(_0x1949ef[_0x3f64('0x5f')]){_0x12a382[_0x3f64('0x5f')]={'id':_0x1949ef['Interval']['id'],'name':_0x1949ef[_0x3f64('0x5f')][_0x3f64('0x4c')]};}var _0xe171dc=md5(JSON[_0x3f64('0x60')](_0x12a382));if(_0x1949ef['md5']!==_0xe171dc){_0x1949ef[_0x3f64('0x3')]=_0xe171dc;logger[_0x3f64('0x4e')]('[voiceQueueReport]['+_0x48989a+_0x3f64('0x61'),util[_0x3f64('0x40')](_0x12a382,{'showHidden':![],'depth':null}));this[_0x3f64('0x47')](util[_0x3f64('0x62')](_0x3f64('0x4b'),_0x12a382['name']),'voice_queue:save',_0x12a382);}}};VoiceQueueReport[_0x3f64('0xc')]['isNotNull']=function(_0xa026a){return _0xa026a!==null&&!_[_0x3f64('0x63')](_0xa026a);};VoiceQueueReport[_0x3f64('0xc')]['loopQueueShow']=function(){var _0x1bbd08=this;setInterval(function(){_0x1bbd08[_0x3f64('0x64')]();ami[_0x3f64('0x3b')]({'action':_0x3f64('0x65')})['catch'](function(_0x196406){logger['error']('[voiceQueueReport][queues]',util[_0x3f64('0x40')](_0x196406,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x2f')]=function(){var _0x181a15=this;setInterval(function(){if(_0x181a15['flagQueueSummary']){return ami[_0x3f64('0x3b')]({'action':'queuesummary'})[_0x3f64('0x66')](function(_0x52132b){_0x181a15['flagQueueSummary']=![];})[_0x3f64('0x67')](function(_0x2a7dc6){logger[_0x3f64('0x44')](_0x3f64('0x68'),util[_0x3f64('0x40')](_0x2a7dc6,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x1a')]=function(_0x43411c){try{if(this['isNotNull'](_0x43411c)&&this[_0x3f64('0x69')](_0x43411c[_0x3f64('0x6a')])){logger[_0x3f64('0x4e')](_0x3f64('0x6b'),util[_0x3f64('0x40')](_0x43411c,{'showHidden':![],'depth':null}));if(this['voiceQueues'][_0x43411c['queue']]){logger[_0x3f64('0x6c')](_0x3f64('0x6d'),_0x43411c[_0x3f64('0x6a')]);var _0x2ad021=_['countBy'](this[_0x3f64('0x13')],_0x3f64('0x6a'))[_0x43411c[_0x3f64('0x6a')]]||0x0;var _0x37a49c=_0x2ad021-_0x43411c[_0x3f64('0x6e')];if(this['voiceQueues'][_0x43411c[_0x3f64('0x6a')]]['waiting']!==_[_0x3f64('0x6f')](_0x43411c[_0x3f64('0x6e')])||this[_0x3f64('0x15')][_0x43411c['queue']][_0x3f64('0x56')]!==_[_0x3f64('0x6f')](_0x43411c[_0x3f64('0x70')])||this['voiceQueues'][_0x43411c[_0x3f64('0x6a')]][_0x3f64('0x55')]!==_[_0x3f64('0x6f')](_0x43411c['available'])||this[_0x3f64('0x15')][_0x43411c[_0x3f64('0x6a')]]['talking']!==_0x37a49c){this[_0x3f64('0x15')][_0x43411c[_0x3f64('0x6a')]][_0x3f64('0x36')]=_['toNumber'](_0x43411c[_0x3f64('0x6e')]);this['voiceQueues'][_0x43411c['queue']][_0x3f64('0x56')]=_[_0x3f64('0x6f')](_0x43411c[_0x3f64('0x70')]);this[_0x3f64('0x15')][_0x43411c[_0x3f64('0x6a')]][_0x3f64('0x55')]=_[_0x3f64('0x6f')](_0x43411c[_0x3f64('0x55')]);this[_0x3f64('0x15')][_0x43411c['queue']]['talking']=_0x37a49c>0x0?_0x37a49c:0x0;this[_0x3f64('0x15')][_0x43411c[_0x3f64('0x6a')]]['talking']=this[_0x3f64('0x15')][_0x43411c['queue']][_0x3f64('0x34')]>_[_0x3f64('0x6f')](_0x43411c[_0x3f64('0x70')])?_[_0x3f64('0x6f')](_0x43411c[_0x3f64('0x70')]):this[_0x3f64('0x15')][_0x43411c[_0x3f64('0x6a')]]['talking'];this[_0x3f64('0x50')](this[_0x3f64('0x15')][_0x43411c[_0x3f64('0x6a')]],_0x3f64('0x19'));}logger[_0x3f64('0x4e')](_0x3f64('0x71'),util['inspect'](this['voiceQueues'][_0x43411c[_0x3f64('0x6a')]],{'showHidden':![],'depth':null}));ami[_0x3f64('0x47')](_0x3f64('0x72'),this['voiceQueues'][_0x43411c[_0x3f64('0x6a')]]);}}}catch(_0x11ea84){logger[_0x3f64('0x44')](_0x3f64('0x68'),util[_0x3f64('0x40')](_0x11ea84,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x3f64('0x73')]=function(_0x2a69cb){logger['debug'](_0x3f64('0x74'),util[_0x3f64('0x40')](_0x2a69cb,{'showHidden':![],'depth':null}));this[_0x3f64('0x16')]=!![];};VoiceQueueReport['prototype'][_0x3f64('0x1e')]=function(_0x5608a5){try{if(this[_0x3f64('0x69')](_0x5608a5)){logger[_0x3f64('0x4e')](_0x3f64('0x75'),_0x5608a5[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x5608a5,{'showHidden':![],'depth':null}));if(_[_0x3f64('0x63')](this[_0x3f64('0x11')][_0x5608a5['uniqueid']])){this['queueReports'][_0x5608a5['uniqueid']]=[];this[_0x3f64('0x13')][_0x5608a5[_0x3f64('0x4a')]]={};}var _0x292e83=new QueueReport();_0x292e83[_0x3f64('0x4c')]=_0x5608a5[_0x3f64('0x6a')];_0x292e83['type']=this[_0x3f64('0x15')][_0x292e83[_0x3f64('0x4c')]]&&this[_0x3f64('0x15')][_0x292e83[_0x3f64('0x4c')]]['type']?this[_0x3f64('0x15')][_0x292e83[_0x3f64('0x4c')]][_0x3f64('0x51')]||'inbound':_0x3f64('0x52');_0x292e83[_0x3f64('0x6a')]=_0x5608a5[_0x3f64('0x6a')];_0x292e83[_0x3f64('0x76')]=moment()[_0x3f64('0x62')](_0x3f64('0x77'));_0x292e83[_0x3f64('0x78')]=_0x5608a5[_0x3f64('0x78')];_0x292e83['count']=_0x5608a5['count'];_0x292e83[_0x3f64('0x4a')]=_0x5608a5[_0x3f64('0x4a')];logger['info'](_0x3f64('0x79'),_0x292e83[_0x3f64('0x4c')],_0x292e83[_0x3f64('0x51')]);_['merge'](_0x292e83,_[_0x3f64('0x7a')](_0x5608a5,_[_0x3f64('0x7b')](_0x292e83)));this[_0x3f64('0x11')][_0x5608a5[_0x3f64('0x4a')]][_0x3f64('0x7c')](_0x292e83);this[_0x3f64('0x13')][_0x5608a5[_0x3f64('0x4a')]]=_0x292e83;this[_0x3f64('0x48')](_0x292e83,_0x3f64('0x1d'));}}catch(_0x3015e5){logger['error']('[%s][voiceQueueReport][queuecallerjoin]',_0x5608a5['uniqueid'],util['inspect'](_0x3015e5,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x1f')]=function(_0x4821c7){try{if(this[_0x3f64('0x69')](_0x4821c7)){logger[_0x3f64('0x4e')](_0x3f64('0x7d'),_0x4821c7[_0x3f64('0x4a')],util['inspect'](_0x4821c7,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x4821c7[_0x3f64('0x4a')]]){var _0x5375ac=_[_0x3f64('0x7e')](this['queueReports'][_0x4821c7['uniqueid']]);_0x5375ac[_0x3f64('0x7f')]=![];_0x5375ac[_0x3f64('0x80')]=null;_0x5375ac[_0x3f64('0x81')]=_0x4821c7[_0x3f64('0x81')];_0x5375ac[_0x3f64('0x82')]=_0x4821c7['originalposition'];_0x5375ac[_0x3f64('0x83')]=!![];_0x5375ac[_0x3f64('0x84')]=moment()[_0x3f64('0x62')](_0x3f64('0x77'));_0x5375ac[_0x3f64('0x85')]=_0x3f64('0x86');_0x5375ac[_0x3f64('0x87')]=null;logger[_0x3f64('0x6c')](_0x3f64('0x88'),_0x5375ac[_0x3f64('0x4c')],_0x5375ac['type']);this['channels'][_0x4821c7[_0x3f64('0x4a')]]=_0x5375ac;this[_0x3f64('0x46')](_0x5375ac,'queuecallerabandon');}}}catch(_0x480a8a){logger[_0x3f64('0x44')](_0x3f64('0x7d'),_0x4821c7[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x480a8a,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3f64('0xc')]['syncQueueCallerLeave']=function(_0x38084c){try{if(this[_0x3f64('0x69')](_0x38084c)){logger[_0x3f64('0x4e')]('[%s][voiceQueueReport][queuecallerleave]',_0x38084c['uniqueid'],util['inspect'](_0x38084c,{'showHidden':![],'depth':null}));if(this[_0x3f64('0x11')][_0x38084c['uniqueid']]){var _0x5d941a=_['last'](this[_0x3f64('0x11')][_0x38084c[_0x3f64('0x4a')]]);_0x5d941a[_0x3f64('0x89')]=moment()[_0x3f64('0x62')]('YYYY-MM-DD\x20HH:mm:ss');_0x5d941a['connectedlinenum']=_0x38084c[_0x3f64('0x8a')];_0x5d941a['connectedlinename']=_0x38084c['connectedlinename'];logger[_0x3f64('0x6c')]('[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x5d941a[_0x3f64('0x4c')],_0x5d941a[_0x3f64('0x51')],_0x38084c[_0x3f64('0x8a')],_0x38084c[_0x3f64('0x8b')]);this[_0x3f64('0x13')][_0x38084c[_0x3f64('0x4a')]]=_0x5d941a;this[_0x3f64('0x48')](_0x5d941a,'queuecallerleave');}}}catch(_0x7a67b8){logger[_0x3f64('0x44')](_0x3f64('0x8c'),_0x38084c[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x7a67b8,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncAgentConnect']=function(_0x3d6758){try{if(this['isNotNull'](_0x3d6758)){logger['debug'](_0x3f64('0x8d'),_0x3d6758['uniqueid'],util[_0x3f64('0x40')](_0x3d6758,{'showHidden':![],'depth':null}));if(this[_0x3f64('0x11')][_0x3d6758[_0x3f64('0x4a')]]){var _0x27fb38=_['last'](this[_0x3f64('0x11')][_0x3d6758[_0x3f64('0x4a')]]);_0x27fb38[_0x3f64('0x7f')]=!![];_0x27fb38[_0x3f64('0x85')]=_0x3f64('0x8e');logger[_0x3f64('0x6c')](_0x3f64('0x8f'),_0x27fb38['name'],_0x27fb38[_0x3f64('0x51')]);}}}catch(_0x5af0d8){logger[_0x3f64('0x44')](_0x3f64('0x8d'),_0x3d6758['uniqueid'],util['inspect'](_0x5af0d8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x23')]=function(_0x16c333){try{if(this[_0x3f64('0x69')](_0x16c333)){logger[_0x3f64('0x4e')]('[%s][voiceQueueReport][agentcomplete]',_0x16c333[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x16c333,{'showHidden':![],'depth':null}));if(this[_0x3f64('0x11')][_0x16c333[_0x3f64('0x4a')]]){var _0x31f82e=_[_0x3f64('0x7e')](this['queueReports'][_0x16c333[_0x3f64('0x4a')]]);_0x31f82e[_0x3f64('0x83')]=![];_0x31f82e[_0x3f64('0x84')]=null;_0x31f82e[_0x3f64('0x90')]=!![];_0x31f82e['lastAssignedTo']=_0x16c333[_0x3f64('0x91')];_0x31f82e[_0x3f64('0x81')]=_0x16c333[_0x3f64('0x81')];_0x31f82e[_0x3f64('0x7f')]=!![];_0x31f82e[_0x3f64('0x92')]=![];_0x31f82e[_0x3f64('0x93')]=null;if(!_0x31f82e['transfer']){if(_0x16c333[_0x3f64('0x94')]==_0x3f64('0x95')){_0x31f82e[_0x3f64('0x85')]='COMPLETED';logger[_0x3f64('0x6c')](_0x3f64('0x96'),_0x31f82e['name'],_0x31f82e[_0x3f64('0x51')]);}else{if(_[_0x3f64('0x97')](_0x16c333[_0x3f64('0x3d')]['toLowerCase'](),_0x3f64('0x98'))){if(this[_0x3f64('0x11')][_0x16c333['linkedid']]){var _0x22f5a8=_[_0x3f64('0x7e')](this[_0x3f64('0x11')][_0x16c333[_0x3f64('0x99')]]);_0x22f5a8[_0x3f64('0x7f')]=![];_0x22f5a8[_0x3f64('0x92')]=!![];_0x22f5a8['queuecallerexitAt']=moment(_0x31f82e['queuecallerjoinAt'])[_0x3f64('0x9a')](_0x16c333[_0x3f64('0x81')],_0x3f64('0x9b'))['format'](_0x3f64('0x77'));_0x22f5a8['queuecallerexitreason']=_0x3f64('0x9c');_0x22f5a8['transfer']=!![];_0x22f5a8[_0x3f64('0x9d')]='FORWARD';_0x22f5a8['transferexten']=_0x16c333[_0x3f64('0x9e')];_0x22f5a8['transferuniqueid']=_0x16c333['uniqueid'];logger[_0x3f64('0x6c')](_0x3f64('0x9f'),_0x22f5a8[_0x3f64('0x4c')],_0x22f5a8[_0x3f64('0x51')]);var _0x475bd2=this[_0x3f64('0x11')][_0x16c333[_0x3f64('0x99')]];this[_0x3f64('0x11')][_0x16c333[_0x3f64('0x99')]]=this['queueReports'][_0x16c333[_0x3f64('0x4a')]];this['queueReports'][_0x16c333[_0x3f64('0x4a')]]=_0x475bd2;}}else{_0x31f82e[_0x3f64('0x85')]=_0x3f64('0xa0')+_0x16c333[_0x3f64('0x94')][_0x3f64('0xa1')]();logger[_0x3f64('0x6c')](_0x3f64('0xa2'),_0x31f82e[_0x3f64('0x4c')],_0x31f82e[_0x3f64('0x51')],_0x31f82e['queuecallerexitreason']);}}}this[_0x3f64('0x13')][_0x16c333[_0x3f64('0x4a')]]=_0x31f82e;this[_0x3f64('0x46')](_0x31f82e,_0x3f64('0x22'));}}}catch(_0x3e03b4){logger[_0x3f64('0x44')](_0x3f64('0xa3'),_0x16c333['uniqueid'],util[_0x3f64('0x40')](_0x3e03b4,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x3f64('0x26')]=function(_0x32816d){try{if(this[_0x3f64('0x69')](_0x32816d)){logger[_0x3f64('0x4e')](_0x3f64('0xa4'),_0x32816d[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x32816d,{'showHidden':![],'depth':null}));this['addVariable'](_0x32816d[_0x3f64('0x4a')],_[_0x3f64('0x7b')](_0x32816d[_0x3f64('0xa5')])[0x0],_0x32816d[_0x3f64('0xa6')]);if(this[_0x3f64('0x11')][_0x32816d[_0x3f64('0x4a')]]){var _0x1ad46c=_[_0x3f64('0x7e')](this[_0x3f64('0x11')][_0x32816d['uniqueid']]);if(_0x1ad46c){if(this[_0x3f64('0x69')](_0x32816d['variable'])&&this[_0x3f64('0x69')](_0x32816d[_0x3f64('0xa5')][_0x3f64('0xa7')])){switch(_0x32816d['value']){case'CONTINUE':_0x1ad46c[_0x3f64('0x92')]=![];_0x1ad46c['queuecallerexitAt']=null;break;case _0x3f64('0xa8'):_0x1ad46c[_0x3f64('0xa9')]=_0x3f64('0xaa');_0x1ad46c['queuecallerexit']=!![];_0x1ad46c[_0x3f64('0x93')]=moment()[_0x3f64('0x62')](_0x3f64('0x77'));_0x1ad46c[_0x3f64('0x89')]=moment()[_0x3f64('0x62')](_0x3f64('0x77'));logger[_0x3f64('0x4e')](_0x3f64('0xab'),_0x32816d[_0x3f64('0x4a')],util['inspect'](_0x1ad46c,{'showHidden':![],'depth':null}));ami[_0x3f64('0x47')]('custom:timeout',_0x1ad46c);break;default:_0x1ad46c[_0x3f64('0x92')]=!![];_0x1ad46c[_0x3f64('0x93')]=moment()['format'](_0x3f64('0x77'));_0x1ad46c[_0x3f64('0x89')]=moment()[_0x3f64('0x62')]('YYYY-MM-DD\x20HH:mm:ss');}_0x1ad46c[_0x3f64('0x83')]=![];_0x1ad46c[_0x3f64('0x84')]=null;_0x1ad46c[_0x3f64('0x85')]=_0x32816d[_0x3f64('0xa6')];this['channels'][_0x32816d['uniqueid']]=_0x1ad46c;this[_0x3f64('0x46')](_0x1ad46c,_0x3f64('0xac'));}else if(this[_0x3f64('0x69')](_0x32816d[_0x3f64('0xa5')])&&this[_0x3f64('0x69')](_0x32816d[_0x3f64('0xa5')]['queueposition'])){if(!_0x1ad46c[_0x3f64('0x83')]){_0x1ad46c[_0x3f64('0x92')]=!![];_0x1ad46c[_0x3f64('0x93')]=moment()[_0x3f64('0x62')](_0x3f64('0x77'));_0x1ad46c['queuecallerexitreason']=_0x3f64('0xad');_0x1ad46c['queuecallerleaveAt']=moment()[_0x3f64('0x62')](_0x3f64('0x77'));this[_0x3f64('0x13')][_0x32816d[_0x3f64('0x4a')]]=_0x1ad46c;}}logger[_0x3f64('0x6c')](_0x3f64('0xae'),_0x32816d[_0x3f64('0x4a')],_0x1ad46c['name'],_0x1ad46c['type'],_[_0x3f64('0x7b')](_0x32816d['variable'])[0x0],_0x32816d[_0x3f64('0xa6')]);_0x1ad46c['variables']=this['variables'][_0x32816d[_0x3f64('0x4a')]];}}}}catch(_0x13fc3a){logger['error'](_0x3f64('0xa4'),_0x32816d[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x13fc3a,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['addVariable']=function(_0x8fe18c,_0x50f22f,_0x579472){var _0x1d2c03=[_0x3f64('0xaf'),_0x3f64('0xb0'),_0x3f64('0xb1'),_0x3f64('0xb2'),'rtpaudioqosloss',_0x3f64('0xb3'),_0x3f64('0xb4'),'rtpaudioqosrttbridged',_0x3f64('0xb5'),_0x3f64('0xb6'),'bridgepeer',_0x3f64('0xb7'),_0x3f64('0xb8'),_0x3f64('0xb9'),'memberinterface',_0x3f64('0xba'),_0x3f64('0x91'),_0x3f64('0xbb'),'memberrealtime'];if(!_[_0x3f64('0x3a')](_0x50f22f)&&!_[_0x3f64('0xbc')](_0x1d2c03,_0x50f22f)){if(_['isUndefined'](this['variables'][_0x8fe18c])){this[_0x3f64('0x18')][_0x8fe18c]={};}this['variables'][_0x8fe18c][_0x50f22f]=_0x579472;}};VoiceQueueReport[_0x3f64('0xc')][_0x3f64('0x27')]=function(_0x17e705){try{if(this['isNotNull'](_0x17e705)){logger[_0x3f64('0x4e')](_0x3f64('0xbd'),_0x17e705[_0x3f64('0x4a')],util[_0x3f64('0x40')](_0x17e705,{'showHidden':![],'depth':null}));if(this[_0x3f64('0x11')][_0x17e705['uniqueid']]){for(var _0x96a1=0x0,_0x2bb2a3={};_0x96a10x0?_0x404336:0x0;this[_0x9ec8('0xf')][_0x379191[_0x9ec8('0x65')]]['talking']=this[_0x9ec8('0xf')][_0x379191[_0x9ec8('0x65')]]['talking']>_[_0x9ec8('0x69')](_0x379191[_0x9ec8('0x6a')])?_[_0x9ec8('0x69')](_0x379191[_0x9ec8('0x6a')]):this[_0x9ec8('0xf')][_0x379191[_0x9ec8('0x65')]][_0x9ec8('0x54')];this['emitVoiceQueueSummary'](this[_0x9ec8('0xf')][_0x379191['queue']],_0x9ec8('0x61'));}logger[_0x9ec8('0x42')](_0x9ec8('0x6b'),util[_0x9ec8('0x3b')](this[_0x9ec8('0xf')][_0x379191[_0x9ec8('0x65')]],{'showHidden':![],'depth':null}));ami[_0x9ec8('0x41')](_0x9ec8('0x6c'),this[_0x9ec8('0xf')][_0x379191[_0x9ec8('0x65')]]);}}}catch(_0x540b19){logger[_0x9ec8('0x39')]('[voiceQueueReport][queuesummary]',util[_0x9ec8('0x3b')](_0x540b19,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x9ec8('0x16')]=function(_0x188ce1){logger[_0x9ec8('0x42')]('[voiceQueueReport][queuesummarycomplete]\x20event:',util[_0x9ec8('0x3b')](_0x188ce1,{'showHidden':![],'depth':null}));this[_0x9ec8('0x10')]=!![];};VoiceQueueReport[_0x9ec8('0x8')][_0x9ec8('0x18')]=function(_0x4726f4){try{if(this[_0x9ec8('0x6d')](_0x4726f4)){logger[_0x9ec8('0x42')](_0x9ec8('0x6e'),_0x4726f4[_0x9ec8('0x44')],util['inspect'](_0x4726f4,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0x9ec8('0x3c')][_0x4726f4['uniqueid']])){this[_0x9ec8('0x3c')][_0x4726f4[_0x9ec8('0x44')]]=[];this[_0x9ec8('0xd')][_0x4726f4[_0x9ec8('0x44')]]={};}var _0x4c65a4=new QueueReport();_0x4c65a4[_0x9ec8('0x4d')]=_0x4726f4[_0x9ec8('0x65')];_0x4c65a4[_0x9ec8('0x4b')]=this['voiceQueues'][_0x4c65a4[_0x9ec8('0x4d')]]&&this['voiceQueues'][_0x4c65a4[_0x9ec8('0x4d')]][_0x9ec8('0x4b')]?this['voiceQueues'][_0x4c65a4[_0x9ec8('0x4d')]][_0x9ec8('0x4b')]||_0x9ec8('0x4c'):_0x9ec8('0x4c');_0x4c65a4[_0x9ec8('0x65')]=_0x4726f4[_0x9ec8('0x65')];_0x4c65a4[_0x9ec8('0x6f')]=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));_0x4c65a4['position']=_0x4726f4[_0x9ec8('0x71')];_0x4c65a4[_0x9ec8('0x72')]=_0x4726f4[_0x9ec8('0x72')];_0x4c65a4[_0x9ec8('0x44')]=_0x4726f4[_0x9ec8('0x44')];logger['info']('[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s',_0x4c65a4[_0x9ec8('0x4d')],_0x4c65a4[_0x9ec8('0x4b')]);_[_0x9ec8('0x73')](_0x4c65a4,_[_0x9ec8('0x74')](_0x4726f4,_[_0x9ec8('0x75')](_0x4c65a4)));this['queueReports'][_0x4726f4['uniqueid']]['push'](_0x4c65a4);this[_0x9ec8('0xd')][_0x4726f4['uniqueid']]=_0x4c65a4;this['emitVoiceQueueChannelSave'](_0x4c65a4,_0x9ec8('0x17'));}}catch(_0x57bedd){logger[_0x9ec8('0x39')]('[%s][voiceQueueReport][queuecallerjoin]',_0x4726f4[_0x9ec8('0x44')],util['inspect'](_0x57bedd,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueCallerAbandon']=function(_0x277858){try{if(this[_0x9ec8('0x6d')](_0x277858)){logger[_0x9ec8('0x42')](_0x9ec8('0x76'),_0x277858['uniqueid'],util['inspect'](_0x277858,{'showHidden':![],'depth':null}));if(this[_0x9ec8('0x3c')][_0x277858[_0x9ec8('0x44')]]){var _0x5f507a=_[_0x9ec8('0x77')](this[_0x9ec8('0x3c')][_0x277858[_0x9ec8('0x44')]]);_0x5f507a[_0x9ec8('0x78')]=![];_0x5f507a[_0x9ec8('0x79')]=null;_0x5f507a['holdtime']=_0x277858['holdtime'];_0x5f507a[_0x9ec8('0x7a')]=_0x277858[_0x9ec8('0x7a')];_0x5f507a[_0x9ec8('0x19')]=!![];_0x5f507a[_0x9ec8('0x7b')]=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));_0x5f507a[_0x9ec8('0x7c')]=_0x9ec8('0x7d');_0x5f507a[_0x9ec8('0x7e')]=null;logger['info'](_0x9ec8('0x7f'),_0x5f507a[_0x9ec8('0x4d')],_0x5f507a[_0x9ec8('0x4b')]);this[_0x9ec8('0xd')][_0x277858[_0x9ec8('0x44')]]=_0x5f507a;this['emitVoiceQueueChannelRemove'](_0x5f507a,_0x9ec8('0x19'));}}}catch(_0x4324b7){logger[_0x9ec8('0x39')](_0x9ec8('0x76'),_0x277858['uniqueid'],util['inspect'](_0x4324b7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9ec8('0x8')][_0x9ec8('0x1c')]=function(_0x42bdd0){try{if(this[_0x9ec8('0x6d')](_0x42bdd0)){logger[_0x9ec8('0x42')]('[%s][voiceQueueReport][queuecallerleave]',_0x42bdd0[_0x9ec8('0x44')],util['inspect'](_0x42bdd0,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x42bdd0[_0x9ec8('0x44')]]){var _0x2e057b=_[_0x9ec8('0x77')](this[_0x9ec8('0x3c')][_0x42bdd0[_0x9ec8('0x44')]]);_0x2e057b[_0x9ec8('0x80')]=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));_0x2e057b[_0x9ec8('0x81')]=_0x42bdd0[_0x9ec8('0x81')];_0x2e057b[_0x9ec8('0x82')]=_0x42bdd0[_0x9ec8('0x82')];logger[_0x9ec8('0x66')](_0x9ec8('0x83'),_0x2e057b[_0x9ec8('0x4d')],_0x2e057b[_0x9ec8('0x4b')],_0x42bdd0[_0x9ec8('0x81')],_0x42bdd0[_0x9ec8('0x82')]);this['channels'][_0x42bdd0[_0x9ec8('0x44')]]=_0x2e057b;this['emitVoiceQueueChannelSave'](_0x2e057b,_0x9ec8('0x1b'));}}}catch(_0x30b37f){logger[_0x9ec8('0x39')](_0x9ec8('0x84'),_0x42bdd0[_0x9ec8('0x44')],util[_0x9ec8('0x3b')](_0x30b37f,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9ec8('0x8')][_0x9ec8('0x85')]=function(_0x21094b){try{if(this[_0x9ec8('0x6d')](_0x21094b)){logger[_0x9ec8('0x42')](_0x9ec8('0x86'),_0x21094b['uniqueid'],util[_0x9ec8('0x3b')](_0x21094b,{'showHidden':![],'depth':null}));if(this[_0x9ec8('0x3c')][_0x21094b['uniqueid']]){var _0x5af20e=_[_0x9ec8('0x77')](this['queueReports'][_0x21094b[_0x9ec8('0x44')]]);_0x5af20e[_0x9ec8('0x78')]=!![];_0x5af20e[_0x9ec8('0x7c')]=_0x9ec8('0x87');logger[_0x9ec8('0x66')]('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x5af20e['name'],_0x5af20e['type']);}}}catch(_0x4b971d){logger['error'](_0x9ec8('0x86'),_0x21094b['uniqueid'],util[_0x9ec8('0x3b')](_0x4b971d,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x9ec8('0x88')]=function(_0x4c5ae5){try{if(this[_0x9ec8('0x6d')](_0x4c5ae5)){logger[_0x9ec8('0x42')]('[%s][voiceQueueReport][agentcomplete]',_0x4c5ae5[_0x9ec8('0x44')],util[_0x9ec8('0x3b')](_0x4c5ae5,{'showHidden':![],'depth':null}));if(this[_0x9ec8('0x3c')][_0x4c5ae5['uniqueid']]){var _0x6260b8=_[_0x9ec8('0x77')](this[_0x9ec8('0x3c')][_0x4c5ae5[_0x9ec8('0x44')]]);_0x6260b8[_0x9ec8('0x19')]=![];_0x6260b8[_0x9ec8('0x7b')]=null;_0x6260b8[_0x9ec8('0x89')]=!![];_0x6260b8[_0x9ec8('0x7e')]=_0x4c5ae5[_0x9ec8('0x8a')];_0x6260b8[_0x9ec8('0x8b')]=_0x4c5ae5[_0x9ec8('0x8b')];_0x6260b8[_0x9ec8('0x78')]=!![];_0x6260b8[_0x9ec8('0x8c')]=![];_0x6260b8['queuecallerexitAt']=null;if(!_0x6260b8[_0x9ec8('0x8d')]){if(_0x4c5ae5[_0x9ec8('0x8e')]=='transfer'){_0x6260b8[_0x9ec8('0x7c')]=_0x9ec8('0x8f');logger['info'](_0x9ec8('0x90'),_0x6260b8[_0x9ec8('0x4d')],_0x6260b8[_0x9ec8('0x4b')]);}else{if(_[_0x9ec8('0x91')](_0x4c5ae5[_0x9ec8('0x36')]['toLowerCase'](),_0x9ec8('0x92'))){if(this['queueReports'][_0x4c5ae5[_0x9ec8('0x93')]]){var _0x25b20c=_[_0x9ec8('0x77')](this[_0x9ec8('0x3c')][_0x4c5ae5['linkedid']]);_0x25b20c[_0x9ec8('0x78')]=![];_0x25b20c[_0x9ec8('0x8c')]=!![];_0x25b20c[_0x9ec8('0x94')]=moment(_0x6260b8['queuecallerjoinAt'])['add'](_0x4c5ae5[_0x9ec8('0x8b')],'seconds')[_0x9ec8('0x45')](_0x9ec8('0x70'));_0x25b20c[_0x9ec8('0x7c')]=_0x9ec8('0x95');_0x25b20c['transfer']=!![];_0x25b20c[_0x9ec8('0x96')]='FORWARD';_0x25b20c[_0x9ec8('0x97')]=_0x4c5ae5['destexten'];_0x25b20c[_0x9ec8('0x98')]=_0x4c5ae5['uniqueid'];logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x25b20c[_0x9ec8('0x4d')],_0x25b20c['type']);var _0x2044bd=this[_0x9ec8('0x3c')][_0x4c5ae5[_0x9ec8('0x93')]];this[_0x9ec8('0x3c')][_0x4c5ae5[_0x9ec8('0x93')]]=this['queueReports'][_0x4c5ae5[_0x9ec8('0x44')]];this['queueReports'][_0x4c5ae5[_0x9ec8('0x44')]]=_0x2044bd;}}else{_0x6260b8[_0x9ec8('0x7c')]='COMPLETEDBY'+_0x4c5ae5[_0x9ec8('0x8e')][_0x9ec8('0x99')]();logger[_0x9ec8('0x66')](_0x9ec8('0x9a'),_0x6260b8[_0x9ec8('0x4d')],_0x6260b8[_0x9ec8('0x4b')],_0x6260b8['queuecallerexitreason']);}}}this[_0x9ec8('0xd')][_0x4c5ae5['uniqueid']]=_0x6260b8;this[_0x9ec8('0x47')](_0x6260b8,_0x9ec8('0x9b'));}}}catch(_0x130f8c){logger[_0x9ec8('0x39')](_0x9ec8('0x9c'),_0x4c5ae5[_0x9ec8('0x44')],util[_0x9ec8('0x3b')](_0x130f8c,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9ec8('0x8')][_0x9ec8('0x1f')]=function(_0xa1a73c){try{if(this[_0x9ec8('0x6d')](_0xa1a73c)){logger[_0x9ec8('0x42')]('[%s][voiceQueueReport][varset]',_0xa1a73c['uniqueid'],util[_0x9ec8('0x3b')](_0xa1a73c,{'showHidden':![],'depth':null}));this[_0x9ec8('0x9d')](_0xa1a73c[_0x9ec8('0x44')],_[_0x9ec8('0x75')](_0xa1a73c['variable'])[0x0],_0xa1a73c[_0x9ec8('0x9e')]);if(this['queueReports'][_0xa1a73c[_0x9ec8('0x44')]]){var _0x2ca9d0=_['last'](this[_0x9ec8('0x3c')][_0xa1a73c[_0x9ec8('0x44')]]);if(_0x2ca9d0){if(this[_0x9ec8('0x6d')](_0xa1a73c[_0x9ec8('0x9f')])&&this[_0x9ec8('0x6d')](_0xa1a73c[_0x9ec8('0x9f')][_0x9ec8('0xa0')])){switch(_0xa1a73c[_0x9ec8('0x9e')]){case _0x9ec8('0xa1'):_0x2ca9d0[_0x9ec8('0x8c')]=![];_0x2ca9d0[_0x9ec8('0x94')]=null;break;case'TIMEOUT':_0x2ca9d0['lastevent']='timeout';_0x2ca9d0['queuecallerexit']=!![];_0x2ca9d0[_0x9ec8('0x94')]=moment()['format'](_0x9ec8('0x70'));_0x2ca9d0['queuecallerleaveAt']=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));logger['debug'](_0x9ec8('0xa2'),_0xa1a73c[_0x9ec8('0x44')],util[_0x9ec8('0x3b')](_0x2ca9d0,{'showHidden':![],'depth':null}));ami[_0x9ec8('0x41')](_0x9ec8('0xa3'),_0x2ca9d0);break;default:_0x2ca9d0[_0x9ec8('0x8c')]=!![];_0x2ca9d0[_0x9ec8('0x94')]=moment()[_0x9ec8('0x45')]('YYYY-MM-DD\x20HH:mm:ss');_0x2ca9d0[_0x9ec8('0x80')]=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));}_0x2ca9d0[_0x9ec8('0x19')]=![];_0x2ca9d0[_0x9ec8('0x7b')]=null;_0x2ca9d0[_0x9ec8('0x7c')]=_0xa1a73c[_0x9ec8('0x9e')];this[_0x9ec8('0xd')][_0xa1a73c[_0x9ec8('0x44')]]=_0x2ca9d0;this[_0x9ec8('0x47')](_0x2ca9d0,_0x9ec8('0x1e'));}else if(this[_0x9ec8('0x6d')](_0xa1a73c[_0x9ec8('0x9f')])&&this['isNotNull'](_0xa1a73c['variable']['queueposition'])){if(!_0x2ca9d0[_0x9ec8('0x19')]){_0x2ca9d0[_0x9ec8('0x8c')]=!![];_0x2ca9d0[_0x9ec8('0x94')]=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));_0x2ca9d0[_0x9ec8('0x7c')]=_0x9ec8('0xa4');_0x2ca9d0[_0x9ec8('0x80')]=moment()[_0x9ec8('0x45')](_0x9ec8('0x70'));this['channels'][_0xa1a73c[_0x9ec8('0x44')]]=_0x2ca9d0;}}logger[_0x9ec8('0x66')](_0x9ec8('0xa5'),_0xa1a73c['uniqueid'],_0x2ca9d0['name'],_0x2ca9d0['type'],_[_0x9ec8('0x75')](_0xa1a73c[_0x9ec8('0x9f')])[0x0],_0xa1a73c[_0x9ec8('0x9e')]);_0x2ca9d0[_0x9ec8('0x12')]=this['variables'][_0xa1a73c[_0x9ec8('0x44')]];}}}}catch(_0x2749d0){logger[_0x9ec8('0x39')](_0x9ec8('0xa6'),_0xa1a73c[_0x9ec8('0x44')],util[_0x9ec8('0x3b')](_0x2749d0,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9ec8('0x8')][_0x9ec8('0x9d')]=function(_0x25b280,_0x110a7a,_0xcf7ddb){var _0x225a09=[_0x9ec8('0xa7'),_0x9ec8('0xa8'),'rtpaudioqosjitter',_0x9ec8('0xa9'),_0x9ec8('0xaa'),_0x9ec8('0xab'),_0x9ec8('0xac'),_0x9ec8('0xad'),'sipcallid',_0x9ec8('0xae'),_0x9ec8('0xaf'),_0x9ec8('0xb0'),_0x9ec8('0xb1'),_0x9ec8('0xb2'),_0x9ec8('0xb3'),_0x9ec8('0xb4'),_0x9ec8('0x8a'),_0x9ec8('0xb5'),_0x9ec8('0xb6')];if(!_['isNil'](_0x110a7a)&&!_[_0x9ec8('0xb7')](_0x225a09,_0x110a7a)){if(_[_0x9ec8('0x5f')](this[_0x9ec8('0x12')][_0x25b280])){this['variables'][_0x25b280]={};}this[_0x9ec8('0x12')][_0x25b280][_0x110a7a]=_0xcf7ddb;}};VoiceQueueReport[_0x9ec8('0x8')][_0x9ec8('0x21')]=function(_0x468107){try{if(this[_0x9ec8('0x6d')](_0x468107)){logger[_0x9ec8('0x42')]('[%s][voiceQueueReport][hangup]',_0x468107[_0x9ec8('0x44')],util[_0x9ec8('0x3b')](_0x468107,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x468107[_0x9ec8('0x44')]]){for(var _0x2d7d65=0x0,_0x2fe17b={};_0x2d7d65=0x0?moment(_0x5ca35e[_0xc6bd('0x16')])['diff'](_0x5ca35e[_0xc6bd('0x17')],_0xc6bd('0x18')):null,'data1':_0xc6bd('0x19'),'data2':_0x5ca35e[_0xc6bd('0x13')],'data3':_0x5ca35e[_0xc6bd('0x1a')],'data4':_0x5ca35e['dialstring']||null,'role':_0xc6bd('0x12'),'internal':_0x5ca35e[_0xc6bd('0x13')]?_[_0xc6bd('0x14')](_0x5ca35e['accountcode']):undefined,'uniqueid':_0x5ca35e[_0xc6bd('0x1b')]},'log':'CreateMemberReport'});}; \ No newline at end of file +var _0xa581=['membername','endtime','starttime','outbound','accountcode','moment','lodash','util','../client','queuecallercompleteAt','Request','CreateMemberReport','voice','isNil','interface','SIP/%s','lastAssignedTo','TALKING','queuecallerleaveAt','diff','seconds','calleridnum','exten','queue','agent','toNumber','uniqueid'];(function(_0x37dd9d,_0x1e4b0f){var _0x4e9983=function(_0x5d0ad5){while(--_0x5d0ad5){_0x37dd9d['push'](_0x37dd9d['shift']());}};_0x4e9983(++_0x1e4b0f);}(_0xa581,0x19a));var _0x1a58=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa581[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0x1a58('0x0'));var _=require(_0x1a58('0x1'));var util=require(_0x1a58('0x2'));var client=require(_0x1a58('0x3'));exports['voiceQueueReport']=function(_0x4c54cd){var _0x5764ea=_0x4c54cd[_0x1a58('0x4')]||_0x4c54cd['queuecallerexitAt'];return client[_0x1a58('0x5')](_0x1a58('0x6'),{'body':{'channel':_0x1a58('0x7'),'membername':_0x4c54cd['lastAssignedTo'],'interface':_[_0x1a58('0x8')](_0x4c54cd[_0x1a58('0x9')])?util['format'](_0x1a58('0xa'),_0x4c54cd[_0x1a58('0xb')]):_0x4c54cd[_0x1a58('0x9')],'type':_0x1a58('0xc'),'enterAt':_0x4c54cd[_0x1a58('0xd')],'exitAt':_0x5764ea,'duration':moment(_0x5764ea)[_0x1a58('0xe')](_0x4c54cd[_0x1a58('0xd')],_0x1a58('0xf')),'data1':'inbound','data2':_0x4c54cd[_0x1a58('0x10')],'data3':_0x4c54cd[_0x1a58('0x11')],'data4':null,'data5':_0x4c54cd[_0x1a58('0x12')],'role':_0x1a58('0x13'),'internal':_0x4c54cd['accountcode']?_[_0x1a58('0x14')](_0x4c54cd['accountcode']):undefined,'uniqueid':_0x4c54cd[_0x1a58('0x15')]},'log':_0x1a58('0x6')});};exports['voiceDialReport']=function(_0x5f102f){return client[_0x1a58('0x5')](_0x1a58('0x6'),{'body':{'channel':'voice','membername':_0x5f102f[_0x1a58('0x16')],'interface':_0x5f102f[_0x1a58('0x9')],'type':'TALKING','enterAt':_0x5f102f['starttime'],'exitAt':_0x5f102f[_0x1a58('0x17')],'duration':moment(_0x5f102f[_0x1a58('0x17')])[_0x1a58('0xe')](_0x5f102f[_0x1a58('0x18')],'seconds')>=0x0?moment(_0x5f102f['endtime'])[_0x1a58('0xe')](_0x5f102f[_0x1a58('0x18')],_0x1a58('0xf')):null,'data1':_0x1a58('0x19'),'data2':_0x5f102f[_0x1a58('0x1a')],'data3':_0x5f102f[_0x1a58('0x11')],'data4':_0x5f102f['dialstring']||null,'role':'agent','internal':_0x5f102f[_0x1a58('0x1a')]?_[_0x1a58('0x14')](_0x5f102f['accountcode']):undefined,'uniqueid':_0x5f102f[_0x1a58('0x15')]},'log':_0x1a58('0x6')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/template.js b/server/services/ami/rpc/template.js index 6922eb8..13973e2 100644 --- a/server/services/ami/rpc/template.js +++ b/server/services/ami/rpc/template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3eec=['getTemplates','GetTemplate','name','html','../client'];(function(_0x32c82a,_0x159aa){var _0x1c5705=function(_0x29457f){while(--_0x29457f){_0x32c82a['push'](_0x32c82a['shift']());}};_0x1c5705(++_0x159aa);}(_0x3eec,0x1e9));var _0xc3ee=function(_0x296a62,_0x39e39c){_0x296a62=_0x296a62-0x0;var _0x201a37=_0x3eec[_0x296a62];return _0x201a37;};'use strict';var client=require(_0xc3ee('0x0'));exports[_0xc3ee('0x1')]=function(_0x181c8e){return function(_0x3b1908){return client['Request'](_0xc3ee('0x2'),{'options':{'raw':!![],'attributes':['id',_0xc3ee('0x3'),_0xc3ee('0x4')]},'log':_0xc3ee('0x2')});};}; \ No newline at end of file +var _0xe28e=['Request','GetTemplate','name','html','../client','getTemplates'];(function(_0x3b84ea,_0x85e5a9){var _0xfb8c9b=function(_0x597426){while(--_0x597426){_0x3b84ea['push'](_0x3b84ea['shift']());}};_0xfb8c9b(++_0x85e5a9);}(_0xe28e,0x1ba));var _0xee28=function(_0x3ccd19,_0xc1940d){_0x3ccd19=_0x3ccd19-0x0;var _0x384eec=_0xe28e[_0x3ccd19];return _0x384eec;};'use strict';var client=require(_0xee28('0x0'));exports[_0xee28('0x1')]=function(_0x1d67b1){return function(_0x280bed){return client[_0xee28('0x2')](_0xee28('0x3'),{'options':{'raw':!![],'attributes':['id',_0xee28('0x4'),_0xee28('0x5')]},'log':_0xee28('0x3')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trigger.js b/server/services/ami/rpc/trigger.js index 0c964f1..a8fd2df 100644 --- a/server/services/ami/rpc/trigger.js +++ b/server/services/ami/rpc/trigger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xab04=['../client','getTriggers','Request','GetTrigger','name','Condition','AllConditions','field','value','AnyConditions','operator','Action','Actions','action','data1','data2','data3','data5','data6','data7'];(function(_0x47cd53,_0x43e9b4){var _0x2d128c=function(_0x585312){while(--_0x585312){_0x47cd53['push'](_0x47cd53['shift']());}};_0x2d128c(++_0x43e9b4);}(_0xab04,0x1b8));var _0x4ab0=function(_0x2b27a0,_0x2ee33){_0x2b27a0=_0x2b27a0-0x0;var _0x44ec6b=_0xab04[_0x2b27a0];return _0x44ec6b;};'use strict';var client=require(_0x4ab0('0x0'));exports[_0x4ab0('0x1')]=function(_0xd9d99f){return function(_0x57a05f){return client[_0x4ab0('0x2')](_0x4ab0('0x3'),{'options':{'raw':![],'attributes':['id',_0x4ab0('0x4'),'channel','status'],'include':[{'model':_0x4ab0('0x5'),'as':_0x4ab0('0x6'),'attributes':['id',_0x4ab0('0x7'),'operator',_0x4ab0('0x8')]},{'model':_0x4ab0('0x5'),'as':_0x4ab0('0x9'),'attributes':['id',_0x4ab0('0x7'),_0x4ab0('0xa'),_0x4ab0('0x8')]},{'model':_0x4ab0('0xb'),'as':_0x4ab0('0xc'),'attributes':['id',_0x4ab0('0xd'),_0x4ab0('0xe'),_0x4ab0('0xf'),_0x4ab0('0x10'),'data4',_0x4ab0('0x11'),_0x4ab0('0x12'),_0x4ab0('0x13')]}]},'log':'GetTrigger'});};}; \ No newline at end of file +var _0xfd2a=['data3','data4','data5','data6','data7','../client','getTriggers','Request','GetTrigger','name','channel','status','Condition','field','operator','value','Action','Actions','data2'];(function(_0x1ccd83,_0x945c00){var _0x3993cf=function(_0x255849){while(--_0x255849){_0x1ccd83['push'](_0x1ccd83['shift']());}};_0x3993cf(++_0x945c00);}(_0xfd2a,0x9d));var _0xafd2=function(_0x1b4b23,_0x5dd6d6){_0x1b4b23=_0x1b4b23-0x0;var _0x2a325b=_0xfd2a[_0x1b4b23];return _0x2a325b;};'use strict';var client=require(_0xafd2('0x0'));exports[_0xafd2('0x1')]=function(_0x6cc43a){return function(_0x5d9a6e){return client[_0xafd2('0x2')](_0xafd2('0x3'),{'options':{'raw':![],'attributes':['id',_0xafd2('0x4'),_0xafd2('0x5'),_0xafd2('0x6')],'include':[{'model':_0xafd2('0x7'),'as':'AllConditions','attributes':['id',_0xafd2('0x8'),_0xafd2('0x9'),_0xafd2('0xa')]},{'model':_0xafd2('0x7'),'as':'AnyConditions','attributes':['id','field',_0xafd2('0x9'),_0xafd2('0xa')]},{'model':_0xafd2('0xb'),'as':_0xafd2('0xc'),'attributes':['id','action','data1',_0xafd2('0xd'),_0xafd2('0xe'),_0xafd2('0xf'),_0xafd2('0x10'),_0xafd2('0x11'),_0xafd2('0x12')]}]},'log':_0xafd2('0x3')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trunk.js b/server/services/ami/rpc/trunk.js index cac00f3..085d5bb 100644 --- a/server/services/ami/rpc/trunk.js +++ b/server/services/ami/rpc/trunk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x660b=['getTrunks','Request','GetTrunk','name','../client'];(function(_0x3c1a30,_0x1073c8){var _0x307988=function(_0x424649){while(--_0x424649){_0x3c1a30['push'](_0x3c1a30['shift']());}};_0x307988(++_0x1073c8);}(_0x660b,0x194));var _0xb660=function(_0x578320,_0x4b27a0){_0x578320=_0x578320-0x0;var _0x218799=_0x660b[_0x578320];return _0x218799;};'use strict';var client=require(_0xb660('0x0'));exports[_0xb660('0x1')]=function(_0x403164){return function(_0x368c54){return client[_0xb660('0x2')](_0xb660('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0xb660('0x4'),'registry']},'log':'GetTrunk'});};}; \ No newline at end of file +var _0x6706=['getTrunks','Request','GetTrunk','name','registry','../client'];(function(_0xfec3c8,_0x33c9f5){var _0xfb507d=function(_0x2ff2b2){while(--_0x2ff2b2){_0xfec3c8['push'](_0xfec3c8['shift']());}};_0xfb507d(++_0x33c9f5);}(_0x6706,0x185));var _0x6670=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6706[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x6670('0x0'));exports[_0x6670('0x1')]=function(_0x285444){return function(_0x4e8fbc){return client[_0x6670('0x2')](_0x6670('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x6670('0x4'),_0x6670('0x5')]},'log':_0x6670('0x3')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/user.js b/server/services/ami/rpc/user.js index 6680a26..40262c7 100644 --- a/server/services/ami/rpc/user.js +++ b/server/services/ami/rpc/user.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0379=['internal','savePause','PauseUser','UnpauseUser','getAgent','ShowUser','email','online','interface','../client','getAgents','Request','agent','accountcode','fullname','lastLoginAt','pauseType','lastPauseAt','voicePause','phone','mobile','getTelephones','GetUser','telephone'];(function(_0x5e97b1,_0x3c16bc){var _0x2ef581=function(_0x386f22){while(--_0x386f22){_0x5e97b1['push'](_0x5e97b1['shift']());}};_0x2ef581(++_0x3c16bc);}(_0x0379,0x129));var _0x9037=function(_0x22a50b,_0x96421f){_0x22a50b=_0x22a50b-0x0;var _0x109ae8=_0x0379[_0x22a50b];return _0x109ae8;};'use strict';var client=require(_0x9037('0x0'));exports[_0x9037('0x1')]=function(){return function(){return client[_0x9037('0x2')]('GetUser',{'options':{'raw':![],'where':{'role':_0x9037('0x3')},'attributes':['id','name','email',_0x9037('0x4'),_0x9037('0x5'),'online',_0x9037('0x6'),_0x9037('0x7'),_0x9037('0x8'),_0x9037('0x9'),_0x9037('0xa'),_0x9037('0xb'),'interface']},'log':_0x9037('0x1')});};};exports[_0x9037('0xc')]=function(){return function(){return client[_0x9037('0x2')](_0x9037('0xd'),{'options':{'raw':!![],'where':{'role':_0x9037('0xe')},'attributes':['id','name',_0x9037('0x4'),_0x9037('0xf')]},'log':_0x9037('0xc')});};};exports[_0x9037('0x10')]=function(_0x5281cd,_0x3aac9b,_0x11dad4){return client[_0x9037('0x2')](_0x9037('0x11'),{'body':{'type':_0x3aac9b,'uniqueid':_0x11dad4},'options':{'where':{'id':_0x5281cd['id']}},'log':_0x9037('0x10')});};exports['saveUnpause']=function(_0x479d68){return client[_0x9037('0x2')](_0x9037('0x12'),{'body':{},'options':{'where':{'id':_0x479d68['id']}},'log':'savePause'});};exports[_0x9037('0x13')]=function(_0x1eb6b9){return client[_0x9037('0x2')](_0x9037('0x14'),{'options':{'raw':![],'where':{'role':_0x9037('0x3'),'id':_0x1eb6b9},'attributes':['id','name',_0x9037('0x15'),_0x9037('0x4'),'fullname',_0x9037('0x16'),'lastLoginAt','pauseType',_0x9037('0x8'),_0x9037('0x9'),_0x9037('0x17')]},'log':_0x9037('0x13')});}; \ No newline at end of file +var _0xa573=['name','email','accountcode','fullname','lastLoginAt','pauseType','lastPauseAt','voicePause','phone','interface','getTelephones','GetUser','internal','PauseUser','savePause','saveUnpause','UnpauseUser','getAgent','ShowUser','getAgents','Request'];(function(_0x2a616b,_0x5161f4){var _0x368f19=function(_0x537d7f){while(--_0x537d7f){_0x2a616b['push'](_0x2a616b['shift']());}};_0x368f19(++_0x5161f4);}(_0xa573,0x163));var _0x3a57=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa573[_0x3dd15e];return _0x231fd0;};'use strict';var client=require('../client');exports[_0x3a57('0x0')]=function(){return function(){return client[_0x3a57('0x1')]('GetUser',{'options':{'raw':![],'where':{'role':'agent'},'attributes':['id',_0x3a57('0x2'),_0x3a57('0x3'),_0x3a57('0x4'),_0x3a57('0x5'),'online',_0x3a57('0x6'),_0x3a57('0x7'),_0x3a57('0x8'),_0x3a57('0x9'),_0x3a57('0xa'),'mobile',_0x3a57('0xb')]},'log':_0x3a57('0x0')});};};exports[_0x3a57('0xc')]=function(){return function(){return client['Request'](_0x3a57('0xd'),{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x3a57('0x2'),_0x3a57('0x4'),_0x3a57('0xe')]},'log':_0x3a57('0xc')});};};exports['savePause']=function(_0x27e4f4,_0x106371,_0x8e26cb){return client[_0x3a57('0x1')](_0x3a57('0xf'),{'body':{'type':_0x106371,'uniqueid':_0x8e26cb},'options':{'where':{'id':_0x27e4f4['id']}},'log':_0x3a57('0x10')});};exports[_0x3a57('0x11')]=function(_0xbe616a){return client[_0x3a57('0x1')](_0x3a57('0x12'),{'body':{},'options':{'where':{'id':_0xbe616a['id']}},'log':'savePause'});};exports[_0x3a57('0x13')]=function(_0x1f22d1){return client[_0x3a57('0x1')](_0x3a57('0x14'),{'options':{'raw':![],'where':{'role':'agent','id':_0x1f22d1},'attributes':['id',_0x3a57('0x2'),_0x3a57('0x3'),_0x3a57('0x4'),_0x3a57('0x5'),'online',_0x3a57('0x6'),_0x3a57('0x7'),_0x3a57('0x8'),_0x3a57('0x9'),_0x3a57('0xb')]},'log':_0x3a57('0x13')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceAgentReport.js b/server/services/ami/rpc/voiceAgentReport.js index faf31eb..0704712 100644 --- a/server/services/ami/rpc/voiceAgentReport.js +++ b/server/services/ami/rpc/voiceAgentReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x81c4=['UpdateVoiceAgentReport','Request','CreateVoiceAgentReport','update'];(function(_0x48c290,_0x558081){var _0x153b62=function(_0x1d6148){while(--_0x1d6148){_0x48c290['push'](_0x48c290['shift']());}};_0x153b62(++_0x558081);}(_0x81c4,0x179));var _0x481c=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x81c4[_0x4243a3];return _0x1b2a33;};'use strict';var client=require('../client');exports['create']=function(_0x1164bf){return client[_0x481c('0x0')](_0x481c('0x1'),{'body':_0x1164bf,'log':_0x481c('0x1')});};exports[_0x481c('0x2')]=function(_0x470d05,_0x2b749b,_0x31e2c0){return client[_0x481c('0x0')](_0x481c('0x3'),{'body':_0x470d05,'options':{'where':{'uniqueid':_0x2b749b,'interface':_0x31e2c0,'agentcomplete':!![]}},'log':_0x481c('0x3')});}; \ No newline at end of file +var _0x7ef9=['CreateVoiceAgentReport','update','UpdateVoiceAgentReport','create','Request'];(function(_0x393ebf,_0x449e5a){var _0x5808c2=function(_0x3e132d){while(--_0x3e132d){_0x393ebf['push'](_0x393ebf['shift']());}};_0x5808c2(++_0x449e5a);}(_0x7ef9,0x13e));var _0x97ef=function(_0x300754,_0x120159){_0x300754=_0x300754-0x0;var _0x3566e0=_0x7ef9[_0x300754];return _0x3566e0;};'use strict';var client=require('../client');exports[_0x97ef('0x0')]=function(_0x52ac5c){return client[_0x97ef('0x1')]('CreateVoiceAgentReport',{'body':_0x52ac5c,'log':_0x97ef('0x2')});};exports[_0x97ef('0x3')]=function(_0x13ce16,_0x5e8180,_0x23c802){return client[_0x97ef('0x1')](_0x97ef('0x4'),{'body':_0x13ce16,'options':{'where':{'uniqueid':_0x5e8180,'interface':_0x23c802,'agentcomplete':!![]}},'log':'UpdateVoiceAgentReport'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceCallReport.js b/server/services/ami/rpc/voiceCallReport.js index af0be6e..68f4738 100644 --- a/server/services/ami/rpc/voiceCallReport.js +++ b/server/services/ami/rpc/voiceCallReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x82e8=['calleridnum','callerid','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','day','type','disposition','duration','billableseconds','GetVoiceCallReports','util','lodash','../client','Request','CreateVoiceCallReport'];(function(_0x28947d,_0x4cc9c6){var _0x12d2ee=function(_0x3f38fc){while(--_0x3f38fc){_0x28947d['push'](_0x28947d['shift']());}};_0x12d2ee(++_0x4cc9c6);}(_0x82e8,0x1b3));var _0x882e=function(_0x37d5ff,_0x5ee83b){_0x37d5ff=_0x37d5ff-0x0;var _0x146b37=_0x82e8[_0x37d5ff];return _0x146b37;};'use strict';var moment=require('moment');var util=require(_0x882e('0x0'));var _=require(_0x882e('0x1'));var client=require(_0x882e('0x2'));exports['create']=function(_0x5b5872){return client[_0x882e('0x3')](_0x882e('0x4'),{'body':_['merge'](_0x5b5872,{'source':_0x5b5872[_0x882e('0x5')],'destinationcontext':_0x5b5872['context'],'callerid':_0x5b5872[_0x882e('0x6')],'amaflags':'DOCUMENTATION'}),'log':_0x882e('0x4')});};exports[_0x882e('0x7')]=function(){return function(){return client[_0x882e('0x3')](_0x882e('0x8'),{'options':{'where':{'type':[_0x882e('0x9')],'createdAt':{'$between':[moment()[_0x882e('0xa')]('day')[_0x882e('0xb')](_0x882e('0xc')),moment()[_0x882e('0xd')](_0x882e('0xe'))[_0x882e('0xb')](_0x882e('0xc'))]}},'attributes':[_0x882e('0xf'),_0x882e('0x10'),_0x882e('0x11'),_0x882e('0x12')]},'log':_0x882e('0x13')});};}; \ No newline at end of file +var _0xace7=['startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','type','disposition','duration','billableseconds','GetVoiceCallReports','moment','util','lodash','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','DOCUMENTATION','getVoiceCallReports','outbound'];(function(_0x514582,_0x4cd39a){var _0x1fe535=function(_0x3718fe){while(--_0x3718fe){_0x514582['push'](_0x514582['shift']());}};_0x1fe535(++_0x4cd39a);}(_0xace7,0x195));var _0x7ace=function(_0x2215d2,_0x563782){_0x2215d2=_0x2215d2-0x0;var _0x2bb13a=_0xace7[_0x2215d2];return _0x2bb13a;};'use strict';var moment=require(_0x7ace('0x0'));var util=require(_0x7ace('0x1'));var _=require(_0x7ace('0x2'));var client=require(_0x7ace('0x3'));exports[_0x7ace('0x4')]=function(_0x350a80){return client[_0x7ace('0x5')](_0x7ace('0x6'),{'body':_[_0x7ace('0x7')](_0x350a80,{'source':_0x350a80[_0x7ace('0x8')],'destinationcontext':_0x350a80[_0x7ace('0x9')],'callerid':_0x350a80['callerid'],'amaflags':_0x7ace('0xa')}),'log':_0x7ace('0x6')});};exports[_0x7ace('0xb')]=function(){return function(){return client[_0x7ace('0x5')]('GetVoiceCallReport',{'options':{'where':{'type':[_0x7ace('0xc')],'createdAt':{'$between':[moment()[_0x7ace('0xd')](_0x7ace('0xe'))[_0x7ace('0xf')](_0x7ace('0x10')),moment()['endOf']('day')['format'](_0x7ace('0x10'))]}},'attributes':[_0x7ace('0x11'),_0x7ace('0x12'),_0x7ace('0x13'),_0x7ace('0x14')]},'log':_0x7ace('0x15')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceDialReport.js b/server/services/ami/rpc/voiceDialReport.js index bc59136..e88fa22 100644 --- a/server/services/ami/rpc/voiceDialReport.js +++ b/server/services/ami/rpc/voiceDialReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9827=['create','CreateVoiceDialReport'];(function(_0x455807,_0xf0fef3){var _0x521949=function(_0x35fbdd){while(--_0x35fbdd){_0x455807['push'](_0x455807['shift']());}};_0x521949(++_0xf0fef3);}(_0x9827,0x106));var _0x7982=function(_0x2cc594,_0x4d727b){_0x2cc594=_0x2cc594-0x0;var _0x4abff7=_0x9827[_0x2cc594];return _0x4abff7;};'use strict';var client=require('../client');exports[_0x7982('0x0')]=function(_0x16b222){return client['Request'](_0x7982('0x1'),{'body':_0x16b222,'log':_0x7982('0x1')});}; \ No newline at end of file +var _0xee52=['../client','create','Request','CreateVoiceDialReport'];(function(_0xf9b28f,_0x560889){var _0x1d5dfc=function(_0x2be6e0){while(--_0x2be6e0){_0xf9b28f['push'](_0xf9b28f['shift']());}};_0x1d5dfc(++_0x560889);}(_0xee52,0xc0));var _0x2ee5=function(_0x51617d,_0x3a3685){_0x51617d=_0x51617d-0x0;var _0x120b53=_0xee52[_0x51617d];return _0x120b53;};'use strict';var client=require(_0x2ee5('0x0'));exports[_0x2ee5('0x1')]=function(_0x2d48a8){return client[_0x2ee5('0x2')]('CreateVoiceDialReport',{'body':_0x2d48a8,'log':_0x2ee5('0x3')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceExtension.js b/server/services/ami/rpc/voiceExtension.js index f84a029..94284f7 100644 --- a/server/services/ami/rpc/voiceExtension.js +++ b/server/services/ami/rpc/voiceExtension.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x352e=['exten','recordingFormat','../client','getVoiceExtensions','Request','GetVoiceExtension'];(function(_0x1290a7,_0x4a3b0b){var _0xb8f971=function(_0x2af0b8){while(--_0x2af0b8){_0x1290a7['push'](_0x1290a7['shift']());}};_0xb8f971(++_0x4a3b0b);}(_0x352e,0x1a6));var _0xe352=function(_0x2ae7ce,_0x20332c){_0x2ae7ce=_0x2ae7ce-0x0;var _0x21d90c=_0x352e[_0x2ae7ce];return _0x21d90c;};'use strict';var client=require(_0xe352('0x0'));exports[_0xe352('0x1')]=function(){return function(){return client[_0xe352('0x2')](_0xe352('0x3'),{'options':{'raw':!![],'attributes':['id',_0xe352('0x4'),_0xe352('0x5')],'where':{'VoiceExtensionId':null}},'log':_0xe352('0x1')});};}; \ No newline at end of file +var _0x3a5d=['getVoiceExtensions','../client','Request','GetVoiceExtension','exten','recordingFormat'];(function(_0x3d7c6d,_0x4a6b57){var _0x465da2=function(_0x4c420b){while(--_0x4c420b){_0x3d7c6d['push'](_0x3d7c6d['shift']());}};_0x465da2(++_0x4a6b57);}(_0x3a5d,0x193));var _0xd3a5=function(_0x6295cf,_0x13ad24){_0x6295cf=_0x6295cf-0x0;var _0x34b304=_0x3a5d[_0x6295cf];return _0x34b304;};'use strict';var client=require(_0xd3a5('0x0'));exports['getVoiceExtensions']=function(){return function(){return client[_0xd3a5('0x1')](_0xd3a5('0x2'),{'options':{'raw':!![],'attributes':['id',_0xd3a5('0x3'),_0xd3a5('0x4')],'where':{'VoiceExtensionId':null}},'log':_0xd3a5('0x5')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueue.js b/server/services/ami/rpc/voiceQueue.js index 7ed1013..a520d44 100644 --- a/server/services/ami/rpc/voiceQueue.js +++ b/server/services/ami/rpc/voiceQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x16bc=['dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalInterval','dialPrefix','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','timeout','dialRecallMeTimeout','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','dialCutDigit','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','Trunk','name','callerid','active','TrunkBackup','Interval','Intervals','interval','../client','Request','acw','acwTimeout','monitor_format','type','dialMethod','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry'];(function(_0x341e0f,_0x4a09d0){var _0x59555a=function(_0x4343a8){while(--_0x4343a8){_0x341e0f['push'](_0x341e0f['shift']());}};_0x59555a(++_0x4a09d0);}(_0x16bc,0x11e));var _0xc16b=function(_0x319855,_0x55a20d){_0x319855=_0x319855-0x0;var _0xfb7f50=_0x16bc[_0x319855];return _0xfb7f50;};'use strict';var client=require(_0xc16b('0x0'));exports['getVoiceQueues']=function(){return function(){return client[_0xc16b('0x1')]('GetVoiceQueue',{'options':{'raw':![],'attributes':['id','name',_0xc16b('0x2'),_0xc16b('0x3'),'autopause',_0xc16b('0x4'),_0xc16b('0x5'),'dialActive',_0xc16b('0x6'),_0xc16b('0x7'),_0xc16b('0x8'),_0xc16b('0x9'),_0xc16b('0xa'),_0xc16b('0xb'),_0xc16b('0xc'),'dialOriginateCallerIdName',_0xc16b('0xd'),_0xc16b('0xe'),_0xc16b('0xf'),_0xc16b('0x10'),_0xc16b('0x11'),_0xc16b('0x12'),_0xc16b('0x13'),_0xc16b('0x14'),_0xc16b('0x15'),_0xc16b('0x16'),_0xc16b('0x17'),'dialGlobalMaxRetry','dialTimezone',_0xc16b('0x18'),_0xc16b('0x19'),'dialCheckDuplicateType',_0xc16b('0x1a'),_0xc16b('0x1b'),_0xc16b('0x1c'),_0xc16b('0x1d'),'dialAMDTotalAnalysisTime',_0xc16b('0x1e'),_0xc16b('0x1f'),_0xc16b('0x20'),_0xc16b('0x21'),'dialAMDMaximumWordLength',_0xc16b('0x22'),_0xc16b('0x23'),'dialRecallInQueue',_0xc16b('0x24'),_0xc16b('0x25'),_0xc16b('0x26'),_0xc16b('0x27'),_0xc16b('0x4'),'strategy','dialRandomLastDigitCallerIdNumber',_0xc16b('0x28'),_0xc16b('0x29'),_0xc16b('0x2a'),_0xc16b('0x2b'),_0xc16b('0x2c'),_0xc16b('0x2d'),_0xc16b('0x2e'),_0xc16b('0x2f'),_0xc16b('0x30'),_0xc16b('0x31'),_0xc16b('0x32'),'mandatoryDisposition',_0xc16b('0x33'),_0xc16b('0x34')],'include':[{'model':_0xc16b('0x35'),'as':_0xc16b('0x35'),'attributes':['id',_0xc16b('0x36'),_0xc16b('0x37'),_0xc16b('0x38')]},{'model':'Pause','as':'mandatoryDispositionPause','attributes':['id',_0xc16b('0x36')]},{'model':_0xc16b('0x35'),'as':_0xc16b('0x39'),'attributes':['id',_0xc16b('0x36'),'callerid',_0xc16b('0x38')]},{'model':_0xc16b('0x3a'),'as':_0xc16b('0x3a'),'attributes':['id','name'],'include':[{'model':'Interval','as':_0xc16b('0x3b'),'attributes':['id','name',_0xc16b('0x3c')]}]}]},'log':'getVoiceQueues'});};}; \ No newline at end of file +var _0xe54b=['dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialTimezone','dialPrefix','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','Trunk','callerid','active','Pause','mandatoryDispositionPause','TrunkBackup','Interval','Intervals','interval','../client','getVoiceQueues','GetVoiceQueue','name','acw','acwTimeout','autopause','monitor_format','type','dialActive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval'];(function(_0x4dfb68,_0x4ccb8e){var _0x13fe59=function(_0x822119){while(--_0x822119){_0x4dfb68['push'](_0x4dfb68['shift']());}};_0x13fe59(++_0x4ccb8e);}(_0xe54b,0xb9));var _0xbe54=function(_0x3a84aa,_0x74bf06){_0x3a84aa=_0x3a84aa-0x0;var _0x5a0cde=_0xe54b[_0x3a84aa];return _0x5a0cde;};'use strict';var client=require(_0xbe54('0x0'));exports[_0xbe54('0x1')]=function(){return function(){return client['Request'](_0xbe54('0x2'),{'options':{'raw':![],'attributes':['id',_0xbe54('0x3'),_0xbe54('0x4'),_0xbe54('0x5'),_0xbe54('0x6'),_0xbe54('0x7'),_0xbe54('0x8'),_0xbe54('0x9'),'dialMethod',_0xbe54('0xa'),_0xbe54('0xb'),_0xbe54('0xc'),_0xbe54('0xd'),_0xbe54('0xe'),_0xbe54('0xf'),_0xbe54('0x10'),_0xbe54('0x11'),_0xbe54('0x12'),_0xbe54('0x13'),'dialQueueTimeout',_0xbe54('0x14'),_0xbe54('0x15'),_0xbe54('0x16'),_0xbe54('0x17'),_0xbe54('0x18'),_0xbe54('0x19'),_0xbe54('0x1a'),_0xbe54('0x1b'),_0xbe54('0x1c'),'dialGlobalInterval',_0xbe54('0x1d'),'dialCheckDuplicateType','dialAMDActive',_0xbe54('0x1e'),_0xbe54('0x1f'),_0xbe54('0x20'),'dialAMDTotalAnalysisTime',_0xbe54('0x21'),_0xbe54('0x22'),_0xbe54('0x23'),_0xbe54('0x24'),_0xbe54('0x25'),'timeout',_0xbe54('0x26'),_0xbe54('0x27'),_0xbe54('0x28'),_0xbe54('0x29'),_0xbe54('0x2a'),_0xbe54('0x2b'),'monitor_format',_0xbe54('0x2c'),_0xbe54('0x2d'),'dialCutDigit',_0xbe54('0x2e'),_0xbe54('0x2f'),'dialDropMaxRetry',_0xbe54('0x30'),_0xbe54('0x31'),_0xbe54('0x32'),_0xbe54('0x33'),_0xbe54('0x34'),_0xbe54('0x35'),_0xbe54('0x36'),_0xbe54('0x37'),_0xbe54('0x38'),_0xbe54('0x39')],'include':[{'model':_0xbe54('0x3a'),'as':_0xbe54('0x3a'),'attributes':['id','name',_0xbe54('0x3b'),_0xbe54('0x3c')]},{'model':_0xbe54('0x3d'),'as':_0xbe54('0x3e'),'attributes':['id',_0xbe54('0x3')]},{'model':_0xbe54('0x3a'),'as':_0xbe54('0x3f'),'attributes':['id',_0xbe54('0x3'),_0xbe54('0x3b'),'active']},{'model':_0xbe54('0x40'),'as':_0xbe54('0x40'),'attributes':['id','name'],'include':[{'model':_0xbe54('0x40'),'as':_0xbe54('0x41'),'attributes':['id',_0xbe54('0x3'),_0xbe54('0x42')]}]}]},'log':_0xbe54('0x1')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueReport.js b/server/services/ami/rpc/voiceQueueReport.js index be67c31..ca5cedd 100644 --- a/server/services/ami/rpc/voiceQueueReport.js +++ b/server/services/ami/rpc/voiceQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc8a4=['endOf','YYYY-MM-DD\x20HH:mm:ss','queue','queuecallerjoinAt','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','queuecallerabandon','moment','lodash','../client','create','Request','CreateVoiceQueueReport','getVoiceQueueReports','day','format'];(function(_0x1bda1f,_0x7361c1){var _0xabb9e3=function(_0x240b8b){while(--_0x240b8b){_0x1bda1f['push'](_0x1bda1f['shift']());}};_0xabb9e3(++_0x7361c1);}(_0xc8a4,0x99));var _0x4c8a=function(_0xfb1cea,_0x38ca21){_0xfb1cea=_0xfb1cea-0x0;var _0x3c7c26=_0xc8a4[_0xfb1cea];return _0x3c7c26;};'use strict';var moment=require(_0x4c8a('0x0'));var _=require(_0x4c8a('0x1'));var client=require(_0x4c8a('0x2'));exports[_0x4c8a('0x3')]=function(_0x586237){return client[_0x4c8a('0x4')](_0x4c8a('0x5'),{'body':_0x586237,'log':_0x4c8a('0x5')});};exports[_0x4c8a('0x6')]=function(){return function(){return client[_0x4c8a('0x4')]('GetVoiceQueueReport',{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0x4c8a('0x7'))[_0x4c8a('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x4c8a('0x9')](_0x4c8a('0x7'))['format'](_0x4c8a('0xa'))]}},'attributes':['uniqueid',_0x4c8a('0xb'),_0x4c8a('0xc'),'queuecallerleaveAt',_0x4c8a('0xd'),_0x4c8a('0xe'),_0x4c8a('0xf'),_0x4c8a('0x10'),_0x4c8a('0x11'),'queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};}; \ No newline at end of file +var _0x2fbb=['../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','day','YYYY-MM-DD\x20HH:mm:ss','format','queue','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','queuecallerabandon','queuecallerabandonAt','GetVoiceQueueReports','moment','lodash'];(function(_0x231f6f,_0xf231e0){var _0xc621c4=function(_0x5c8549){while(--_0x5c8549){_0x231f6f['push'](_0x231f6f['shift']());}};_0xc621c4(++_0xf231e0);}(_0x2fbb,0xe2));var _0xb2fb=function(_0xdd3312,_0x5622bc){_0xdd3312=_0xdd3312-0x0;var _0x4a513a=_0x2fbb[_0xdd3312];return _0x4a513a;};'use strict';var moment=require(_0xb2fb('0x0'));var _=require(_0xb2fb('0x1'));var client=require(_0xb2fb('0x2'));exports['create']=function(_0x43ce60){return client[_0xb2fb('0x3')](_0xb2fb('0x4'),{'body':_0x43ce60,'log':'CreateVoiceQueueReport'});};exports[_0xb2fb('0x5')]=function(){return function(){return client[_0xb2fb('0x3')]('GetVoiceQueueReport',{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xb2fb('0x6'))['format'](_0xb2fb('0x7')),moment()['endOf']('day')[_0xb2fb('0x8')]('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':['uniqueid',_0xb2fb('0x9'),_0xb2fb('0xa'),_0xb2fb('0xb'),_0xb2fb('0xc'),_0xb2fb('0xd'),_0xb2fb('0xe'),_0xb2fb('0xf'),_0xb2fb('0x10'),_0xb2fb('0x11')]},'log':_0xb2fb('0x12')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueRt.js b/server/services/ami/rpc/voiceQueueRt.js index ff74946..51e6510 100644 --- a/server/services/ami/rpc/voiceQueueRt.js +++ b/server/services/ami/rpc/voiceQueueRt.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc8c9=['Request','GetVoiceQueueRtPauses','../client','getVoiceQueueRtPauses'];(function(_0x48faec,_0x4ebc60){var _0xb8370e=function(_0x2d7595){while(--_0x2d7595){_0x48faec['push'](_0x48faec['shift']());}};_0xb8370e(++_0x4ebc60);}(_0xc8c9,0x176));var _0x9c8c=function(_0x1fcf1b,_0x214549){_0x1fcf1b=_0x1fcf1b-0x0;var _0x5d2952=_0xc8c9[_0x1fcf1b];return _0x5d2952;};'use strict';var client=require(_0x9c8c('0x0'));exports[_0x9c8c('0x1')]=function(_0x2c873d){return function(){return client[_0x9c8c('0x2')](_0x9c8c('0x3'),{'options':{'where':{'VoiceQueueId':_0x2c873d,'paused':!![]},'raw':!![]},'log':_0x9c8c('0x1')});};}; \ No newline at end of file +var _0x371f=['GetVoiceQueueRtPauses','../client','getVoiceQueueRtPauses','Request'];(function(_0x342704,_0x4c13f7){var _0x4e9c8a=function(_0xc09146){while(--_0xc09146){_0x342704['push'](_0x342704['shift']());}};_0x4e9c8a(++_0x4c13f7);}(_0x371f,0x169));var _0xf371=function(_0x5ad496,_0x399bf6){_0x5ad496=_0x5ad496-0x0;var _0x152285=_0x371f[_0x5ad496];return _0x152285;};'use strict';var client=require(_0xf371('0x0'));exports[_0xf371('0x1')]=function(_0x54a957){return function(){return client[_0xf371('0x2')](_0xf371('0x3'),{'options':{'where':{'VoiceQueueId':_0x54a957,'paused':!![]},'raw':!![]},'log':'getVoiceQueueRtPauses'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceRecording.js b/server/services/ami/rpc/voiceRecording.js index 29a53a2..714c07a 100644 --- a/server/services/ami/rpc/voiceRecording.js +++ b/server/services/ami/rpc/voiceRecording.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2434=['CreateVoiceRecording','merge','monitorFilename','lodash','../client','create'];(function(_0x2e36f6,_0x518b63){var _0x3a68e2=function(_0x4b8c4f){while(--_0x4b8c4f){_0x2e36f6['push'](_0x2e36f6['shift']());}};_0x3a68e2(++_0x518b63);}(_0x2434,0x81));var _0x4243=function(_0x3018d4,_0x5863e2){_0x3018d4=_0x3018d4-0x0;var _0xa677b5=_0x2434[_0x3018d4];return _0xa677b5;};'use strict';var _=require(_0x4243('0x0'));var client=require(_0x4243('0x1'));exports[_0x4243('0x2')]=function(_0x44a776){return client['Request'](_0x4243('0x3'),{'body':_[_0x4243('0x4')](_0x44a776,{'value':_0x44a776[_0x4243('0x5')]}),'log':_0x4243('0x3')});}; \ No newline at end of file +var _0xd250=['../client','create','Request','CreateVoiceRecording','merge','lodash'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0xd250,0x9b));var _0x0d25=function(_0x35d4e9,_0x298c61){_0x35d4e9=_0x35d4e9-0x0;var _0x5c2770=_0xd250[_0x35d4e9];return _0x5c2770;};'use strict';var _=require(_0x0d25('0x0'));var client=require(_0x0d25('0x1'));exports[_0x0d25('0x2')]=function(_0x592d15){return client[_0x0d25('0x3')](_0x0d25('0x4'),{'body':_[_0x0d25('0x5')](_0x592d15,{'value':_0x592d15['monitorFilename']}),'log':'CreateVoiceRecording'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceTransferReport.js b/server/services/ami/rpc/voiceTransferReport.js index 896aa69..670528e 100644 --- a/server/services/ami/rpc/voiceTransferReport.js +++ b/server/services/ami/rpc/voiceTransferReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xad14=['transfertargetlinkedid','origtransferercontext','attended','../client','transfers','blindTransfer','Request','CreateVoiceTransferReport','result','transfererchannel','transfererconnectedlinenum','transfererconnectedlinename','transfereraccountcode','transferercontext','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinenum','transfereeaccountcode','transfereeexten','transfereelinkedid','isexternal','extension','blind','attendedTransfer','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','origtransfereraccountcode','secondtransfererexten','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetaccountcode','transfertargetcontext'];(function(_0x3dfbb3,_0x2f0680){var _0x62d3bb=function(_0x194a9b){while(--_0x194a9b){_0x3dfbb3['push'](_0x3dfbb3['shift']());}};_0x62d3bb(++_0x2f0680);}(_0xad14,0x123));var _0x4ad1=function(_0x362ad7,_0x948800){_0x362ad7=_0x362ad7-0x0;var _0x54703b=_0xad14[_0x362ad7];return _0x54703b;};'use strict';var client=require(_0x4ad1('0x0'));exports[_0x4ad1('0x1')]={};exports[_0x4ad1('0x2')]=function(_0x57e37d){return client[_0x4ad1('0x3')](_0x4ad1('0x4'),{'body':{'result':_0x57e37d[_0x4ad1('0x5')],'transfererchannel':_0x57e37d[_0x4ad1('0x6')],'transferercalleridnum':_0x57e37d['transferercalleridnum'],'transferercalleridname':_0x57e37d['transferercalleridname'],'transfererconnectedlinenum':_0x57e37d[_0x4ad1('0x7')],'transfererconnectedlinename':_0x57e37d[_0x4ad1('0x8')],'transfereraccountcode':_0x57e37d[_0x4ad1('0x9')],'transferercontext':_0x57e37d[_0x4ad1('0xa')],'transfererexten':_0x57e37d['transfererexten'],'transfererlinkedid':_0x57e37d['transfererlinkedid'],'transfereechannel':_0x57e37d['transfereechannel'],'transfereecalleridnum':_0x57e37d[_0x4ad1('0xb')],'transfereecalleridname':_0x57e37d[_0x4ad1('0xc')],'transfereeconnectedlinenum':_0x57e37d[_0x4ad1('0xd')],'transfereeconnectedlinename':_0x57e37d['transfereeconnectedlinename'],'transfereeaccountcode':_0x57e37d[_0x4ad1('0xe')],'transfereecontext':_0x57e37d['transfereecontext'],'transfereeexten':_0x57e37d[_0x4ad1('0xf')],'transfereelinkedid':_0x57e37d[_0x4ad1('0x10')],'isexternal':_0x57e37d[_0x4ad1('0x11')],'context':_0x57e37d['context'],'extension':_0x57e37d[_0x4ad1('0x12')],'type':_0x4ad1('0x13')},'log':_0x4ad1('0x4')});};exports[_0x4ad1('0x14')]=function(_0x3ee34e){return client[_0x4ad1('0x3')](_0x4ad1('0x4'),{'body':{'result':_0x3ee34e['result'],'transfererchannel':_0x3ee34e['origtransfererchannel'],'transferercalleridnum':_0x3ee34e[_0x4ad1('0x15')],'transferercalleridname':_0x3ee34e[_0x4ad1('0x16')],'transfererconnectedlinenum':_0x3ee34e[_0x4ad1('0x17')],'transfererconnectedlinename':_0x3ee34e['secondtransfererconnectedlinename'],'transfereraccountcode':_0x3ee34e[_0x4ad1('0x18')],'transferercontext':_0x3ee34e['secondtransferercontext'],'transfererexten':_0x3ee34e[_0x4ad1('0x19')],'transfererlinkedid':_0x3ee34e[_0x4ad1('0x1a')],'transfereechannel':_0x3ee34e[_0x4ad1('0x1b')],'transfereecalleridnum':_0x3ee34e[_0x4ad1('0x1c')],'transfereecalleridname':_0x3ee34e[_0x4ad1('0x1d')],'transfereeconnectedlinenum':_0x3ee34e[_0x4ad1('0x1e')],'transfereeconnectedlinename':_0x3ee34e['transfertargetconnectedlinename'],'transfereeaccountcode':_0x3ee34e[_0x4ad1('0x1f')],'transfereecontext':_0x3ee34e[_0x4ad1('0x20')],'transfereeexten':_0x3ee34e['transfertargetexten'],'transfereelinkedid':_0x3ee34e[_0x4ad1('0x21')],'isexternal':_0x3ee34e['isexternal'],'context':_0x3ee34e[_0x4ad1('0x22')],'extension':_0x3ee34e['origtransfererexten'],'type':_0x4ad1('0x23')},'log':'CreateVoiceTransferReport'});}; \ No newline at end of file +var _0x9308=['transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','origtransferercontext','origtransfererexten','attended','../client','Request','CreateVoiceTransferReport','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinename','transfereraccountcode','transferercontext','transfererexten','transfereecalleridnum','transfereecalleridname','transfereeaccountcode','transfereecontext','transfereeexten','transfereelinkedid','isexternal','extension','blind','attendedTransfer','result','origtransfererchannel','origtransferercalleridnum','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransfererexten','origtransfererlinkedid','transfertargetchannel'];(function(_0x32b542,_0x4512fa){var _0x554d54=function(_0x35cdfc){while(--_0x35cdfc){_0x32b542['push'](_0x32b542['shift']());}};_0x554d54(++_0x4512fa);}(_0x9308,0xcd));var _0x8930=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x9308[_0xfae23b];return _0x200640;};'use strict';var client=require(_0x8930('0x0'));exports['transfers']={};exports['blindTransfer']=function(_0x5e2490){return client[_0x8930('0x1')](_0x8930('0x2'),{'body':{'result':_0x5e2490['result'],'transfererchannel':_0x5e2490[_0x8930('0x3')],'transferercalleridnum':_0x5e2490[_0x8930('0x4')],'transferercalleridname':_0x5e2490[_0x8930('0x5')],'transfererconnectedlinenum':_0x5e2490['transfererconnectedlinenum'],'transfererconnectedlinename':_0x5e2490[_0x8930('0x6')],'transfereraccountcode':_0x5e2490[_0x8930('0x7')],'transferercontext':_0x5e2490[_0x8930('0x8')],'transfererexten':_0x5e2490[_0x8930('0x9')],'transfererlinkedid':_0x5e2490['transfererlinkedid'],'transfereechannel':_0x5e2490['transfereechannel'],'transfereecalleridnum':_0x5e2490[_0x8930('0xa')],'transfereecalleridname':_0x5e2490[_0x8930('0xb')],'transfereeconnectedlinenum':_0x5e2490['transfereeconnectedlinenum'],'transfereeconnectedlinename':_0x5e2490['transfereeconnectedlinename'],'transfereeaccountcode':_0x5e2490[_0x8930('0xc')],'transfereecontext':_0x5e2490[_0x8930('0xd')],'transfereeexten':_0x5e2490[_0x8930('0xe')],'transfereelinkedid':_0x5e2490[_0x8930('0xf')],'isexternal':_0x5e2490[_0x8930('0x10')],'context':_0x5e2490['context'],'extension':_0x5e2490[_0x8930('0x11')],'type':_0x8930('0x12')},'log':'CreateVoiceTransferReport'});};exports[_0x8930('0x13')]=function(_0x3c820d){return client[_0x8930('0x1')](_0x8930('0x2'),{'body':{'result':_0x3c820d[_0x8930('0x14')],'transfererchannel':_0x3c820d[_0x8930('0x15')],'transferercalleridnum':_0x3c820d[_0x8930('0x16')],'transferercalleridname':_0x3c820d['origtransferercalleridname'],'transfererconnectedlinenum':_0x3c820d[_0x8930('0x17')],'transfererconnectedlinename':_0x3c820d[_0x8930('0x18')],'transfereraccountcode':_0x3c820d[_0x8930('0x19')],'transferercontext':_0x3c820d['secondtransferercontext'],'transfererexten':_0x3c820d[_0x8930('0x1a')],'transfererlinkedid':_0x3c820d[_0x8930('0x1b')],'transfereechannel':_0x3c820d[_0x8930('0x1c')],'transfereecalleridnum':_0x3c820d['transfertargetcalleridnum'],'transfereecalleridname':_0x3c820d[_0x8930('0x1d')],'transfereeconnectedlinenum':_0x3c820d[_0x8930('0x1e')],'transfereeconnectedlinename':_0x3c820d[_0x8930('0x1f')],'transfereeaccountcode':_0x3c820d[_0x8930('0x20')],'transfereecontext':_0x3c820d[_0x8930('0x21')],'transfereeexten':_0x3c820d[_0x8930('0x22')],'transfereelinkedid':_0x3c820d[_0x8930('0x23')],'isexternal':_0x3c820d['isexternal'],'context':_0x3c820d[_0x8930('0x24')],'extension':_0x3c820d[_0x8930('0x25')],'type':_0x8930('0x26')},'log':_0x8930('0x2')});}; \ No newline at end of file diff --git a/server/services/ami/server/index.js b/server/services/ami/server/index.js index c9cbde6..a57838e 100644 --- a/server/services/ami/server/index.js +++ b/server/services/ami/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d9e=['outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','active','callerid','Interval','push','length','channels','username','map','find','uniqueid','channel','%s.%s','filename','wav','MixMonitor','ai(mixmonitorid)','monitors','toLowerCase','isNil','/var/spool/asterisk/monitor/','YYYY-MM-DD\x20HH:mm:ss','mixmonitorid','status','MixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','voicechannel','resolve','StopMixMonitor','destinationchannel','stop','StopMixMonitor\x20Success','queueChannels','voicequeuechannel','voicequeuechannelhangup','Hangup','voicequeuechannelredirect','Redirect','exten','context','values','telephones','trunks','outboundChannels','campaigns','run','event','Event\x20name\x20mandatory','emit','custom:','faxAccounts','server','http','127.0.0.1','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','validate','bluebird','moment','../properties','../ami','listen','format','%s/%s','name','timers','timer','agents','pause','error','asterisk','ami\x20disconnected','join','pick','module','Reload','Action','then','message','isConnected','command','catch','voiceQueues','loggedIn','sumBillable','talking','total','type','abandoned','waiting','loggedInDb','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay'];(function(_0x2dbce7,_0x57cb8d){var _0x3a3ed0=function(_0x28c8c6){while(--_0x28c8c6){_0x2dbce7['push'](_0x2dbce7['shift']());}};_0x3a3ed0(++_0x57cb8d);}(_0x5d9e,0x155));var _0xe5d9=function(_0xb2d06d,_0x452a70){_0xb2d06d=_0xb2d06d-0x0;var _0x88c80c=_0x5d9e[_0xb2d06d];return _0x88c80c;};'use strict';var _=require(_0xe5d9('0x0'));var util=require(_0xe5d9('0x1'));var jayson=require('jayson/promise');var schema=require(_0xe5d9('0x2'));var BPromise=require(_0xe5d9('0x3'));var moment=require(_0xe5d9('0x4'));var config=require('../../../config/environment');var properties=require(_0xe5d9('0x5'));var ami=require(_0xe5d9('0x6'));exports[_0xe5d9('0x7')]=function(_0x3638b6,_0x5430dd,_0x2e22c2){return new BPromise(function(_0x2f914a,_0x16fd72){var _0x2f6085={'QueuePause':function(_0xe9e628){return new Promise(function(_0x519a61,_0x1dc4be){var _0x4271f3=util[_0xe5d9('0x8')](_0xe5d9('0x9'),'SIP',_0xe9e628[_0xe5d9('0xa')]);if(_0x3638b6[_0xe5d9('0xb')]&&_0x3638b6[_0xe5d9('0xb')][_0x4271f3]&&_0x3638b6[_0xe5d9('0xb')][_0x4271f3][_0xe5d9('0xc')]){_0x3638b6[_0xe5d9('0xb')][_0x4271f3]['updateAcw']();}if(_0x3638b6[_0xe5d9('0xd')][_0x4271f3]){_0x3638b6[_0xe5d9('0xd')][_0x4271f3]['updateStatusRealtime']({'statePause':_0xe9e628[_0xe5d9('0xe')]?!![]:![]});}_0x519a61({'code':0xc8,'message':'QueuePause'});});},'Reload':function(_0x23ff7f){var _0xbe32b8=this;return new Promise(function(_0x16a5af,_0x122264){if(ami['isConnected']()==![]){return _0x122264(_0xbe32b8[_0xe5d9('0xf')](0x1f4,[config[_0xe5d9('0x10')]['ip'],config[_0xe5d9('0x10')]['username'],_0xe5d9('0x11')][_0xe5d9('0x12')]('\x20')));}_0x23ff7f=_[_0xe5d9('0x13')](_0x23ff7f,_['keys'](properties[_0xe5d9('0x14')]));_0x23ff7f['action']=_0xe5d9('0x15');return ami[_0xe5d9('0x16')](_0x23ff7f)[_0xe5d9('0x17')](function(_0x3bebf3){_0x16a5af({'code':0xc8,'message':_0x3bebf3[_0xe5d9('0x18')]});})['catch'](function(_0x413c9c){_0x122264(_0xbe32b8[_0xe5d9('0xf')](0x1f5,_0x413c9c[_0xe5d9('0x18')]));});});},'Command':function(_0x3c5758){var _0x165343=this;return new Promise(function(_0x32bd5e,_0x2cf512){if(ami[_0xe5d9('0x19')]()==![]){return _0x2cf512(_0x165343['error'](0x1f4,[config['asterisk']['ip'],config[_0xe5d9('0x10')]['username'],_0xe5d9('0x11')]['join']('\x20')));}_0x3c5758=_[_0xe5d9('0x13')](_0x3c5758,_0xe5d9('0x1a'));_0x3c5758['action']='Command';return ami[_0xe5d9('0x16')](_0x3c5758)['then'](function(_0x1fa654){_0x32bd5e({'code':0xc8,'message':_0x1fa654['content']});})[_0xe5d9('0x1b')](function(_0x225b21){_0x2cf512(_0x165343['error'](0x1f5,_0x225b21[_0xe5d9('0x18')]));});});},'VoiceQueues':function(_0x5af514){return new Promise(function(_0x2fe51d,_0x2033a3){var _0x57d70a=[];for(var _0x776cc4 in _0x3638b6['voiceQueues']){if(_0x3638b6[_0xe5d9('0x1c')]['hasOwnProperty'](_0x776cc4)){var _0xfd0848=_0x3638b6[_0xe5d9('0x1c')][_0x776cc4];var _0x42d3b9={'id':_0xfd0848['id'],'name':_0xfd0848[_0xe5d9('0xa')],'strategy':_0xfd0848['strategy'],'answered':_0xfd0848['answered'],'available':_0xfd0848['available'],'loggedIn':_0xfd0848[_0xe5d9('0x1d')],'pTalking':_0xfd0848['pTalking'],'sumBillable':_0xfd0848[_0xe5d9('0x1e')],'sumDuration':_0xfd0848['sumDuration'],'sumHoldTime':_0xfd0848['sumHoldTime']||0x0,'talking':_0xfd0848[_0xe5d9('0x1f')],'total':_0xfd0848[_0xe5d9('0x20')],'type':_0xfd0848[_0xe5d9('0x21')],'unmanaged':_0xfd0848['unmanaged'],'abandoned':_0xfd0848[_0xe5d9('0x22')],'waiting':_0xfd0848[_0xe5d9('0x23')],'loggedInDb':_0xfd0848[_0xe5d9('0x24')]};if(_0xfd0848[_0xe5d9('0x21')]===_0xe5d9('0x25')){_0x42d3b9[_0xe5d9('0x26')]=_0xfd0848['dialActive'];_0x42d3b9[_0xe5d9('0x27')]=_0xfd0848[_0xe5d9('0x27')];_0x42d3b9[_0xe5d9('0x28')]=_0xfd0848[_0xe5d9('0x28')];_0x42d3b9['dialOriginateCallerIdNumber']=_0xfd0848['dialOriginateCallerIdNumber'];_0x42d3b9[_0xe5d9('0x29')]=_0xfd0848[_0xe5d9('0x29')];_0x42d3b9['dialPrefix']=_0xfd0848[_0xe5d9('0x2a')];_0x42d3b9[_0xe5d9('0x2b')]=_0xfd0848[_0xe5d9('0x2b')];_0x42d3b9[_0xe5d9('0x2c')]=_0xfd0848['outboundAnswerCallsDay'];_0x42d3b9[_0xe5d9('0x2d')]=_0xfd0848['outboundBlacklistCallsDay'];_0x42d3b9[_0xe5d9('0x2e')]=_0xfd0848['outboundBusyCallsDay'];_0x42d3b9['outboundCongestionCallsDay']=_0xfd0848[_0xe5d9('0x2f')];_0x42d3b9[_0xe5d9('0x30')]=_0xfd0848[_0xe5d9('0x30')];_0x42d3b9[_0xe5d9('0x31')]=_0xfd0848[_0xe5d9('0x31')];_0x42d3b9[_0xe5d9('0x32')]=_0xfd0848[_0xe5d9('0x32')];_0x42d3b9['outboundNoAnswerCallsDay']=_0xfd0848[_0xe5d9('0x33')];_0x42d3b9[_0xe5d9('0x34')]=_0xfd0848['outboundNoSuchCallsDay'];_0x42d3b9[_0xe5d9('0x35')]=_0xfd0848[_0xe5d9('0x35')];_0x42d3b9[_0xe5d9('0x36')]=_0xfd0848[_0xe5d9('0x36')];_0x42d3b9[_0xe5d9('0x37')]=_0xfd0848[_0xe5d9('0x37')];_0x42d3b9[_0xe5d9('0x38')]=_0xfd0848[_0xe5d9('0x38')];_0x42d3b9['predictiveIntervalAnsweredCalls']=_0xfd0848[_0xe5d9('0x39')];_0x42d3b9[_0xe5d9('0x3a')]=_0xfd0848['predictiveIntervalAvgHoldtime'];_0x42d3b9['predictiveIntervalAvgTalktime']=_0xfd0848[_0xe5d9('0x3b')];_0x42d3b9[_0xe5d9('0x3c')]=_0xfd0848[_0xe5d9('0x3c')];_0x42d3b9[_0xe5d9('0x3d')]=_0xfd0848[_0xe5d9('0x3d')];_0x42d3b9[_0xe5d9('0x3e')]=_0xfd0848[_0xe5d9('0x3e')];_0x42d3b9[_0xe5d9('0x3f')]=_0xfd0848[_0xe5d9('0x3f')];_0x42d3b9[_0xe5d9('0x40')]=_0xfd0848[_0xe5d9('0x40')];_0x42d3b9['predictiveIntervalMultiplicativeFactor']=_0xfd0848[_0xe5d9('0x41')];_0x42d3b9[_0xe5d9('0x42')]=_0xfd0848['predictiveIntervalPauses'];_0x42d3b9['predictiveIntervalAvailable']=_0xfd0848['predictiveIntervalAvailable'];_0x42d3b9[_0xe5d9('0x43')]=_0xfd0848[_0xe5d9('0x43')];_0x42d3b9['message']=_0xfd0848[_0xe5d9('0x18')];_0x42d3b9[_0xe5d9('0x44')]=_0xfd0848[_0xe5d9('0x44')];_0x42d3b9['erlangCalls']=_0xfd0848[_0xe5d9('0x45')];_0x42d3b9['erlangCallToSecond']=_0xfd0848[_0xe5d9('0x46')];_0x42d3b9[_0xe5d9('0x47')]=_0xfd0848[_0xe5d9('0x47')];_0x42d3b9[_0xe5d9('0x48')]=_0xfd0848['erlangBusyFactor'];_0x42d3b9['startPredictive']=_0xfd0848[_0xe5d9('0x49')];_0x42d3b9[_0xe5d9('0x4a')]=_0xfd0848[_0xe5d9('0x4a')];}if(_0xfd0848[_0xe5d9('0x4b')]){_0x42d3b9['Trunk']={'id':_0xfd0848[_0xe5d9('0x4b')]['id'],'name':_0xfd0848[_0xe5d9('0x4b')][_0xe5d9('0xa')],'active':_0xfd0848['Trunk'][_0xe5d9('0x4c')],'callerid':_0xfd0848[_0xe5d9('0x4b')][_0xe5d9('0x4d')]};}if(_0xfd0848[_0xe5d9('0x4e')]){_0x42d3b9[_0xe5d9('0x4e')]={'id':_0xfd0848[_0xe5d9('0x4e')]['id'],'name':_0xfd0848['Interval'][_0xe5d9('0xa')]};}_0x57d70a[_0xe5d9('0x4f')](_0x42d3b9);}}_0x2fe51d({'count':_0x57d70a[_0xe5d9('0x50')],'rows':_0x57d70a});});},'VoiceChannels':function(_0x2c3826){return new Promise(function(_0x2906aa,_0x37e777){var _0x442328=_['values'](_0x3638b6[_0xe5d9('0x51')]);_0x2906aa({'count':_0x442328['length'],'rows':_0x442328});});},'VoiceChannelMixMonitor':function(_0xa90660){var _0x4673cd=this;return new Promise(function(_0x42f060,_0xb060b){if(ami[_0xe5d9('0x19')]()==![]){return _0xb060b(_0x4673cd[_0xe5d9('0xf')](0x1f4,[config[_0xe5d9('0x10')]['ip'],config['asterisk'][_0xe5d9('0x52')],_0xe5d9('0x11')][_0xe5d9('0x12')]('\x20')));}var _0x52d877=schema(properties['voicechannel'])[_0xe5d9('0x2')](_0xa90660);if(_0x52d877[_0xe5d9('0x50')]>0x0){return _0xb060b(_0x4673cd['error'](0x1f4,_[_0xe5d9('0x53')](_0x52d877,'message')[_0xe5d9('0x12')](',\x20')));}var _0x4d3297=_[_0xe5d9('0x54')](_0x3638b6['channels'],{'uniqueid':_0xa90660[_0xe5d9('0x55')]});if(_0x4d3297&&_0x4d3297[_0xe5d9('0x56')]){var _0x18b049=util[_0xe5d9('0x8')](_0xe5d9('0x57'),_0xa90660[_0xe5d9('0x58')]||_0xa90660[_0xe5d9('0x55')],_0xa90660[_0xe5d9('0x8')]||_0xe5d9('0x59'));return ami['Action']({'action':_0xe5d9('0x5a'),'channel':_0x4d3297[_0xe5d9('0x56')],'file':_0x18b049,'options':_0xe5d9('0x5b')})[_0xe5d9('0x17')](function(_0x554d9f){var _0x274739=_[_0xe5d9('0x54')](_0x4d3297[_0xe5d9('0x5c')],{'filename':'/var/spool/asterisk/monitor/'+_0x18b049[_0xe5d9('0x5d')]()});if(_[_0xe5d9('0x5e')](_0x274739)){_0x4d3297[_0xe5d9('0x5c')][_0xe5d9('0x4f')]({'filename':_0xe5d9('0x5f')+_0x18b049[_0xe5d9('0x5d')](),'createdAt':moment()[_0xe5d9('0x8')](_0xe5d9('0x60')),'mixmonitorid':_0x554d9f[_0xe5d9('0x61')],'status':'rec'});}else{_0x274739[_0xe5d9('0x61')]=_0x554d9f['mixmonitorid'];_0x274739[_0xe5d9('0x62')]='rec';}_0x42f060({'code':0xc8,'message':[_0xa90660['uniqueid'],_0xe5d9('0x63'),_0x554d9f['mixmonitorid']][_0xe5d9('0x12')]('\x20'),'mixmonitorid':_0x554d9f[_0xe5d9('0x61')]});})[_0xe5d9('0x1b')](function(_0x4e10c3){_0xb060b(_0x4673cd['error'](0x1f5,[_0xa90660[_0xe5d9('0x55')],_0x4e10c3[_0xe5d9('0x18')][_0xe5d9('0x5d')]()][_0xe5d9('0x12')]('\x20')));});}else{return _0xb060b(_0x4673cd[_0xe5d9('0xf')](0x1f5,_0xe5d9('0x64')));}});},'VoiceChannelStopMixMonitor':function(_0x5d44dd){var _0xa732e7=this;return new Promise(function(_0x671a3e,_0x9e8236){if(ami['isConnected']()==![]){return _0x9e8236(_0xa732e7[_0xe5d9('0xf')](0x1f4,[config['asterisk']['ip'],config['asterisk']['username'],_0xe5d9('0x11')][_0xe5d9('0x12')]('\x20')));}var _0x267c76=schema(properties[_0xe5d9('0x65')])[_0xe5d9('0x2')](_0x5d44dd);if(_0x267c76[_0xe5d9('0x50')]>0x0){return _0x9e8236(_0xa732e7[_0xe5d9('0xf')](0x1f4,_[_0xe5d9('0x53')](_0x267c76,_0xe5d9('0x18'))[_0xe5d9('0x12')](',\x20')));}var _0x3bf606=_['find'](_0x3638b6['channels'],{'uniqueid':_0x5d44dd[_0xe5d9('0x55')]});if(_0x3bf606){return BPromise[_0xe5d9('0x66')]()[_0xe5d9('0x17')](function(){if(_0x3bf606[_0xe5d9('0x56')]){return ami[_0xe5d9('0x16')]({'action':_0xe5d9('0x67'),'channel':_0x3bf606['channel'],'mixmonitorid':_0x5d44dd[_0xe5d9('0x61')]})[_0xe5d9('0x1b')](function(_0x173593){});}})[_0xe5d9('0x17')](function(){if(_0x3bf606[_0xe5d9('0x68')]){return ami['Action']({'action':_0xe5d9('0x67'),'channel':_0x3bf606[_0xe5d9('0x68')],'mixmonitorid':_0x5d44dd[_0xe5d9('0x61')]})[_0xe5d9('0x1b')](function(_0x15cceb){});}})['then'](function(_0x5d11be){var _0x3d9c06=_[_0xe5d9('0x54')](_0x3bf606[_0xe5d9('0x5c')],{'mixmonitorid':_0x5d44dd[_0xe5d9('0x61')]});if(_0x3d9c06){_0x3d9c06[_0xe5d9('0x62')]='stop';}})[_0xe5d9('0x17')](function(){var _0x24a9db=util[_0xe5d9('0x8')](_0xe5d9('0x57'),_0x5d44dd['filename']||_0x5d44dd['uniqueid'],_0x5d44dd[_0xe5d9('0x8')]||_0xe5d9('0x59'));var _0x5c112a=_['find'](_0x3bf606[_0xe5d9('0x5c')],{'filename':_0xe5d9('0x5f')+_0x24a9db[_0xe5d9('0x5d')]()});if(_0x5c112a){_0x5c112a['status']=_0xe5d9('0x69');}})['then'](function(){_0x671a3e({'code':0xc8,'message':[_0x5d44dd['uniqueid'],_0xe5d9('0x6a')][_0xe5d9('0x12')]('\x20')});})[_0xe5d9('0x1b')](function(_0x272d36){_0x9e8236(_0xa732e7['error'](0x1f5,[_0x5d44dd[_0xe5d9('0x55')],_0x272d36[_0xe5d9('0x18')]['toLowerCase']()][_0xe5d9('0x12')]('\x20')));});}else{return _0x9e8236(_0xa732e7[_0xe5d9('0xf')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannels':function(_0x3d2638){return new Promise(function(_0x774709,_0x47db5d){var _0x2884cc=_['values'](_0x3638b6[_0xe5d9('0x6b')]);_0x774709({'count':_0x2884cc[_0xe5d9('0x50')],'rows':_0x2884cc});});},'VoiceQueuesChannel':function(_0x45b808){var _0x15c3fa=this;return new Promise(function(_0x32a6b3,_0x332e67){var _0x14cb8c=schema(properties[_0xe5d9('0x6c')])[_0xe5d9('0x2')](_0x45b808);if(_0x14cb8c[_0xe5d9('0x50')]>0x0){return _0x332e67(_0x15c3fa[_0xe5d9('0xf')](0x1f4,_[_0xe5d9('0x53')](_0x14cb8c,_0xe5d9('0x18'))['join'](',\x20')));}var _0x28ec09=_[_0xe5d9('0x54')](_0x3638b6[_0xe5d9('0x6b')],{'uniqueid':_0x45b808[_0xe5d9('0x55')]});if(_0x28ec09){_0x32a6b3(_0x28ec09);}else{return _0x332e67(_0x15c3fa[_0xe5d9('0xf')](0x1f5,_0xe5d9('0x64')));}});},'VoiceQueuesChannelHangup':function(_0x4d9e48){var _0x10ccaf=this;return new Promise(function(_0x1ed347,_0x23cc58){if(ami[_0xe5d9('0x19')]()==![]){return _0x23cc58(_0x10ccaf[_0xe5d9('0xf')](0x1f4,[config[_0xe5d9('0x10')]['ip'],config['asterisk']['username'],'ami\x20disconnected']['join']('\x20')));}var _0x13376c=schema(properties[_0xe5d9('0x6d')])[_0xe5d9('0x2')](_0x4d9e48);if(_0x13376c[_0xe5d9('0x50')]>0x0){return _0x23cc58(_0x10ccaf['error'](0x1f4,_[_0xe5d9('0x53')](_0x13376c,_0xe5d9('0x18'))['join'](',\x20')));}var _0x4f6e98=_[_0xe5d9('0x54')](_0x3638b6[_0xe5d9('0x6b')],{'uniqueid':_0x4d9e48[_0xe5d9('0x55')]});if(_0x4f6e98&&_0x4f6e98['channel']){return ami[_0xe5d9('0x16')]({'action':_0xe5d9('0x6e'),'channel':_0x4f6e98[_0xe5d9('0x56')]})[_0xe5d9('0x17')](function(_0x39e346){_0x1ed347({'code':0xc8,'message':[_0x4d9e48[_0xe5d9('0x55')],_0x39e346[_0xe5d9('0x18')][_0xe5d9('0x5d')]()][_0xe5d9('0x12')]('\x20')});})[_0xe5d9('0x1b')](function(_0x30d4fe){_0x23cc58(_0x10ccaf['error'](0x1f5,[_0x4d9e48[_0xe5d9('0x55')],_0x30d4fe[_0xe5d9('0x18')][_0xe5d9('0x5d')]()]['join']('\x20')));});}else{return _0x23cc58(_0x10ccaf[_0xe5d9('0xf')](0x1f5,_0xe5d9('0x64')));}});},'VoiceQueuesChannelRedirect':function(_0x102db3){var _0x367f22=this;return new Promise(function(_0x4ebeaf,_0x3e7faf){if(ami[_0xe5d9('0x19')]()==![]){return _0x3e7faf(_0x367f22['error'](0x1f4,[config[_0xe5d9('0x10')]['ip'],config[_0xe5d9('0x10')][_0xe5d9('0x52')],_0xe5d9('0x11')][_0xe5d9('0x12')]('\x20')));}var _0x43c79b=schema(properties[_0xe5d9('0x6f')])[_0xe5d9('0x2')](_0x102db3);if(_0x43c79b[_0xe5d9('0x50')]>0x0){return _0x3e7faf(_0x367f22[_0xe5d9('0xf')](0x1f4,_['map'](_0x43c79b,'message')['join'](',\x20')));}var _0x2b0588=_['find'](_0x3638b6[_0xe5d9('0x6b')],{'uniqueid':_0x102db3[_0xe5d9('0x55')]});if(_0x2b0588&&_0x2b0588[_0xe5d9('0x56')]){return ami[_0xe5d9('0x16')]({'action':_0xe5d9('0x70'),'channel':_0x2b0588['channel'],'exten':_0x102db3[_0xe5d9('0x71')],'context':_0x102db3[_0xe5d9('0x72')]||_0x2b0588['context'],'priority':0x1})[_0xe5d9('0x17')](function(_0x2ef1cf){_0x4ebeaf({'code':0xc8,'message':[_0x102db3['uniqueid'],_0x2ef1cf['message'][_0xe5d9('0x5d')]()][_0xe5d9('0x12')]('\x20')});})[_0xe5d9('0x1b')](function(_0x278c9c){_0x3e7faf(_0x367f22[_0xe5d9('0xf')](0x1f5,[_0x102db3['uniqueid'],_0x278c9c[_0xe5d9('0x18')][_0xe5d9('0x5d')]()][_0xe5d9('0x12')]('\x20')));});}else{return _0x3e7faf(_0x367f22[_0xe5d9('0xf')](0x1f5,_0xe5d9('0x64')));}});},'Agents':function(_0x125d6a){return new Promise(function(_0x3f4533,_0x5e44ac){var _0x1761a5=_[_0xe5d9('0x73')](_0x3638b6[_0xe5d9('0xd')]);_0x3f4533({'count':_0x1761a5[_0xe5d9('0x50')],'rows':_0x1761a5});});},'Telephones':function(_0xf5af01){return new Promise(function(_0x3667c4,_0x289f36){var _0x406838=_[_0xe5d9('0x73')](_0x3638b6[_0xe5d9('0x74')]);_0x3667c4({'count':_0x406838[_0xe5d9('0x50')],'rows':_0x406838});});},'Trunks':function(_0x20ab9d){return new Promise(function(_0x41273e,_0x4ee649){var _0x21514b=_[_0xe5d9('0x73')](_0x3638b6[_0xe5d9('0x75')]);_0x41273e({'count':_0x21514b[_0xe5d9('0x50')],'rows':_0x21514b});});},'OutboundChannels':function(_0x432eca){return new Promise(function(_0x555f01,_0x223133){var _0x9ea692=_['values'](_0x3638b6[_0xe5d9('0x76')]);_0x555f01({'count':_0x9ea692[_0xe5d9('0x50')],'rows':_0x9ea692});});},'Outbound':function(_0x54d107){return new Promise(function(_0x22d3d5,_0x81fc3b){_0x22d3d5(_0x3638b6[_0xe5d9('0x25')]);});},'Campaigns':function(_0x790df8){return new Promise(function(_0x12e5c0,_0x49a2bf){var _0x1a3b2c=_[_0xe5d9('0x73')](_0x3638b6[_0xe5d9('0x77')]);_0x12e5c0({'count':_0x1a3b2c[_0xe5d9('0x50')],'rows':_0x1a3b2c});});},'VoiceQueuesPreview':function(_0xc85e1){var _0xf7c1c5=this;return new Promise(function(_0x3ff82e,_0x3338a3){_0x5430dd[_0xe5d9('0x78')](_0xc85e1['id'])[_0xe5d9('0x17')](function(_0x7bab9f){_0x3ff82e({'code':0xc8,'message':_0x7bab9f[_0xe5d9('0x18')]});})[_0xe5d9('0x1b')](function(_0x303470){_0x3338a3(_0xf7c1c5['error'](0x1f4,_0x303470[_0xe5d9('0x18')]));});});},'EventManager':function(_0x783a38){var _0x11537d=this;return new Promise(function(_0x27cff8,_0x13fc68){if(!_0x783a38[_0xe5d9('0x79')]){return _0x13fc68(_0x11537d[_0xe5d9('0xf')](0x1f4,_0xe5d9('0x7a')));}ami[_0xe5d9('0x7b')](_0xe5d9('0x7c')+_0x783a38[_0xe5d9('0x79')],_0x783a38['message']);_0x27cff8({'code':0xc8,'message':_0x783a38});});},'FaxAccounts':function(_0x23f972){return new Promise(function(_0x388359,_0x1d2a11){var _0x2737b5=_[_0xe5d9('0x73')](_0x3638b6[_0xe5d9('0x7d')]);_0x388359({'count':_0x2737b5[_0xe5d9('0x50')],'rows':_0x2737b5});});},'SendFax':function(_0x42039c){var _0x256de4=this;return new Promise(function(_0x3066be,_0x3e9636){_0x2e22c2['send'](_0x42039c)[_0xe5d9('0x17')](function(_0x43ec59){_0x3066be({'code':0xc8,'message':_0x43ec59[_0xe5d9('0x18')]});})['catch'](function(_0x1c649f){_0x3e9636(_0x256de4[_0xe5d9('0xf')](0x1f4,_0x1c649f[_0xe5d9('0x18')]));});});},'CheckAfterSend':function(_0x5b4bd2){var _0xb9ba52=this;return new Promise(function(_0x5ee2d9,_0xa1c570){_0x2e22c2['checkAfterSend'](_0x5b4bd2)[_0xe5d9('0x17')](function(_0x30c1cb){_0x5ee2d9({'code':0xc8,'message':_0x30c1cb[_0xe5d9('0x18')]});})['catch'](function(_0x102828){_0xa1c570(_0xb9ba52[_0xe5d9('0xf')](0x1f4,_0x102828[_0xe5d9('0x18')]));});});}};var _0x2488b9=jayson[_0xe5d9('0x7e')](_0x2f6085)[_0xe5d9('0x7f')]();_0x2488b9['on'](_0xe5d9('0xf'),function(_0x182272){return _0x16fd72(_0x182272);});_0x2488b9[_0xe5d9('0x7')](0x232a,_0xe5d9('0x80'),function(){console['log'](_0xe5d9('0x81'),0x232a);return _0x2f914a(_0xe5d9('0x82')+0x232a);});});}; \ No newline at end of file +var _0x7788=['status','rec','MixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','resolve','destinationchannel','find','stop','%s.%s','StopMixMonitor\x20Success','voicequeuechannel','voicequeuechannelhangup','Hangup','Redirect','context','trunks','outboundChannels','outbound','campaigns','run','emit','custom:','faxAccounts','send','checkAfterSend','server','http','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','validate','bluebird','moment','../properties','../ami','listen','format','SIP','name','timers','timer','updateAcw','agents','QueuePause','isConnected','error','asterisk','join','pick','module','then','catch','username','action','Command','Action','content','hasOwnProperty','voiceQueues','strategy','answered','available','loggedIn','pTalking','sumBillable','sumHoldTime','talking','total','type','abandoned','waiting','loggedInDb','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','message','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','active','callerid','Interval','push','length','values','channels','ami\x20disconnected','voicechannel','map','uniqueid','filename','wav','MixMonitor','channel','monitors','toLowerCase','isNil','/var/spool/asterisk/monitor/','YYYY-MM-DD\x20HH:mm:ss','mixmonitorid'];(function(_0x4df912,_0x4a3d9f){var _0x3438fb=function(_0x1163f9){while(--_0x1163f9){_0x4df912['push'](_0x4df912['shift']());}};_0x3438fb(++_0x4a3d9f);}(_0x7788,0xa3));var _0x8778=function(_0x5ce15c,_0x19c917){_0x5ce15c=_0x5ce15c-0x0;var _0x36e4f5=_0x7788[_0x5ce15c];return _0x36e4f5;};'use strict';var _=require(_0x8778('0x0'));var util=require(_0x8778('0x1'));var jayson=require(_0x8778('0x2'));var schema=require(_0x8778('0x3'));var BPromise=require(_0x8778('0x4'));var moment=require(_0x8778('0x5'));var config=require('../../../config/environment');var properties=require(_0x8778('0x6'));var ami=require(_0x8778('0x7'));exports[_0x8778('0x8')]=function(_0x5777a6,_0x245a92,_0x40d608){return new BPromise(function(_0x39f6a8,_0x29fa8f){var _0xc023f5={'QueuePause':function(_0x31cd9a){return new Promise(function(_0x1cdabe,_0x22c2a1){var _0x4805b1=util[_0x8778('0x9')]('%s/%s',_0x8778('0xa'),_0x31cd9a[_0x8778('0xb')]);if(_0x5777a6[_0x8778('0xc')]&&_0x5777a6[_0x8778('0xc')][_0x4805b1]&&_0x5777a6[_0x8778('0xc')][_0x4805b1][_0x8778('0xd')]){_0x5777a6[_0x8778('0xc')][_0x4805b1][_0x8778('0xe')]();}if(_0x5777a6['agents'][_0x4805b1]){_0x5777a6[_0x8778('0xf')][_0x4805b1]['updateStatusRealtime']({'statePause':_0x31cd9a['pause']?!![]:![]});}_0x1cdabe({'code':0xc8,'message':_0x8778('0x10')});});},'Reload':function(_0x5b907a){var _0x5c806a=this;return new Promise(function(_0x33981f,_0x470d0f){if(ami[_0x8778('0x11')]()==![]){return _0x470d0f(_0x5c806a[_0x8778('0x12')](0x1f4,[config['asterisk']['ip'],config[_0x8778('0x13')]['username'],'ami\x20disconnected'][_0x8778('0x14')]('\x20')));}_0x5b907a=_[_0x8778('0x15')](_0x5b907a,_['keys'](properties[_0x8778('0x16')]));_0x5b907a['action']='Reload';return ami['Action'](_0x5b907a)[_0x8778('0x17')](function(_0x5bdab3){_0x33981f({'code':0xc8,'message':_0x5bdab3['message']});})[_0x8778('0x18')](function(_0x133375){_0x470d0f(_0x5c806a[_0x8778('0x12')](0x1f5,_0x133375['message']));});});},'Command':function(_0x443ed4){var _0x205aae=this;return new Promise(function(_0x5939d2,_0x2a0ba5){if(ami[_0x8778('0x11')]()==![]){return _0x2a0ba5(_0x205aae[_0x8778('0x12')](0x1f4,[config[_0x8778('0x13')]['ip'],config[_0x8778('0x13')][_0x8778('0x19')],'ami\x20disconnected']['join']('\x20')));}_0x443ed4=_[_0x8778('0x15')](_0x443ed4,'command');_0x443ed4[_0x8778('0x1a')]=_0x8778('0x1b');return ami[_0x8778('0x1c')](_0x443ed4)[_0x8778('0x17')](function(_0x10aa3e){_0x5939d2({'code':0xc8,'message':_0x10aa3e[_0x8778('0x1d')]});})[_0x8778('0x18')](function(_0x10d5be){_0x2a0ba5(_0x205aae['error'](0x1f5,_0x10d5be['message']));});});},'VoiceQueues':function(_0x364262){return new Promise(function(_0x17b985,_0x4fed63){var _0x2583db=[];for(var _0x19551e in _0x5777a6['voiceQueues']){if(_0x5777a6['voiceQueues'][_0x8778('0x1e')](_0x19551e)){var _0xba5c14=_0x5777a6[_0x8778('0x1f')][_0x19551e];var _0x5740a8={'id':_0xba5c14['id'],'name':_0xba5c14['name'],'strategy':_0xba5c14[_0x8778('0x20')],'answered':_0xba5c14[_0x8778('0x21')],'available':_0xba5c14[_0x8778('0x22')],'loggedIn':_0xba5c14[_0x8778('0x23')],'pTalking':_0xba5c14[_0x8778('0x24')],'sumBillable':_0xba5c14[_0x8778('0x25')],'sumDuration':_0xba5c14['sumDuration'],'sumHoldTime':_0xba5c14[_0x8778('0x26')]||0x0,'talking':_0xba5c14[_0x8778('0x27')],'total':_0xba5c14[_0x8778('0x28')],'type':_0xba5c14[_0x8778('0x29')],'unmanaged':_0xba5c14['unmanaged'],'abandoned':_0xba5c14[_0x8778('0x2a')],'waiting':_0xba5c14[_0x8778('0x2b')],'loggedInDb':_0xba5c14[_0x8778('0x2c')]};if(_0xba5c14[_0x8778('0x29')]==='outbound'){_0x5740a8[_0x8778('0x2d')]=_0xba5c14[_0x8778('0x2d')];_0x5740a8[_0x8778('0x2e')]=_0xba5c14[_0x8778('0x2e')];_0x5740a8[_0x8778('0x2f')]=_0xba5c14[_0x8778('0x2f')];_0x5740a8[_0x8778('0x30')]=_0xba5c14['dialOriginateCallerIdNumber'];_0x5740a8['dialOriginateTimeout']=_0xba5c14[_0x8778('0x31')];_0x5740a8['dialPrefix']=_0xba5c14[_0x8778('0x32')];_0x5740a8['outboundAnswerAgiCallsDay']=_0xba5c14['outboundAnswerAgiCallsDay'];_0x5740a8[_0x8778('0x33')]=_0xba5c14[_0x8778('0x33')];_0x5740a8['outboundBlacklistCallsDay']=_0xba5c14[_0x8778('0x34')];_0x5740a8[_0x8778('0x35')]=_0xba5c14[_0x8778('0x35')];_0x5740a8[_0x8778('0x36')]=_0xba5c14[_0x8778('0x36')];_0x5740a8[_0x8778('0x37')]=_0xba5c14[_0x8778('0x37')];_0x5740a8['outboundDropCallsDayCallersExit']=_0xba5c14['outboundDropCallsDayCallersExit'];_0x5740a8[_0x8778('0x38')]=_0xba5c14[_0x8778('0x38')];_0x5740a8[_0x8778('0x39')]=_0xba5c14[_0x8778('0x39')];_0x5740a8[_0x8778('0x3a')]=_0xba5c14[_0x8778('0x3a')];_0x5740a8['outboundOriginateFailureCallsDay']=_0xba5c14[_0x8778('0x3b')];_0x5740a8['outboundReCallsDay']=_0xba5c14[_0x8778('0x3c')];_0x5740a8['outboundRejectCallsDay']=_0xba5c14[_0x8778('0x3d')];_0x5740a8[_0x8778('0x3e')]=_0xba5c14['outboundUnknownCallsDay'];_0x5740a8[_0x8778('0x3f')]=_0xba5c14[_0x8778('0x3f')];_0x5740a8[_0x8778('0x40')]=_0xba5c14['predictiveIntervalAvgHoldtime'];_0x5740a8[_0x8778('0x41')]=_0xba5c14[_0x8778('0x41')];_0x5740a8[_0x8778('0x42')]=_0xba5c14[_0x8778('0x42')];_0x5740a8['predictiveIntervalDroppedCallsTimeout']=_0xba5c14[_0x8778('0x43')];_0x5740a8[_0x8778('0x44')]=_0xba5c14[_0x8778('0x44')];_0x5740a8[_0x8778('0x45')]=_0xba5c14[_0x8778('0x45')];_0x5740a8[_0x8778('0x46')]=_0xba5c14[_0x8778('0x46')];_0x5740a8['predictiveIntervalMultiplicativeFactor']=_0xba5c14[_0x8778('0x47')];_0x5740a8[_0x8778('0x48')]=_0xba5c14[_0x8778('0x48')];_0x5740a8[_0x8778('0x49')]=_0xba5c14['predictiveIntervalAvailable'];_0x5740a8[_0x8778('0x4a')]=_0xba5c14[_0x8778('0x4a')];_0x5740a8[_0x8778('0x4b')]=_0xba5c14[_0x8778('0x4b')];_0x5740a8[_0x8778('0x4c')]=_0xba5c14[_0x8778('0x4c')];_0x5740a8[_0x8778('0x4d')]=_0xba5c14[_0x8778('0x4d')];_0x5740a8[_0x8778('0x4e')]=_0xba5c14[_0x8778('0x4e')];_0x5740a8[_0x8778('0x4f')]=_0xba5c14[_0x8778('0x4f')];_0x5740a8[_0x8778('0x50')]=_0xba5c14['erlangBusyFactor'];_0x5740a8[_0x8778('0x51')]=_0xba5c14[_0x8778('0x51')];_0x5740a8[_0x8778('0x52')]=_0xba5c14[_0x8778('0x52')];}if(_0xba5c14['Trunk']){_0x5740a8[_0x8778('0x53')]={'id':_0xba5c14[_0x8778('0x53')]['id'],'name':_0xba5c14[_0x8778('0x53')][_0x8778('0xb')],'active':_0xba5c14[_0x8778('0x53')][_0x8778('0x54')],'callerid':_0xba5c14[_0x8778('0x53')][_0x8778('0x55')]};}if(_0xba5c14['Interval']){_0x5740a8[_0x8778('0x56')]={'id':_0xba5c14[_0x8778('0x56')]['id'],'name':_0xba5c14[_0x8778('0x56')][_0x8778('0xb')]};}_0x2583db[_0x8778('0x57')](_0x5740a8);}}_0x17b985({'count':_0x2583db[_0x8778('0x58')],'rows':_0x2583db});});},'VoiceChannels':function(_0x26f4ac){return new Promise(function(_0x52c571,_0xe5abef){var _0x20b09c=_[_0x8778('0x59')](_0x5777a6[_0x8778('0x5a')]);_0x52c571({'count':_0x20b09c[_0x8778('0x58')],'rows':_0x20b09c});});},'VoiceChannelMixMonitor':function(_0x37d5d0){var _0x13ec3e=this;return new Promise(function(_0xc4cd81,_0x2b07ed){if(ami[_0x8778('0x11')]()==![]){return _0x2b07ed(_0x13ec3e['error'](0x1f4,[config['asterisk']['ip'],config[_0x8778('0x13')]['username'],_0x8778('0x5b')][_0x8778('0x14')]('\x20')));}var _0x404fa9=schema(properties[_0x8778('0x5c')])[_0x8778('0x3')](_0x37d5d0);if(_0x404fa9[_0x8778('0x58')]>0x0){return _0x2b07ed(_0x13ec3e[_0x8778('0x12')](0x1f4,_[_0x8778('0x5d')](_0x404fa9,_0x8778('0x4b'))[_0x8778('0x14')](',\x20')));}var _0x506472=_['find'](_0x5777a6[_0x8778('0x5a')],{'uniqueid':_0x37d5d0[_0x8778('0x5e')]});if(_0x506472&&_0x506472['channel']){var _0x430fe8=util['format']('%s.%s',_0x37d5d0[_0x8778('0x5f')]||_0x37d5d0[_0x8778('0x5e')],_0x37d5d0[_0x8778('0x9')]||_0x8778('0x60'));return ami[_0x8778('0x1c')]({'action':_0x8778('0x61'),'channel':_0x506472[_0x8778('0x62')],'file':_0x430fe8,'options':'ai(mixmonitorid)'})[_0x8778('0x17')](function(_0x2c3160){var _0x39df04=_['find'](_0x506472[_0x8778('0x63')],{'filename':'/var/spool/asterisk/monitor/'+_0x430fe8[_0x8778('0x64')]()});if(_[_0x8778('0x65')](_0x39df04)){_0x506472[_0x8778('0x63')][_0x8778('0x57')]({'filename':_0x8778('0x66')+_0x430fe8['toLowerCase'](),'createdAt':moment()['format'](_0x8778('0x67')),'mixmonitorid':_0x2c3160[_0x8778('0x68')],'status':'rec'});}else{_0x39df04['mixmonitorid']=_0x2c3160[_0x8778('0x68')];_0x39df04[_0x8778('0x69')]=_0x8778('0x6a');}_0xc4cd81({'code':0xc8,'message':[_0x37d5d0[_0x8778('0x5e')],_0x8778('0x6b'),_0x2c3160[_0x8778('0x68')]][_0x8778('0x14')]('\x20'),'mixmonitorid':_0x2c3160[_0x8778('0x68')]});})[_0x8778('0x18')](function(_0x583d70){_0x2b07ed(_0x13ec3e[_0x8778('0x12')](0x1f5,[_0x37d5d0[_0x8778('0x5e')],_0x583d70[_0x8778('0x4b')][_0x8778('0x64')]()][_0x8778('0x14')]('\x20')));});}else{return _0x2b07ed(_0x13ec3e[_0x8778('0x12')](0x1f5,_0x8778('0x6c')));}});},'VoiceChannelStopMixMonitor':function(_0x3cfbea){var _0x1a62b6=this;return new Promise(function(_0x42fc4b,_0x52f18b){if(ami[_0x8778('0x11')]()==![]){return _0x52f18b(_0x1a62b6['error'](0x1f4,[config[_0x8778('0x13')]['ip'],config['asterisk'][_0x8778('0x19')],_0x8778('0x5b')][_0x8778('0x14')]('\x20')));}var _0x73affe=schema(properties[_0x8778('0x5c')])[_0x8778('0x3')](_0x3cfbea);if(_0x73affe[_0x8778('0x58')]>0x0){return _0x52f18b(_0x1a62b6[_0x8778('0x12')](0x1f4,_['map'](_0x73affe,_0x8778('0x4b'))[_0x8778('0x14')](',\x20')));}var _0x5d69be=_['find'](_0x5777a6['channels'],{'uniqueid':_0x3cfbea[_0x8778('0x5e')]});if(_0x5d69be){return BPromise[_0x8778('0x6d')]()[_0x8778('0x17')](function(){if(_0x5d69be[_0x8778('0x62')]){return ami[_0x8778('0x1c')]({'action':'StopMixMonitor','channel':_0x5d69be[_0x8778('0x62')],'mixmonitorid':_0x3cfbea[_0x8778('0x68')]})[_0x8778('0x18')](function(_0x388534){});}})['then'](function(){if(_0x5d69be[_0x8778('0x6e')]){return ami[_0x8778('0x1c')]({'action':'StopMixMonitor','channel':_0x5d69be[_0x8778('0x6e')],'mixmonitorid':_0x3cfbea[_0x8778('0x68')]})[_0x8778('0x18')](function(_0x4866bf){});}})[_0x8778('0x17')](function(_0x23d3f2){var _0x9c5d87=_[_0x8778('0x6f')](_0x5d69be[_0x8778('0x63')],{'mixmonitorid':_0x3cfbea[_0x8778('0x68')]});if(_0x9c5d87){_0x9c5d87[_0x8778('0x69')]=_0x8778('0x70');}})[_0x8778('0x17')](function(){var _0x29132d=util[_0x8778('0x9')](_0x8778('0x71'),_0x3cfbea['filename']||_0x3cfbea[_0x8778('0x5e')],_0x3cfbea[_0x8778('0x9')]||_0x8778('0x60'));var _0x10a719=_[_0x8778('0x6f')](_0x5d69be['monitors'],{'filename':_0x8778('0x66')+_0x29132d[_0x8778('0x64')]()});if(_0x10a719){_0x10a719[_0x8778('0x69')]=_0x8778('0x70');}})[_0x8778('0x17')](function(){_0x42fc4b({'code':0xc8,'message':[_0x3cfbea[_0x8778('0x5e')],_0x8778('0x72')][_0x8778('0x14')]('\x20')});})[_0x8778('0x18')](function(_0x5889cc){_0x52f18b(_0x1a62b6[_0x8778('0x12')](0x1f5,[_0x3cfbea[_0x8778('0x5e')],_0x5889cc[_0x8778('0x4b')][_0x8778('0x64')]()]['join']('\x20')));});}else{return _0x52f18b(_0x1a62b6[_0x8778('0x12')](0x1f5,_0x8778('0x6c')));}});},'VoiceQueuesChannels':function(_0x1f31a0){return new Promise(function(_0x951f6,_0x1d7d96){var _0x1b4348=_[_0x8778('0x59')](_0x5777a6['queueChannels']);_0x951f6({'count':_0x1b4348[_0x8778('0x58')],'rows':_0x1b4348});});},'VoiceQueuesChannel':function(_0x1940fb){var _0x54c0e0=this;return new Promise(function(_0x2b0dc1,_0x11f744){var _0x426d4a=schema(properties[_0x8778('0x73')])[_0x8778('0x3')](_0x1940fb);if(_0x426d4a[_0x8778('0x58')]>0x0){return _0x11f744(_0x54c0e0[_0x8778('0x12')](0x1f4,_[_0x8778('0x5d')](_0x426d4a,_0x8778('0x4b'))[_0x8778('0x14')](',\x20')));}var _0x51620a=_[_0x8778('0x6f')](_0x5777a6['queueChannels'],{'uniqueid':_0x1940fb[_0x8778('0x5e')]});if(_0x51620a){_0x2b0dc1(_0x51620a);}else{return _0x11f744(_0x54c0e0[_0x8778('0x12')](0x1f5,_0x8778('0x6c')));}});},'VoiceQueuesChannelHangup':function(_0xd87a0b){var _0x46df5d=this;return new Promise(function(_0xdaa21,_0x5e9235){if(ami[_0x8778('0x11')]()==![]){return _0x5e9235(_0x46df5d[_0x8778('0x12')](0x1f4,[config['asterisk']['ip'],config[_0x8778('0x13')][_0x8778('0x19')],_0x8778('0x5b')][_0x8778('0x14')]('\x20')));}var _0x13108f=schema(properties[_0x8778('0x74')])[_0x8778('0x3')](_0xd87a0b);if(_0x13108f[_0x8778('0x58')]>0x0){return _0x5e9235(_0x46df5d[_0x8778('0x12')](0x1f4,_[_0x8778('0x5d')](_0x13108f,'message')[_0x8778('0x14')](',\x20')));}var _0x218f9e=_['find'](_0x5777a6['queueChannels'],{'uniqueid':_0xd87a0b[_0x8778('0x5e')]});if(_0x218f9e&&_0x218f9e['channel']){return ami['Action']({'action':_0x8778('0x75'),'channel':_0x218f9e['channel']})[_0x8778('0x17')](function(_0x435264){_0xdaa21({'code':0xc8,'message':[_0xd87a0b[_0x8778('0x5e')],_0x435264['message'][_0x8778('0x64')]()][_0x8778('0x14')]('\x20')});})['catch'](function(_0x2f4fae){_0x5e9235(_0x46df5d['error'](0x1f5,[_0xd87a0b['uniqueid'],_0x2f4fae['message'][_0x8778('0x64')]()][_0x8778('0x14')]('\x20')));});}else{return _0x5e9235(_0x46df5d[_0x8778('0x12')](0x1f5,_0x8778('0x6c')));}});},'VoiceQueuesChannelRedirect':function(_0x33fdc5){var _0x43ad27=this;return new Promise(function(_0x45f4b7,_0x3a2d88){if(ami[_0x8778('0x11')]()==![]){return _0x3a2d88(_0x43ad27['error'](0x1f4,[config['asterisk']['ip'],config[_0x8778('0x13')][_0x8778('0x19')],_0x8778('0x5b')]['join']('\x20')));}var _0x38c0ca=schema(properties['voicequeuechannelredirect'])[_0x8778('0x3')](_0x33fdc5);if(_0x38c0ca[_0x8778('0x58')]>0x0){return _0x3a2d88(_0x43ad27['error'](0x1f4,_[_0x8778('0x5d')](_0x38c0ca,'message')[_0x8778('0x14')](',\x20')));}var _0xebdab6=_[_0x8778('0x6f')](_0x5777a6['queueChannels'],{'uniqueid':_0x33fdc5[_0x8778('0x5e')]});if(_0xebdab6&&_0xebdab6[_0x8778('0x62')]){return ami[_0x8778('0x1c')]({'action':_0x8778('0x76'),'channel':_0xebdab6['channel'],'exten':_0x33fdc5['exten'],'context':_0x33fdc5[_0x8778('0x77')]||_0xebdab6['context'],'priority':0x1})[_0x8778('0x17')](function(_0x3c8fdf){_0x45f4b7({'code':0xc8,'message':[_0x33fdc5[_0x8778('0x5e')],_0x3c8fdf[_0x8778('0x4b')][_0x8778('0x64')]()][_0x8778('0x14')]('\x20')});})[_0x8778('0x18')](function(_0x57652a){_0x3a2d88(_0x43ad27[_0x8778('0x12')](0x1f5,[_0x33fdc5['uniqueid'],_0x57652a[_0x8778('0x4b')][_0x8778('0x64')]()][_0x8778('0x14')]('\x20')));});}else{return _0x3a2d88(_0x43ad27[_0x8778('0x12')](0x1f5,_0x8778('0x6c')));}});},'Agents':function(_0x3b1014){return new Promise(function(_0x38fb27,_0x2f64e1){var _0x8042a9=_[_0x8778('0x59')](_0x5777a6['agents']);_0x38fb27({'count':_0x8042a9[_0x8778('0x58')],'rows':_0x8042a9});});},'Telephones':function(_0x2bacd3){return new Promise(function(_0x10445a,_0x281dee){var _0x39c150=_['values'](_0x5777a6['telephones']);_0x10445a({'count':_0x39c150[_0x8778('0x58')],'rows':_0x39c150});});},'Trunks':function(_0x828d98){return new Promise(function(_0x6cf70e,_0x5cd1b2){var _0x2fccc4=_[_0x8778('0x59')](_0x5777a6[_0x8778('0x78')]);_0x6cf70e({'count':_0x2fccc4[_0x8778('0x58')],'rows':_0x2fccc4});});},'OutboundChannels':function(_0x591a35){return new Promise(function(_0x47c9e0,_0x5d8219){var _0x3a10e8=_[_0x8778('0x59')](_0x5777a6[_0x8778('0x79')]);_0x47c9e0({'count':_0x3a10e8[_0x8778('0x58')],'rows':_0x3a10e8});});},'Outbound':function(_0x384186){return new Promise(function(_0x4ffffd,_0x2d1f0c){_0x4ffffd(_0x5777a6[_0x8778('0x7a')]);});},'Campaigns':function(_0x4448c3){return new Promise(function(_0x31f154,_0x27df0a){var _0x2e62a4=_[_0x8778('0x59')](_0x5777a6[_0x8778('0x7b')]);_0x31f154({'count':_0x2e62a4['length'],'rows':_0x2e62a4});});},'VoiceQueuesPreview':function(_0x4c8591){var _0x38409a=this;return new Promise(function(_0x40f077,_0x13a4fa){_0x245a92[_0x8778('0x7c')](_0x4c8591['id'])['then'](function(_0x215195){_0x40f077({'code':0xc8,'message':_0x215195[_0x8778('0x4b')]});})['catch'](function(_0x41404e){_0x13a4fa(_0x38409a[_0x8778('0x12')](0x1f4,_0x41404e[_0x8778('0x4b')]));});});},'EventManager':function(_0x53fe1d){var _0x1c816e=this;return new Promise(function(_0x2021ed,_0x697b9b){if(!_0x53fe1d['event']){return _0x697b9b(_0x1c816e[_0x8778('0x12')](0x1f4,'Event\x20name\x20mandatory'));}ami[_0x8778('0x7d')](_0x8778('0x7e')+_0x53fe1d['event'],_0x53fe1d['message']);_0x2021ed({'code':0xc8,'message':_0x53fe1d});});},'FaxAccounts':function(_0x51679f){return new Promise(function(_0x1b94d9,_0x24028b){var _0x5cffde=_[_0x8778('0x59')](_0x5777a6[_0x8778('0x7f')]);_0x1b94d9({'count':_0x5cffde[_0x8778('0x58')],'rows':_0x5cffde});});},'SendFax':function(_0x4d84be){var _0x7c40f7=this;return new Promise(function(_0x2af227,_0x25a334){_0x40d608[_0x8778('0x80')](_0x4d84be)['then'](function(_0x55cac0){_0x2af227({'code':0xc8,'message':_0x55cac0[_0x8778('0x4b')]});})[_0x8778('0x18')](function(_0x5bc775){_0x25a334(_0x7c40f7['error'](0x1f4,_0x5bc775[_0x8778('0x4b')]));});});},'CheckAfterSend':function(_0x1022d1){var _0x2bbba4=this;return new Promise(function(_0x3e5781,_0x4f5c42){_0x40d608[_0x8778('0x81')](_0x1022d1)[_0x8778('0x17')](function(_0x2a0ad6){_0x3e5781({'code':0xc8,'message':_0x2a0ad6[_0x8778('0x4b')]});})['catch'](function(_0x3530ad){_0x4f5c42(_0x2bbba4[_0x8778('0x12')](0x1f4,_0x3530ad[_0x8778('0x4b')]));});});}};var _0x58b1fa=jayson[_0x8778('0x82')](_0xc023f5)[_0x8778('0x83')]();_0x58b1fa['on'](_0x8778('0x12'),function(_0x42ed8f){return _0x29fa8f(_0x42ed8f);});_0x58b1fa['listen'](0x232a,'127.0.0.1',function(){console['log'](_0x8778('0x84'),0x232a);return _0x39f6a8(_0x8778('0x85')+0x232a);});});}; \ No newline at end of file diff --git a/server/services/ami/trigger/cmContact/index.js b/server/services/ami/trigger/cmContact/index.js index d55904e..ebfc8f5 100644 --- a/server/services/ami/trigger/cmContact/index.js +++ b/server/services/ami/trigger/cmContact/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe1cb=['createContact','push','[CM][%s][%s]\x20Autocreate\x20disabled','Unknown','format','user:%s','name','trigger:%s','action','bluebird','ioredis','../../../../config/logger','../../rpc/cmContact','defaults','redis','localhost','socket.io-emitter','info','[CM][%s][%s]','stringify','emit','exec','data1','ListId','data3','split','phone','$or','routeId','destcalleridnum','calleridnum','firstName','lastName','fax','scheduledAt','resolve','then','getContacts','isEmpty','length','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','map','join','[CM][%s][%s]\x20Contact\x20not\x20found','data4','isNil','calleridname','destcalleridname',''];(function(_0x1df920,_0xb351c6){var _0x1e5905=function(_0x23b57e){while(--_0x23b57e){_0x1df920['push'](_0x1df920['shift']());}};_0x1e5905(++_0xb351c6);}(_0xe1cb,0x6f));var _0xbe1c=function(_0x173b69,_0x34531b){_0x173b69=_0x173b69-0x0;var _0x217d41=_0xe1cb[_0x173b69];return _0x217d41;};'use strict';var _=require('lodash');var BPromise=require(_0xbe1c('0x0'));var Redis=require(_0xbe1c('0x1'));var util=require('util');var config=require('../../../../config/environment');var logger=require(_0xbe1c('0x2'))('trigger');var cmContactRpc=require(_0xbe1c('0x3'));config['redis']=_[_0xbe1c('0x4')](config[_0xbe1c('0x5')],{'host':_0xbe1c('0x6'),'port':0x18eb});var io=require(_0xbe1c('0x7'))(new Redis(config[_0xbe1c('0x5')]));function emit(_0x293477,_0x113c9d,_0x54eac6,_0x406840,_0x4e52bb){logger[_0xbe1c('0x8')](_0xbe1c('0x9'),_0x293477,_0x113c9d['id'],_0x54eac6,_0x406840,JSON[_0xbe1c('0xa')](_0x4e52bb));io['to'](_0x54eac6)[_0xbe1c('0xb')](_0x406840,_0x4e52bb);}exports[_0xbe1c('0xc')]=function(_0x286874,_0x1bd339,_0x57c4df,_0x41c16a){var _0x503d23,_0x3dbc81;var _0x10f5ce={};var _0x6cb737=Number(_0x57c4df[_0xbe1c('0xd')]);var _0xa21414=_0x57c4df['data2']?Boolean(Number(_0x57c4df['data2'])):![];var _0x557e80;if(_0x41c16a['xmd-contactid']){_0x10f5ce['id']=_0x41c16a['xmd-contactid'];}if(!_0x10f5ce['id']){_0x10f5ce[_0xbe1c('0xe')]=_0x6cb737;_0x557e80=_0x57c4df[_0xbe1c('0xf')]&&_0x57c4df[_0xbe1c('0xf')]!=='0'?_0x57c4df[_0xbe1c('0xf')][_0xbe1c('0x10')](','):[_0xbe1c('0x11')];_0x10f5ce[_0xbe1c('0x12')]=_['map'](_0x557e80,function(_0x1da6f1){var _0x177c8b={};_0x177c8b[_0x1da6f1]=_0x41c16a[_0xbe1c('0x13')]?_0x41c16a[_0xbe1c('0x14')]:_0x41c16a[_0xbe1c('0x15')];return _0x177c8b;});}var _0x483521=['id',_0xbe1c('0x16'),_0xbe1c('0x17'),'phone','mobile',_0xbe1c('0x18'),'ListId','createdAt',_0xbe1c('0x19'),'updatedAt'];var _0x3e714f=_['union'](_0x483521,_0x557e80);BPromise[_0xbe1c('0x1a')]()[_0xbe1c('0x1b')](cmContactRpc[_0xbe1c('0x1c')]({'attributes':_0x3e714f,'where':_0x10f5ce}))[_0xbe1c('0x1b')](function(_0x9a650c){_0x3dbc81=_0x9a650c;if(!_[_0xbe1c('0x1d')](_0x3dbc81)){if(_0x3dbc81[_0xbe1c('0x1e')]===0x1){_0x503d23=_0x3dbc81[0x0];logger[_0xbe1c('0x8')](_0xbe1c('0x1f'),_0x41c16a[_0xbe1c('0x20')],_0x1bd339['id'],_0x503d23['id']);}else{logger['info'](_0xbe1c('0x21'),_0x41c16a[_0xbe1c('0x20')],_0x1bd339['id'],_[_0xbe1c('0x22')](_0x3dbc81,'id')[_0xbe1c('0x23')](','));}return;}else{logger[_0xbe1c('0x8')](_0xbe1c('0x24'),_0x41c16a[_0xbe1c('0x20')],_0x1bd339['id']);var _0x42e5a2={'ListId':_0x6cb737};var _0x14646c=_0x57c4df[_0xbe1c('0x25')]&&_0x57c4df[_0xbe1c('0x25')]!=='0'?_0x57c4df['data4']:_0xbe1c('0x11');if(_0xa21414){logger[_0xbe1c('0x8')]('[CM][%s][%s]\x20Autocreate\x20enabled',_0x41c16a['uniqueid'],_0x1bd339['id']);_0x42e5a2[_0x14646c]=_[_0xbe1c('0x26')](_0x41c16a[_0xbe1c('0x13')])?_0x41c16a['calleridnum']:_0x41c16a['destcalleridnum'];if(_['isNil'](_0x41c16a[_0xbe1c('0x13')])){_0x42e5a2[_0xbe1c('0x16')]=_0x41c16a['calleridname']&&_0x41c16a['calleridname']!==''?_0x41c16a[_0xbe1c('0x27')]:'Unknown';}else{_0x42e5a2[_0xbe1c('0x16')]=_0x41c16a[_0xbe1c('0x28')]&&_0x41c16a['destcalleridname']!==_0xbe1c('0x29')?_0x41c16a[_0xbe1c('0x28')]:'Unknown';}return BPromise[_0xbe1c('0x1a')]()[_0xbe1c('0x1b')](cmContactRpc[_0xbe1c('0x2a')](_0x42e5a2))[_0xbe1c('0x1b')](function(_0x161e38){_0x503d23=_0x161e38;_0x3dbc81[_0xbe1c('0x2b')](_0x161e38);if(_0x503d23){logger[_0xbe1c('0x8')]('[CM][%s][%s]\x20Contact\x20created:%s',_0x41c16a['uniqueid'],_0x1bd339['id'],_0x503d23['id']);}return;});}else{logger[_0xbe1c('0x8')](_0xbe1c('0x2c'),_0x41c16a['uniqueid'],_0x1bd339['id']);_0x42e5a2[_0x14646c]=_[_0xbe1c('0x26')](_0x41c16a[_0xbe1c('0x13')])?_0x41c16a[_0xbe1c('0x15')]:_0x41c16a[_0xbe1c('0x14')];if(_[_0xbe1c('0x26')](_0x41c16a[_0xbe1c('0x13')])){_0x42e5a2[_0xbe1c('0x16')]=_0x41c16a[_0xbe1c('0x27')]&&_0x41c16a['calleridname']!==''?_0x41c16a[_0xbe1c('0x27')]:_0xbe1c('0x2d');}else{_0x42e5a2['firstName']=_0x41c16a[_0xbe1c('0x28')]&&_0x41c16a[_0xbe1c('0x28')]!==_0xbe1c('0x29')?_0x41c16a[_0xbe1c('0x28')]:'Unknown';}_0x503d23=_0x42e5a2;_0x3dbc81['push'](_0x42e5a2);return;}}})['then'](function(){if(_0x286874){emit(_0x41c16a[_0xbe1c('0x20')],_0x1bd339,util[_0xbe1c('0x2e')](_0xbe1c('0x2f'),_0x286874[_0xbe1c('0x30')]),util['format'](_0xbe1c('0x31'),_0x57c4df[_0xbe1c('0x32')]['toLowerCase']()),{'evt':_['merge'](_0x41c16a,{'autoCreate':_0xa21414}),'contact':_0x503d23===undefined?{}:_0x503d23,'contacts':_0x3dbc81[_0xbe1c('0x1e')]===0x0?undefined:_0x3dbc81});}});}; \ No newline at end of file +var _0xb839=['firstName','calleridname','','Unknown','destcalleridname','createContact','push','[CM][%s][%s]\x20Autocreate\x20disabled','format','user:%s','name','trigger:%s','action','toLowerCase','lodash','ioredis','../../../../config/environment','../../../../config/logger','trigger','../../rpc/cmContact','redis','defaults','localhost','info','[CM][%s][%s]','stringify','emit','exec','data1','data2','xmd-contactid','ListId','data3','split','$or','map','destcalleridnum','lastName','phone','mobile','createdAt','scheduledAt','resolve','then','getContacts','isEmpty','length','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','join','[CM][%s][%s]\x20Contact\x20not\x20found','data4','[CM][%s][%s]\x20Autocreate\x20enabled','calleridnum','isNil','routeId'];(function(_0x2ad374,_0x18b3fa){var _0x3602fd=function(_0x4fd519){while(--_0x4fd519){_0x2ad374['push'](_0x2ad374['shift']());}};_0x3602fd(++_0x18b3fa);}(_0xb839,0xee));var _0x9b83=function(_0x553bd5,_0x58d09e){_0x553bd5=_0x553bd5-0x0;var _0x487a53=_0xb839[_0x553bd5];return _0x487a53;};'use strict';var _=require(_0x9b83('0x0'));var BPromise=require('bluebird');var Redis=require(_0x9b83('0x1'));var util=require('util');var config=require(_0x9b83('0x2'));var logger=require(_0x9b83('0x3'))(_0x9b83('0x4'));var cmContactRpc=require(_0x9b83('0x5'));config[_0x9b83('0x6')]=_[_0x9b83('0x7')](config[_0x9b83('0x6')],{'host':_0x9b83('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x9b83('0x6')]));function emit(_0x329b8a,_0x331e25,_0x491f3c,_0x47f5e4,_0x56d2dc){logger[_0x9b83('0x9')](_0x9b83('0xa'),_0x329b8a,_0x331e25['id'],_0x491f3c,_0x47f5e4,JSON[_0x9b83('0xb')](_0x56d2dc));io['to'](_0x491f3c)[_0x9b83('0xc')](_0x47f5e4,_0x56d2dc);}exports[_0x9b83('0xd')]=function(_0x102ca6,_0x4bfd6e,_0x5b772d,_0x489345){var _0x3c355e,_0x309079;var _0x378222={};var _0x2231cd=Number(_0x5b772d[_0x9b83('0xe')]);var _0x54decc=_0x5b772d[_0x9b83('0xf')]?Boolean(Number(_0x5b772d[_0x9b83('0xf')])):![];var _0x1ee761;if(_0x489345[_0x9b83('0x10')]){_0x378222['id']=_0x489345[_0x9b83('0x10')];}if(!_0x378222['id']){_0x378222[_0x9b83('0x11')]=_0x2231cd;_0x1ee761=_0x5b772d['data3']&&_0x5b772d[_0x9b83('0x12')]!=='0'?_0x5b772d['data3'][_0x9b83('0x13')](','):['phone'];_0x378222[_0x9b83('0x14')]=_[_0x9b83('0x15')](_0x1ee761,function(_0x1f1dc7){var _0x22153d={};_0x22153d[_0x1f1dc7]=_0x489345['routeId']?_0x489345[_0x9b83('0x16')]:_0x489345['calleridnum'];return _0x22153d;});}var _0x5afc56=['id','firstName',_0x9b83('0x17'),_0x9b83('0x18'),_0x9b83('0x19'),'fax',_0x9b83('0x11'),_0x9b83('0x1a'),_0x9b83('0x1b'),'updatedAt'];var _0x3daaa3=_['union'](_0x5afc56,_0x1ee761);BPromise[_0x9b83('0x1c')]()[_0x9b83('0x1d')](cmContactRpc[_0x9b83('0x1e')]({'attributes':_0x3daaa3,'where':_0x378222}))['then'](function(_0x51c82b){_0x309079=_0x51c82b;if(!_[_0x9b83('0x1f')](_0x309079)){if(_0x309079[_0x9b83('0x20')]===0x1){_0x3c355e=_0x309079[0x0];logger[_0x9b83('0x9')](_0x9b83('0x21'),_0x489345[_0x9b83('0x22')],_0x4bfd6e['id'],_0x3c355e['id']);}else{logger[_0x9b83('0x9')]('[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]',_0x489345[_0x9b83('0x22')],_0x4bfd6e['id'],_[_0x9b83('0x15')](_0x309079,'id')[_0x9b83('0x23')](','));}return;}else{logger['info'](_0x9b83('0x24'),_0x489345[_0x9b83('0x22')],_0x4bfd6e['id']);var _0x292842={'ListId':_0x2231cd};var _0x28dd61=_0x5b772d[_0x9b83('0x25')]&&_0x5b772d[_0x9b83('0x25')]!=='0'?_0x5b772d[_0x9b83('0x25')]:_0x9b83('0x18');if(_0x54decc){logger[_0x9b83('0x9')](_0x9b83('0x26'),_0x489345['uniqueid'],_0x4bfd6e['id']);_0x292842[_0x28dd61]=_['isNil'](_0x489345['routeId'])?_0x489345[_0x9b83('0x27')]:_0x489345[_0x9b83('0x16')];if(_[_0x9b83('0x28')](_0x489345[_0x9b83('0x29')])){_0x292842[_0x9b83('0x2a')]=_0x489345['calleridname']&&_0x489345[_0x9b83('0x2b')]!==_0x9b83('0x2c')?_0x489345['calleridname']:_0x9b83('0x2d');}else{_0x292842[_0x9b83('0x2a')]=_0x489345[_0x9b83('0x2e')]&&_0x489345[_0x9b83('0x2e')]!==_0x9b83('0x2c')?_0x489345[_0x9b83('0x2e')]:_0x9b83('0x2d');}return BPromise['resolve']()[_0x9b83('0x1d')](cmContactRpc[_0x9b83('0x2f')](_0x292842))[_0x9b83('0x1d')](function(_0x86a6e1){_0x3c355e=_0x86a6e1;_0x309079[_0x9b83('0x30')](_0x86a6e1);if(_0x3c355e){logger[_0x9b83('0x9')]('[CM][%s][%s]\x20Contact\x20created:%s',_0x489345[_0x9b83('0x22')],_0x4bfd6e['id'],_0x3c355e['id']);}return;});}else{logger[_0x9b83('0x9')](_0x9b83('0x31'),_0x489345[_0x9b83('0x22')],_0x4bfd6e['id']);_0x292842[_0x28dd61]=_[_0x9b83('0x28')](_0x489345[_0x9b83('0x29')])?_0x489345[_0x9b83('0x27')]:_0x489345[_0x9b83('0x16')];if(_[_0x9b83('0x28')](_0x489345['routeId'])){_0x292842['firstName']=_0x489345[_0x9b83('0x2b')]&&_0x489345[_0x9b83('0x2b')]!==_0x9b83('0x2c')?_0x489345[_0x9b83('0x2b')]:_0x9b83('0x2d');}else{_0x292842[_0x9b83('0x2a')]=_0x489345[_0x9b83('0x2e')]&&_0x489345[_0x9b83('0x2e')]!==_0x9b83('0x2c')?_0x489345[_0x9b83('0x2e')]:_0x9b83('0x2d');}_0x3c355e=_0x292842;_0x309079[_0x9b83('0x30')](_0x292842);return;}}})[_0x9b83('0x1d')](function(){if(_0x102ca6){emit(_0x489345['uniqueid'],_0x4bfd6e,util[_0x9b83('0x32')](_0x9b83('0x33'),_0x102ca6[_0x9b83('0x34')]),util[_0x9b83('0x32')](_0x9b83('0x35'),_0x5b772d[_0x9b83('0x36')][_0x9b83('0x37')]()),{'evt':_['merge'](_0x489345,{'autoCreate':_0x54decc}),'contact':_0x3c355e===undefined?{}:_0x3c355e,'contacts':_0x309079[_0x9b83('0x20')]===0x0?undefined:_0x309079});}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/index.js b/server/services/ami/trigger/index.js index 194f271..767cdad 100644 --- a/server/services/ami/trigger/index.js +++ b/server/services/ami/trigger/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x77b4=['data6','600','winApplication','render','winArguments','format','user:%s','name','toLowerCase','trigger:%s','integration','exec','queue','routeId','urlforward','script','parse','search','checkTrigger','AllConditions','every','channel','AnyConditions','some','checkConditions','field','account','ChatWebsiteId','operator','value','upperFirst','interaction','message','event','membername','lastevent','exports','lodash','url','mustache','ioredis','./urlforward','./integration','./cmContact','../../../config/environment','../../../config/logger','trigger','../ami','defaults','redis','localhost','socket.io-emitter','popup','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','syncCustomEvent','bind','custom:agentconnect','custom:agentringnoanswer','custom:agentcomplete','custom:agentnosuchnumber','custom:agentbusy','custom:agentcongestion','custom:agentreject','custom:timeout','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','info','stringify','emit','clone','checkTriggers','prototype','interface','hasOwnProperty','status','merge','variables','Actions','length','action','contactmanager','motionbar','browser','data1','TemplateId','data2','html','template\x20not\x20found','uri','buildUri','isNil','data3','data4','location','uriLocation','windowWidth','data5','800','windowHeight'];(function(_0x5a471c,_0x5d1825){var _0x2b5f03=function(_0xa3ae4f){while(--_0xa3ae4f){_0x5a471c['push'](_0x5a471c['shift']());}};_0x2b5f03(++_0x5d1825);}(_0x77b4,0x11d));var _0x477b=function(_0x5ba280,_0x178f07){_0x5ba280=_0x5ba280-0x0;var _0x57fd68=_0x77b4[_0x5ba280];return _0x57fd68;};'use strict';var util=require('util');var _=require(_0x477b('0x0'));var url=require(_0x477b('0x1'));var Mustache=require(_0x477b('0x2'));var Redis=require(_0x477b('0x3'));var urlforward=require(_0x477b('0x4'));var integration=require(_0x477b('0x5'));var cmContact=require(_0x477b('0x6'));var script=require('./script');var config=require(_0x477b('0x7'));var logger=require(_0x477b('0x8'))(_0x477b('0x9'));var ami=require(_0x477b('0xa'));config['redis']=_[_0x477b('0xb')](config[_0x477b('0xc')],{'host':_0x477b('0xd'),'port':0x18eb});var io=require(_0x477b('0xe'))(new Redis(config['redis']));var operators={'equals':function(_0x5b7898,_0x394663){return _0x5b7898==_0x394663;},'not_equals':function(_0x552ead,_0x1a65b0){return _0x552ead!=_0x1a65b0;}};var barAndWebActions=[_0x477b('0xf'),_0x477b('0x1'),_0x477b('0x10')];function Trigger(_0x5c9397){this[_0x477b('0x11')]=_0x5c9397[_0x477b('0x11')];this[_0x477b('0x12')]=_0x5c9397[_0x477b('0x12')];this[_0x477b('0x13')]=_0x5c9397[_0x477b('0x13')];this['templates']=_0x5c9397[_0x477b('0x14')];this['voiceExtensions']=_0x5c9397[_0x477b('0x15')];this['zendeskAccounts']=_0x5c9397[_0x477b('0x16')];this[_0x477b('0x17')]=_0x5c9397[_0x477b('0x17')];this[_0x477b('0x18')]=_0x5c9397[_0x477b('0x18')];this[_0x477b('0x19')]=_0x5c9397[_0x477b('0x19')];this['zohoAccounts']=_0x5c9397[_0x477b('0x1a')];this[_0x477b('0x1b')]=_0x5c9397[_0x477b('0x1b')];this[_0x477b('0x1c')]=_0x5c9397['vtigerAccounts'];this[_0x477b('0x1d')]=_0x5c9397[_0x477b('0x1d')];this[_0x477b('0x1e')]=_0x5c9397[_0x477b('0x1e')];this[_0x477b('0x1f')]=_0x5c9397[_0x477b('0x1f')];this[_0x477b('0x20')]={'zendesk':this['zendeskAccounts'],'salesforce':this[_0x477b('0x18')],'freshdesk':this[_0x477b('0x17')],'sugarcrm':this[_0x477b('0x19')],'zoho':this['zohoAccounts'],'desk':this[_0x477b('0x1b')],'vtiger':this['vtigerAccounts'],'dynamics365':this[_0x477b('0x1e')],'freshsales':this['freshsalesAccounts'],'servicenow':this[_0x477b('0x1d')]};ami['on'](_0x477b('0x21'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x24'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x25'),this[_0x477b('0x22')]['bind'](this));ami['on'](_0x477b('0x26'),this['syncCustomEvent'][_0x477b('0x23')](this));ami['on'](_0x477b('0x27'),this['syncCustomEvent']['bind'](this));ami['on']('custom:agentnoanswer',this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x28'),this[_0x477b('0x22')]['bind'](this));ami['on'](_0x477b('0x29'),this['syncCustomEvent']['bind'](this));ami['on'](_0x477b('0x2a'),this['syncCustomEvent'][_0x477b('0x23')](this));ami['on']('custom:queuecallerabandon',this['syncCustomEvent'][_0x477b('0x23')](this));ami['on'](_0x477b('0x2b'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x2c'),this[_0x477b('0x2d')][_0x477b('0x23')](this));ami['on'](_0x477b('0x2e'),this[_0x477b('0x2d')][_0x477b('0x23')](this));ami['on'](_0x477b('0x2f'),this['syncAgentDial']['bind'](this));ami['on'](_0x477b('0x30'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x31'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x32'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x33'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x34'),this[_0x477b('0x22')][_0x477b('0x23')](this));ami['on'](_0x477b('0x35'),this['syncCustomEvent'][_0x477b('0x23')](this));}Trigger['prototype']['emit']=function(_0x1f2699,_0x336ebd,_0x23fefb){logger[_0x477b('0x36')](_0x1f2699,_0x336ebd,JSON[_0x477b('0x37')](_0x23fefb));io['to'](_0x1f2699)[_0x477b('0x38')](_0x336ebd,_0x23fefb);};Trigger['prototype'][_0x477b('0x22')]=function(_0x2f354a){var _0x34a262=_[_0x477b('0x39')](_0x2f354a);this[_0x477b('0x3a')](_0x34a262);};Trigger[_0x477b('0x3b')][_0x477b('0x2d')]=function(_0x2aa904){if(this[_0x477b('0x12')][_0x2aa904[_0x477b('0x3c')]]){this['syncCustomEvent'](_0x2aa904);}};Trigger['prototype'][_0x477b('0x3a')]=function(_0x32ab93){var _0x24fab9;for(var _0x27ab46 in this[_0x477b('0x11')]){if(this[_0x477b('0x11')][_0x477b('0x3d')](_0x27ab46)){if(this[_0x477b('0x11')][_0x27ab46][_0x477b('0x3e')]){_0x24fab9=this['checkTrigger'](this[_0x477b('0x11')][_0x27ab46],_0x32ab93);if(_0x24fab9){_[_0x477b('0x3f')](_0x32ab93,_0x32ab93[_0x477b('0x40')]);for(var _0xcdf0a5=0x0,_0x305843,_0x47a0f5,_0x5cc53f;_0xcdf0a50x0){_0x34dc65=_[_0x0a9e('0x26')](_0x5bfb33,_0x1dc186);}return _0x34dc65;}function getCustomFields(_0x140511,_0x1538a4){var _0x11c3b6=[];var _0x14de77={'custom_fields':{}};if(_0x140511['length']>0x0){_[_0x0a9e('0x27')](_0x140511,function(_0x468813){if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x29')&&_0x468813['nameField']&&!_0x468813[_0x0a9e('0x2a')]){_0x14de77[_0x468813[_0x0a9e('0x2b')][_0x0a9e('0x2c')]()]=_0x468813[_0x0a9e('0x2d')][_0x0a9e('0x2e')]();}else if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x29')&&_0x468813[_0x0a9e('0x2f')]&&_0x468813[_0x0a9e('0x2a')]){_0x14de77['custom_fields'][_0x468813[_0x0a9e('0x2f')]]=_0x468813['content'][_0x0a9e('0x2e')]();}else if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x30')&&_0x468813[_0x0a9e('0x31')]&&_0x468813[_0x0a9e('0x2f')]&&_0x468813['customField']){_0x1538a4[_0x468813[_0x0a9e('0x31')]]&&(_0x14de77[_0x0a9e('0x32')][_0x468813[_0x0a9e('0x2f')]]=_0x1538a4[_0x468813[_0x0a9e('0x31')]][_0x0a9e('0x2e')]());}else if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x33')&&_0x468813[_0x0a9e('0x34')]&&_0x468813['Variable'][_0x0a9e('0x35')]&&_0x468813['idField']&&_0x468813[_0x0a9e('0x2a')]){_0x1538a4[_0x468813[_0x0a9e('0x34')][_0x0a9e('0x35')][_0x0a9e('0x2c')]()]&&(_0x14de77['custom_fields'][_0x468813[_0x0a9e('0x2f')]]=_0x1538a4[_0x468813[_0x0a9e('0x34')][_0x0a9e('0x35')][_0x0a9e('0x2c')]()]['toString']());}});}if(_0x14de77['priority']){_0x14de77[_0x0a9e('0x36')]=Number(_0x14de77['priority']);}return _0x14de77;}function getTicket(_0x24936a,_0x3d9717,_0x381c37,_0x1ef87a,_0x4f41ae){logger[_0x0a9e('0xb')](_0x0a9e('0x37'));var _0x3cae=_['merge']({'subject':intUtil[_0x0a9e('0x38')](_0x1ef87a[_0x0a9e('0x39')],_0x4f41ae,'\x20'),'type':_0x0a9e('0x3a'),'status':'new','labels':['xCALLY',_0x0a9e('0x3b'),_0x0a9e('0x3c')]['concat'](getTags(_0x1ef87a[_0x0a9e('0x3d')],_0x0a9e('0x35'))),'description':intUtil[_0x0a9e('0x38')](_0x1ef87a[_0x0a9e('0x3e')],_0x4f41ae,'\x0a'),'_links':{'assigned_user':{'href':util['format']('/api/v2/users/%d',_0x3d9717['id']),'class':_0x0a9e('0x3f')}},'message':{'direction':'in','body':intUtil[_0x0a9e('0x38')](_0x1ef87a['Descriptions'],_0x4f41ae,'\x0a')}},getCustomFields(_0x1ef87a[_0x0a9e('0x40')],_0x4f41ae));return request({'uri':util[_0x0a9e('0xd')](_0x0a9e('0x41'),_0x24936a['remoteUri'],_0x381c37['id']),'method':_0x0a9e('0x42'),'body':_0x3cae});}exports[_0x0a9e('0x43')]=function(_0x274e8e,_0x43dd5b,_0x13cb1f,_0xeaa5e5,_0x2881b3,_0x45a9b8){var _0x23b089,_0x3da2cd;_0x45a9b8[_0x0a9e('0x16')]=intUtil[_0x0a9e('0x44')](_0x45a9b8[_0x0a9e('0x16')]);_0x45a9b8[_0x0a9e('0x45')]=intUtil[_0x0a9e('0x44')](_0x45a9b8['serverUrl']);if(_0x2881b3&&_0x2881b3['monitor_format']){logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x47'));_0x43dd5b[_0x0a9e('0x48')]=util[_0x0a9e('0xd')](_0x0a9e('0x49'),_0x45a9b8[_0x0a9e('0x45')],_0x43dd5b[_0x0a9e('0x4a')],md5(_0x43dd5b[_0x0a9e('0x4a')]));}else{_0x43dd5b[_0x0a9e('0x48')]='';}headers[_0x0a9e('0x4b')]=getAuth(_0x45a9b8);return getUser(_0x45a9b8,_0xeaa5e5[_0x0a9e('0x4c')])['then'](function(_0x117c99){_0x23b089=_0x117c99;logger[_0x0a9e('0xb')](_0x0a9e('0x4d'),_0x23b089['id']);return getEndUser(_0x45a9b8,_0x43dd5b[_0x0a9e('0x4e')],_0x43dd5b[_0x0a9e('0x4f')]);})[_0x0a9e('0x12')](function(_0x21eb86){_0x3da2cd=_0x21eb86;logger[_0x0a9e('0xb')]('The\x20Enduser\x20ID\x20is:',_0x3da2cd['id']);return getTicket(_0x45a9b8,_0x23b089,_0x3da2cd,_0x13cb1f,_0x43dd5b);})[_0x0a9e('0x12')](function(_0x48fd45){if(_0x48fd45){logger[_0x0a9e('0xb')](_0x0a9e('0x50'));logger[_0x0a9e('0xb')]('The\x20Ticket\x20ID\x20is:',_0x48fd45['id']);switch(_0x45a9b8[_0x0a9e('0x28')]){case _0x0a9e('0x51'):logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x52'));emit(util[_0x0a9e('0xd')](_0x0a9e('0x53'),_0xeaa5e5['name']),_0x0a9e('0x54'),{'recordId':_0x48fd45['id']});break;case _0x0a9e('0x55'):logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x56'));emit(util[_0x0a9e('0xd')](_0x0a9e('0x53'),_0xeaa5e5[_0x0a9e('0x35')]),_0x0a9e('0x57'),{'uri':util['format'](_0x0a9e('0x58'),_0x48fd45['id'])});break;default:logger[_0x0a9e('0x59')]('[QUEUE]','Desk\x20account\x20type\x20not\x20recognized');}}})['catch'](function(_0x1adfee){console[_0x0a9e('0x59')](_0x1adfee);logger[_0x0a9e('0x59')](_0x0a9e('0x46'),JSON[_0x0a9e('0x19')](_0x1adfee));});};exports[_0x0a9e('0x5a')]=function(_0x2e5165,_0x375c18,_0x5d38ae,_0x4b1b9f,_0x53975a,_0x39d77d,_0x204173){var _0x14d602,_0x5bb3ed;_0x39d77d[_0x0a9e('0x16')]=intUtil[_0x0a9e('0x44')](_0x39d77d['remoteUri']);_0x39d77d['serverUrl']=intUtil[_0x0a9e('0x44')](_0x39d77d['serverUrl']);if(_0x204173&&_0x204173[_0x0a9e('0x5b')]&&_0x204173['recordingFormat']!==_0x0a9e('0x5c')){logger[_0x0a9e('0xb')](_0x0a9e('0x5d'),'Recording\x20is\x20enabled!');_0x375c18[_0x0a9e('0x48')]=util[_0x0a9e('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x39d77d['serverUrl'],_0x375c18[_0x0a9e('0x4a')],md5(_0x375c18[_0x0a9e('0x4a')]));}headers['Authorization']=getAuth(_0x39d77d);return getUser(_0x39d77d,_0x4b1b9f[_0x0a9e('0x4c')])['then'](function(_0x211ef9){_0x14d602=_0x211ef9;logger['info'](_0x0a9e('0x4d'),_0x14d602['id']);return getEndUser(_0x39d77d,_0x375c18['destcalleridname'],_0x375c18['destcalleridnum']);})['then'](function(_0x2da03c){_0x5bb3ed=_0x2da03c;logger['info'](_0x0a9e('0x5e'),_0x5bb3ed['id']);return getTicket(_0x39d77d,_0x14d602,_0x5bb3ed,_0x5d38ae,_0x375c18);})[_0x0a9e('0x12')](function(_0x3cfd00){if(_0x3cfd00){logger[_0x0a9e('0xb')](_0x0a9e('0x50'));logger[_0x0a9e('0xb')](_0x0a9e('0x5f'),_0x3cfd00['id']);switch(_0x39d77d[_0x0a9e('0x28')]){case'integrationTab':logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x52'));emit(util[_0x0a9e('0xd')](_0x0a9e('0x53'),_0x4b1b9f[_0x0a9e('0x35')]),'trigger:desk:display',{'recordId':_0x3cfd00['id']});break;case _0x0a9e('0x55'):logger[_0x0a9e('0xb')]('[QUEUE]',_0x0a9e('0x56'));emit(util['format'](_0x0a9e('0x53'),_0x4b1b9f['name']),'trigger:browser:url',{'uri':util['format'](_0x0a9e('0x60'),_0x39d77d['remoteUri'],_0x3cfd00['id'])});break;default:logger[_0x0a9e('0x59')](_0x0a9e('0x5d'),_0x0a9e('0x61'));}}})[_0x0a9e('0x62')](function(_0x1cca9f){logger[_0x0a9e('0x59')]('[OUTBOUND]',JSON[_0x0a9e('0x19')](_0x1cca9f));});};exports['unmanaged']=function(_0xca4ade,_0x1f07cb,_0x51aaf7,_0x5adf8f,_0x453360,_0x156f1c){var _0x119677,_0x32e134;_0x156f1c['remoteUri']=intUtil[_0x0a9e('0x44')](_0x156f1c[_0x0a9e('0x16')]);_0x156f1c['serverUrl']=intUtil[_0x0a9e('0x44')](_0x156f1c[_0x0a9e('0x45')]);if(_0x453360&&_0x453360[_0x0a9e('0x63')]){logger[_0x0a9e('0xb')]('['+_0x1f07cb[_0x0a9e('0x64')]['toUpperCase']()+']',_0x0a9e('0x47'));_0x1f07cb[_0x0a9e('0x48')]=util[_0x0a9e('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x156f1c[_0x0a9e('0x45')],_0x1f07cb['uniqueid'],md5(_0x1f07cb['uniqueid']));}else{_0x1f07cb[_0x0a9e('0x48')]='';}headers[_0x0a9e('0x4b')]=getAuth(_0x156f1c);return getUser(_0x156f1c)[_0x0a9e('0x12')](function(_0x19c995){_0x119677=_0x19c995;logger[_0x0a9e('0xb')](_0x0a9e('0x4d'),_0x119677['id']);return getEndUser(_0x156f1c,_0x1f07cb[_0x0a9e('0x4e')],_0x1f07cb[_0x0a9e('0x4f')]);})[_0x0a9e('0x12')](function(_0x1cc4f3){_0x32e134=_0x1cc4f3;logger[_0x0a9e('0xb')](_0x0a9e('0x5e'),_0x32e134['id']);return getTicket(_0x156f1c,_0x119677,_0x32e134,_0x51aaf7,_0x1f07cb);})[_0x0a9e('0x12')](function(_0x2b8192){if(_0x2b8192){logger[_0x0a9e('0xb')](_0x0a9e('0x50'));logger[_0x0a9e('0xb')](_0x0a9e('0x5f'),_0x2b8192['id']);}})['catch'](function(_0x1b0b98){logger[_0x0a9e('0x59')]('['+_0x1f07cb[_0x0a9e('0x64')]['toUpperCase']()+']',JSON[_0x0a9e('0x19')](_0x1b0b98));});}; \ No newline at end of file +var _0xa9e0=['Getting\x20agent\x20with\x20email','format','total_entries','find','_embedded','entries','then','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me','remoteUri','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','debug','stringify','GET','authType','basic','%s:%s','username','password','token','Basic\x20%s','%s/customers/search','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','work','length','map','forEach','type','string','customField','nameField','toLowerCase','content','toString','idField','variable','variableName','custom_fields','customVariable','Variable','name','priority','Creating\x20new\x20ticket...','getString','Subjects','phone','Motion','CTI','Tags','Descriptions','user','Fields','%s/customers/%d/cases','POST','queue','stripTrailingSlash','serverUrl','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','Ticket\x20created!','integrationTab','Displaying\x20ticket\x20to\x20agent...','user:%s','trigger:desk:display','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','https://xcally.desk.com/web/agent/case/%d','error','outbound','recordingFormat','none','[OUTBOUND]','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','%s/agent/tickets/%s','Desk\x20account\x20type\x20not\x20recognized','catch','monitor_format','lastevent','lodash','request-promise','md5','./util','../../../../config/logger','desk','redis','defaults','socket.io-emitter','emit','validateEmail','info'];(function(_0x10df18,_0x13338c){var _0x1f9a1d=function(_0x3157f4){while(--_0x3157f4){_0x10df18['push'](_0x10df18['shift']());}};_0x1f9a1d(++_0x13338c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3b5250,_0x7a0b2c){_0x3b5250=_0x3b5250-0x0;var _0xc844a1=_0xa9e0[_0x3b5250];return _0xc844a1;};'use strict';var _=require(_0x0a9e('0x0'));var rp=require(_0x0a9e('0x1'));var md5=require(_0x0a9e('0x2'));var util=require('util');var Redis=require('ioredis');var intUtil=require(_0x0a9e('0x3'));var config=require('../../../../config/environment');var logger=require(_0x0a9e('0x4'))(_0x0a9e('0x5'));config[_0x0a9e('0x6')]=_[_0x0a9e('0x7')](config[_0x0a9e('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x0a9e('0x8'))(new Redis(config[_0x0a9e('0x6')]));function emit(_0x2cc193,_0x5f41ea,_0x503809){io['to'](_0x2cc193)[_0x0a9e('0x9')](_0x5f41ea,_0x503809);}var headers={'Content-Type':'application/json','Accept':'application/json'};function getUser(_0x39753a,_0xf81284){if(intUtil[_0x0a9e('0xa')](_0xf81284)===!![]){logger[_0x0a9e('0xb')](_0x0a9e('0xc'),_0xf81284);return request({'uri':util[_0x0a9e('0xd')]('%s/users',_0x39753a['remoteUri'])})['then'](function(_0x4cfe67){if(_0x4cfe67[_0x0a9e('0xe')]){return _[_0x0a9e('0xf')](_0x4cfe67[_0x0a9e('0x10')][_0x0a9e('0x11')],{'email':_0xf81284});}})[_0x0a9e('0x12')](function(_0x69aeb7){if(_0x69aeb7){logger['info'](_0x0a9e('0x13'));return _0x69aeb7;}else{logger[_0x0a9e('0xb')](_0x0a9e('0x14'));return request({'uri':util[_0x0a9e('0xd')](_0x0a9e('0x15'),_0x39753a[_0x0a9e('0x16')])});}});}else{logger['info'](_0x0a9e('0x17'));return request({'uri':util['format'](_0x0a9e('0x15'),_0x39753a['remoteUri'])});}}function request(_0x16033c){logger[_0x0a9e('0x18')]('[HTTP]',JSON[_0x0a9e('0x19')](_0x16033c));return rp(_['defaults'](_0x16033c,{'method':_0x0a9e('0x1a'),'headers':headers,'json':!![]}));}function getAuth(_0x478723){var _0x106033;if(_0x478723[_0x0a9e('0x1b')]===_0x0a9e('0x1c')){_0x106033=util[_0x0a9e('0xd')](_0x0a9e('0x1d'),_0x478723[_0x0a9e('0x1e')],_0x478723[_0x0a9e('0x1f')]);}else if(_0x478723[_0x0a9e('0x1b')]===_0x0a9e('0x20')){_0x106033=util[_0x0a9e('0xd')]('%s/token:%s',_0x478723[_0x0a9e('0x1e')],_0x478723[_0x0a9e('0x20')]);}return util['format'](_0x0a9e('0x21'),new Buffer(_0x106033)['toString']('base64'));}function getEndUser(_0x3a02e1,_0x432e56,_0x38e7c4){logger[_0x0a9e('0xb')]('Searching\x20enduser\x20with\x20phone',_0x38e7c4);return request({'uri':util[_0x0a9e('0xd')](_0x0a9e('0x22'),_0x3a02e1[_0x0a9e('0x16')]),'qs':{'phone':_0x38e7c4}})[_0x0a9e('0x12')](function(_0x370d86){if(_0x370d86[_0x0a9e('0xe')]){logger[_0x0a9e('0xb')]('Enduser\x20found!');return _0x370d86['_embedded'][_0x0a9e('0x11')][0x0];}else{logger[_0x0a9e('0xb')](_0x0a9e('0x23'));return request({'uri':util[_0x0a9e('0xd')]('%s/customers',_0x3a02e1[_0x0a9e('0x16')]),'method':'POST','body':{'first_name':_0x432e56,'title':_0x432e56,'phone_numbers':[{'type':_0x0a9e('0x24'),'value':_0x38e7c4}]}});}});}function getTags(_0x5bfb33,_0x1dc186){var _0x34dc65=[];if(_0x5bfb33&&_0x5bfb33[_0x0a9e('0x25')]>0x0){_0x34dc65=_[_0x0a9e('0x26')](_0x5bfb33,_0x1dc186);}return _0x34dc65;}function getCustomFields(_0x140511,_0x1538a4){var _0x11c3b6=[];var _0x14de77={'custom_fields':{}};if(_0x140511['length']>0x0){_[_0x0a9e('0x27')](_0x140511,function(_0x468813){if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x29')&&_0x468813['nameField']&&!_0x468813[_0x0a9e('0x2a')]){_0x14de77[_0x468813[_0x0a9e('0x2b')][_0x0a9e('0x2c')]()]=_0x468813[_0x0a9e('0x2d')][_0x0a9e('0x2e')]();}else if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x29')&&_0x468813[_0x0a9e('0x2f')]&&_0x468813[_0x0a9e('0x2a')]){_0x14de77['custom_fields'][_0x468813[_0x0a9e('0x2f')]]=_0x468813['content'][_0x0a9e('0x2e')]();}else if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x30')&&_0x468813[_0x0a9e('0x31')]&&_0x468813[_0x0a9e('0x2f')]&&_0x468813['customField']){_0x1538a4[_0x468813[_0x0a9e('0x31')]]&&(_0x14de77[_0x0a9e('0x32')][_0x468813[_0x0a9e('0x2f')]]=_0x1538a4[_0x468813[_0x0a9e('0x31')]][_0x0a9e('0x2e')]());}else if(_0x468813[_0x0a9e('0x28')]===_0x0a9e('0x33')&&_0x468813[_0x0a9e('0x34')]&&_0x468813['Variable'][_0x0a9e('0x35')]&&_0x468813['idField']&&_0x468813[_0x0a9e('0x2a')]){_0x1538a4[_0x468813[_0x0a9e('0x34')][_0x0a9e('0x35')][_0x0a9e('0x2c')]()]&&(_0x14de77['custom_fields'][_0x468813[_0x0a9e('0x2f')]]=_0x1538a4[_0x468813[_0x0a9e('0x34')][_0x0a9e('0x35')][_0x0a9e('0x2c')]()]['toString']());}});}if(_0x14de77['priority']){_0x14de77[_0x0a9e('0x36')]=Number(_0x14de77['priority']);}return _0x14de77;}function getTicket(_0x24936a,_0x3d9717,_0x381c37,_0x1ef87a,_0x4f41ae){logger[_0x0a9e('0xb')](_0x0a9e('0x37'));var _0x3cae=_['merge']({'subject':intUtil[_0x0a9e('0x38')](_0x1ef87a[_0x0a9e('0x39')],_0x4f41ae,'\x20'),'type':_0x0a9e('0x3a'),'status':'new','labels':['xCALLY',_0x0a9e('0x3b'),_0x0a9e('0x3c')]['concat'](getTags(_0x1ef87a[_0x0a9e('0x3d')],_0x0a9e('0x35'))),'description':intUtil[_0x0a9e('0x38')](_0x1ef87a[_0x0a9e('0x3e')],_0x4f41ae,'\x0a'),'_links':{'assigned_user':{'href':util['format']('/api/v2/users/%d',_0x3d9717['id']),'class':_0x0a9e('0x3f')}},'message':{'direction':'in','body':intUtil[_0x0a9e('0x38')](_0x1ef87a['Descriptions'],_0x4f41ae,'\x0a')}},getCustomFields(_0x1ef87a[_0x0a9e('0x40')],_0x4f41ae));return request({'uri':util[_0x0a9e('0xd')](_0x0a9e('0x41'),_0x24936a['remoteUri'],_0x381c37['id']),'method':_0x0a9e('0x42'),'body':_0x3cae});}exports[_0x0a9e('0x43')]=function(_0x274e8e,_0x43dd5b,_0x13cb1f,_0xeaa5e5,_0x2881b3,_0x45a9b8){var _0x23b089,_0x3da2cd;_0x45a9b8[_0x0a9e('0x16')]=intUtil[_0x0a9e('0x44')](_0x45a9b8[_0x0a9e('0x16')]);_0x45a9b8[_0x0a9e('0x45')]=intUtil[_0x0a9e('0x44')](_0x45a9b8['serverUrl']);if(_0x2881b3&&_0x2881b3['monitor_format']){logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x47'));_0x43dd5b[_0x0a9e('0x48')]=util[_0x0a9e('0xd')](_0x0a9e('0x49'),_0x45a9b8[_0x0a9e('0x45')],_0x43dd5b[_0x0a9e('0x4a')],md5(_0x43dd5b[_0x0a9e('0x4a')]));}else{_0x43dd5b[_0x0a9e('0x48')]='';}headers[_0x0a9e('0x4b')]=getAuth(_0x45a9b8);return getUser(_0x45a9b8,_0xeaa5e5[_0x0a9e('0x4c')])['then'](function(_0x117c99){_0x23b089=_0x117c99;logger[_0x0a9e('0xb')](_0x0a9e('0x4d'),_0x23b089['id']);return getEndUser(_0x45a9b8,_0x43dd5b[_0x0a9e('0x4e')],_0x43dd5b[_0x0a9e('0x4f')]);})[_0x0a9e('0x12')](function(_0x21eb86){_0x3da2cd=_0x21eb86;logger[_0x0a9e('0xb')]('The\x20Enduser\x20ID\x20is:',_0x3da2cd['id']);return getTicket(_0x45a9b8,_0x23b089,_0x3da2cd,_0x13cb1f,_0x43dd5b);})[_0x0a9e('0x12')](function(_0x48fd45){if(_0x48fd45){logger[_0x0a9e('0xb')](_0x0a9e('0x50'));logger[_0x0a9e('0xb')]('The\x20Ticket\x20ID\x20is:',_0x48fd45['id']);switch(_0x45a9b8[_0x0a9e('0x28')]){case _0x0a9e('0x51'):logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x52'));emit(util[_0x0a9e('0xd')](_0x0a9e('0x53'),_0xeaa5e5['name']),_0x0a9e('0x54'),{'recordId':_0x48fd45['id']});break;case _0x0a9e('0x55'):logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x56'));emit(util[_0x0a9e('0xd')](_0x0a9e('0x53'),_0xeaa5e5[_0x0a9e('0x35')]),_0x0a9e('0x57'),{'uri':util['format'](_0x0a9e('0x58'),_0x48fd45['id'])});break;default:logger[_0x0a9e('0x59')]('[QUEUE]','Desk\x20account\x20type\x20not\x20recognized');}}})['catch'](function(_0x1adfee){console[_0x0a9e('0x59')](_0x1adfee);logger[_0x0a9e('0x59')](_0x0a9e('0x46'),JSON[_0x0a9e('0x19')](_0x1adfee));});};exports[_0x0a9e('0x5a')]=function(_0x2e5165,_0x375c18,_0x5d38ae,_0x4b1b9f,_0x53975a,_0x39d77d,_0x204173){var _0x14d602,_0x5bb3ed;_0x39d77d[_0x0a9e('0x16')]=intUtil[_0x0a9e('0x44')](_0x39d77d['remoteUri']);_0x39d77d['serverUrl']=intUtil[_0x0a9e('0x44')](_0x39d77d['serverUrl']);if(_0x204173&&_0x204173[_0x0a9e('0x5b')]&&_0x204173['recordingFormat']!==_0x0a9e('0x5c')){logger[_0x0a9e('0xb')](_0x0a9e('0x5d'),'Recording\x20is\x20enabled!');_0x375c18[_0x0a9e('0x48')]=util[_0x0a9e('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x39d77d['serverUrl'],_0x375c18[_0x0a9e('0x4a')],md5(_0x375c18[_0x0a9e('0x4a')]));}headers['Authorization']=getAuth(_0x39d77d);return getUser(_0x39d77d,_0x4b1b9f[_0x0a9e('0x4c')])['then'](function(_0x211ef9){_0x14d602=_0x211ef9;logger['info'](_0x0a9e('0x4d'),_0x14d602['id']);return getEndUser(_0x39d77d,_0x375c18['destcalleridname'],_0x375c18['destcalleridnum']);})['then'](function(_0x2da03c){_0x5bb3ed=_0x2da03c;logger['info'](_0x0a9e('0x5e'),_0x5bb3ed['id']);return getTicket(_0x39d77d,_0x14d602,_0x5bb3ed,_0x5d38ae,_0x375c18);})[_0x0a9e('0x12')](function(_0x3cfd00){if(_0x3cfd00){logger[_0x0a9e('0xb')](_0x0a9e('0x50'));logger[_0x0a9e('0xb')](_0x0a9e('0x5f'),_0x3cfd00['id']);switch(_0x39d77d[_0x0a9e('0x28')]){case'integrationTab':logger[_0x0a9e('0xb')](_0x0a9e('0x46'),_0x0a9e('0x52'));emit(util[_0x0a9e('0xd')](_0x0a9e('0x53'),_0x4b1b9f[_0x0a9e('0x35')]),'trigger:desk:display',{'recordId':_0x3cfd00['id']});break;case _0x0a9e('0x55'):logger[_0x0a9e('0xb')]('[QUEUE]',_0x0a9e('0x56'));emit(util['format'](_0x0a9e('0x53'),_0x4b1b9f['name']),'trigger:browser:url',{'uri':util['format'](_0x0a9e('0x60'),_0x39d77d['remoteUri'],_0x3cfd00['id'])});break;default:logger[_0x0a9e('0x59')](_0x0a9e('0x5d'),_0x0a9e('0x61'));}}})[_0x0a9e('0x62')](function(_0x1cca9f){logger[_0x0a9e('0x59')]('[OUTBOUND]',JSON[_0x0a9e('0x19')](_0x1cca9f));});};exports['unmanaged']=function(_0xca4ade,_0x1f07cb,_0x51aaf7,_0x5adf8f,_0x453360,_0x156f1c){var _0x119677,_0x32e134;_0x156f1c['remoteUri']=intUtil[_0x0a9e('0x44')](_0x156f1c[_0x0a9e('0x16')]);_0x156f1c['serverUrl']=intUtil[_0x0a9e('0x44')](_0x156f1c[_0x0a9e('0x45')]);if(_0x453360&&_0x453360[_0x0a9e('0x63')]){logger[_0x0a9e('0xb')]('['+_0x1f07cb[_0x0a9e('0x64')]['toUpperCase']()+']',_0x0a9e('0x47'));_0x1f07cb[_0x0a9e('0x48')]=util[_0x0a9e('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x156f1c[_0x0a9e('0x45')],_0x1f07cb['uniqueid'],md5(_0x1f07cb['uniqueid']));}else{_0x1f07cb[_0x0a9e('0x48')]='';}headers[_0x0a9e('0x4b')]=getAuth(_0x156f1c);return getUser(_0x156f1c)[_0x0a9e('0x12')](function(_0x19c995){_0x119677=_0x19c995;logger[_0x0a9e('0xb')](_0x0a9e('0x4d'),_0x119677['id']);return getEndUser(_0x156f1c,_0x1f07cb[_0x0a9e('0x4e')],_0x1f07cb[_0x0a9e('0x4f')]);})[_0x0a9e('0x12')](function(_0x1cc4f3){_0x32e134=_0x1cc4f3;logger[_0x0a9e('0xb')](_0x0a9e('0x5e'),_0x32e134['id']);return getTicket(_0x156f1c,_0x119677,_0x32e134,_0x51aaf7,_0x1f07cb);})[_0x0a9e('0x12')](function(_0x2b8192){if(_0x2b8192){logger[_0x0a9e('0xb')](_0x0a9e('0x50'));logger[_0x0a9e('0xb')](_0x0a9e('0x5f'),_0x2b8192['id']);}})['catch'](function(_0x1b0b98){logger[_0x0a9e('0x59')]('['+_0x1f07cb[_0x0a9e('0x64')]['toUpperCase']()+']',JSON[_0x0a9e('0x19')](_0x1b0b98));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/dynamics365.js b/server/services/ami/trigger/integration/dynamics365.js index c4af0ee..552f4a4 100644 --- a/server/services/ami/trigger/integration/dynamics365.js +++ b/server/services/ami/trigger/integration/dynamics365.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x77d1=['util','md5','ioredis','../../../../config/logger','dynamics365','../../../../config/environment','redis','defaults','socket.io-emitter','POST','remoteUri','username','password','then','access_token','catch','error','toUpperCase',']\x20Wrong\x20credentials!','message','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','isNil','validateEmail','email','userEmail','length','internalemailaddress','isdisabled','info',']\x20Agent\x20found\x20','systemuserid','userId','toLowerCase','calleridnum','contacts','/systemusers(','4.0','headers','odata-entityid','lastIndexOf','enduserId','contacts?$select=telephone1','value','outbound','destcalleridnum','telephone1',']\x20Enduser\x20created!','forEach','string','nameField','idField','substring','indexOf','content','incidents','getString','Descriptions','/contacts(','ticketType','phonecall','phonecalls','assign','Subjects','callDirection','queue','Fields','ticketId','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','emit','trigger:browser:url','stripTrailingSlash','serverUrl','unmanaged','%s/api/data/v9.0/','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','name','request-promise'];(function(_0x204ddc,_0x581ed7){var _0x2ee64f=function(_0x48713a){while(--_0x48713a){_0x204ddc['push'](_0x204ddc['shift']());}};_0x2ee64f(++_0x581ed7);}(_0x77d1,0xbd));var _0x177d=function(_0x3048ea,_0x3838c2){_0x3048ea=_0x3048ea-0x0;var _0x1a13c4=_0x77d1[_0x3048ea];return _0x1a13c4;};'use strict';var _=require('lodash');var BPromise=require('bluebird');var rp=require(_0x177d('0x0'));var util=require(_0x177d('0x1'));var intUtil=require('./util');var md5=require(_0x177d('0x2'));var Redis=require(_0x177d('0x3'));var logger=require(_0x177d('0x4'))(_0x177d('0x5'));var config=require(_0x177d('0x6'));config[_0x177d('0x7')]=_[_0x177d('0x8')](config[_0x177d('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x177d('0x9'))(new Redis(config['redis']));function getAuthToken(_0x1ab8da,_0x267708,_0x164c62){var _0x407d46={'method':_0x177d('0xa'),'uri':_0x267708,'form':{'client_id':_0x1ab8da['clientId'],'resource':_0x1ab8da[_0x177d('0xb')],'username':_0x1ab8da[_0x177d('0xc')],'password':_0x1ab8da[_0x177d('0xd')],'grant_type':_0x177d('0xd'),'client_secret':_0x1ab8da['clientSecret']},'json':!![]};return rp(_0x407d46)[_0x177d('0xe')](function(_0x4a6a71){return _0x4a6a71[_0x177d('0xf')];})[_0x177d('0x10')](function(_0x1c1a1f){logger[_0x177d('0x11')]('['+[_0x164c62[_0x177d('0x12')]()]+_0x177d('0x13'));return _0x1c1a1f[_0x177d('0x14')];});}function getUser(_0x35cd89,_0x4f636d,_0x3d2122,_0x203eee,_0x3e0ed3,_0x453e40){return new BPromise(function(_0x2a79d6,_0x26d2c0){return getAuthToken(_0x4f636d,_0x203eee,_0x453e40)['then'](function(_0x543d17){var _0x583706={'method':_0x177d('0x15'),'uri':_0x3e0ed3+_0x177d('0x16'),'headers':{'Authorization':_0x177d('0x17')+_0x543d17,'OData-Version':'4.0'},'json':!![]};return rp(_0x583706);})[_0x177d('0xe')](function(_0x1dd5f6){var _0x5bafd8=_0x1dd5f6['value'];var _0x5322db=![];var _0x4fb9d5=null;if(!_[_0x177d('0x18')](_0x3d2122)){if(intUtil[_0x177d('0x19')](_0x3d2122[_0x177d('0x1a')])){_0x35cd89[_0x177d('0x1b')]=_0x3d2122['email'];for(_0x4fb9d5=0x0;_0x4fb9d5<_0x5bafd8[_0x177d('0x1c')];_0x4fb9d5++){if(_0x5bafd8[_0x4fb9d5][_0x177d('0x1d')]===_0x3d2122[_0x177d('0x1a')]&&!_0x5bafd8[_0x4fb9d5][_0x177d('0x1e')]){_0x5322db=!![];logger[_0x177d('0x1f')]('['+[_0x453e40[_0x177d('0x12')]()]+_0x177d('0x20')+_0x5bafd8[_0x4fb9d5][_0x177d('0x21')]+'!');_0x35cd89[_0x177d('0x22')]=_0x5bafd8[_0x4fb9d5]['systemuserid'];}}}}if(!_0x5322db){logger[_0x177d('0x1f')]('['+[_0x453e40['toUpperCase']()]+']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');_0x35cd89[_0x177d('0x1b')]=_0x4f636d[_0x177d('0xc')];for(_0x4fb9d5=0x0;_0x4fb9d5<_0x5bafd8[_0x177d('0x1c')];_0x4fb9d5++){if(_0x5bafd8[_0x4fb9d5][_0x177d('0x1d')]===_0x4f636d['username']){_0x35cd89[_0x177d('0x22')]=_0x5bafd8[_0x4fb9d5][_0x177d('0x21')];}}}_0x2a79d6(_0x35cd89);})[_0x177d('0x10')](function(_0x38cb7d){_0x26d2c0(_0x38cb7d[_0x177d('0x14')]);});});}function createEndUser(_0x403425,_0x4d5864,_0x569443,_0xf3c863,_0x510194,_0x2fda96){return new BPromise(function(_0x4d2598,_0x376084){return getAuthToken(_0x4d5864,_0x569443,_0x2fda96)[_0x177d('0xe')](function(_0x31b8a9){var _0x147456=_0x2fda96[_0x177d('0x23')]()==='outbound'?_0x510194['destcalleridnum']:_0x510194[_0x177d('0x24')];var _0x1cddf1={'method':_0x177d('0xa'),'uri':_0xf3c863+_0x177d('0x25'),'body':{'telephone1':_0x147456,'fullname':_0x147456,'firstname':_0x147456,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x177d('0x26')+_0x403425[_0x177d('0x22')]+')'},'headers':{'Authorization':_0x177d('0x17')+_0x31b8a9,'OData-Version':_0x177d('0x27')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x1cddf1);})[_0x177d('0xe')](function(_0x150b17){var _0x5eba30=_0x150b17[_0x177d('0x28')][_0x177d('0x29')];var _0x42032d=_0x5eba30['substring'](_0x5eba30[_0x177d('0x2a')]('(')+0x1,_0x5eba30[_0x177d('0x2a')](')'));_0x403425[_0x177d('0x2b')]=_0x42032d;_0x4d2598(_0x403425);})[_0x177d('0x10')](function(_0x46933b){_0x376084(_0x46933b[_0x177d('0x14')]);});});}function getEndUser(_0x3ff84e,_0x15c466,_0xb6f831,_0x42584e,_0x2b36d8,_0x109553){return new BPromise(function(_0x4a8bd7,_0x500535){return getAuthToken(_0x15c466,_0xb6f831,_0x109553)[_0x177d('0xe')](function(_0x176d5c){var _0x2169eb={'method':_0x177d('0x15'),'uri':_0x42584e+_0x177d('0x2c'),'headers':{'Authorization':_0x177d('0x17')+_0x176d5c,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x2169eb);})['then'](function(_0x7b0d9f){var _0xa42d20=null;if(_0x7b0d9f){var _0x11b8f5=_0x7b0d9f[_0x177d('0x2d')];var _0xe12412=![];for(_0xa42d20=0x0;_0xa42d20<_0x11b8f5[_0x177d('0x1c')];_0xa42d20++){var _0x30866c=_0x109553[_0x177d('0x23')]()===_0x177d('0x2e')?_0x2b36d8[_0x177d('0x2f')]:_0x2b36d8[_0x177d('0x24')];if(_0x11b8f5[_0xa42d20][_0x177d('0x30')]===_0x30866c){_0xe12412=!![];_0x3ff84e[_0x177d('0x2b')]=_0x11b8f5[_0xa42d20]['contactid'];}}if(_0xe12412){_0x4a8bd7(_0x3ff84e);}else{return createEndUser(_0x3ff84e,_0x15c466,_0xb6f831,_0x42584e,_0x2b36d8,_0x109553)[_0x177d('0xe')](function(_0x563648){logger[_0x177d('0x1f')]('['+[_0x109553[_0x177d('0x12')]()]+_0x177d('0x31'),_0x563648[_0x177d('0x2b')]);_0x4a8bd7(_0x563648);});}}else{return createEndUser(_0x3ff84e,_0x15c466,_0xb6f831,_0x42584e,_0x2b36d8,_0x109553)[_0x177d('0xe')](function(_0x1a62db){logger['info']('['+[_0x109553[_0x177d('0x12')]()]+']\x20Enduser\x20Created!',_0x1a62db['enduserId']);_0x4a8bd7(_0x1a62db);});}});});}function getCustomFields(_0x2be6d5,_0x511101,_0x32ab2d){var _0x2573c8={};if(_0x2be6d5['length']>0x0){_[_0x177d('0x32')](_0x2be6d5,function(_0x1ae683){if(_0x1ae683['type']===_0x177d('0x33')&&_0x1ae683[_0x177d('0x34')]&&!_0x1ae683['customField']){var _0x22101a=_0x1ae683[_0x177d('0x35')][_0x177d('0x23')]();var _0x4457bc=_0x22101a[_0x177d('0x36')](0x0,_0x22101a[_0x177d('0x37')]('_'));var _0x5b7149=_0x22101a[_0x177d('0x36')](_0x22101a[_0x177d('0x37')]('_')+0x1);if(_0x4457bc===_0x32ab2d){_0x2573c8[_0x5b7149]=_0x1ae683[_0x177d('0x38')];}}});}return _0x2573c8;}function getTicket(_0x2e9108,_0x49e61e,_0x12025a,_0x477064,_0x47b8c8,_0x1addd6,_0x34a63f){return new BPromise(function(_0x4ec594,_0x332322){var _0x2e7b0e;return getAuthToken(_0x49e61e,_0x12025a,_0x34a63f)[_0x177d('0xe')](function(_0xa1c56b){if(_0x1addd6['ticketType']==='incident'){_0x2e7b0e={'method':_0x177d('0xa'),'uri':_0x477064+_0x177d('0x39'),'body':Object['assign']({},{'title':intUtil[_0x177d('0x3a')](_0x1addd6['Subjects'],_0x47b8c8,'\x20'),'description':intUtil[_0x177d('0x3a')](_0x1addd6[_0x177d('0x3b')],_0x47b8c8,'\x0a'),'customerid_contact@odata.bind':_0x177d('0x3c')+_0x2e9108[_0x177d('0x2b')]+')','ownerid@odata.bind':_0x177d('0x26')+_0x2e9108[_0x177d('0x22')]+')','caseorigincode':'1'},getCustomFields(_0x1addd6['Fields'],_0x47b8c8,_0x1addd6[_0x177d('0x3d')])),'headers':{'Authorization':_0x177d('0x17')+_0xa1c56b,'OData-Version':_0x177d('0x27')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x1addd6['ticketType']===_0x177d('0x3e')){_0x2e7b0e={'method':_0x177d('0xa'),'uri':_0x477064+_0x177d('0x3f'),'body':Object[_0x177d('0x40')]({},{'subject':intUtil['getString'](_0x1addd6[_0x177d('0x41')],_0x47b8c8,'\x20'),'phonenumber':String(_0x47b8c8['calleridnum']),'description':intUtil['getString'](_0x1addd6[_0x177d('0x3b')],_0x47b8c8,'\x0a'),'regardingobjectid_contact@odata.bind':_0x177d('0x3c')+_0x2e9108[_0x177d('0x2b')]+')','ownerid@odata.bind':_0x177d('0x26')+_0x2e9108['userId']+')','directioncode':_0x2e9108[_0x177d('0x42')]===_0x177d('0x43')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0x177d('0x26')+_0x2e9108[_0x177d('0x22')]+')','participationtypemask':_0x2e9108[_0x177d('0x42')]===_0x177d('0x43')?0x2:0x1},{'partyid_contact@odata.bind':_0x177d('0x3c')+_0x2e9108[_0x177d('0x2b')]+')','participationtypemask':_0x2e9108['callDirection']===_0x177d('0x43')?0x1:0x2}]},getCustomFields(_0x1addd6[_0x177d('0x44')],_0x47b8c8,_0x1addd6[_0x177d('0x3d')])),'headers':{'Authorization':_0x177d('0x17')+_0xa1c56b,'OData-Version':_0x177d('0x27')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x2e7b0e);})[_0x177d('0xe')](function(_0x224444){var _0x251335=_0x224444[_0x177d('0x28')][_0x177d('0x29')];var _0x39822c=_0x251335[_0x177d('0x36')](_0x251335[_0x177d('0x2a')]('(')+0x1,_0x251335[_0x177d('0x2a')](')'));_0x2e9108[_0x177d('0x45')]=_0x39822c;_0x4ec594(_0x2e9108);})[_0x177d('0x10')](function(_0x41a6b7){_0x332322(_0x41a6b7[_0x177d('0x14')]);});});}function emit(_0x4eccac,_0x48da9e,_0xeebea7,_0x4543a8){var _0x2e3dba={'uri':util[_0x177d('0x46')](_0x177d('0x47'),_0x4eccac,_0xeebea7,_0x4543a8)};io['to'](util['format']('user:%s',_0x48da9e))[_0x177d('0x48')](_0x177d('0x49'),_0x2e3dba);}exports['cs']=function(_0x37b5e6,_0xadc3c8,_0x476e38,_0xc3cb91,_0x1fc90f,_0x557c7a,_0x19b29f,_0x31201a){var _0x46d450={};_0x557c7a[_0x177d('0xb')]=intUtil[_0x177d('0x4a')](_0x557c7a['remoteUri']);_0x557c7a[_0x177d('0x4b')]=intUtil[_0x177d('0x4a')](_0x557c7a['serverUrl']);_0x46d450[_0x177d('0x42')]=_0x31201a===_0x177d('0x43')||_0x31201a===_0x177d('0x4c')?_0x177d('0x43'):_0x177d('0x2e');var _0x25a72b=util[_0x177d('0x46')](_0x177d('0x4d'),_0x557c7a[_0x177d('0xb')]);var _0xe8091a=util['format']('https://login.microsoftonline.com/%s/oauth2/token',_0x557c7a[_0x177d('0x4e')]);var _0x214b31=util['format'](_0x177d('0x4f'),_0x557c7a[_0x177d('0x4b')],_0xadc3c8[_0x177d('0x50')],md5(_0xadc3c8[_0x177d('0x50')]));if(_0x1fc90f&&_0x1fc90f[_0x177d('0x51')]){logger[_0x177d('0x1f')](_0x177d('0x52'),_0x177d('0x53'));_0xadc3c8[_0x177d('0x54')]=_0x214b31;}else if(_0x19b29f&&_0x19b29f[_0x177d('0x55')]&&_0x19b29f[_0x177d('0x55')]!=='none'){logger[_0x177d('0x1f')](_0x177d('0x56'),_0x177d('0x53'));_0xadc3c8[_0x177d('0x54')]=_0x214b31;}else{_0xadc3c8['recordingURL']='';}return getUser(_0x46d450,_0x557c7a,_0xc3cb91,_0xe8091a,_0x25a72b,_0x31201a)[_0x177d('0xe')](function(_0x5a2af1){logger[_0x177d('0x1f')]('['+_0x31201a[_0x177d('0x12')]()+_0x177d('0x57'),_0x5a2af1['userId']);logger['info']('['+_0x31201a['toUpperCase']()+_0x177d('0x58'),_0x5a2af1['userEmail']);return getEndUser(_0x5a2af1,_0x557c7a,_0xe8091a,_0x25a72b,_0xadc3c8,_0x31201a);})[_0x177d('0xe')](function(_0x57bf54){logger[_0x177d('0x1f')]('['+_0x31201a['toUpperCase']()+_0x177d('0x59'),_0x57bf54['enduserId']);logger[_0x177d('0x1f')]('['+_0x31201a['toUpperCase']()+_0x177d('0x5a'),_0xadc3c8[_0x177d('0x24')]);return getTicket(_0x57bf54,_0x557c7a,_0xe8091a,_0x25a72b,_0xadc3c8,_0x476e38,_0x31201a);})[_0x177d('0xe')](function(_0xffb6cf){logger[_0x177d('0x1f')](util[_0x177d('0x46')]('['+_0x31201a[_0x177d('0x12')]()+_0x177d('0x5b'),_0x476e38['ticketType'],_0xffb6cf[_0x177d('0x45')]));logger['info'](util[_0x177d('0x46')]('['+_0x31201a['toUpperCase']()+_0x177d('0x5c'),_0x31201a));if(_0x31201a!==_0x177d('0x4c')){logger[_0x177d('0x1f')]('['+_0x31201a['toUpperCase']()+']',_0x177d('0x5d'));emit(_0x557c7a[_0x177d('0xb')],_0xc3cb91[_0x177d('0x5e')],_0x476e38[_0x177d('0x3d')],_0xffb6cf[_0x177d('0x45')]);}})[_0x177d('0x10')](function(_0x4071a2){logger[_0x177d('0x11')]('['+_0x31201a[_0x177d('0x12')]()+']\x20Error\x20running\x20Dynamics365\x20integration',util['inspect'](_0x4071a2,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x764a=['unmanaged','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','Recording\x20is\x20enabled!','recordingURL','recordingFormat','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:','name','ticketId','inspect','lodash','bluebird','request-promise','util','./util','md5','../../../../config/logger','dynamics365','../../../../config/environment','redis','defaults','localhost','POST','remoteUri','username','password','then','access_token','catch','error','toUpperCase',']\x20Wrong\x20credentials!','message','GET','Bearer\x20','value','validateEmail','email','userEmail','internalemailaddress','isdisabled','info',']\x20Agent\x20found\x20','systemuserid','userId',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','length','toLowerCase','outbound','destcalleridnum','calleridnum','4.0','headers','odata-entityid','substring','enduserId','contacts?$select=telephone1','telephone1','contactid',']\x20Enduser\x20created!',']\x20Enduser\x20Created!','type','string','customField','idField','content','ticketType','incidents','getString','Subjects','Descriptions','/contacts(','/systemusers(','Fields','phonecall','phonecalls','assign','callDirection','queue','lastIndexOf','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','emit','stripTrailingSlash','serverUrl'];(function(_0x2fbff6,_0xd47a5f){var _0x1d9e67=function(_0x53bca3){while(--_0x53bca3){_0x2fbff6['push'](_0x2fbff6['shift']());}};_0x1d9e67(++_0xd47a5f);}(_0x764a,0xce));var _0xa764=function(_0x16c80d,_0x5673d2){_0x16c80d=_0x16c80d-0x0;var _0x234a69=_0x764a[_0x16c80d];return _0x234a69;};'use strict';var _=require(_0xa764('0x0'));var BPromise=require(_0xa764('0x1'));var rp=require(_0xa764('0x2'));var util=require(_0xa764('0x3'));var intUtil=require(_0xa764('0x4'));var md5=require(_0xa764('0x5'));var Redis=require('ioredis');var logger=require(_0xa764('0x6'))(_0xa764('0x7'));var config=require(_0xa764('0x8'));config[_0xa764('0x9')]=_[_0xa764('0xa')](config[_0xa764('0x9')],{'host':_0xa764('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xa764('0x9')]));function getAuthToken(_0x315f61,_0x21730a,_0x5b9269){var _0x38ea21={'method':_0xa764('0xc'),'uri':_0x21730a,'form':{'client_id':_0x315f61['clientId'],'resource':_0x315f61[_0xa764('0xd')],'username':_0x315f61[_0xa764('0xe')],'password':_0x315f61[_0xa764('0xf')],'grant_type':'password','client_secret':_0x315f61['clientSecret']},'json':!![]};return rp(_0x38ea21)[_0xa764('0x10')](function(_0x43d922){return _0x43d922[_0xa764('0x11')];})[_0xa764('0x12')](function(_0x495652){logger[_0xa764('0x13')]('['+[_0x5b9269[_0xa764('0x14')]()]+_0xa764('0x15'));return _0x495652[_0xa764('0x16')];});}function getUser(_0xcbf786,_0x10f666,_0x6b78ad,_0x26e27f,_0x3828cf,_0x507c67){return new BPromise(function(_0x523214,_0x4fc5df){return getAuthToken(_0x10f666,_0x26e27f,_0x507c67)[_0xa764('0x10')](function(_0x23e3f0){var _0x378ad9={'method':_0xa764('0x17'),'uri':_0x3828cf+'systemusers?$select=internalemailaddress,isdisabled,systemuserid','headers':{'Authorization':_0xa764('0x18')+_0x23e3f0,'OData-Version':'4.0'},'json':!![]};return rp(_0x378ad9);})[_0xa764('0x10')](function(_0x58e85a){var _0x860d94=_0x58e85a[_0xa764('0x19')];var _0x521e3f=![];var _0x1aefdb=null;if(!_['isNil'](_0x6b78ad)){if(intUtil[_0xa764('0x1a')](_0x6b78ad[_0xa764('0x1b')])){_0xcbf786[_0xa764('0x1c')]=_0x6b78ad['email'];for(_0x1aefdb=0x0;_0x1aefdb<_0x860d94['length'];_0x1aefdb++){if(_0x860d94[_0x1aefdb][_0xa764('0x1d')]===_0x6b78ad[_0xa764('0x1b')]&&!_0x860d94[_0x1aefdb][_0xa764('0x1e')]){_0x521e3f=!![];logger[_0xa764('0x1f')]('['+[_0x507c67[_0xa764('0x14')]()]+_0xa764('0x20')+_0x860d94[_0x1aefdb][_0xa764('0x21')]+'!');_0xcbf786[_0xa764('0x22')]=_0x860d94[_0x1aefdb]['systemuserid'];}}}}if(!_0x521e3f){logger[_0xa764('0x1f')]('['+[_0x507c67['toUpperCase']()]+_0xa764('0x23'));_0xcbf786[_0xa764('0x1c')]=_0x10f666['username'];for(_0x1aefdb=0x0;_0x1aefdb<_0x860d94[_0xa764('0x24')];_0x1aefdb++){if(_0x860d94[_0x1aefdb][_0xa764('0x1d')]===_0x10f666[_0xa764('0xe')]){_0xcbf786[_0xa764('0x22')]=_0x860d94[_0x1aefdb]['systemuserid'];}}}_0x523214(_0xcbf786);})[_0xa764('0x12')](function(_0x24bbfa){_0x4fc5df(_0x24bbfa[_0xa764('0x16')]);});});}function createEndUser(_0x271c3c,_0x45eb8d,_0x4369cd,_0x2eaa57,_0x49ae2c,_0x2951f8){return new BPromise(function(_0x40c940,_0x59600f){return getAuthToken(_0x45eb8d,_0x4369cd,_0x2951f8)[_0xa764('0x10')](function(_0x314b01){var _0x5386e7=_0x2951f8[_0xa764('0x25')]()===_0xa764('0x26')?_0x49ae2c[_0xa764('0x27')]:_0x49ae2c[_0xa764('0x28')];var _0x11ba48={'method':_0xa764('0xc'),'uri':_0x2eaa57+'contacts','body':{'telephone1':_0x5386e7,'fullname':_0x5386e7,'firstname':_0x5386e7,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':'/systemusers('+_0x271c3c[_0xa764('0x22')]+')'},'headers':{'Authorization':_0xa764('0x18')+_0x314b01,'OData-Version':_0xa764('0x29')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x11ba48);})['then'](function(_0x462f62){var _0xc034b1=_0x462f62[_0xa764('0x2a')][_0xa764('0x2b')];var _0x1ddd1b=_0xc034b1[_0xa764('0x2c')](_0xc034b1['lastIndexOf']('(')+0x1,_0xc034b1['lastIndexOf'](')'));_0x271c3c[_0xa764('0x2d')]=_0x1ddd1b;_0x40c940(_0x271c3c);})[_0xa764('0x12')](function(_0x2adb33){_0x59600f(_0x2adb33[_0xa764('0x16')]);});});}function getEndUser(_0x311aa3,_0x1ff20e,_0x146461,_0x777de0,_0xaf6628,_0x537527){return new BPromise(function(_0x566991,_0x20346f){return getAuthToken(_0x1ff20e,_0x146461,_0x537527)[_0xa764('0x10')](function(_0x4adfe3){var _0x59781a={'method':_0xa764('0x17'),'uri':_0x777de0+_0xa764('0x2e'),'headers':{'Authorization':_0xa764('0x18')+_0x4adfe3,'If-None-Match':null,'OData-Version':_0xa764('0x29')},'json':!![]};return rp(_0x59781a);})[_0xa764('0x10')](function(_0x329462){var _0x222098=null;if(_0x329462){var _0x21898c=_0x329462[_0xa764('0x19')];var _0x5d4a01=![];for(_0x222098=0x0;_0x222098<_0x21898c[_0xa764('0x24')];_0x222098++){var _0x46b92e=_0x537527[_0xa764('0x25')]()===_0xa764('0x26')?_0xaf6628[_0xa764('0x27')]:_0xaf6628[_0xa764('0x28')];if(_0x21898c[_0x222098][_0xa764('0x2f')]===_0x46b92e){_0x5d4a01=!![];_0x311aa3[_0xa764('0x2d')]=_0x21898c[_0x222098][_0xa764('0x30')];}}if(_0x5d4a01){_0x566991(_0x311aa3);}else{return createEndUser(_0x311aa3,_0x1ff20e,_0x146461,_0x777de0,_0xaf6628,_0x537527)[_0xa764('0x10')](function(_0x37f508){logger[_0xa764('0x1f')]('['+[_0x537527['toUpperCase']()]+_0xa764('0x31'),_0x37f508[_0xa764('0x2d')]);_0x566991(_0x37f508);});}}else{return createEndUser(_0x311aa3,_0x1ff20e,_0x146461,_0x777de0,_0xaf6628,_0x537527)[_0xa764('0x10')](function(_0x26f2d1){logger[_0xa764('0x1f')]('['+[_0x537527['toUpperCase']()]+_0xa764('0x32'),_0x26f2d1[_0xa764('0x2d')]);_0x566991(_0x26f2d1);});}});});}function getCustomFields(_0x2392cd,_0xc6920e,_0x23c0cd){var _0x50c41a={};if(_0x2392cd[_0xa764('0x24')]>0x0){_['forEach'](_0x2392cd,function(_0x3524fb){if(_0x3524fb[_0xa764('0x33')]===_0xa764('0x34')&&_0x3524fb['nameField']&&!_0x3524fb[_0xa764('0x35')]){var _0x5b5ab1=_0x3524fb[_0xa764('0x36')]['toLowerCase']();var _0x19239c=_0x5b5ab1[_0xa764('0x2c')](0x0,_0x5b5ab1['indexOf']('_'));var _0x38bbd4=_0x5b5ab1['substring'](_0x5b5ab1['indexOf']('_')+0x1);if(_0x19239c===_0x23c0cd){_0x50c41a[_0x38bbd4]=_0x3524fb[_0xa764('0x37')];}}});}return _0x50c41a;}function getTicket(_0x35e480,_0x1a2a27,_0x39f049,_0x82cfc3,_0x3049e1,_0x67b644,_0x5025e){return new BPromise(function(_0x444fbf,_0x14e562){var _0x1620e9;return getAuthToken(_0x1a2a27,_0x39f049,_0x5025e)[_0xa764('0x10')](function(_0x4edf28){if(_0x67b644[_0xa764('0x38')]==='incident'){_0x1620e9={'method':_0xa764('0xc'),'uri':_0x82cfc3+_0xa764('0x39'),'body':Object['assign']({},{'title':intUtil[_0xa764('0x3a')](_0x67b644[_0xa764('0x3b')],_0x3049e1,'\x20'),'description':intUtil[_0xa764('0x3a')](_0x67b644[_0xa764('0x3c')],_0x3049e1,'\x0a'),'customerid_contact@odata.bind':_0xa764('0x3d')+_0x35e480[_0xa764('0x2d')]+')','ownerid@odata.bind':_0xa764('0x3e')+_0x35e480[_0xa764('0x22')]+')','caseorigincode':'1'},getCustomFields(_0x67b644[_0xa764('0x3f')],_0x3049e1,_0x67b644[_0xa764('0x38')])),'headers':{'Authorization':_0xa764('0x18')+_0x4edf28,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}if(_0x67b644[_0xa764('0x38')]===_0xa764('0x40')){_0x1620e9={'method':_0xa764('0xc'),'uri':_0x82cfc3+_0xa764('0x41'),'body':Object[_0xa764('0x42')]({},{'subject':intUtil['getString'](_0x67b644[_0xa764('0x3b')],_0x3049e1,'\x20'),'phonenumber':String(_0x3049e1[_0xa764('0x28')]),'description':intUtil['getString'](_0x67b644[_0xa764('0x3c')],_0x3049e1,'\x0a'),'regardingobjectid_contact@odata.bind':_0xa764('0x3d')+_0x35e480[_0xa764('0x2d')]+')','ownerid@odata.bind':'/systemusers('+_0x35e480[_0xa764('0x22')]+')','directioncode':_0x35e480[_0xa764('0x43')]===_0xa764('0x44')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0xa764('0x3e')+_0x35e480[_0xa764('0x22')]+')','participationtypemask':_0x35e480[_0xa764('0x43')]===_0xa764('0x44')?0x2:0x1},{'partyid_contact@odata.bind':_0xa764('0x3d')+_0x35e480[_0xa764('0x2d')]+')','participationtypemask':_0x35e480[_0xa764('0x43')]==='queue'?0x1:0x2}]},getCustomFields(_0x67b644[_0xa764('0x3f')],_0x3049e1,_0x67b644[_0xa764('0x38')])),'headers':{'Authorization':_0xa764('0x18')+_0x4edf28,'OData-Version':_0xa764('0x29')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x1620e9);})[_0xa764('0x10')](function(_0x63de0d){var _0x1446d2=_0x63de0d['headers'][_0xa764('0x2b')];var _0x590a54=_0x1446d2[_0xa764('0x2c')](_0x1446d2[_0xa764('0x45')]('(')+0x1,_0x1446d2[_0xa764('0x45')](')'));_0x35e480['ticketId']=_0x590a54;_0x444fbf(_0x35e480);})['catch'](function(_0x27c5ed){_0x14e562(_0x27c5ed[_0xa764('0x16')]);});});}function emit(_0x3b5b38,_0x544ea9,_0x9a6a7f,_0x31cf1c){var _0x4eb523={'uri':util[_0xa764('0x46')](_0xa764('0x47'),_0x3b5b38,_0x9a6a7f,_0x31cf1c)};io['to'](util[_0xa764('0x46')](_0xa764('0x48'),_0x544ea9))[_0xa764('0x49')]('trigger:browser:url',_0x4eb523);}exports['cs']=function(_0x26dfbd,_0x477356,_0x211980,_0x3c4fc5,_0x4982de,_0x46b356,_0x2052fe,_0x50c7eb){var _0x2c8869={};_0x46b356[_0xa764('0xd')]=intUtil[_0xa764('0x4a')](_0x46b356['remoteUri']);_0x46b356[_0xa764('0x4b')]=intUtil[_0xa764('0x4a')](_0x46b356[_0xa764('0x4b')]);_0x2c8869[_0xa764('0x43')]=_0x50c7eb===_0xa764('0x44')||_0x50c7eb===_0xa764('0x4c')?_0xa764('0x44'):_0xa764('0x26');var _0x4b639e=util['format'](_0xa764('0x4d'),_0x46b356['remoteUri']);var _0x4271e5=util[_0xa764('0x46')](_0xa764('0x4e'),_0x46b356[_0xa764('0x4f')]);var _0x5c234a=util[_0xa764('0x46')](_0xa764('0x50'),_0x46b356[_0xa764('0x4b')],_0x477356[_0xa764('0x51')],md5(_0x477356['uniqueid']));if(_0x4982de&&_0x4982de[_0xa764('0x52')]){logger[_0xa764('0x1f')]('[QUEUE]',_0xa764('0x53'));_0x477356[_0xa764('0x54')]=_0x5c234a;}else if(_0x2052fe&&_0x2052fe[_0xa764('0x55')]&&_0x2052fe['recordingFormat']!=='none'){logger[_0xa764('0x1f')](_0xa764('0x56'),'Recording\x20is\x20enabled!');_0x477356[_0xa764('0x54')]=_0x5c234a;}else{_0x477356[_0xa764('0x54')]='';}return getUser(_0x2c8869,_0x46b356,_0x3c4fc5,_0x4271e5,_0x4b639e,_0x50c7eb)[_0xa764('0x10')](function(_0xbdeb49){logger[_0xa764('0x1f')]('['+_0x50c7eb[_0xa764('0x14')]()+_0xa764('0x57'),_0xbdeb49[_0xa764('0x22')]);logger[_0xa764('0x1f')]('['+_0x50c7eb[_0xa764('0x14')]()+_0xa764('0x58'),_0xbdeb49['userEmail']);return getEndUser(_0xbdeb49,_0x46b356,_0x4271e5,_0x4b639e,_0x477356,_0x50c7eb);})[_0xa764('0x10')](function(_0x5f45f6){logger[_0xa764('0x1f')]('['+_0x50c7eb[_0xa764('0x14')]()+_0xa764('0x59'),_0x5f45f6[_0xa764('0x2d')]);logger[_0xa764('0x1f')]('['+_0x50c7eb[_0xa764('0x14')]()+_0xa764('0x5a'),_0x477356[_0xa764('0x28')]);return getTicket(_0x5f45f6,_0x46b356,_0x4271e5,_0x4b639e,_0x477356,_0x211980,_0x50c7eb);})[_0xa764('0x10')](function(_0x3fa4dd){logger[_0xa764('0x1f')](util[_0xa764('0x46')]('['+_0x50c7eb[_0xa764('0x14')]()+']\x20The\x20%s\x20ID\x20is:\x20%s',_0x211980['ticketType'],_0x3fa4dd['ticketId']));logger[_0xa764('0x1f')](util['format']('['+_0x50c7eb[_0xa764('0x14')]()+']\x20Call\x20direction:\x20%s',_0x50c7eb));if(_0x50c7eb!=='unmanaged'){logger[_0xa764('0x1f')]('['+_0x50c7eb['toUpperCase']()+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x46b356['remoteUri'],_0x3c4fc5[_0xa764('0x5b')],_0x211980['ticketType'],_0x3fa4dd[_0xa764('0x5c')]);}})[_0xa764('0x12')](function(_0x3081c6){logger['error']('['+_0x50c7eb[_0xa764('0x14')]()+']\x20Error\x20running\x20Dynamics365\x20integration',util[_0xa764('0x5d')](_0x3081c6,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/freshdesk.js b/server/services/ami/trigger/integration/freshdesk.js index d486f58..85c2dfa 100644 --- a/server/services/ami/trigger/integration/freshdesk.js +++ b/server/services/ami/trigger/integration/freshdesk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x300f=['Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','POST','Enduser\x20created.','Basic\x20%s','apiKey','toString','base64','debug','[HTTP]','stringify','GET','customField','nameField','toLowerCase','string','idField','push','content','type','variable','variableName','Variable','name','queue','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','uniqueid','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','catch','error','outbound','recordingFormat','none','[OUTBOUND]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','Authorization','email','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','%s/helpdesk/tickets/%d','lastevent','toUpperCase','lodash','request-promise','md5','./util','../../../../config/environment','freshdesk','redis','defaults','localhost','socket.io-emitter','emit','info','format','calleridname','calleridnum','getString','Subjects','
','Tags','Fields','custom_fields','keyBy','value','%s/api/v2/tickets','then','Ticket\x20created!','%s/api/v2/agents','remoteUri','length','Agent\x20found!','find','contact','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me'];(function(_0x1e115c,_0x3a3517){var _0x2de184=function(_0x400d2b){while(--_0x400d2b){_0x1e115c['push'](_0x1e115c['shift']());}};_0x2de184(++_0x3a3517);}(_0x300f,0x136));var _0xf300=function(_0xbe8a9,_0x514ec0){_0xbe8a9=_0xbe8a9-0x0;var _0x2a9dfc=_0x300f[_0xbe8a9];return _0x2a9dfc;};'use strict';var _=require(_0xf300('0x0'));var rp=require(_0xf300('0x1'));var md5=require(_0xf300('0x2'));var util=require('util');var Redis=require('ioredis');var intUtil=require(_0xf300('0x3'));var config=require(_0xf300('0x4'));var logger=require('../../../../config/logger')(_0xf300('0x5'));config[_0xf300('0x6')]=_[_0xf300('0x7')](config[_0xf300('0x6')],{'host':_0xf300('0x8'),'port':0x18eb});var io=require(_0xf300('0x9'))(new Redis(config['redis']));var headers={'Content-Type':'application/json','Accept':'application/json'};function emit(_0x3faf44,_0x32c8f4,_0x42d7d0){io['to'](_0x3faf44)[_0xf300('0xa')](_0x32c8f4,_0x42d7d0);}function getTicket(_0x5c5a88,_0x405438,_0x18d99a,_0x4705be,_0x14471d){logger[_0xf300('0xb')]('Creating\x20new\x20ticket...');var _0x3d0f22=_['merge']({'responder_id':_0x405438['id'],'requester_id':_0x18d99a['id'],'name':util[_0xf300('0xc')]('Caller\x20-\x20%s',_0x14471d[_0xf300('0xd')]),'phone':_0x14471d[_0xf300('0xe')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0xf300('0xf')](_0x4705be[_0xf300('0x10')],_0x14471d,'\x20'),'description':intUtil[_0xf300('0xf')](_0x4705be['Descriptions'],_0x14471d,_0xf300('0x11')),'tags':getTags(_0x4705be[_0xf300('0x12')],'name')},getCustomFields(_0x4705be[_0xf300('0x13')],_0x14471d));_0x3d0f22[_0xf300('0x14')]=_['mapValues'](_[_0xf300('0x15')](_0x3d0f22[_0xf300('0x14')],'id'),_0xf300('0x16'));return request({'uri':util[_0xf300('0xc')](_0xf300('0x17'),_0x5c5a88['remoteUri']),'method':'POST','body':_0x3d0f22})[_0xf300('0x18')](function(_0x4cd5f3){logger['info'](_0xf300('0x19'));return _0x4cd5f3;});}function getUser(_0x5acb23,_0x47ddd9){if(intUtil['validateEmail'](_0x47ddd9)){return request({'uri':util[_0xf300('0xc')](_0xf300('0x1a'),_0x5acb23[_0xf300('0x1b')]),'qs':{'email':_0x47ddd9}})[_0xf300('0x18')](function(_0xc90f79){if(_0xc90f79[_0xf300('0x1c')]){logger[_0xf300('0xb')](_0xf300('0x1d'));return _[_0xf300('0x1e')](_0xc90f79,function(_0x189b54){return _0x189b54[_0xf300('0x1f')]['email']===_0x47ddd9;});}else{logger[_0xf300('0xb')](_0xf300('0x20'));return request({'uri':util[_0xf300('0xc')]('%s/api/v2/agents/me',_0x5acb23[_0xf300('0x1b')])})[_0xf300('0x18')](function(_0x2e702b){logger['info']('Admin\x20account\x20selected.');return _0x2e702b;});}});}else{logger[_0xf300('0xb')]('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0xf300('0xc')](_0xf300('0x21'),_0x5acb23[_0xf300('0x1b')])})[_0xf300('0x18')](function(_0x1430a1){logger[_0xf300('0xb')](_0xf300('0x22'));return _0x1430a1;});}}function getEndUser(_0x45afc4,_0x4bea1b,_0x22644d){logger[_0xf300('0xb')](_0xf300('0x23'),_0x22644d);return request({'uri':util[_0xf300('0xc')](_0xf300('0x24'),_0x45afc4[_0xf300('0x1b')]),'qs':{'phone':_0x22644d}})[_0xf300('0x18')](function(_0x2904f7){if(_0x2904f7[_0xf300('0x1c')]){logger[_0xf300('0xb')]('Enduser\x20found!');return _[_0xf300('0x1e')](_0x2904f7,{'phone':_0x22644d});}else{logger['info']('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util['format']('%s/api/v2/contacts',_0x45afc4['remoteUri']),'method':_0xf300('0x25'),'body':{'name':_0x4bea1b,'phone':_0x22644d}})[_0xf300('0x18')](function(_0x919775){logger['info'](_0xf300('0x26'));return _0x919775;});}});}function getAuth(_0x46239b){return util[_0xf300('0xc')](_0xf300('0x27'),new Buffer(_0x46239b[_0xf300('0x28')]+':X')[_0xf300('0x29')](_0xf300('0x2a')));}function request(_0x34353b){logger[_0xf300('0x2b')](_0xf300('0x2c'),JSON[_0xf300('0x2d')](_0x34353b));return rp(_[_0xf300('0x7')](_0x34353b,{'method':_0xf300('0x2e'),'headers':headers,'json':!![]}));}function getTags(_0x39e610,_0x2ffb4d){var _0x1530b7=[];if(_0x39e610&&_0x39e610[_0xf300('0x1c')]>0x0){_0x1530b7=_['map'](_0x39e610,_0x2ffb4d);}return _0x1530b7;}function getCustomFields(_0x285702,_0x1372ef){var _0x23b37a=[];var _0x46e09b={'custom_fields':[]};if(_0x285702[_0xf300('0x1c')]>0x0){_['forEach'](_0x285702,function(_0x2e7edb){if(_0x2e7edb['type']==='string'&&_0x2e7edb['nameField']&&!_0x2e7edb[_0xf300('0x2f')]){_0x46e09b[_0x2e7edb[_0xf300('0x30')][_0xf300('0x31')]()]=_0x2e7edb['content'][_0xf300('0x29')]();}else if(_0x2e7edb['type']===_0xf300('0x32')&&_0x2e7edb[_0xf300('0x33')]&&_0x2e7edb[_0xf300('0x2f')]){_0x46e09b[_0xf300('0x14')][_0xf300('0x34')]({'id':_0x2e7edb[_0xf300('0x33')],'value':_0x2e7edb[_0xf300('0x35')]['toString']()});}else if(_0x2e7edb[_0xf300('0x36')]===_0xf300('0x37')&&_0x2e7edb[_0xf300('0x38')]&&_0x2e7edb[_0xf300('0x33')]&&_0x2e7edb[_0xf300('0x2f')]){_0x1372ef[_0x2e7edb['variableName']]&&_0x46e09b[_0xf300('0x14')][_0xf300('0x34')]({'id':_0x2e7edb[_0xf300('0x33')],'value':_0x1372ef[_0x2e7edb[_0xf300('0x38')]][_0xf300('0x29')]()});}else if(_0x2e7edb[_0xf300('0x36')]==='customVariable'&&_0x2e7edb[_0xf300('0x39')]&&_0x2e7edb['Variable']['name']&&_0x2e7edb[_0xf300('0x33')]&&_0x2e7edb[_0xf300('0x2f')]){_0x1372ef[_0x2e7edb['Variable'][_0xf300('0x3a')][_0xf300('0x31')]()]&&_0x46e09b[_0xf300('0x14')]['push']({'id':_0x2e7edb[_0xf300('0x33')],'value':_0x1372ef[_0x2e7edb[_0xf300('0x39')]['name'][_0xf300('0x31')]()][_0xf300('0x29')]()});}});}return _0x46e09b;}exports[_0xf300('0x3b')]=function(_0x8fac71,_0x30acad,_0x1e712a,_0x136b01,_0x1e93fc,_0x8644f1){var _0x56c005,_0x15a314;_0x8644f1[_0xf300('0x1b')]=intUtil[_0xf300('0x3c')](_0x8644f1['remoteUri']);_0x8644f1['serverUrl']=intUtil[_0xf300('0x3c')](_0x8644f1[_0xf300('0x3d')]);if(_0x1e93fc&&_0x1e93fc[_0xf300('0x3e')]){logger['info']('[QUEUE]',_0xf300('0x3f'));_0x30acad['recordingURL']=util[_0xf300('0xc')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x8644f1[_0xf300('0x3d')],_0x30acad[_0xf300('0x40')],md5(_0x30acad[_0xf300('0x40')]));}else{_0x30acad['recordingURL']='';}headers['Authorization']=getAuth(_0x8644f1);return getUser(_0x8644f1,_0x136b01['email'])['then'](function(_0x5a42fb){_0x56c005=_0x5a42fb;logger[_0xf300('0xb')]('The\x20User\x20ID\x20is:',_0x56c005['id']);return getEndUser(_0x8644f1,_0x30acad['calleridname'],_0x30acad[_0xf300('0xe')]);})[_0xf300('0x18')](function(_0x5db419){_0x15a314=_0x5db419;logger['info']('The\x20Enduser\x20ID\x20is:',_0x15a314['id']);return getTicket(_0x8644f1,_0x56c005,_0x15a314,_0x1e712a,_0x30acad);})[_0xf300('0x18')](function(_0x2ecae2){if(_0x2ecae2&&_0x2ecae2['id']){logger[_0xf300('0xb')](_0xf300('0x19'));logger[_0xf300('0xb')](_0xf300('0x41'),_0x2ecae2['id']);logger[_0xf300('0xb')]('[QUEUE]',_0xf300('0x42'));emit(util[_0xf300('0xc')](_0xf300('0x43'),_0x136b01[_0xf300('0x3a')]),_0xf300('0x44'),{'uri':util[_0xf300('0xc')]('%s/helpdesk/tickets/%d',_0x8644f1['remoteUri'],_0x2ecae2['id'])});}})[_0xf300('0x45')](function(_0x551673){logger[_0xf300('0x46')]('[QUEUE]',JSON['stringify'](_0x551673));});};exports[_0xf300('0x47')]=function(_0x1304c4,_0x59abd3,_0x272660,_0x445b9f,_0x385dc1,_0x100330,_0x56cb97){var _0x438c98,_0x3ad30c;_0x100330[_0xf300('0x1b')]=intUtil[_0xf300('0x3c')](_0x100330[_0xf300('0x1b')]);_0x100330[_0xf300('0x3d')]=intUtil[_0xf300('0x3c')](_0x100330[_0xf300('0x3d')]);if(_0x56cb97&&_0x56cb97[_0xf300('0x48')]&&_0x56cb97[_0xf300('0x48')]!==_0xf300('0x49')){logger['info'](_0xf300('0x4a'),'Recording\x20is\x20enabled!');_0x59abd3[_0xf300('0x4b')]=util[_0xf300('0xc')](_0xf300('0x4c'),_0x100330['serverUrl'],_0x59abd3[_0xf300('0x40')],md5(_0x59abd3[_0xf300('0x40')]));}headers[_0xf300('0x4d')]=getAuth(_0x100330);return getUser(_0x100330,_0x445b9f[_0xf300('0x4e')])['then'](function(_0x5b5638){_0x438c98=_0x5b5638;logger[_0xf300('0xb')](_0xf300('0x4f'),_0x438c98['id']);return getEndUser(_0x100330,_0x59abd3[_0xf300('0x50')],_0x59abd3[_0xf300('0x51')]);})[_0xf300('0x18')](function(_0x12b486){_0x3ad30c=_0x12b486;logger[_0xf300('0xb')](_0xf300('0x52'),_0x3ad30c['id']);return getTicket(_0x100330,_0x438c98,_0x3ad30c,_0x272660,_0x59abd3);})[_0xf300('0x18')](function(_0x5352ed){if(_0x5352ed&&_0x5352ed['id']){logger[_0xf300('0xb')](_0xf300('0x19'));logger['info'](_0xf300('0x41'),_0x5352ed['id']);logger[_0xf300('0xb')]('[OUTBOUND]',_0xf300('0x42'));emit(util[_0xf300('0xc')](_0xf300('0x43'),_0x445b9f[_0xf300('0x3a')]),_0xf300('0x44'),{'uri':util[_0xf300('0xc')](_0xf300('0x53'),_0x100330[_0xf300('0x1b')],_0x5352ed['id'])});}})[_0xf300('0x45')](function(_0x9d225){logger['error'](_0xf300('0x4a'),JSON[_0xf300('0x2d')](_0x9d225));});};exports['unmanaged']=function(_0x904f70,_0x37c89b,_0x28564a,_0x47cae0,_0x4076e4,_0x2ed903){var _0x26feb2,_0x2b4970;_0x2ed903[_0xf300('0x1b')]=intUtil[_0xf300('0x3c')](_0x2ed903['remoteUri']);_0x2ed903[_0xf300('0x3d')]=intUtil[_0xf300('0x3c')](_0x2ed903[_0xf300('0x3d')]);if(_0x4076e4&&_0x4076e4[_0xf300('0x3e')]){logger[_0xf300('0xb')]('['+_0x37c89b[_0xf300('0x54')][_0xf300('0x55')]()+']',_0xf300('0x3f'));_0x37c89b[_0xf300('0x4b')]=util[_0xf300('0xc')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2ed903[_0xf300('0x3d')],_0x37c89b[_0xf300('0x40')],md5(_0x37c89b[_0xf300('0x40')]));}else{_0x37c89b[_0xf300('0x4b')]='';}headers[_0xf300('0x4d')]=getAuth(_0x2ed903);return getUser(_0x2ed903,'')[_0xf300('0x18')](function(_0x4c50d9){_0x26feb2=_0x4c50d9;logger[_0xf300('0xb')](_0xf300('0x4f'),_0x26feb2['id']);return getEndUser(_0x2ed903,_0x37c89b[_0xf300('0xd')],_0x37c89b[_0xf300('0xe')]);})['then'](function(_0x11f08d){_0x2b4970=_0x11f08d;logger[_0xf300('0xb')](_0xf300('0x52'),_0x2b4970['id']);return getTicket(_0x2ed903,_0x26feb2,_0x2b4970,_0x28564a,_0x37c89b);})[_0xf300('0x18')](function(_0x3c0721){if(_0x3c0721){logger[_0xf300('0xb')](_0xf300('0x19'));logger[_0xf300('0xb')](_0xf300('0x41'),_0x3c0721['id']);}})['catch'](function(_0x397835){logger[_0xf300('0x46')]('['+_0x37c89b['lastevent'][_0xf300('0x55')]()+']',JSON[_0xf300('0x2d')](_0x397835));});}; \ No newline at end of file +var _0x6822=['mapValues','keyBy','%s/api/v2/tickets','remoteUri','POST','validateEmail','%s/api/v2/agents','length','Agent\x20found!','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','then','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Enduser\x20created.','Basic\x20%s','apiKey','toString','debug','[HTTP]','stringify','GET','map','forEach','type','string','nameField','customField','toLowerCase','content','idField','push','variable','variableName','Variable','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','recordingFormat','[OUTBOUND]','Authorization','destcalleridname','catch','error','unmanaged','lastevent','toUpperCase','Ticket\x20created!','lodash','request-promise','md5','util','ioredis','freshdesk','redis','defaults','localhost','application/json','emit','info','Creating\x20new\x20ticket...','format','calleridname','calleridnum','getString','Subjects','Descriptions','
','name','custom_fields'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x6822,0x14e));var _0x2682=function(_0x528020,_0x423c46){_0x528020=_0x528020-0x0;var _0x70a02a=_0x6822[_0x528020];return _0x70a02a;};'use strict';var _=require(_0x2682('0x0'));var rp=require(_0x2682('0x1'));var md5=require(_0x2682('0x2'));var util=require(_0x2682('0x3'));var Redis=require(_0x2682('0x4'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0x2682('0x5'));config[_0x2682('0x6')]=_[_0x2682('0x7')](config[_0x2682('0x6')],{'host':_0x2682('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x2682('0x6')]));var headers={'Content-Type':'application/json','Accept':_0x2682('0x9')};function emit(_0x24fad7,_0x5d56b5,_0x46ac31){io['to'](_0x24fad7)[_0x2682('0xa')](_0x5d56b5,_0x46ac31);}function getTicket(_0x393b95,_0x39edbf,_0x1b7a2f,_0x485ef9,_0x4b6e69){logger[_0x2682('0xb')](_0x2682('0xc'));var _0x2437b0=_['merge']({'responder_id':_0x39edbf['id'],'requester_id':_0x1b7a2f['id'],'name':util[_0x2682('0xd')]('Caller\x20-\x20%s',_0x4b6e69[_0x2682('0xe')]),'phone':_0x4b6e69[_0x2682('0xf')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0x2682('0x10')](_0x485ef9[_0x2682('0x11')],_0x4b6e69,'\x20'),'description':intUtil[_0x2682('0x10')](_0x485ef9[_0x2682('0x12')],_0x4b6e69,_0x2682('0x13')),'tags':getTags(_0x485ef9['Tags'],_0x2682('0x14'))},getCustomFields(_0x485ef9['Fields'],_0x4b6e69));_0x2437b0[_0x2682('0x15')]=_[_0x2682('0x16')](_[_0x2682('0x17')](_0x2437b0[_0x2682('0x15')],'id'),'value');return request({'uri':util['format'](_0x2682('0x18'),_0x393b95[_0x2682('0x19')]),'method':_0x2682('0x1a'),'body':_0x2437b0})['then'](function(_0x123c62){logger['info']('Ticket\x20created!');return _0x123c62;});}function getUser(_0x44a249,_0x140e23){if(intUtil[_0x2682('0x1b')](_0x140e23)){return request({'uri':util[_0x2682('0xd')](_0x2682('0x1c'),_0x44a249[_0x2682('0x19')]),'qs':{'email':_0x140e23}})['then'](function(_0x3e7565){if(_0x3e7565[_0x2682('0x1d')]){logger[_0x2682('0xb')](_0x2682('0x1e'));return _[_0x2682('0x1f')](_0x3e7565,function(_0x5529ef){return _0x5529ef[_0x2682('0x20')][_0x2682('0x21')]===_0x140e23;});}else{logger['info'](_0x2682('0x22'));return request({'uri':util[_0x2682('0xd')](_0x2682('0x23'),_0x44a249['remoteUri'])})[_0x2682('0x24')](function(_0x1ccdce){logger['info'](_0x2682('0x25'));return _0x1ccdce;});}});}else{logger[_0x2682('0xb')](_0x2682('0x26'));return request({'uri':util[_0x2682('0xd')]('%s/api/v2/agents/me',_0x44a249[_0x2682('0x19')])})['then'](function(_0x5cf107){logger[_0x2682('0xb')](_0x2682('0x25'));return _0x5cf107;});}}function getEndUser(_0x306870,_0x5edffb,_0x84296f){logger['info'](_0x2682('0x27'),_0x84296f);return request({'uri':util[_0x2682('0xd')](_0x2682('0x28'),_0x306870[_0x2682('0x19')]),'qs':{'phone':_0x84296f}})['then'](function(_0x39c100){if(_0x39c100[_0x2682('0x1d')]){logger[_0x2682('0xb')]('Enduser\x20found!');return _[_0x2682('0x1f')](_0x39c100,{'phone':_0x84296f});}else{logger[_0x2682('0xb')](_0x2682('0x29'));return request({'uri':util['format'](_0x2682('0x28'),_0x306870['remoteUri']),'method':_0x2682('0x1a'),'body':{'name':_0x5edffb,'phone':_0x84296f}})['then'](function(_0x396afa){logger[_0x2682('0xb')](_0x2682('0x2a'));return _0x396afa;});}});}function getAuth(_0x24751c){return util[_0x2682('0xd')](_0x2682('0x2b'),new Buffer(_0x24751c[_0x2682('0x2c')]+':X')[_0x2682('0x2d')]('base64'));}function request(_0x52f624){logger[_0x2682('0x2e')](_0x2682('0x2f'),JSON[_0x2682('0x30')](_0x52f624));return rp(_[_0x2682('0x7')](_0x52f624,{'method':_0x2682('0x31'),'headers':headers,'json':!![]}));}function getTags(_0x4bef3d,_0x45c772){var _0x253413=[];if(_0x4bef3d&&_0x4bef3d[_0x2682('0x1d')]>0x0){_0x253413=_[_0x2682('0x32')](_0x4bef3d,_0x45c772);}return _0x253413;}function getCustomFields(_0x2a3297,_0x11deda){var _0x501947=[];var _0x30beeb={'custom_fields':[]};if(_0x2a3297['length']>0x0){_[_0x2682('0x33')](_0x2a3297,function(_0x397241){if(_0x397241[_0x2682('0x34')]===_0x2682('0x35')&&_0x397241[_0x2682('0x36')]&&!_0x397241[_0x2682('0x37')]){_0x30beeb[_0x397241[_0x2682('0x36')][_0x2682('0x38')]()]=_0x397241[_0x2682('0x39')]['toString']();}else if(_0x397241[_0x2682('0x34')]===_0x2682('0x35')&&_0x397241[_0x2682('0x3a')]&&_0x397241[_0x2682('0x37')]){_0x30beeb[_0x2682('0x15')][_0x2682('0x3b')]({'id':_0x397241[_0x2682('0x3a')],'value':_0x397241[_0x2682('0x39')]['toString']()});}else if(_0x397241[_0x2682('0x34')]===_0x2682('0x3c')&&_0x397241[_0x2682('0x3d')]&&_0x397241['idField']&&_0x397241[_0x2682('0x37')]){_0x11deda[_0x397241[_0x2682('0x3d')]]&&_0x30beeb[_0x2682('0x15')][_0x2682('0x3b')]({'id':_0x397241[_0x2682('0x3a')],'value':_0x11deda[_0x397241['variableName']][_0x2682('0x2d')]()});}else if(_0x397241[_0x2682('0x34')]==='customVariable'&&_0x397241[_0x2682('0x3e')]&&_0x397241[_0x2682('0x3e')][_0x2682('0x14')]&&_0x397241[_0x2682('0x3a')]&&_0x397241[_0x2682('0x37')]){_0x11deda[_0x397241[_0x2682('0x3e')][_0x2682('0x14')][_0x2682('0x38')]()]&&_0x30beeb['custom_fields'][_0x2682('0x3b')]({'id':_0x397241[_0x2682('0x3a')],'value':_0x11deda[_0x397241[_0x2682('0x3e')][_0x2682('0x14')][_0x2682('0x38')]()][_0x2682('0x2d')]()});}});}return _0x30beeb;}exports[_0x2682('0x3f')]=function(_0x41ca7e,_0x3e8bde,_0x1b156b,_0x1dbf0a,_0x5b2664,_0x435eee){var _0x54d6b4,_0x4c18a5;_0x435eee['remoteUri']=intUtil['stripTrailingSlash'](_0x435eee[_0x2682('0x19')]);_0x435eee[_0x2682('0x40')]=intUtil[_0x2682('0x41')](_0x435eee['serverUrl']);if(_0x5b2664&&_0x5b2664[_0x2682('0x42')]){logger['info'](_0x2682('0x43'),_0x2682('0x44'));_0x3e8bde['recordingURL']=util['format'](_0x2682('0x45'),_0x435eee['serverUrl'],_0x3e8bde[_0x2682('0x46')],md5(_0x3e8bde[_0x2682('0x46')]));}else{_0x3e8bde[_0x2682('0x47')]='';}headers['Authorization']=getAuth(_0x435eee);return getUser(_0x435eee,_0x1dbf0a[_0x2682('0x21')])['then'](function(_0x5cd538){_0x54d6b4=_0x5cd538;logger[_0x2682('0xb')](_0x2682('0x48'),_0x54d6b4['id']);return getEndUser(_0x435eee,_0x3e8bde[_0x2682('0xe')],_0x3e8bde['calleridnum']);})[_0x2682('0x24')](function(_0x36617e){_0x4c18a5=_0x36617e;logger[_0x2682('0xb')](_0x2682('0x49'),_0x4c18a5['id']);return getTicket(_0x435eee,_0x54d6b4,_0x4c18a5,_0x1b156b,_0x3e8bde);})[_0x2682('0x24')](function(_0xb9c5dc){if(_0xb9c5dc&&_0xb9c5dc['id']){logger['info']('Ticket\x20created!');logger['info'](_0x2682('0x4a'),_0xb9c5dc['id']);logger[_0x2682('0xb')](_0x2682('0x43'),_0x2682('0x4b'));emit(util[_0x2682('0xd')](_0x2682('0x4c'),_0x1dbf0a[_0x2682('0x14')]),_0x2682('0x4d'),{'uri':util[_0x2682('0xd')](_0x2682('0x4e'),_0x435eee['remoteUri'],_0xb9c5dc['id'])});}})['catch'](function(_0x3ba9c0){logger['error'](_0x2682('0x43'),JSON['stringify'](_0x3ba9c0));});};exports['outbound']=function(_0x593fbe,_0x48b2e7,_0x92953f,_0x202a7b,_0x433dbf,_0x527bc9,_0x594a91){var _0xcea2b9,_0xe6cbb0;_0x527bc9[_0x2682('0x19')]=intUtil[_0x2682('0x41')](_0x527bc9[_0x2682('0x19')]);_0x527bc9[_0x2682('0x40')]=intUtil[_0x2682('0x41')](_0x527bc9[_0x2682('0x40')]);if(_0x594a91&&_0x594a91[_0x2682('0x4f')]&&_0x594a91[_0x2682('0x4f')]!=='none'){logger[_0x2682('0xb')](_0x2682('0x50'),_0x2682('0x44'));_0x48b2e7[_0x2682('0x47')]=util[_0x2682('0xd')](_0x2682('0x45'),_0x527bc9[_0x2682('0x40')],_0x48b2e7['uniqueid'],md5(_0x48b2e7['uniqueid']));}headers[_0x2682('0x51')]=getAuth(_0x527bc9);return getUser(_0x527bc9,_0x202a7b['email'])[_0x2682('0x24')](function(_0x301fc4){_0xcea2b9=_0x301fc4;logger[_0x2682('0xb')](_0x2682('0x48'),_0xcea2b9['id']);return getEndUser(_0x527bc9,_0x48b2e7[_0x2682('0x52')],_0x48b2e7['destcalleridnum']);})[_0x2682('0x24')](function(_0x24061a){_0xe6cbb0=_0x24061a;logger['info'](_0x2682('0x49'),_0xe6cbb0['id']);return getTicket(_0x527bc9,_0xcea2b9,_0xe6cbb0,_0x92953f,_0x48b2e7);})['then'](function(_0x2fe981){if(_0x2fe981&&_0x2fe981['id']){logger[_0x2682('0xb')]('Ticket\x20created!');logger[_0x2682('0xb')](_0x2682('0x4a'),_0x2fe981['id']);logger[_0x2682('0xb')](_0x2682('0x50'),_0x2682('0x4b'));emit(util[_0x2682('0xd')](_0x2682('0x4c'),_0x202a7b[_0x2682('0x14')]),'trigger:browser:url',{'uri':util[_0x2682('0xd')](_0x2682('0x4e'),_0x527bc9['remoteUri'],_0x2fe981['id'])});}})[_0x2682('0x53')](function(_0x9d1b22){logger[_0x2682('0x54')](_0x2682('0x50'),JSON[_0x2682('0x30')](_0x9d1b22));});};exports[_0x2682('0x55')]=function(_0x23bbf9,_0x1c0016,_0x2fe42e,_0x55cc31,_0x403144,_0x337230){var _0x55a622,_0x4c10a4;_0x337230[_0x2682('0x19')]=intUtil[_0x2682('0x41')](_0x337230[_0x2682('0x19')]);_0x337230[_0x2682('0x40')]=intUtil[_0x2682('0x41')](_0x337230['serverUrl']);if(_0x403144&&_0x403144['monitor_format']){logger['info']('['+_0x1c0016[_0x2682('0x56')][_0x2682('0x57')]()+']',_0x2682('0x44'));_0x1c0016['recordingURL']=util[_0x2682('0xd')](_0x2682('0x45'),_0x337230[_0x2682('0x40')],_0x1c0016[_0x2682('0x46')],md5(_0x1c0016[_0x2682('0x46')]));}else{_0x1c0016[_0x2682('0x47')]='';}headers[_0x2682('0x51')]=getAuth(_0x337230);return getUser(_0x337230,'')[_0x2682('0x24')](function(_0x2747ce){_0x55a622=_0x2747ce;logger[_0x2682('0xb')](_0x2682('0x48'),_0x55a622['id']);return getEndUser(_0x337230,_0x1c0016[_0x2682('0xe')],_0x1c0016[_0x2682('0xf')]);})[_0x2682('0x24')](function(_0x4dae00){_0x4c10a4=_0x4dae00;logger[_0x2682('0xb')](_0x2682('0x49'),_0x4c10a4['id']);return getTicket(_0x337230,_0x55a622,_0x4c10a4,_0x2fe42e,_0x1c0016);})[_0x2682('0x24')](function(_0x2071a7){if(_0x2071a7){logger[_0x2682('0xb')](_0x2682('0x58'));logger[_0x2682('0xb')](_0x2682('0x4a'),_0x2071a7['id']);}})['catch'](function(_0x4a69df){logger[_0x2682('0x54')]('['+_0x1c0016['lastevent']['toUpperCase']()+']',JSON[_0x2682('0x30')](_0x4a69df));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/freshsales.js b/server/services/ami/trigger/integration/freshsales.js index 819e18b..6bb792d 100644 --- a/server/services/ami/trigger/integration/freshsales.js +++ b/server/services/ami/trigger/integration/freshsales.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x43fd=['headers','Getting\x20user\x20list','Getting\x20user\x20with\x20email','agentEmail','userEmail','userId','catch','message','/api/lookup?q=','&f=','&entities=contact','contacts','format','Searching\x20contact\x20with\x20phone\x20%s','contactNumber','mobile_number','endUserId','Contact\x20found\x20mobile_number:','work_number','Contact\x20found\x20work_number:','Contact\x20created:','POST','/api/contacts','YYYY-MM-DDTHH:mm:ss','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','Creating\x20new\x20task','/api/tasks','getString','Descriptions','Contact','add','task','Task\x20created:','ticketId','/contacts/','user:%s','emit','trigger:browser:url','apiKey','stripTrailingSlash','remoteUri','serverUrl','username','toLowerCase','outbound','destcalleridnum','calleridnum','callDirection','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20task\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20Freshsales\x20integration','inspect','request-promise','moment','bluebird','./util','../../../../config/logger','freshsales','redis','defaults','localhost','socket.io-emitter','GET','/api/selector/owners','info','Getting\x20admin\x20information','then','users','length','email','adminEmail','adminId','Admin\x20found:','Requested\x20Resource\x20not\x20Found','error','toUpperCase'];(function(_0x5b8871,_0xfe7ea1){var _0x57d152=function(_0x3bfb9d){while(--_0x3bfb9d){_0x5b8871['push'](_0x5b8871['shift']());}};_0x57d152(++_0xfe7ea1);}(_0x43fd,0x1ec));var _0xd43f=function(_0x5e82e0,_0x26d739){_0x5e82e0=_0x5e82e0-0x0;var _0x2cc3e4=_0x43fd[_0x5e82e0];return _0x2cc3e4;};'use strict';var _=require('lodash');var rp=require(_0xd43f('0x0'));var md5=require('md5');var util=require('util');var moment=require(_0xd43f('0x1'));var Promise=require(_0xd43f('0x2'));var Redis=require('ioredis');var intUtil=require(_0xd43f('0x3'));var config=require('../../../../config/environment');var logger=require(_0xd43f('0x4'))(_0xd43f('0x5'));config[_0xd43f('0x6')]=_[_0xd43f('0x7')](config['redis'],{'host':_0xd43f('0x8'),'port':0x18eb});var io=require(_0xd43f('0x9'))(new Redis(config[_0xd43f('0x6')]));function getAdminId(_0x331163,_0x547e12,_0x19c71d,_0x20d066){return new Promise(function(_0x52e9c8,_0x474216){var _0x2d5011=![];var _0x114c2e={'method':_0xd43f('0xa'),'uri':_0x20d066+_0xd43f('0xb'),'json':!![]};_0x114c2e['headers']=_0x19c71d;logger[_0xd43f('0xc')](_0xd43f('0xd'));return rp(_0x114c2e)[_0xd43f('0xe')](function(_0x1ed31a){if(_0x1ed31a){var _0x430977=_0x1ed31a[_0xd43f('0xf')];var _0x22f057=null;for(_0x22f057=0x0;_0x22f057<_0x430977[_0xd43f('0x10')];_0x22f057++){if(_0x430977[_0x22f057][_0xd43f('0x11')]===_0x331163[_0xd43f('0x12')]){_0x331163[_0xd43f('0x13')]=_0x430977[_0x22f057]['id'];_0x2d5011=!![];}}if(_0x2d5011){logger['info'](_0xd43f('0x14'),_0x331163[_0xd43f('0x13')]);_0x52e9c8(_0x331163);}else{_0x474216({'statusCode':0x194,'message':_0xd43f('0x15')});}}else{_0x474216({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}})['catch'](function(_0x4a2b49){logger[_0xd43f('0x16')]('['+[_0x547e12[_0xd43f('0x17')]()]+']',_0x4a2b49['message']);_0x474216(_0x4a2b49);});});}function getUser(_0x3c0953,_0x3647df,_0x57635e){return function(_0x5ced70){return new Promise(function(_0x4fd639,_0x54bbcd){var _0x135734={'method':_0xd43f('0xa'),'uri':_0x57635e+'/api/selector/owners','json':!![]};_0x135734[_0xd43f('0x18')]=_0x3647df;logger[_0xd43f('0xc')](_0xd43f('0x19'));return rp(_0x135734)[_0xd43f('0xe')](function(_0x5deaed){if(_0x5deaed){var _0xa86810=_0x5deaed[_0xd43f('0xf')];var _0xb37d52=![];var _0x564261=null;if(_0x5ced70['agentEmail']!==null){logger['info'](_0xd43f('0x1a'),_0x5ced70[_0xd43f('0x1b')]);_0x5ced70[_0xd43f('0x1c')]=_0x5ced70[_0xd43f('0x1b')];for(_0x564261=0x0;_0x564261<_0xa86810[_0xd43f('0x10')];_0x564261++){if(_0xa86810[_0x564261][_0xd43f('0x11')]===_0x5ced70[_0xd43f('0x1b')]){_0xb37d52=!![];_0x5ced70['userId']=_0xa86810[_0x564261]['id'];logger[_0xd43f('0xc')]('User\x20found:',_0x5ced70[_0xd43f('0x1d')]);}}}if(!_0xb37d52){logger['info']('Admin\x20selected');_0x5ced70[_0xd43f('0x1c')]=_0x5ced70[_0xd43f('0x12')];_0x5ced70[_0xd43f('0x1d')]=_0x5ced70[_0xd43f('0x13')];_0xb37d52=!![];}if(_0xb37d52){_0x4fd639(_0x5ced70);}else{_0x54bbcd({'statusCode':0x194,'message':_0xd43f('0x15')});}}else{_0x54bbcd({'statusCode':0x194,'message':_0xd43f('0x15')});}})[_0xd43f('0x1e')](function(_0xc2e3da){logger[_0xd43f('0x16')]('['+[_0x3c0953['toUpperCase']()]+']',_0xc2e3da[_0xd43f('0x1f')]);_0x54bbcd(_0xc2e3da);});});};}function searchContact(_0x2d5915,_0x366cf7,_0x2d54a7,_0x209ccd){return new Promise(function(_0x4a8b4d,_0x161540){var _0x7b6761={'method':_0xd43f('0xa'),'headers':_0x366cf7,'uri':_0x2d5915+_0xd43f('0x20')+_0x209ccd+_0xd43f('0x21')+_0x2d54a7+_0xd43f('0x22'),'json':!![]};rp(_0x7b6761)['then'](function(_0x1e54d0){var _0x1f476d=_['find'](_0x1e54d0[_0xd43f('0x23')]['contacts'],[_0x2d54a7,_0x209ccd]);_0x4a8b4d(_0x1f476d);})['catch'](function(_0x45e84a){_0x161540(_0x45e84a);});});}function getEndUser(_0x18472c,_0x29e123,_0x4d032e){return function(_0x410921){return new Promise(function(_0x23c4f7,_0x5bba3d){logger['info'](util[_0xd43f('0x24')](_0xd43f('0x25'),_0x410921[_0xd43f('0x26')]));searchContact(_0x4d032e,_0x29e123,_0xd43f('0x27'),_0x410921['contactNumber'])[_0xd43f('0xe')](function(_0x24015b){if(_0x24015b){_0x410921[_0xd43f('0x28')]=_0x24015b['id'];logger[_0xd43f('0xc')](_0xd43f('0x29'),_0x410921[_0xd43f('0x28')]);return _0x23c4f7(_0x410921);}searchContact(_0x4d032e,_0x29e123,_0xd43f('0x2a'),_0x410921['contactNumber'])[_0xd43f('0xe')](function(_0x57ac0f){if(_0x57ac0f){_0x410921[_0xd43f('0x28')]=_0x57ac0f['id'];logger[_0xd43f('0xc')](_0xd43f('0x2b'),_0x410921['endUserId']);return _0x23c4f7(_0x410921);}createEndUser(_0x410921,_0x18472c,_0x29e123,_0x4d032e)[_0xd43f('0xe')](function(_0x2ccd50){logger['info'](_0xd43f('0x2c'),_0x2ccd50[_0xd43f('0x28')]);return _0x23c4f7(_0x2ccd50);});});})[_0xd43f('0x1e')](function(_0x4ed4eb){_0x5bba3d(_0x4ed4eb);});});};}function createEndUser(_0x291f05,_0x13f996,_0x1c0d7f,_0x20682d){return new Promise(function(_0x176aac,_0x5bce4d){var _0x3386d9=moment();var _0x4b1c73={'method':_0xd43f('0x2d'),'uri':_0x20682d+_0xd43f('0x2e'),'body':{'contact':{'last_name':_0x291f05[_0xd43f('0x26')],'work_number':_0x291f05['contactNumber'],'mobile_number':_0x291f05[_0xd43f('0x26')],'owner_id':_0x291f05[_0xd43f('0x1d')],'created_at':_0x3386d9['format'](_0xd43f('0x2f'))}},'json':!![]};_0x4b1c73['headers']=_0x1c0d7f;logger['info'](_0xd43f('0x30'));return rp(_0x4b1c73)['then'](function(_0x5b648f){_0x291f05[_0xd43f('0x28')]=_0x5b648f['contact']['id'];_0x176aac(_0x291f05);})['catch'](function(_0x10679a){logger[_0xd43f('0x16')]('['+[_0x13f996[_0xd43f('0x17')]()]+']',_0x10679a[_0xd43f('0x1f')]);_0x5bce4d(_0x10679a[_0xd43f('0x1f')]);});});}function getTicket(_0x5caa8c,_0x44d29f,_0x236571,_0x8016ca,_0x3a823b){return function(_0x31e8c2){logger[_0xd43f('0xc')](_0xd43f('0x31'));return new Promise(function(_0x41f7e4,_0x173b01){var _0x3929e9=moment();var _0x37f496={'method':'POST','uri':_0x236571+_0xd43f('0x32'),'body':{'title':intUtil[_0xd43f('0x33')](_0x8016ca['Subjects'],_0x3a823b,'\x20'),'description':intUtil['getString'](_0x8016ca[_0xd43f('0x34')],_0x3a823b,'\x0a'),'owner_id':_0x31e8c2[_0xd43f('0x1d')],'creater_id':_0x31e8c2[_0xd43f('0x13')],'targetable_id':_0x31e8c2['endUserId'],'targetable_type':_0xd43f('0x35'),'created_at':_0x3929e9[_0xd43f('0x24')](_0xd43f('0x2f')),'due_date':_0x3929e9[_0xd43f('0x36')](0x1e,'m')['format']('YYYY-MM-DDTHH:mm:ss')},'json':!![]};_0x37f496[_0xd43f('0x18')]=_0x44d29f;return rp(_0x37f496)[_0xd43f('0xe')](function(_0x156e8a){_0x31e8c2['ticketId']=_0x156e8a[_0xd43f('0x37')]['id'];logger[_0xd43f('0xc')](_0xd43f('0x38'),_0x31e8c2[_0xd43f('0x39')]);_0x41f7e4(_0x31e8c2);})[_0xd43f('0x1e')](function(_0xc2a5a6){logger[_0xd43f('0x16')]('['+[_0x5caa8c[_0xd43f('0x17')]()]+']',_0xc2a5a6['message']);_0x173b01(_0xc2a5a6[_0xd43f('0x1f')]);});});};}function emit(_0x464d7d,_0x386dfa,_0x400273){var _0x343902={'uri':_0x464d7d+_0xd43f('0x3a')+_0x400273};io['to'](util[_0xd43f('0x24')](_0xd43f('0x3b'),_0x386dfa))[_0xd43f('0x3c')](_0xd43f('0x3d'),_0x343902);}exports['cs']=function(_0x3a17fe,_0x517509,_0x440627,_0x15d79c,_0x3b6d79,_0x237bc1,_0x45207d,_0x4763b7){var _0x54eaa2={};var _0x9e1727={'Authorization':'Token\x20token='+_0x237bc1[_0xd43f('0x3e')]};_0x237bc1['remoteUri']=intUtil[_0xd43f('0x3f')](_0x237bc1[_0xd43f('0x40')]);_0x237bc1[_0xd43f('0x41')]=intUtil[_0xd43f('0x3f')](_0x237bc1[_0xd43f('0x41')]);var _0x2eb1bf=_0x237bc1[_0xd43f('0x40')];_0x54eaa2[_0xd43f('0x12')]=_0x237bc1[_0xd43f('0x42')];_0x54eaa2['contactNumber']=_0x4763b7[_0xd43f('0x43')]()===_0xd43f('0x44')?_0x517509[_0xd43f('0x45')]:_0x517509[_0xd43f('0x46')];_0x54eaa2[_0xd43f('0x47')]=_0x4763b7===_0xd43f('0x48')||_0x4763b7===_0xd43f('0x49')?_0xd43f('0x48'):_0xd43f('0x44');if(_0x15d79c){_0x54eaa2[_0xd43f('0x1b')]=_0x15d79c[_0xd43f('0x11')];}var _0x5bb8e5=util['format'](_0xd43f('0x4a'),_0x237bc1[_0xd43f('0x41')],_0x517509[_0xd43f('0x4b')],md5(_0x517509['uniqueid']));if(_0x3b6d79&&_0x3b6d79['monitor_format']){logger[_0xd43f('0xc')](_0xd43f('0x4c'),_0xd43f('0x4d'));_0x517509[_0xd43f('0x4e')]=_0x5bb8e5;}else if(_0x45207d&&_0x45207d[_0xd43f('0x4f')]&&_0x45207d['recordingFormat']!==_0xd43f('0x50')){logger[_0xd43f('0xc')](_0xd43f('0x51'),_0xd43f('0x4d'));_0x517509[_0xd43f('0x4e')]=_0x5bb8e5;}else{_0x517509[_0xd43f('0x4e')]='';}return getAdminId(_0x54eaa2,_0x4763b7,_0x9e1727,_0x2eb1bf)['then'](getUser(_0x4763b7,_0x9e1727,_0x2eb1bf))[_0xd43f('0xe')](getEndUser(_0x4763b7,_0x9e1727,_0x2eb1bf))[_0xd43f('0xe')](getTicket(_0x4763b7,_0x9e1727,_0x2eb1bf,_0x440627,_0x517509))[_0xd43f('0xe')](function(_0x376d02){logger[_0xd43f('0xc')](util[_0xd43f('0x24')](_0xd43f('0x52'),_0x376d02[_0xd43f('0x39')]));if(_0x4763b7!=='unmanaged'){logger[_0xd43f('0xc')]('['+[_0x4763b7[_0xd43f('0x17')]()]+']',_0xd43f('0x53'));emit(_0x2eb1bf,_0x15d79c['name'],_0x376d02[_0xd43f('0x28')]);}})[_0xd43f('0x1e')](function(_0xb719d){logger[_0xd43f('0x16')]('['+[_0x4763b7[_0xd43f('0x17')]()]+_0xd43f('0x54'),util[_0xd43f('0x55')](_0xb719d,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x933c=['then','length','email','adminEmail','adminId','Admin\x20found:','Requested\x20Resource\x20not\x20Found','catch','toUpperCase','users','agentEmail','userEmail','userId','User\x20found:','message','/api/lookup?q=','&entities=contact','find','contacts','format','Searching\x20contact\x20with\x20phone\x20%s','mobile_number','contactNumber','Contact\x20found\x20mobile_number:','endUserId','work_number','Contact\x20found\x20work_number:','POST','/api/contacts','YYYY-MM-DDTHH:mm:ss','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','Creating\x20new\x20task','getString','Subjects','Descriptions','Contact','add','ticketId','task','Task\x20created:','error','/contacts/','user:%s','emit','Token\x20token=','stripTrailingSlash','serverUrl','remoteUri','username','toLowerCase','outbound','destcalleridnum','calleridnum','callDirection','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingFormat','none','recordingURL','The\x20ticket\x20ID\x20is:\x20%s','unmanaged','Displaying\x20task\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20Freshsales\x20integration','inspect','lodash','request-promise','md5','util','moment','./util','../../../../config/environment','../../../../config/logger','freshsales','redis','defaults','localhost','GET','/api/selector/owners','headers','info','Getting\x20admin\x20information'];(function(_0x56efcb,_0x362ced){var _0x4f5469=function(_0x540734){while(--_0x540734){_0x56efcb['push'](_0x56efcb['shift']());}};_0x4f5469(++_0x362ced);}(_0x933c,0x99));var _0xc933=function(_0x4b01b9,_0x559c81){_0x4b01b9=_0x4b01b9-0x0;var _0x505deb=_0x933c[_0x4b01b9];return _0x505deb;};'use strict';var _=require(_0xc933('0x0'));var rp=require(_0xc933('0x1'));var md5=require(_0xc933('0x2'));var util=require(_0xc933('0x3'));var moment=require(_0xc933('0x4'));var Promise=require('bluebird');var Redis=require('ioredis');var intUtil=require(_0xc933('0x5'));var config=require(_0xc933('0x6'));var logger=require(_0xc933('0x7'))(_0xc933('0x8'));config[_0xc933('0x9')]=_[_0xc933('0xa')](config['redis'],{'host':_0xc933('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xc933('0x9')]));function getAdminId(_0xf924f4,_0x520373,_0x5e9b96,_0x406918){return new Promise(function(_0x1ac472,_0x5906c4){var _0x4cd7cc=![];var _0x36e8eb={'method':_0xc933('0xc'),'uri':_0x406918+_0xc933('0xd'),'json':!![]};_0x36e8eb[_0xc933('0xe')]=_0x5e9b96;logger[_0xc933('0xf')](_0xc933('0x10'));return rp(_0x36e8eb)[_0xc933('0x11')](function(_0xb1a409){if(_0xb1a409){var _0x515b72=_0xb1a409['users'];var _0x2c855a=null;for(_0x2c855a=0x0;_0x2c855a<_0x515b72[_0xc933('0x12')];_0x2c855a++){if(_0x515b72[_0x2c855a][_0xc933('0x13')]===_0xf924f4[_0xc933('0x14')]){_0xf924f4[_0xc933('0x15')]=_0x515b72[_0x2c855a]['id'];_0x4cd7cc=!![];}}if(_0x4cd7cc){logger['info'](_0xc933('0x16'),_0xf924f4['adminId']);_0x1ac472(_0xf924f4);}else{_0x5906c4({'statusCode':0x194,'message':_0xc933('0x17')});}}else{_0x5906c4({'statusCode':0x194,'message':_0xc933('0x17')});}})[_0xc933('0x18')](function(_0x2f5784){logger['error']('['+[_0x520373[_0xc933('0x19')]()]+']',_0x2f5784['message']);_0x5906c4(_0x2f5784);});});}function getUser(_0x4bdbe8,_0x776634,_0x42b06a){return function(_0xb76659){return new Promise(function(_0x229901,_0x1611a7){var _0x2ba124={'method':_0xc933('0xc'),'uri':_0x42b06a+_0xc933('0xd'),'json':!![]};_0x2ba124[_0xc933('0xe')]=_0x776634;logger[_0xc933('0xf')]('Getting\x20user\x20list');return rp(_0x2ba124)[_0xc933('0x11')](function(_0x15fd65){if(_0x15fd65){var _0xbe7f7b=_0x15fd65[_0xc933('0x1a')];var _0x1f57db=![];var _0x318370=null;if(_0xb76659[_0xc933('0x1b')]!==null){logger[_0xc933('0xf')]('Getting\x20user\x20with\x20email',_0xb76659[_0xc933('0x1b')]);_0xb76659[_0xc933('0x1c')]=_0xb76659[_0xc933('0x1b')];for(_0x318370=0x0;_0x318370<_0xbe7f7b[_0xc933('0x12')];_0x318370++){if(_0xbe7f7b[_0x318370][_0xc933('0x13')]===_0xb76659['agentEmail']){_0x1f57db=!![];_0xb76659[_0xc933('0x1d')]=_0xbe7f7b[_0x318370]['id'];logger[_0xc933('0xf')](_0xc933('0x1e'),_0xb76659[_0xc933('0x1d')]);}}}if(!_0x1f57db){logger[_0xc933('0xf')]('Admin\x20selected');_0xb76659[_0xc933('0x1c')]=_0xb76659[_0xc933('0x14')];_0xb76659['userId']=_0xb76659['adminId'];_0x1f57db=!![];}if(_0x1f57db){_0x229901(_0xb76659);}else{_0x1611a7({'statusCode':0x194,'message':_0xc933('0x17')});}}else{_0x1611a7({'statusCode':0x194,'message':_0xc933('0x17')});}})[_0xc933('0x18')](function(_0x1afada){logger['error']('['+[_0x4bdbe8[_0xc933('0x19')]()]+']',_0x1afada[_0xc933('0x1f')]);_0x1611a7(_0x1afada);});});};}function searchContact(_0x519ede,_0x1a9004,_0x202244,_0x53373a){return new Promise(function(_0x50805b,_0x4628ec){var _0x5d7b77={'method':_0xc933('0xc'),'headers':_0x1a9004,'uri':_0x519ede+_0xc933('0x20')+_0x53373a+'&f='+_0x202244+_0xc933('0x21'),'json':!![]};rp(_0x5d7b77)[_0xc933('0x11')](function(_0x22af1a){var _0x5055c7=_[_0xc933('0x22')](_0x22af1a[_0xc933('0x23')][_0xc933('0x23')],[_0x202244,_0x53373a]);_0x50805b(_0x5055c7);})['catch'](function(_0x129af4){_0x4628ec(_0x129af4);});});}function getEndUser(_0x1d6469,_0x142ec9,_0x21fcd1){return function(_0x322332){return new Promise(function(_0x38e548,_0x387367){logger[_0xc933('0xf')](util[_0xc933('0x24')](_0xc933('0x25'),_0x322332['contactNumber']));searchContact(_0x21fcd1,_0x142ec9,_0xc933('0x26'),_0x322332[_0xc933('0x27')])[_0xc933('0x11')](function(_0x45fa89){if(_0x45fa89){_0x322332['endUserId']=_0x45fa89['id'];logger['info'](_0xc933('0x28'),_0x322332[_0xc933('0x29')]);return _0x38e548(_0x322332);}searchContact(_0x21fcd1,_0x142ec9,_0xc933('0x2a'),_0x322332['contactNumber'])[_0xc933('0x11')](function(_0x1d559a){if(_0x1d559a){_0x322332[_0xc933('0x29')]=_0x1d559a['id'];logger[_0xc933('0xf')](_0xc933('0x2b'),_0x322332[_0xc933('0x29')]);return _0x38e548(_0x322332);}createEndUser(_0x322332,_0x1d6469,_0x142ec9,_0x21fcd1)[_0xc933('0x11')](function(_0x3dc8db){logger[_0xc933('0xf')]('Contact\x20created:',_0x3dc8db[_0xc933('0x29')]);return _0x38e548(_0x3dc8db);});});})[_0xc933('0x18')](function(_0x3eacab){_0x387367(_0x3eacab);});});};}function createEndUser(_0x304ee7,_0x566635,_0x1530eb,_0x42dc86){return new Promise(function(_0x19dea9,_0x204347){var _0x8769b6=moment();var _0x4652fb={'method':_0xc933('0x2c'),'uri':_0x42dc86+_0xc933('0x2d'),'body':{'contact':{'last_name':_0x304ee7[_0xc933('0x27')],'work_number':_0x304ee7[_0xc933('0x27')],'mobile_number':_0x304ee7['contactNumber'],'owner_id':_0x304ee7[_0xc933('0x1d')],'created_at':_0x8769b6[_0xc933('0x24')](_0xc933('0x2e'))}},'json':!![]};_0x4652fb[_0xc933('0xe')]=_0x1530eb;logger['info'](_0xc933('0x2f'));return rp(_0x4652fb)['then'](function(_0xde28c7){_0x304ee7['endUserId']=_0xde28c7[_0xc933('0x30')]['id'];_0x19dea9(_0x304ee7);})['catch'](function(_0x280f20){logger['error']('['+[_0x566635['toUpperCase']()]+']',_0x280f20[_0xc933('0x1f')]);_0x204347(_0x280f20[_0xc933('0x1f')]);});});}function getTicket(_0x31316f,_0x560ae9,_0x30775c,_0x40cd12,_0x29f7d8){return function(_0x5b23f7){logger[_0xc933('0xf')](_0xc933('0x31'));return new Promise(function(_0x31d591,_0x40857c){var _0x3ea21f=moment();var _0x3cb197={'method':_0xc933('0x2c'),'uri':_0x30775c+'/api/tasks','body':{'title':intUtil[_0xc933('0x32')](_0x40cd12[_0xc933('0x33')],_0x29f7d8,'\x20'),'description':intUtil['getString'](_0x40cd12[_0xc933('0x34')],_0x29f7d8,'\x0a'),'owner_id':_0x5b23f7[_0xc933('0x1d')],'creater_id':_0x5b23f7[_0xc933('0x15')],'targetable_id':_0x5b23f7[_0xc933('0x29')],'targetable_type':_0xc933('0x35'),'created_at':_0x3ea21f[_0xc933('0x24')](_0xc933('0x2e')),'due_date':_0x3ea21f[_0xc933('0x36')](0x1e,'m')[_0xc933('0x24')](_0xc933('0x2e'))},'json':!![]};_0x3cb197['headers']=_0x560ae9;return rp(_0x3cb197)[_0xc933('0x11')](function(_0x251a64){_0x5b23f7[_0xc933('0x37')]=_0x251a64[_0xc933('0x38')]['id'];logger[_0xc933('0xf')](_0xc933('0x39'),_0x5b23f7[_0xc933('0x37')]);_0x31d591(_0x5b23f7);})[_0xc933('0x18')](function(_0x5d4f68){logger[_0xc933('0x3a')]('['+[_0x31316f[_0xc933('0x19')]()]+']',_0x5d4f68[_0xc933('0x1f')]);_0x40857c(_0x5d4f68['message']);});});};}function emit(_0x1c481a,_0x18f88f,_0x3a0352){var _0xb9453d={'uri':_0x1c481a+_0xc933('0x3b')+_0x3a0352};io['to'](util[_0xc933('0x24')](_0xc933('0x3c'),_0x18f88f))[_0xc933('0x3d')]('trigger:browser:url',_0xb9453d);}exports['cs']=function(_0x4a3295,_0x33c6f2,_0x22734f,_0x4c7709,_0x1721b6,_0x461a86,_0x627891,_0x72884f){var _0x1ac447={};var _0x4d74b5={'Authorization':_0xc933('0x3e')+_0x461a86['apiKey']};_0x461a86['remoteUri']=intUtil[_0xc933('0x3f')](_0x461a86['remoteUri']);_0x461a86[_0xc933('0x40')]=intUtil[_0xc933('0x3f')](_0x461a86[_0xc933('0x40')]);var _0x43316a=_0x461a86[_0xc933('0x41')];_0x1ac447['adminEmail']=_0x461a86[_0xc933('0x42')];_0x1ac447['contactNumber']=_0x72884f[_0xc933('0x43')]()===_0xc933('0x44')?_0x33c6f2[_0xc933('0x45')]:_0x33c6f2[_0xc933('0x46')];_0x1ac447[_0xc933('0x47')]=_0x72884f==='queue'||_0x72884f==='unmanaged'?'queue':_0xc933('0x44');if(_0x4c7709){_0x1ac447[_0xc933('0x1b')]=_0x4c7709[_0xc933('0x13')];}var _0x4856a9=util[_0xc933('0x24')](_0xc933('0x48'),_0x461a86[_0xc933('0x40')],_0x33c6f2[_0xc933('0x49')],md5(_0x33c6f2[_0xc933('0x49')]));if(_0x1721b6&&_0x1721b6[_0xc933('0x4a')]){logger['info'](_0xc933('0x4b'),_0xc933('0x4c'));_0x33c6f2['recordingURL']=_0x4856a9;}else if(_0x627891&&_0x627891[_0xc933('0x4d')]&&_0x627891[_0xc933('0x4d')]!==_0xc933('0x4e')){logger[_0xc933('0xf')]('[OUTBOUND]',_0xc933('0x4c'));_0x33c6f2[_0xc933('0x4f')]=_0x4856a9;}else{_0x33c6f2[_0xc933('0x4f')]='';}return getAdminId(_0x1ac447,_0x72884f,_0x4d74b5,_0x43316a)['then'](getUser(_0x72884f,_0x4d74b5,_0x43316a))[_0xc933('0x11')](getEndUser(_0x72884f,_0x4d74b5,_0x43316a))['then'](getTicket(_0x72884f,_0x4d74b5,_0x43316a,_0x22734f,_0x33c6f2))[_0xc933('0x11')](function(_0x265565){logger[_0xc933('0xf')](util['format'](_0xc933('0x50'),_0x265565[_0xc933('0x37')]));if(_0x72884f!==_0xc933('0x51')){logger[_0xc933('0xf')]('['+[_0x72884f[_0xc933('0x19')]()]+']',_0xc933('0x52'));emit(_0x43316a,_0x4c7709['name'],_0x265565['endUserId']);}})[_0xc933('0x18')](function(_0x4b2a19){logger[_0xc933('0x3a')]('['+[_0x72884f['toUpperCase']()]+_0xc933('0x53'),util[_0xc933('0x54')](_0x4b2a19,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/index.js b/server/services/ami/trigger/integration/index.js index 19f0635..9125413 100644 --- a/server/services/ami/trigger/integration/index.js +++ b/server/services/ami/trigger/integration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe605=['./desk','./vtiger','./servicenow','./dynamics365','./freshsales','zendesk','salesforce','sugarcrm','zoho','freshsales','servicenow','exec','includes','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','log','EVENT\x20UNKNOWN','freshdesk','vtiger','dynamics365','unknown\x20integration','../../../../config/logger','error','[EXEC]','%s\x20configuration\x20#%s\x20not\x20found','%s\x20account\x20#%s\x20not\x20found','lodash','util','./salesforce','./sugarcrm','./freshdesk','./zoho'];(function(_0x5ac954,_0x541d45){var _0x16b423=function(_0xb35748){while(--_0xb35748){_0x5ac954['push'](_0x5ac954['shift']());}};_0x16b423(++_0x541d45);}(_0xe605,0x92));var _0x5e60=function(_0x2c8572,_0x1491c2){_0x2c8572=_0x2c8572-0x0;var _0xac8a95=_0xe605[_0x2c8572];return _0xac8a95;};'use strict';var _=require(_0x5e60('0x0'));var util=require(_0x5e60('0x1'));var zendesk=require('./zendesk');var salesforce=require(_0x5e60('0x2'));var sugarcrm=require(_0x5e60('0x3'));var freshdesk=require(_0x5e60('0x4'));var zoho=require(_0x5e60('0x5'));var desk=require(_0x5e60('0x6'));var vtiger=require(_0x5e60('0x7'));var servicenow=require(_0x5e60('0x8'));var dynamics365=require(_0x5e60('0x9'));var freshsales=require(_0x5e60('0xa'));var integrations=[_0x5e60('0xb'),_0x5e60('0xc'),_0x5e60('0xd'),'freshdesk',_0x5e60('0xe'),'desk','vtiger','dynamics365',_0x5e60('0xf'),_0x5e60('0x10')];exports[_0x5e60('0x11')]=function(_0x2c5425,_0x331b3e,_0x2cbe4e,_0x56f05a,_0x6ab0ce,_0x527f7b){if(_0x2cbe4e){if(_[_0x5e60('0x12')](integrations,_0x2c5425[_0x5e60('0x13')][_0x5e60('0x14')]())){try{var _0x51e7f6=null;var _0x371df7='';var _0x178782=_0x2cbe4e[_0x2c5425[_0x5e60('0x13')][_0x5e60('0x14')]()];if(_0x178782){var _0x2874c4=_0x178782[_0x2c5425[_0x5e60('0x15')]];if(_0x2874c4){var _0x4fd10e=_[_0x5e60('0x16')](_0x2874c4[_0x5e60('0x17')],{'id':parseInt(_0x2c5425[_0x5e60('0x18')],0xa)});if(_0x4fd10e){if(_0x56f05a){if(_0x6ab0ce&&_0x331b3e[_0x5e60('0x19')]){_0x371df7='queue';}else if(_0x331b3e[_0x5e60('0x1a')]){_0x371df7='outbound';}else{console[_0x5e60('0x1b')](_0x5e60('0x1c'),_0x331b3e);}}else{_0x371df7='unmanaged';}switch(_0x2c5425[_0x5e60('0x13')][_0x5e60('0x14')]()){case _0x5e60('0xb'):zendesk[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case _0x5e60('0xc'):salesforce[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case'sugarcrm':sugarcrm[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case _0x5e60('0x1d'):freshdesk[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case _0x5e60('0xe'):zoho[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case'desk':desk[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case _0x5e60('0x1e'):vtiger[_0x371df7](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b);break;case _0x5e60('0xf'):freshsales['cs'](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b,_0x371df7);break;case _0x5e60('0x10'):servicenow['cs'](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b,_0x371df7);break;case _0x5e60('0x1f'):dynamics365['cs'](_0x2c5425,_0x331b3e,_0x4fd10e,_0x56f05a,_0x6ab0ce,_0x2874c4,_0x527f7b,_0x371df7);break;default:console[_0x5e60('0x1b')](_0x5e60('0x20'));}}else{_0x51e7f6=require(_0x5e60('0x21'))(_0x2c5425[_0x5e60('0x13')][_0x5e60('0x14')]());_0x51e7f6[_0x5e60('0x22')](_0x5e60('0x23'),util['format'](_0x5e60('0x24'),_0x2c5425['data1'][_0x5e60('0x14')](),_0x2c5425[_0x5e60('0x18')]));}}else{_0x51e7f6=require(_0x5e60('0x21'))(_0x2c5425[_0x5e60('0x13')][_0x5e60('0x14')]());_0x51e7f6[_0x5e60('0x22')](_0x5e60('0x23'),util['format'](_0x5e60('0x25'),_0x2c5425[_0x5e60('0x13')][_0x5e60('0x14')](),_0x2c5425['data2']));}}else{}}catch(_0x45cb62){console[_0x5e60('0x22')](_0x45cb62);}}}}; \ No newline at end of file +var _0x8603=['zendesk','salesforce','sugarcrm','freshdesk','zoho','freshsales','servicenow','includes','data1','toLowerCase','data2','find','Configurations','queue','routeId','outbound','log','EVENT\x20UNKNOWN','unmanaged','desk','vtiger','dynamics365','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','data3','%s\x20account\x20#%s\x20not\x20found','util','./zendesk','./salesforce','./zoho','./desk','./vtiger','./dynamics365'];(function(_0x2b764b,_0x552064){var _0x33eab0=function(_0x329efd){while(--_0x329efd){_0x2b764b['push'](_0x2b764b['shift']());}};_0x33eab0(++_0x552064);}(_0x8603,0x190));var _0x3860=function(_0x377e30,_0x2fe51a){_0x377e30=_0x377e30-0x0;var _0x50a9e8=_0x8603[_0x377e30];return _0x50a9e8;};'use strict';var _=require('lodash');var util=require(_0x3860('0x0'));var zendesk=require(_0x3860('0x1'));var salesforce=require(_0x3860('0x2'));var sugarcrm=require('./sugarcrm');var freshdesk=require('./freshdesk');var zoho=require(_0x3860('0x3'));var desk=require(_0x3860('0x4'));var vtiger=require(_0x3860('0x5'));var servicenow=require('./servicenow');var dynamics365=require(_0x3860('0x6'));var freshsales=require('./freshsales');var integrations=[_0x3860('0x7'),_0x3860('0x8'),_0x3860('0x9'),_0x3860('0xa'),_0x3860('0xb'),'desk','vtiger','dynamics365',_0x3860('0xc'),_0x3860('0xd')];exports['exec']=function(_0x2fb169,_0x38737e,_0x5909b8,_0x101263,_0x45ba50,_0x4cd35d){if(_0x5909b8){if(_[_0x3860('0xe')](integrations,_0x2fb169[_0x3860('0xf')]['toLowerCase']())){try{var _0x405510=null;var _0x8ad61d='';var _0x2428f6=_0x5909b8[_0x2fb169[_0x3860('0xf')][_0x3860('0x10')]()];if(_0x2428f6){var _0x21ae4e=_0x2428f6[_0x2fb169[_0x3860('0x11')]];if(_0x21ae4e){var _0x12b23b=_[_0x3860('0x12')](_0x21ae4e[_0x3860('0x13')],{'id':parseInt(_0x2fb169['data3'],0xa)});if(_0x12b23b){if(_0x101263){if(_0x45ba50&&_0x38737e[_0x3860('0x14')]){_0x8ad61d=_0x3860('0x14');}else if(_0x38737e[_0x3860('0x15')]){_0x8ad61d=_0x3860('0x16');}else{console[_0x3860('0x17')](_0x3860('0x18'),_0x38737e);}}else{_0x8ad61d=_0x3860('0x19');}switch(_0x2fb169[_0x3860('0xf')][_0x3860('0x10')]()){case _0x3860('0x7'):zendesk[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case _0x3860('0x8'):salesforce[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case _0x3860('0x9'):sugarcrm[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case'freshdesk':freshdesk[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case'zoho':zoho[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case _0x3860('0x1a'):desk[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case _0x3860('0x1b'):vtiger[_0x8ad61d](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d);break;case _0x3860('0xc'):freshsales['cs'](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d,_0x8ad61d);break;case'servicenow':servicenow['cs'](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d,_0x8ad61d);break;case _0x3860('0x1c'):dynamics365['cs'](_0x2fb169,_0x38737e,_0x12b23b,_0x101263,_0x45ba50,_0x21ae4e,_0x4cd35d,_0x8ad61d);break;default:console[_0x3860('0x17')](_0x3860('0x1d'));}}else{_0x405510=require(_0x3860('0x1e'))(_0x2fb169[_0x3860('0xf')][_0x3860('0x10')]());_0x405510[_0x3860('0x1f')](_0x3860('0x20'),util[_0x3860('0x21')](_0x3860('0x22'),_0x2fb169[_0x3860('0xf')][_0x3860('0x10')](),_0x2fb169[_0x3860('0x23')]));}}else{_0x405510=require(_0x3860('0x1e'))(_0x2fb169[_0x3860('0xf')]['toLowerCase']());_0x405510[_0x3860('0x1f')](_0x3860('0x20'),util[_0x3860('0x21')](_0x3860('0x24'),_0x2fb169[_0x3860('0xf')]['toLowerCase'](),_0x2fb169[_0x3860('0x11')]));}}else{}}catch(_0x568515){console['error'](_0x568515);}}}}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/salesforce.js b/server/services/ami/trigger/integration/salesforce.js index 33a52e2..aad82b7 100644 --- a/server/services/ami/trigger/integration/salesforce.js +++ b/server/services/ami/trigger/integration/salesforce.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb10=['Email','Name','info','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','resolve','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','contact_lead','Contact','execute','Lead','contact','lead','Case','Phone','Enduser\x20with\x20phone\x20%s\x20found.','format','Caller\x20-\x20%s','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','Task','No\x20Company','upperFirst','create','forEach','string','idField','content','toString','type','variable','variableName','customVariable','name','Variable','toLowerCase','password','securityToken','Connection','remoteUri','https://login.salesforce.com','clientId','clientSecret','username','Connection\x20established.','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','uniqueid','email','calleridnum','Fields','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','user:%s','newTab','trigger:browser:url','%s/%s/e','instanceUrl','error','catch','outbound','recordingFormat','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','stringify','lastevent','toUpperCase','calleridname',']\x20Ticket\x20%s\x20created.',']\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','moment','bluebird','jsforce','util','ioredis','./util','../../../../config/environment','salesforce','redis','defaults','localhost','socket.io-emitter','emit','getString','Subjects','Descriptions','WhoId','ContactId','sobject','ticketType','isNil','validateEmail','User','find','then','length'];(function(_0x13dbb1,_0x56edc7){var _0xe196dd=function(_0x8bc97a){while(--_0x8bc97a){_0x13dbb1['push'](_0x13dbb1['shift']());}};_0xe196dd(++_0x56edc7);}(_0xdb10,0x12b));var _0x0db1=function(_0xc0a3d3,_0x2c8d00){_0xc0a3d3=_0xc0a3d3-0x0;var _0x3386e8=_0xdb10[_0xc0a3d3];return _0x3386e8;};'use strict';var _=require(_0x0db1('0x0'));var rp=require(_0x0db1('0x1'));var moment=require(_0x0db1('0x2'));var BPromise=require(_0x0db1('0x3'));var md5=require('md5');var jsforce=require(_0x0db1('0x4'));var util=require(_0x0db1('0x5'));var Redis=require(_0x0db1('0x6'));var intUtil=require(_0x0db1('0x7'));var config=require(_0x0db1('0x8'));var logger=require('../../../../config/logger')(_0x0db1('0x9'));config[_0x0db1('0xa')]=_[_0x0db1('0xb')](config['redis'],{'host':_0x0db1('0xc'),'port':0x18eb});var io=require(_0x0db1('0xd'))(new Redis(config[_0x0db1('0xa')]));function emit(_0x3108bc,_0xa7d4ee,_0x5cbd28){io['to'](_0x3108bc)[_0x0db1('0xe')](_0xa7d4ee,_0x5cbd28);}function getTicket(_0x11a94c,_0x296cd5,_0x2dd080,_0x474ab8,_0x5d436f,_0x5c36ff,_0x817227,_0x172b11){var _0x478110={};if(_0x474ab8['ticketType']==='Task'){_0x478110=Object['assign']({},{'OwnerId':_0x296cd5['id'],'ActivityDate':moment['utc'](),'IsReminderSet':![],'IsRecurrence':![],'Subject':intUtil[_0x0db1('0xf')](_0x474ab8[_0x0db1('0x10')],_0x5d436f,'\x20'),'Description':intUtil[_0x0db1('0xf')](_0x474ab8[_0x0db1('0x11')],_0x5d436f,'\x0a')},getCustomFields(_0x5c36ff,_0x5d436f));if(_0x2dd080){_0x478110[_0x0db1('0x12')]=_0x2dd080['id'];}}else if(_0x474ab8['ticketType']==='Case'){_0x478110=Object['assign']({},{'OwnerId':_0x296cd5['id'],'Subject':intUtil[_0x0db1('0xf')](_0x474ab8[_0x0db1('0x10')],_0x5d436f,'\x20'),'Description':intUtil[_0x0db1('0xf')](_0x474ab8[_0x0db1('0x11')],_0x5d436f,'\x0a')},getCustomFields(_0x5c36ff,_0x5d436f));if(_0x2dd080){_0x478110[_0x0db1('0x13')]=_0x2dd080['id'];}}return _0x817227[_0x0db1('0x14')](_0x474ab8[_0x0db1('0x15')])['create'](_0x478110);}function getUser(_0x409946,_0x5e3cbc,_0x10c746){if(!_[_0x0db1('0x16')](_0x5e3cbc)&&intUtil[_0x0db1('0x17')](_0x5e3cbc)){var _0xeb4102={'Email':_0x5e3cbc};var _0x38efa0={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x10c746[_0x0db1('0x14')](_0x0db1('0x18'))[_0x0db1('0x19')](_0xeb4102,_0x38efa0)['execute']()[_0x0db1('0x1a')](function(_0x25c9a2){if(_0x25c9a2[_0x0db1('0x1b')]){var _0x564ec9=_[_0x0db1('0x19')](_0x25c9a2,function(_0x4d4583){return _0x4d4583[_0x0db1('0x1c')]===_0x5e3cbc;});if(_0x564ec9){logger['info']('Agent\x20%s\x20found.',_0x5e3cbc);return BPromise['resolve']({'id':_0x564ec9['Id'],'name':_0x564ec9[_0x0db1('0x1d')]});}}else{logger[_0x0db1('0x1e')](_0x0db1('0x1f'),_0x5e3cbc);return _0x10c746[_0x0db1('0x20')]()['then'](function(_0x32e786){return BPromise[_0x0db1('0x21')]({'id':_0x32e786['user_id'],'name':_0x32e786['display_name']});});}});}else{logger['info'](_0x0db1('0x1f'),_0x5e3cbc);return _0x10c746[_0x0db1('0x20')]()[_0x0db1('0x1a')](function(_0x38847d){return BPromise[_0x0db1('0x21')]({'id':_0x38847d['user_id'],'name':_0x38847d['display_name']});});}}function getEndUser(_0x704e15,_0x1682c1,_0x654d77,_0x22120c,_0x39401f){var _0xd32c38={'Phone':_0x22120c};var _0x311ea8={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x0db1('0x21')]()[_0x0db1('0x1a')](function(){if(_0x1682c1[_0x0db1('0x15')]==='Task'){logger[_0x0db1('0x1e')](_0x0db1('0x22'),_0x22120c,_0x1682c1[_0x0db1('0x23')]);switch(_0x1682c1[_0x0db1('0x23')]){case _0x0db1('0x24'):return _0x39401f[_0x0db1('0x14')](_0x0db1('0x25'))['find'](_0xd32c38,_0x311ea8)[_0x0db1('0x26')]()[_0x0db1('0x1a')](function(_0x43e6de){if(_0x43e6de&&_0x43e6de[_0x0db1('0x1b')]){return _0x43e6de;}else{return _0x39401f[_0x0db1('0x14')](_0x0db1('0x27'))[_0x0db1('0x19')](_0xd32c38,_0x311ea8);}});case _0x0db1('0x28'):return _0x39401f[_0x0db1('0x14')](_0x0db1('0x25'))[_0x0db1('0x19')](_0xd32c38,_0x311ea8)['execute']();case _0x0db1('0x29'):return _0x39401f['sobject']('Lead')[_0x0db1('0x19')](_0xd32c38,_0x311ea8);default:return null;}}else if(_0x1682c1[_0x0db1('0x15')]===_0x0db1('0x2a')){logger[_0x0db1('0x1e')]('Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.',_0x22120c,_0x0db1('0x28'));return _0x39401f[_0x0db1('0x14')](_0x0db1('0x25'))[_0x0db1('0x19')](_0xd32c38,_0x311ea8)['execute']();}})[_0x0db1('0x1a')](function(_0x57c81a){if(_0x57c81a&&_0x57c81a[_0x0db1('0x1b')]){var _0x54f282=_[_0x0db1('0x19')](_0x57c81a,function(_0x3ebd4f){return _0x3ebd4f[_0x0db1('0x2b')]===_0x22120c;});if(_0x54f282){return BPromise['resolve']({'id':_0x54f282['Id'],'name':_0x54f282['Name'],'phone':_0x54f282[_0x0db1('0x2b')]});}}})['then'](function(_0x1026dc){if(_0x1026dc){logger[_0x0db1('0x1e')](_0x0db1('0x2c'),_0x22120c);return BPromise[_0x0db1('0x21')](_0x1026dc);}else{logger[_0x0db1('0x1e')]('Enduser\x20with\x20phone\x20%s\x20not\x20found.',_0x22120c);var _0x185857={'LastName':_0x654d77!==''?_0x654d77:util[_0x0db1('0x2d')](_0x0db1('0x2e'),_0x22120c),'Phone':_0x22120c};if(_0x1682c1['moduleCreate']){if(_0x1682c1[_0x0db1('0x2f')]===_0x0db1('0x28')){logger[_0x0db1('0x1e')](_0x0db1('0x30'),_0x22120c,_0x1682c1[_0x0db1('0x2f')]);}else if(_0x1682c1[_0x0db1('0x2f')]===_0x0db1('0x29')&&_0x1682c1[_0x0db1('0x15')]===_0x0db1('0x31')){logger[_0x0db1('0x1e')]('Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.',_0x22120c,_0x1682c1[_0x0db1('0x2f')]);_0x185857['Company']=_0x0db1('0x32');}else{return null;}}return _0x39401f[_0x0db1('0x14')](_[_0x0db1('0x33')](_0x1682c1[_0x0db1('0x2f')]))[_0x0db1('0x34')](_0x185857);}});}function getCustomFields(_0x191923,_0x1c6e7c){var _0x32dde6={};if(_0x191923[_0x0db1('0x1b')]>0x0){_[_0x0db1('0x35')](_0x191923,function(_0x2f3d18){if(_0x2f3d18['type']===_0x0db1('0x36')&&_0x2f3d18[_0x0db1('0x37')]){_0x32dde6[_0x2f3d18[_0x0db1('0x37')]]=_0x2f3d18[_0x0db1('0x38')][_0x0db1('0x39')]();}else if(_0x2f3d18[_0x0db1('0x3a')]===_0x0db1('0x3b')&&_0x2f3d18[_0x0db1('0x3c')]&&_0x2f3d18[_0x0db1('0x37')]){_0x1c6e7c[_0x2f3d18[_0x0db1('0x3c')]]&&(_0x32dde6[_0x2f3d18['idField']]=_0x1c6e7c[_0x2f3d18['variableName']][_0x0db1('0x39')]());}else if(_0x2f3d18['type']===_0x0db1('0x3d')&&_0x2f3d18['Variable']&&_0x2f3d18['Variable'][_0x0db1('0x3e')]&&_0x2f3d18[_0x0db1('0x37')]){_0x1c6e7c[_0x2f3d18[_0x0db1('0x3f')]['name']['toLowerCase']()]&&(_0x32dde6[_0x2f3d18['idField']]=_0x1c6e7c[_0x2f3d18['Variable'][_0x0db1('0x3e')][_0x0db1('0x40')]()][_0x0db1('0x39')]());}});}return _0x32dde6;}function getConnection(_0x24fd7a){var _0x1cfb0a=_0x24fd7a[_0x0db1('0x41')]['concat'](_0x24fd7a[_0x0db1('0x42')]);var _0x30c577=new jsforce[(_0x0db1('0x43'))]({'oauth2':{'loginUrl':_0x24fd7a[_0x0db1('0x44')]||_0x0db1('0x45'),'clientId':_0x24fd7a[_0x0db1('0x46')],'clientSecret':_0x24fd7a[_0x0db1('0x47')]}});return _0x30c577['login'](_0x24fd7a[_0x0db1('0x48')],_0x1cfb0a)['then'](function(){logger[_0x0db1('0x1e')](_0x0db1('0x49'));return _0x30c577;});}exports[_0x0db1('0x4a')]=function(_0x551a5e,_0x54e2ae,_0x4b586a,_0x2bf81a,_0x4549a9,_0xbf33c6){var _0x458a97,_0x2af5ce,_0x6b762b,_0x33fdc7;_0xbf33c6[_0x0db1('0x4b')]=intUtil[_0x0db1('0x4c')](_0xbf33c6[_0x0db1('0x4b')]);_0xbf33c6[_0x0db1('0x44')]=intUtil[_0x0db1('0x4c')](_0xbf33c6['remoteUri']);if(_0x4549a9&&_0x4549a9[_0x0db1('0x4d')]){logger[_0x0db1('0x1e')](_0x0db1('0x4e'),_0x0db1('0x4f'));_0x54e2ae[_0x0db1('0x50')]=util[_0x0db1('0x2d')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0xbf33c6[_0x0db1('0x4b')],_0x54e2ae[_0x0db1('0x51')],md5(_0x54e2ae[_0x0db1('0x51')]));}else{_0x54e2ae[_0x0db1('0x50')]='';}return getConnection(_0xbf33c6)['then'](function(_0x1e1305){_0x33fdc7=_0x1e1305;return getUser(_0xbf33c6,_0x2bf81a[_0x0db1('0x52')],_0x33fdc7);})[_0x0db1('0x1a')](function(_0x3ef604){_0x458a97=_0x3ef604;return getEndUser(_0xbf33c6,_0x4b586a,_0x54e2ae['calleridname'],_0x54e2ae[_0x0db1('0x53')],_0x33fdc7);})[_0x0db1('0x1a')](function(_0x5a2a0d){_0x2af5ce=_0x5a2a0d;return getTicket(_0xbf33c6,_0x458a97,_0x2af5ce,_0x4b586a,_0x54e2ae,_0x4b586a[_0x0db1('0x54')],_0x33fdc7,'queue');})[_0x0db1('0x1a')](function(_0x92c858){_0x6b762b=_0x92c858;logger[_0x0db1('0x1e')](_0x0db1('0x55'),_0x6b762b['id']);logger[_0x0db1('0x1e')](_0x0db1('0x56'),_0x6b762b['id'],_0x2bf81a[_0x0db1('0x3e')],_0xbf33c6[_0x0db1('0x3a')]);switch(_0xbf33c6[_0x0db1('0x3a')]){case _0x0db1('0x57'):emit(util['format'](_0x0db1('0x58'),_0x2bf81a['name']),'trigger:salesforce:display',{'recordId':_0x6b762b['id']});break;case _0x0db1('0x59'):emit(util[_0x0db1('0x2d')](_0x0db1('0x58'),_0x2bf81a[_0x0db1('0x3e')]),_0x0db1('0x5a'),{'uri':util['format'](_0x0db1('0x5b'),_0x33fdc7[_0x0db1('0x5c')],_0x6b762b['id'])});break;default:logger[_0x0db1('0x5d')]('[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.');}})[_0x0db1('0x5e')](function(_0x579129){logger[_0x0db1('0x5d')](_0x0db1('0x4e'),JSON['stringify'](_0x579129));});};exports[_0x0db1('0x5f')]=function(_0x2cff2e,_0x958c72,_0x3d7b05,_0x3625e9,_0x1c3d7a,_0x498242,_0x15f68c){var _0x20efc0,_0x51618f,_0x438b1e,_0x49006b;_0x498242[_0x0db1('0x4b')]=intUtil[_0x0db1('0x4c')](_0x498242[_0x0db1('0x4b')]);_0x498242[_0x0db1('0x44')]=intUtil[_0x0db1('0x4c')](_0x498242[_0x0db1('0x44')]);if(_0x15f68c&&_0x15f68c[_0x0db1('0x60')]&&_0x15f68c['recordingFormat']!=='none'){logger[_0x0db1('0x1e')](_0x0db1('0x61'),'Recording\x20is\x20enabled!');_0x958c72['recordingURL']=util[_0x0db1('0x2d')](_0x0db1('0x62'),_0x498242['serverUrl'],_0x958c72[_0x0db1('0x51')],md5(_0x958c72['uniqueid']));}return getConnection(_0x498242)[_0x0db1('0x1a')](function(_0x35d44f){_0x49006b=_0x35d44f;return getUser(_0x498242,_0x3625e9[_0x0db1('0x52')],_0x49006b);})['then'](function(_0x1de84e){_0x20efc0=_0x1de84e;return getEndUser(_0x498242,_0x3d7b05,_0x958c72[_0x0db1('0x63')],_0x958c72[_0x0db1('0x64')],_0x49006b);})[_0x0db1('0x1a')](function(_0x2a02c0){_0x51618f=_0x2a02c0;return getTicket(_0x498242,_0x20efc0,_0x51618f,_0x3d7b05,_0x958c72,_0x3d7b05[_0x0db1('0x54')],_0x49006b,_0x0db1('0x5f'));})['then'](function(_0x3688b5){_0x438b1e=_0x3688b5;logger[_0x0db1('0x1e')](_0x0db1('0x65'),_0x438b1e['id']);logger['info'](_0x0db1('0x66'),_0x438b1e['id'],_0x3625e9['name'],_0x498242['type']);switch(_0x498242['type']){case'integrationTab':emit(util[_0x0db1('0x2d')](_0x0db1('0x58'),_0x3625e9[_0x0db1('0x3e')]),'trigger:salesforce:display',{'recordId':_0x438b1e['id']});break;case _0x0db1('0x59'):emit(util[_0x0db1('0x2d')](_0x0db1('0x58'),_0x3625e9[_0x0db1('0x3e')]),_0x0db1('0x5a'),{'uri':util[_0x0db1('0x2d')](_0x0db1('0x5b'),_0x49006b[_0x0db1('0x5c')],_0x438b1e['id'])});break;default:logger[_0x0db1('0x5d')]('[OUTBOUND]','Salesforce\x20account\x20type\x20not\x20recognized');}})[_0x0db1('0x5e')](function(_0x184420){logger[_0x0db1('0x5d')](_0x0db1('0x61'),JSON[_0x0db1('0x67')](_0x184420));});};exports['unmanaged']=function(_0x1b6e0d,_0x80e740,_0x3b83c6,_0x2b279c,_0xcc5cbb,_0x3d9da8){var _0x2f17ec,_0xc9e929,_0x29f5c2,_0x150159;_0x3d9da8[_0x0db1('0x4b')]=intUtil[_0x0db1('0x4c')](_0x3d9da8['serverUrl']);_0x3d9da8['remoteUri']=intUtil[_0x0db1('0x4c')](_0x3d9da8[_0x0db1('0x44')]);if(_0xcc5cbb&&_0xcc5cbb['monitor_format']){logger[_0x0db1('0x1e')]('['+_0x80e740[_0x0db1('0x68')][_0x0db1('0x69')]()+']','Recording\x20is\x20enabled!');_0x80e740[_0x0db1('0x50')]=util[_0x0db1('0x2d')](_0x0db1('0x62'),_0x3d9da8['serverUrl'],_0x80e740[_0x0db1('0x51')],md5(_0x80e740[_0x0db1('0x51')]));}else{_0x80e740[_0x0db1('0x50')]='';}return getConnection(_0x3d9da8)[_0x0db1('0x1a')](function(_0x459628){_0x150159=_0x459628;if(!_[_0x0db1('0x16')](_0x2b279c)){return getUser(_0x3d9da8,_0x2b279c[_0x0db1('0x3e')],_0x150159);}else{return getUser(_0x3d9da8,null,_0x150159);}})[_0x0db1('0x1a')](function(_0x18cff4){_0x2f17ec=_0x18cff4;return getEndUser(_0x3d9da8,_0x3b83c6,_0x80e740[_0x0db1('0x6a')],_0x80e740[_0x0db1('0x53')],_0x150159);})['then'](function(_0x360f30){_0xc9e929=_0x360f30;return getTicket(_0x3d9da8,_0x2f17ec,_0xc9e929,_0x3b83c6,_0x80e740,_0x3b83c6[_0x0db1('0x54')],_0x150159);})[_0x0db1('0x1a')](function(_0x592d76){_0x29f5c2=_0x592d76;logger[_0x0db1('0x1e')]('['+_0x80e740[_0x0db1('0x68')]['toUpperCase']()+_0x0db1('0x6b'),_0x29f5c2['id']);logger[_0x0db1('0x1e')]('['+_0x80e740['lastevent']['toUpperCase']()+_0x0db1('0x6c'),_0x3d9da8['type']);})[_0x0db1('0x5e')](function(_0x35f37e){logger[_0x0db1('0x5d')]('['+_0x80e740[_0x0db1('0x68')][_0x0db1('0x69')]()+']',JSON[_0x0db1('0x67')](_0x35f37e));});}; \ No newline at end of file +var _0xd78d=['then','length','Email','Agent\x20%s\x20found.','resolve','Name','info','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','display_name','user_id','moduleSearch','Contact','Lead','contact','lead','Case','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','Enduser\x20with\x20phone\x20%s\x20found.','Enduser\x20with\x20phone\x20%s\x20not\x20found.','','format','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','moduleCreate','Company','No\x20Company','upperFirst','forEach','type','idField','content','variable','variableName','toString','Variable','name','toLowerCase','password','concat','securityToken','Connection','remoteUri','clientId','login','Connection\x20established.','queue','serverUrl','stripTrailingSlash','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','calleridname','Fields','integrationTab','user:%s','trigger:salesforce:display','trigger:browser:url','%s/%s/e','instanceUrl','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','catch','error','stringify','outbound','recordingFormat','none','[OUTBOUND]','email','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','newTab','Salesforce\x20account\x20type\x20not\x20recognized','unmanaged','monitor_format','toUpperCase','calleridnum','lastevent',']\x20Ticket\x20%s\x20created.','lodash','request-promise','moment','jsforce','util','ioredis','../../../../config/environment','salesforce','redis','defaults','localhost','socket.io-emitter','emit','Task','assign','utc','Subjects','getString','Descriptions','WhoId','ticketType','ContactId','sobject','isNil','User','find','execute'];(function(_0x275803,_0x24caad){var _0x422c17=function(_0x19019d){while(--_0x19019d){_0x275803['push'](_0x275803['shift']());}};_0x422c17(++_0x24caad);}(_0xd78d,0x126));var _0xdd78=function(_0x5bcf83,_0x3ffc79){_0x5bcf83=_0x5bcf83-0x0;var _0xa38a59=_0xd78d[_0x5bcf83];return _0xa38a59;};'use strict';var _=require(_0xdd78('0x0'));var rp=require(_0xdd78('0x1'));var moment=require(_0xdd78('0x2'));var BPromise=require('bluebird');var md5=require('md5');var jsforce=require(_0xdd78('0x3'));var util=require(_0xdd78('0x4'));var Redis=require(_0xdd78('0x5'));var intUtil=require('./util');var config=require(_0xdd78('0x6'));var logger=require('../../../../config/logger')(_0xdd78('0x7'));config[_0xdd78('0x8')]=_[_0xdd78('0x9')](config['redis'],{'host':_0xdd78('0xa'),'port':0x18eb});var io=require(_0xdd78('0xb'))(new Redis(config[_0xdd78('0x8')]));function emit(_0x3fa8f5,_0x22cc73,_0x3a105c){io['to'](_0x3fa8f5)[_0xdd78('0xc')](_0x22cc73,_0x3a105c);}function getTicket(_0x35f3c0,_0x1726ff,_0x189e45,_0x910cc1,_0x536c0f,_0x434b18,_0x436cc7,_0x3f6db6){var _0x2047f5={};if(_0x910cc1['ticketType']===_0xdd78('0xd')){_0x2047f5=Object[_0xdd78('0xe')]({},{'OwnerId':_0x1726ff['id'],'ActivityDate':moment[_0xdd78('0xf')](),'IsReminderSet':![],'IsRecurrence':![],'Subject':intUtil['getString'](_0x910cc1[_0xdd78('0x10')],_0x536c0f,'\x20'),'Description':intUtil[_0xdd78('0x11')](_0x910cc1[_0xdd78('0x12')],_0x536c0f,'\x0a')},getCustomFields(_0x434b18,_0x536c0f));if(_0x189e45){_0x2047f5[_0xdd78('0x13')]=_0x189e45['id'];}}else if(_0x910cc1[_0xdd78('0x14')]==='Case'){_0x2047f5=Object[_0xdd78('0xe')]({},{'OwnerId':_0x1726ff['id'],'Subject':intUtil[_0xdd78('0x11')](_0x910cc1['Subjects'],_0x536c0f,'\x20'),'Description':intUtil[_0xdd78('0x11')](_0x910cc1['Descriptions'],_0x536c0f,'\x0a')},getCustomFields(_0x434b18,_0x536c0f));if(_0x189e45){_0x2047f5[_0xdd78('0x15')]=_0x189e45['id'];}}return _0x436cc7[_0xdd78('0x16')](_0x910cc1[_0xdd78('0x14')])['create'](_0x2047f5);}function getUser(_0x526566,_0x2fbf94,_0x80cfdc){if(!_[_0xdd78('0x17')](_0x2fbf94)&&intUtil['validateEmail'](_0x2fbf94)){var _0x551d3e={'Email':_0x2fbf94};var _0x301bec={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x80cfdc[_0xdd78('0x16')](_0xdd78('0x18'))[_0xdd78('0x19')](_0x551d3e,_0x301bec)[_0xdd78('0x1a')]()[_0xdd78('0x1b')](function(_0x506d1c){if(_0x506d1c[_0xdd78('0x1c')]){var _0x3204c8=_[_0xdd78('0x19')](_0x506d1c,function(_0x20fac2){return _0x20fac2[_0xdd78('0x1d')]===_0x2fbf94;});if(_0x3204c8){logger['info'](_0xdd78('0x1e'),_0x2fbf94);return BPromise[_0xdd78('0x1f')]({'id':_0x3204c8['Id'],'name':_0x3204c8[_0xdd78('0x20')]});}}else{logger[_0xdd78('0x21')](_0xdd78('0x22'),_0x2fbf94);return _0x80cfdc[_0xdd78('0x23')]()[_0xdd78('0x1b')](function(_0x2fd095){return BPromise[_0xdd78('0x1f')]({'id':_0x2fd095['user_id'],'name':_0x2fd095[_0xdd78('0x24')]});});}});}else{logger[_0xdd78('0x21')](_0xdd78('0x22'),_0x2fbf94);return _0x80cfdc[_0xdd78('0x23')]()[_0xdd78('0x1b')](function(_0x3e0b52){return BPromise['resolve']({'id':_0x3e0b52[_0xdd78('0x25')],'name':_0x3e0b52[_0xdd78('0x24')]});});}}function getEndUser(_0x10bc87,_0x7f13bb,_0x227224,_0x35e924,_0x154cec){var _0xc77c4b={'Phone':_0x35e924};var _0x1a5158={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0xdd78('0x1f')]()[_0xdd78('0x1b')](function(){if(_0x7f13bb[_0xdd78('0x14')]===_0xdd78('0xd')){logger[_0xdd78('0x21')]('Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.',_0x35e924,_0x7f13bb[_0xdd78('0x26')]);switch(_0x7f13bb[_0xdd78('0x26')]){case'contact_lead':return _0x154cec[_0xdd78('0x16')](_0xdd78('0x27'))[_0xdd78('0x19')](_0xc77c4b,_0x1a5158)['execute']()[_0xdd78('0x1b')](function(_0x3de77d){if(_0x3de77d&&_0x3de77d['length']){return _0x3de77d;}else{return _0x154cec['sobject'](_0xdd78('0x28'))['find'](_0xc77c4b,_0x1a5158);}});case _0xdd78('0x29'):return _0x154cec[_0xdd78('0x16')](_0xdd78('0x27'))[_0xdd78('0x19')](_0xc77c4b,_0x1a5158)[_0xdd78('0x1a')]();case _0xdd78('0x2a'):return _0x154cec[_0xdd78('0x16')](_0xdd78('0x28'))['find'](_0xc77c4b,_0x1a5158);default:return null;}}else if(_0x7f13bb['ticketType']===_0xdd78('0x2b')){logger[_0xdd78('0x21')](_0xdd78('0x2c'),_0x35e924,_0xdd78('0x29'));return _0x154cec['sobject'](_0xdd78('0x27'))[_0xdd78('0x19')](_0xc77c4b,_0x1a5158)['execute']();}})[_0xdd78('0x1b')](function(_0x12a663){if(_0x12a663&&_0x12a663[_0xdd78('0x1c')]){var _0x2cb629=_[_0xdd78('0x19')](_0x12a663,function(_0x13c71a){return _0x13c71a['Phone']===_0x35e924;});if(_0x2cb629){return BPromise[_0xdd78('0x1f')]({'id':_0x2cb629['Id'],'name':_0x2cb629[_0xdd78('0x20')],'phone':_0x2cb629['Phone']});}}})['then'](function(_0x55487f){if(_0x55487f){logger[_0xdd78('0x21')](_0xdd78('0x2d'),_0x35e924);return BPromise['resolve'](_0x55487f);}else{logger[_0xdd78('0x21')](_0xdd78('0x2e'),_0x35e924);var _0x43d79d={'LastName':_0x227224!==_0xdd78('0x2f')?_0x227224:util[_0xdd78('0x30')]('Caller\x20-\x20%s',_0x35e924),'Phone':_0x35e924};if(_0x7f13bb['moduleCreate']){if(_0x7f13bb['moduleCreate']===_0xdd78('0x29')){logger['info'](_0xdd78('0x31'),_0x35e924,_0x7f13bb[_0xdd78('0x32')]);}else if(_0x7f13bb[_0xdd78('0x32')]==='lead'&&_0x7f13bb[_0xdd78('0x14')]==='Task'){logger[_0xdd78('0x21')](_0xdd78('0x31'),_0x35e924,_0x7f13bb['moduleCreate']);_0x43d79d[_0xdd78('0x33')]=_0xdd78('0x34');}else{return null;}}return _0x154cec['sobject'](_[_0xdd78('0x35')](_0x7f13bb[_0xdd78('0x32')]))['create'](_0x43d79d);}});}function getCustomFields(_0x4a5447,_0x518cce){var _0x266a83={};if(_0x4a5447[_0xdd78('0x1c')]>0x0){_[_0xdd78('0x36')](_0x4a5447,function(_0x41212c){if(_0x41212c[_0xdd78('0x37')]==='string'&&_0x41212c[_0xdd78('0x38')]){_0x266a83[_0x41212c[_0xdd78('0x38')]]=_0x41212c[_0xdd78('0x39')]['toString']();}else if(_0x41212c['type']===_0xdd78('0x3a')&&_0x41212c['variableName']&&_0x41212c[_0xdd78('0x38')]){_0x518cce[_0x41212c[_0xdd78('0x3b')]]&&(_0x266a83[_0x41212c[_0xdd78('0x38')]]=_0x518cce[_0x41212c['variableName']][_0xdd78('0x3c')]());}else if(_0x41212c['type']==='customVariable'&&_0x41212c[_0xdd78('0x3d')]&&_0x41212c[_0xdd78('0x3d')][_0xdd78('0x3e')]&&_0x41212c['idField']){_0x518cce[_0x41212c['Variable']['name'][_0xdd78('0x3f')]()]&&(_0x266a83[_0x41212c['idField']]=_0x518cce[_0x41212c['Variable']['name']['toLowerCase']()]['toString']());}});}return _0x266a83;}function getConnection(_0x25fc73){var _0x2189ab=_0x25fc73[_0xdd78('0x40')][_0xdd78('0x41')](_0x25fc73[_0xdd78('0x42')]);var _0x417c10=new jsforce[(_0xdd78('0x43'))]({'oauth2':{'loginUrl':_0x25fc73[_0xdd78('0x44')]||'https://login.salesforce.com','clientId':_0x25fc73[_0xdd78('0x45')],'clientSecret':_0x25fc73['clientSecret']}});return _0x417c10[_0xdd78('0x46')](_0x25fc73['username'],_0x2189ab)[_0xdd78('0x1b')](function(){logger['info'](_0xdd78('0x47'));return _0x417c10;});}exports[_0xdd78('0x48')]=function(_0x27a75b,_0x1ce727,_0x5b4a0b,_0x5c9c6b,_0x2ab6dc,_0x5d9421){var _0x3efd3d,_0x2ccabc,_0x27e880,_0x4efaa4;_0x5d9421[_0xdd78('0x49')]=intUtil[_0xdd78('0x4a')](_0x5d9421[_0xdd78('0x49')]);_0x5d9421[_0xdd78('0x44')]=intUtil[_0xdd78('0x4a')](_0x5d9421[_0xdd78('0x44')]);if(_0x2ab6dc&&_0x2ab6dc['monitor_format']){logger['info']('[QUEUE]',_0xdd78('0x4b'));_0x1ce727[_0xdd78('0x4c')]=util[_0xdd78('0x30')](_0xdd78('0x4d'),_0x5d9421[_0xdd78('0x49')],_0x1ce727[_0xdd78('0x4e')],md5(_0x1ce727[_0xdd78('0x4e')]));}else{_0x1ce727[_0xdd78('0x4c')]='';}return getConnection(_0x5d9421)['then'](function(_0x40edcf){_0x4efaa4=_0x40edcf;return getUser(_0x5d9421,_0x5c9c6b['email'],_0x4efaa4);})[_0xdd78('0x1b')](function(_0x4a9f24){_0x3efd3d=_0x4a9f24;return getEndUser(_0x5d9421,_0x5b4a0b,_0x1ce727[_0xdd78('0x4f')],_0x1ce727['calleridnum'],_0x4efaa4);})[_0xdd78('0x1b')](function(_0x50885a){_0x2ccabc=_0x50885a;return getTicket(_0x5d9421,_0x3efd3d,_0x2ccabc,_0x5b4a0b,_0x1ce727,_0x5b4a0b[_0xdd78('0x50')],_0x4efaa4,_0xdd78('0x48'));})['then'](function(_0x582959){_0x27e880=_0x582959;logger[_0xdd78('0x21')]('[QUEUE]\x20Ticket\x20%s\x20created',_0x27e880['id']);logger[_0xdd78('0x21')]('[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.',_0x27e880['id'],_0x5c9c6b[_0xdd78('0x3e')],_0x5d9421[_0xdd78('0x37')]);switch(_0x5d9421[_0xdd78('0x37')]){case _0xdd78('0x51'):emit(util[_0xdd78('0x30')](_0xdd78('0x52'),_0x5c9c6b[_0xdd78('0x3e')]),_0xdd78('0x53'),{'recordId':_0x27e880['id']});break;case'newTab':emit(util[_0xdd78('0x30')]('user:%s',_0x5c9c6b[_0xdd78('0x3e')]),_0xdd78('0x54'),{'uri':util[_0xdd78('0x30')](_0xdd78('0x55'),_0x4efaa4[_0xdd78('0x56')],_0x27e880['id'])});break;default:logger['error'](_0xdd78('0x57'));}})[_0xdd78('0x58')](function(_0x2f4ac0){logger[_0xdd78('0x59')]('[QUEUE]',JSON[_0xdd78('0x5a')](_0x2f4ac0));});};exports[_0xdd78('0x5b')]=function(_0x18e284,_0x3e1335,_0x8ba4e3,_0xb98d94,_0x450466,_0x58a7ef,_0x54ae93){var _0xaea8e9,_0x1a22e3,_0x589755,_0x546e74;_0x58a7ef[_0xdd78('0x49')]=intUtil[_0xdd78('0x4a')](_0x58a7ef[_0xdd78('0x49')]);_0x58a7ef[_0xdd78('0x44')]=intUtil[_0xdd78('0x4a')](_0x58a7ef[_0xdd78('0x44')]);if(_0x54ae93&&_0x54ae93[_0xdd78('0x5c')]&&_0x54ae93[_0xdd78('0x5c')]!==_0xdd78('0x5d')){logger[_0xdd78('0x21')](_0xdd78('0x5e'),_0xdd78('0x4b'));_0x3e1335[_0xdd78('0x4c')]=util[_0xdd78('0x30')](_0xdd78('0x4d'),_0x58a7ef[_0xdd78('0x49')],_0x3e1335[_0xdd78('0x4e')],md5(_0x3e1335['uniqueid']));}return getConnection(_0x58a7ef)[_0xdd78('0x1b')](function(_0x3790c6){_0x546e74=_0x3790c6;return getUser(_0x58a7ef,_0xb98d94[_0xdd78('0x5f')],_0x546e74);})[_0xdd78('0x1b')](function(_0x258e0c){_0xaea8e9=_0x258e0c;return getEndUser(_0x58a7ef,_0x8ba4e3,_0x3e1335[_0xdd78('0x60')],_0x3e1335[_0xdd78('0x61')],_0x546e74);})[_0xdd78('0x1b')](function(_0x20f8d3){_0x1a22e3=_0x20f8d3;return getTicket(_0x58a7ef,_0xaea8e9,_0x1a22e3,_0x8ba4e3,_0x3e1335,_0x8ba4e3['Fields'],_0x546e74,_0xdd78('0x5b'));})[_0xdd78('0x1b')](function(_0x599ca3){_0x589755=_0x599ca3;logger[_0xdd78('0x21')](_0xdd78('0x62'),_0x589755['id']);logger['info']('[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.',_0x589755['id'],_0xb98d94[_0xdd78('0x3e')],_0x58a7ef['type']);switch(_0x58a7ef['type']){case'integrationTab':emit(util['format'](_0xdd78('0x52'),_0xb98d94['name']),_0xdd78('0x53'),{'recordId':_0x589755['id']});break;case _0xdd78('0x63'):emit(util['format'](_0xdd78('0x52'),_0xb98d94[_0xdd78('0x3e')]),_0xdd78('0x54'),{'uri':util['format'](_0xdd78('0x55'),_0x546e74['instanceUrl'],_0x589755['id'])});break;default:logger[_0xdd78('0x59')](_0xdd78('0x5e'),_0xdd78('0x64'));}})[_0xdd78('0x58')](function(_0x3d0004){logger[_0xdd78('0x59')]('[OUTBOUND]',JSON[_0xdd78('0x5a')](_0x3d0004));});};exports[_0xdd78('0x65')]=function(_0x55a08f,_0x29df01,_0x160276,_0x537388,_0x59723a,_0x53d1b0){var _0x5e57fe,_0x531303,_0x177751,_0x47d537;_0x53d1b0[_0xdd78('0x49')]=intUtil[_0xdd78('0x4a')](_0x53d1b0['serverUrl']);_0x53d1b0[_0xdd78('0x44')]=intUtil[_0xdd78('0x4a')](_0x53d1b0[_0xdd78('0x44')]);if(_0x59723a&&_0x59723a[_0xdd78('0x66')]){logger[_0xdd78('0x21')]('['+_0x29df01['lastevent'][_0xdd78('0x67')]()+']',_0xdd78('0x4b'));_0x29df01[_0xdd78('0x4c')]=util['format'](_0xdd78('0x4d'),_0x53d1b0[_0xdd78('0x49')],_0x29df01[_0xdd78('0x4e')],md5(_0x29df01['uniqueid']));}else{_0x29df01[_0xdd78('0x4c')]='';}return getConnection(_0x53d1b0)[_0xdd78('0x1b')](function(_0x3a8971){_0x47d537=_0x3a8971;if(!_['isNil'](_0x537388)){return getUser(_0x53d1b0,_0x537388[_0xdd78('0x3e')],_0x47d537);}else{return getUser(_0x53d1b0,null,_0x47d537);}})[_0xdd78('0x1b')](function(_0x19e69b){_0x5e57fe=_0x19e69b;return getEndUser(_0x53d1b0,_0x160276,_0x29df01[_0xdd78('0x4f')],_0x29df01[_0xdd78('0x68')],_0x47d537);})[_0xdd78('0x1b')](function(_0x22ebf7){_0x531303=_0x22ebf7;return getTicket(_0x53d1b0,_0x5e57fe,_0x531303,_0x160276,_0x29df01,_0x160276[_0xdd78('0x50')],_0x47d537);})[_0xdd78('0x1b')](function(_0x44dfa2){_0x177751=_0x44dfa2;logger[_0xdd78('0x21')]('['+_0x29df01[_0xdd78('0x69')][_0xdd78('0x67')]()+_0xdd78('0x6a'),_0x177751['id']);logger[_0xdd78('0x21')]('['+_0x29df01[_0xdd78('0x69')]['toUpperCase']()+']\x20Integration\x20account\x20type\x20%s.',_0x53d1b0['type']);})[_0xdd78('0x58')](function(_0x51105f){logger['error']('['+_0x29df01['lastevent'][_0xdd78('0x67')]()+']',JSON[_0xdd78('0x5a')](_0x51105f));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/servicenow.js b/server/services/ami/trigger/integration/servicenow.js index 67e4e8b..0e7cedb 100644 --- a/server/services/ami/trigger/integration/servicenow.js +++ b/server/services/ami/trigger/integration/servicenow.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc4aa=['all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','map','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','trigger:browser:url','username','sysparm_limit=1','remoteUri','stripTrailingSlash','isNil','email','destcalleridnum','calleridnum','queue','uniqueid','monitor_format','Recording\x20is\x20enabled!','recordingURL','none','[OUTBOUND]','call\x20direction:\x20%s','unmanaged','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20ServiceNow\x20integration','inspect','lodash','bluebird','request-promise','util','md5','ioredis','servicenow','redis','defaults','localhost','socket.io-emitter','GET','then','result','adminId','sys_id','toUpperCase','],\x20getAdminUser\x20crm','catch','error','message','info','],\x20getUser\x20input\x20crm','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','],\x20getUser\x20entity','length','active','true','userId','adminEmail','],\x20getUser\x20crm',']\x20using\x20admin\x20profile','],\x20createEndUser\x20input\x20crm','sys_user?','endUserNumber','user','],\x20EndUser\x20schema','endUserId','sys_user?sysparm_query=phone%3D','],\x20getEndUser\x20crm','forEach','type','string','nameField','customField','idField','toLowerCase','content','toString','variable','variableName','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','outbound','incident','getString','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketId','number',']\x20getTicket\x20crm','label','POST','ticketNumber','push'];(function(_0x2fdf02,_0x13700c){var _0x5b559c=function(_0x53226e){while(--_0x53226e){_0x2fdf02['push'](_0x2fdf02['shift']());}};_0x5b559c(++_0x13700c);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0xc4aa[_0x1d1779];return _0x2377e9;};'use strict';var _=require(_0xac4a('0x0'));var Promise=require(_0xac4a('0x1'));var rp=require(_0xac4a('0x2'));var util=require(_0xac4a('0x3'));var md5=require(_0xac4a('0x4'));var Redis=require(_0xac4a('0x5'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0xac4a('0x6'));config[_0xac4a('0x7')]=_[_0xac4a('0x8')](config[_0xac4a('0x7')],{'host':_0xac4a('0x9'),'port':0x18eb});var io=require(_0xac4a('0xa'))(new Redis(config[_0xac4a('0x7')]));function getAdminUser(_0x10525b,_0x5c6179,_0x5b8339,_0x1aba6d,_0x2a4d53,_0x26ec84){return new Promise(function(_0x4f4146,_0x1d182e){var _0x3a82de={'method':_0xac4a('0xb'),'uri':_0x1aba6d+'sys_user?sysparm_query=user_name%3Dadmin'+'&'+_0x2a4d53+'&'+_0x26ec84,'auth':_0x5c6179,'json':!![]};return rp(_0x3a82de)[_0xac4a('0xc')](function(_0x488e3c){if(_0x488e3c[_0xac4a('0xd')]['length']>0x0){_0x5b8339[_0xac4a('0xe')]=_0x488e3c[_0xac4a('0xd')][0x0][_0xac4a('0xf')];}logger['info']('['+[_0x10525b[_0xac4a('0x10')]()]+_0xac4a('0x11'),_0x5b8339);_0x4f4146(_0x5b8339);})[_0xac4a('0x12')](function(_0x6e00d4){logger[_0xac4a('0x13')]('['+[_0x10525b[_0xac4a('0x10')]()]+']',_0x6e00d4[_0xac4a('0x14')]);_0x1d182e(_0x6e00d4[_0xac4a('0x14')]);});});}function getUser(_0x190418,_0x42c7fc,_0x11e101,_0x26dbb8,_0x4a2119){return function(_0x402fff){logger[_0xac4a('0x15')]('['+[_0x190418[_0xac4a('0x10')]()]+_0xac4a('0x16'),_0x402fff);return new Promise(function(_0x3e88e3,_0x387a54){if(intUtil[_0xac4a('0x17')](_0x402fff[_0xac4a('0x18')])){var _0x546c5d={'method':'GET','uri':_0x11e101+_0xac4a('0x19')+_0x402fff[_0xac4a('0x18')]+'&'+_0x26dbb8+'&'+_0x4a2119,'auth':_0x42c7fc,'json':!![]};logger[_0xac4a('0x15')]('['+[_0x190418['toUpperCase']()]+_0xac4a('0x1a'),_0x546c5d);return rp(_0x546c5d)[_0xac4a('0xc')](function(_0x3752e4){logger[_0xac4a('0x15')]('['+[_0x190418[_0xac4a('0x10')]()]+_0xac4a('0x1b'),_0x3752e4);if(_0x3752e4[_0xac4a('0xd')][_0xac4a('0x1c')]>0x0&&String(_0x3752e4['result'][0x0][_0xac4a('0x1d')])===_0xac4a('0x1e')){_0x402fff['userId']=_0x3752e4[_0xac4a('0xd')][0x0][_0xac4a('0xf')];}else{_0x402fff[_0xac4a('0x1f')]=_0x402fff[_0xac4a('0xe')];_0x402fff['userEmail']=_0x402fff[_0xac4a('0x20')];}logger[_0xac4a('0x15')]('['+[_0x190418[_0xac4a('0x10')]()]+_0xac4a('0x21'),_0x402fff);_0x3e88e3(_0x402fff);})[_0xac4a('0x12')](function(_0x2b0dc2){logger[_0xac4a('0x13')]('['+[_0x190418[_0xac4a('0x10')]()]+']',_0x2b0dc2[_0xac4a('0x14')]);_0x387a54(_0x2b0dc2[_0xac4a('0x14')]);});}else{logger[_0xac4a('0x15')]('['+[_0x190418[_0xac4a('0x10')]()]+_0xac4a('0x22'));_0x402fff[_0xac4a('0x1f')]=_0x402fff[_0xac4a('0xe')];_0x402fff[_0xac4a('0x18')]=_0x402fff['adminEmail'];_0x3e88e3(_0x402fff);}});};}function createEndUser(_0x23b061,_0x267a22,_0x42a33c,_0x2772fe,_0x116700){logger['info']('['+[_0x23b061['toUpperCase']()]+_0xac4a('0x23'),_0x42a33c);return new Promise(function(_0x7a948b,_0x1f12d5){var _0x546b65={'method':'POST','uri':_0x2772fe+_0xac4a('0x24')+_0x116700,'body':{'user_name':_0x42a33c[_0xac4a('0x25')],'roles':_0xac4a('0x26'),'first_name':_0x42a33c[_0xac4a('0x25')],'active':_0xac4a('0x1e'),'date_format':'System','phone':_0x42a33c[_0xac4a('0x25')]},'auth':_0x267a22,'json':!![]};return rp(_0x546b65)['then'](function(_0x30364b){logger['info']('['+[_0x23b061[_0xac4a('0x10')]()]+_0xac4a('0x27'),_0x30364b[_0xac4a('0xd')]);_0x42a33c[_0xac4a('0x28')]=_0x30364b[_0xac4a('0xd')][_0xac4a('0xf')];_0x7a948b(_0x42a33c);})[_0xac4a('0x12')](function(_0x1f13f3){logger[_0xac4a('0x13')]('['+[_0x23b061[_0xac4a('0x10')]()]+']',_0x1f13f3[_0xac4a('0x14')]);_0x1f12d5(_0x1f13f3[_0xac4a('0x14')]);});});}function getEndUser(_0x1a9be2,_0x1a9d4e,_0x5634e2,_0x30442d,_0x1c41fb){return function(_0x5a4e2b){logger[_0xac4a('0x15')]('['+[_0x1a9be2[_0xac4a('0x10')]()]+'],\x20getEndUser\x20input\x20crm',_0x5a4e2b);return new Promise(function(_0x58804b,_0x11f0be){var _0x1ba096={'method':_0xac4a('0xb'),'uri':_0x5634e2+_0xac4a('0x29')+_0x5a4e2b['endUserNumber']+'&'+_0x30442d+'&'+_0x1c41fb,'auth':_0x1a9d4e,'json':!![]};return rp(_0x1ba096)[_0xac4a('0xc')](function(_0x2e56c6){if(_0x2e56c6['result'][_0xac4a('0x1c')]>0x0){_0x5a4e2b[_0xac4a('0x28')]=_0x2e56c6[_0xac4a('0xd')][0x0]['sys_id'];logger[_0xac4a('0x15')]('['+[_0x1a9be2[_0xac4a('0x10')]()]+_0xac4a('0x2a'),_0x5a4e2b);_0x58804b(_0x5a4e2b);}else{return createEndUser(_0x1a9be2,_0x1a9d4e,_0x5a4e2b,_0x5634e2,_0x30442d)['then'](function(_0x35bc94){logger[_0xac4a('0x15')]('['+[_0x1a9be2['toUpperCase']()]+'],\x20createEndUser\x20crm',_0x35bc94);_0x58804b(_0x35bc94);});}})[_0xac4a('0x12')](function(_0x5e0926){logger['error']('['+[_0x1a9be2['toUpperCase']()]+']',_0x5e0926['message']);_0x11f0be(_0x5e0926[_0xac4a('0x14')]);});});};}function getCustomFields(_0x2bf8e8,_0x37834b){var _0x472484={};if(_0x2bf8e8[_0xac4a('0x1c')]>0x0){_[_0xac4a('0x2b')](_0x2bf8e8,function(_0x4220e2){if(_0x4220e2[_0xac4a('0x2c')]===_0xac4a('0x2d')&&_0x4220e2[_0xac4a('0x2e')]&&!_0x4220e2[_0xac4a('0x2f')]){_0x472484[_0x4220e2[_0xac4a('0x30')]['toLowerCase']()]=_0x4220e2['content']['toString']();}else if(_0x4220e2[_0xac4a('0x2c')]===_0xac4a('0x2d')&&_0x4220e2[_0xac4a('0x30')]&&_0x4220e2[_0xac4a('0x2f')]){_0x472484[_0x4220e2[_0xac4a('0x30')][_0xac4a('0x31')]()]=_0x4220e2[_0xac4a('0x32')][_0xac4a('0x33')]();}else if(_0x4220e2[_0xac4a('0x2c')]===_0xac4a('0x34')&&_0x4220e2['variableName']&&_0x4220e2[_0xac4a('0x30')]&&_0x4220e2[_0xac4a('0x2f')]){_0x472484[_0x4220e2[_0xac4a('0x30')][_0xac4a('0x31')]()]=_0x37834b[_0x4220e2[_0xac4a('0x35')]]['toString']();}else if(_0x4220e2[_0xac4a('0x2c')]===_0xac4a('0x36')&&_0x4220e2['Variable']&&_0x4220e2[_0xac4a('0x37')]['name']&&_0x4220e2[_0xac4a('0x30')]&&_0x4220e2[_0xac4a('0x2f')]){_0x472484[_0x4220e2[_0xac4a('0x30')][_0xac4a('0x31')]()]=_0x37834b[_0x4220e2[_0xac4a('0x37')][_0xac4a('0x38')][_0xac4a('0x31')]()][_0xac4a('0x33')]();}});}return _0x472484;}function getTicket(_0x98e0c4,_0xcb002b,_0x4fa9eb,_0x3b68b3,_0x569812,_0x1646ea){return function(_0x41d11d){logger[_0xac4a('0x15')]('['+[_0x98e0c4['toUpperCase']()]+_0xac4a('0x39'),_0x41d11d);return new Promise(function(_0x19276e,_0x5f54ff){var _0x42969b=_0x98e0c4['toLowerCase']()===_0xac4a('0x3a')?_0x41d11d[_0xac4a('0x1f')]:_0x41d11d[_0xac4a('0x28')];var _0x5e3581={'method':'POST','uri':_0x4fa9eb+_0xac4a('0x3b')+'?'+_0x1646ea,'body':Object['assign']({},{'active':_0xac4a('0x1e'),'caller_id':_0x42969b,'assigned_to':_0x41d11d['userId'],'short_description':intUtil[_0xac4a('0x3c')](_0x3b68b3['Subjects'],_0x569812,'\x20'),'description':intUtil[_0xac4a('0x3c')](_0x3b68b3[_0xac4a('0x3d')],_0x569812,'\x0a')},getCustomFields(_0x3b68b3[_0xac4a('0x3e')],_0x569812)),'auth':_0xcb002b,'json':!![]};return rp(_0x5e3581)[_0xac4a('0xc')](function(_0x54782f){logger[_0xac4a('0x15')]('['+[_0x98e0c4[_0xac4a('0x10')]()]+_0xac4a('0x3f'),_0x54782f[_0xac4a('0xd')]);_0x41d11d[_0xac4a('0x40')]=_0x54782f[_0xac4a('0xd')][_0xac4a('0xf')];_0x41d11d['ticketNumber']=_0x54782f[_0xac4a('0xd')][_0xac4a('0x41')];logger['info']('['+[_0x98e0c4[_0xac4a('0x10')]()]+_0xac4a('0x42'),_0x41d11d);_0x19276e(_0x41d11d);})[_0xac4a('0x12')](function(_0x3ac36e){logger['error']('['+[_0x98e0c4[_0xac4a('0x10')]()]+']',_0x3ac36e[_0xac4a('0x14')]);_0x5f54ff(_0x3ac36e[_0xac4a('0x14')]);});});};}function createRemoteTag(_0x129d58,_0x890910,_0x49fbc3,_0x179373){return new Promise(function(_0x564b10,_0x307441){var _0x2c04af={'method':'POST','uri':_0x49fbc3+'label'+'?'+_0x179373,'body':{'short_description':_0x129d58,'global':!![],'active':!![],'name':_0x129d58},'auth':_0x890910,'json':!![]};return rp(_0x2c04af)[_0xac4a('0xc')](function(_0x70fdc3){var _0x4d448f=_0x70fdc3[_0xac4a('0xd')][_0xac4a('0xf')];_0x564b10(_0x4d448f);});});}function getRemoteTag(_0x26b582,_0x103d05,_0x48900f,_0x3057d6,_0x108f7c){return new Promise(function(_0xb43fdb,_0xb5897b){var _0xdc80e3={'method':_0xac4a('0xb'),'uri':_0x48900f+_0xac4a('0x43')+'?sysparm_query=name%3D'+_0x26b582+'&'+_0x3057d6,'auth':_0x103d05,'json':!![]};return rp(_0xdc80e3)[_0xac4a('0xc')](function(_0xef51d0){if(_0xef51d0[_0xac4a('0xd')][_0xac4a('0x1c')]>0x0){var _0x1b7231=_0xef51d0[_0xac4a('0xd')][0x0][_0xac4a('0xf')];_0xb43fdb(_0x1b7231);}else{return createRemoteTag(_0x26b582,_0x103d05,_0x48900f,_0x3057d6)[_0xac4a('0xc')](function(_0x159e43){_0xb43fdb(_0x159e43);});}});});}function assignTagToIncident(_0x786d9,_0x3b175a,_0x38dd4f,_0x400ac4,_0x2fe7df){return new Promise(function(_0x5222f3,_0x11c753){var _0x492aae={'method':_0xac4a('0x44'),'uri':_0x38dd4f+'label_entry'+'?'+_0x2fe7df,'body':{'label':_0x786d9,'table':_0xac4a('0x3b'),'id_type':'Incident','table_key':_0x400ac4[_0xac4a('0x40')],'title':'Incident\x20-\x20'+_0x400ac4[_0xac4a('0x45')],'id_display':_0x400ac4['ticketNumber']},'auth':_0x3b175a,'json':!![]};return rp(_0x492aae)['then'](function(_0x52c957){_0x5222f3();})[_0xac4a('0x12')](function(){_0x5222f3();});});}function manageTags(_0x3bcae2,_0x3c2f84,_0x2f9940,_0xb7b884,_0x592a4b,_0x1e1ffa,_0x50dece){return new Promise(function(_0x34215e,_0x5d03e5){var _0x347880=[];_0x3c2f84[_0xac4a('0x2b')](function(_0x3da7e7){_0x347880[_0xac4a('0x46')](getRemoteTag(_0x3da7e7,_0x2f9940,_0xb7b884,_0x1e1ffa,_0x50dece));});return Promise[_0xac4a('0x47')](_0x347880)[_0xac4a('0xc')](function(_0x3abd57){if(_0x3abd57[_0xac4a('0x1c')]){logger[_0xac4a('0x15')]('['+[_0x3bcae2[_0xac4a('0x10')]()]+_0xac4a('0x48'),_0x3abd57);var _0x2498ad=[];_0x3abd57[_0xac4a('0x2b')](function(_0x2cc410){_0x2498ad[_0xac4a('0x46')](assignTagToIncident(_0x2cc410,_0x2f9940,_0xb7b884,_0x592a4b,_0x1e1ffa));});return Promise[_0xac4a('0x47')](_0x2498ad)[_0xac4a('0xc')](function(){_0x34215e();})['catch'](function(){_0x34215e();});}else{_0x34215e();}});});}function getTags(_0xa90d71,_0x1672c0,_0x4fb812,_0x3c3576,_0x34bd1c,_0x2d24c7){return function(_0x2b8562){return new Promise(function(_0x357cac,_0x4d1440){var _0x47c6d8=[];var _0x45f3c3=_0x3c3576[_0xac4a('0x49')];if(_0x45f3c3&&_0x45f3c3[_0xac4a('0x1c')]>0x0){_0x47c6d8=_[_0xac4a('0x4a')](_0x45f3c3,_0xac4a('0x38'));}if(_0x47c6d8[_0xac4a('0x1c')]>0x0){return manageTags(_0xa90d71,_0x47c6d8,_0x1672c0,_0x4fb812,_0x2b8562,_0x34bd1c,_0x2d24c7)[_0xac4a('0xc')](function(){_0x357cac(_0x2b8562);});}else{_0x357cac(_0x2b8562);}});};}function emit(_0x2988d7,_0x44c60b,_0x295f21){var _0x278c09='%26sysparm_record_target%3Dincident'+'%26sysparm_record_row%3D1%26sysparm_record_rows%3D39'+_0xac4a('0x4b')+_0xac4a('0x4c');var _0x2954fc={'uri':_0x2988d7+_0xac4a('0x4d')+_0x295f21+_0x278c09};io['to'](util[_0xac4a('0x4e')](_0xac4a('0x4f'),_0x44c60b))[_0xac4a('0x50')](_0xac4a('0x51'),_0x2954fc);}exports['cs']=function(_0x453d62,_0x2a5acc,_0xb09b89,_0xb12cc5,_0x5f0173,_0x13c854,_0xc74ce8,_0x26bd31){var _0x231932={};var _0x513976={'user':_0x13c854[_0xac4a('0x52')],'pass':_0x13c854['password']};var _0xab4305=_0xac4a('0x53');var _0x499abc='sysparm_display_value=true';_0x13c854[_0xac4a('0x54')]=intUtil[_0xac4a('0x55')](_0x13c854[_0xac4a('0x54')]);_0x13c854['serverUrl']=intUtil[_0xac4a('0x55')](_0x13c854['serverUrl']);var _0x114b11=util['format']('%s/api/now/table/',_0x13c854[_0xac4a('0x54')]);_0x231932['userEmail']=!_[_0xac4a('0x56')](_0xb12cc5)?_0xb12cc5['email']:null;_0x231932[_0xac4a('0x20')]=_0x13c854[_0xac4a('0x57')];_0x231932['endUserNumber']=_0x26bd31[_0xac4a('0x31')]()==='outbound'?_0x2a5acc[_0xac4a('0x58')]:_0x2a5acc[_0xac4a('0x59')];_0x231932['callDirection']=_0x26bd31===_0xac4a('0x5a')||_0x26bd31==='unmanaged'?'queue':_0xac4a('0x3a');var _0x4e3129=util[_0xac4a('0x4e')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x13c854['serverUrl'],_0x2a5acc[_0xac4a('0x5b')],md5(_0x2a5acc[_0xac4a('0x5b')]));if(_0x5f0173&&_0x5f0173[_0xac4a('0x5c')]){logger['info']('[QUEUE]',_0xac4a('0x5d'));_0x2a5acc[_0xac4a('0x5e')]=_0x4e3129;}else if(_0xc74ce8&&_0xc74ce8['recordingFormat']&&_0xc74ce8['recordingFormat']!==_0xac4a('0x5f')){logger[_0xac4a('0x15')](_0xac4a('0x60'),_0xac4a('0x5d'));_0x2a5acc[_0xac4a('0x5e')]=_0x4e3129;}else{_0x2a5acc[_0xac4a('0x5e')]='';}return getAdminUser(_0x26bd31,_0x513976,_0x231932,_0x114b11,_0x499abc,_0xab4305)[_0xac4a('0xc')](getUser(_0x26bd31,_0x513976,_0x114b11,_0x499abc,_0xab4305))[_0xac4a('0xc')](getEndUser(_0x26bd31,_0x513976,_0x114b11,_0x499abc,_0xab4305))[_0xac4a('0xc')](getTicket(_0x26bd31,_0x513976,_0x114b11,_0xb09b89,_0x2a5acc,_0x499abc))['then'](function(_0x1201e8){logger[_0xac4a('0x15')](util[_0xac4a('0x4e')]('The\x20ticket\x20ID\x20is:\x20%s',_0x1201e8[_0xac4a('0x40')]));logger[_0xac4a('0x15')](util[_0xac4a('0x4e')](_0xac4a('0x61'),_0x26bd31));if(_0x26bd31!==_0xac4a('0x62')){logger['info']('['+[_0x26bd31[_0xac4a('0x10')]()]+']',_0xac4a('0x63'));emit(_0x13c854[_0xac4a('0x54')],_0xb12cc5[_0xac4a('0x38')],_0x1201e8[_0xac4a('0x40')]);}})[_0xac4a('0x12')](function(_0xd7bdd6){logger['error']('['+[_0x26bd31[_0xac4a('0x10')]()]+_0xac4a('0x64'),util[_0xac4a('0x65')](_0xd7bdd6,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x2ef3=['userEmail','GET','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','],\x20getUser\x20entity','length','true','userId','adminEmail','],\x20getUser\x20crm',']\x20using\x20admin\x20profile','],\x20createEndUser\x20input\x20crm','POST','sys_user?','endUserNumber','user','],\x20EndUser\x20schema','endUserId','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','forEach','type','nameField','customField','idField','toLowerCase','content','toString','variable','variableName','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','outbound','incident','assign','getString','Subjects','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketId','ticketNumber','number','catch','label','?sysparm_query=name%3D','label_entry','Incident','push','all','Tags','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','format','emit','trigger:browser:url','username','sysparm_limit=1','sysparm_display_value=true','remoteUri','stripTrailingSlash','serverUrl','isNil','calleridnum','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','recordingURL','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','call\x20direction:\x20%s',']\x20Error\x20running\x20ServiceNow\x20integration','lodash','bluebird','request-promise','util','md5','ioredis','../../../../config/environment','../../../../config/logger','redis','defaults','socket.io-emitter','sys_user?sysparm_query=user_name%3Dadmin','then','result','adminId','sys_id','toUpperCase','],\x20getAdminUser\x20crm','error','message','info','validateEmail'];(function(_0x28b035,_0xfa6753){var _0x5467ce=function(_0xf20440){while(--_0xf20440){_0x28b035['push'](_0x28b035['shift']());}};_0x5467ce(++_0xfa6753);}(_0x2ef3,0xba));var _0x32ef=function(_0x3a04e4,_0xa213d){_0x3a04e4=_0x3a04e4-0x0;var _0x358d45=_0x2ef3[_0x3a04e4];return _0x358d45;};'use strict';var _=require(_0x32ef('0x0'));var Promise=require(_0x32ef('0x1'));var rp=require(_0x32ef('0x2'));var util=require(_0x32ef('0x3'));var md5=require(_0x32ef('0x4'));var Redis=require(_0x32ef('0x5'));var intUtil=require('./util');var config=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('servicenow');config[_0x32ef('0x8')]=_[_0x32ef('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x32ef('0xa'))(new Redis(config[_0x32ef('0x8')]));function getAdminUser(_0x367c39,_0x2fb8eb,_0x234863,_0x298066,_0x2484a0,_0x2bbb50){return new Promise(function(_0x28275c,_0x77df79){var _0x56eb42={'method':'GET','uri':_0x298066+_0x32ef('0xb')+'&'+_0x2484a0+'&'+_0x2bbb50,'auth':_0x2fb8eb,'json':!![]};return rp(_0x56eb42)[_0x32ef('0xc')](function(_0x45bfd5){if(_0x45bfd5[_0x32ef('0xd')]['length']>0x0){_0x234863[_0x32ef('0xe')]=_0x45bfd5['result'][0x0][_0x32ef('0xf')];}logger['info']('['+[_0x367c39[_0x32ef('0x10')]()]+_0x32ef('0x11'),_0x234863);_0x28275c(_0x234863);})['catch'](function(_0x539d18){logger[_0x32ef('0x12')]('['+[_0x367c39['toUpperCase']()]+']',_0x539d18[_0x32ef('0x13')]);_0x77df79(_0x539d18[_0x32ef('0x13')]);});});}function getUser(_0x93d492,_0x54c7f5,_0x57aff1,_0x55bf0b,_0x531e30){return function(_0x13db1a){logger[_0x32ef('0x14')]('['+[_0x93d492[_0x32ef('0x10')]()]+'],\x20getUser\x20input\x20crm',_0x13db1a);return new Promise(function(_0x5d559b,_0x1eb468){if(intUtil[_0x32ef('0x15')](_0x13db1a[_0x32ef('0x16')])){var _0x57863c={'method':_0x32ef('0x17'),'uri':_0x57aff1+_0x32ef('0x18')+_0x13db1a['userEmail']+'&'+_0x55bf0b+'&'+_0x531e30,'auth':_0x54c7f5,'json':!![]};logger[_0x32ef('0x14')]('['+[_0x93d492[_0x32ef('0x10')]()]+_0x32ef('0x19'),_0x57863c);return rp(_0x57863c)[_0x32ef('0xc')](function(_0x445cda){logger[_0x32ef('0x14')]('['+[_0x93d492['toUpperCase']()]+_0x32ef('0x1a'),_0x445cda);if(_0x445cda['result'][_0x32ef('0x1b')]>0x0&&String(_0x445cda[_0x32ef('0xd')][0x0]['active'])===_0x32ef('0x1c')){_0x13db1a[_0x32ef('0x1d')]=_0x445cda[_0x32ef('0xd')][0x0]['sys_id'];}else{_0x13db1a['userId']=_0x13db1a[_0x32ef('0xe')];_0x13db1a[_0x32ef('0x16')]=_0x13db1a[_0x32ef('0x1e')];}logger['info']('['+[_0x93d492['toUpperCase']()]+_0x32ef('0x1f'),_0x13db1a);_0x5d559b(_0x13db1a);})['catch'](function(_0x51a412){logger[_0x32ef('0x12')]('['+[_0x93d492[_0x32ef('0x10')]()]+']',_0x51a412[_0x32ef('0x13')]);_0x1eb468(_0x51a412[_0x32ef('0x13')]);});}else{logger[_0x32ef('0x14')]('['+[_0x93d492[_0x32ef('0x10')]()]+_0x32ef('0x20'));_0x13db1a[_0x32ef('0x1d')]=_0x13db1a[_0x32ef('0xe')];_0x13db1a[_0x32ef('0x16')]=_0x13db1a[_0x32ef('0x1e')];_0x5d559b(_0x13db1a);}});};}function createEndUser(_0xba4b3f,_0x5a88a5,_0xd65fde,_0x2f5d06,_0x5a04cd){logger[_0x32ef('0x14')]('['+[_0xba4b3f[_0x32ef('0x10')]()]+_0x32ef('0x21'),_0xd65fde);return new Promise(function(_0x26e207,_0x50a95b){var _0x10e38c={'method':_0x32ef('0x22'),'uri':_0x2f5d06+_0x32ef('0x23')+_0x5a04cd,'body':{'user_name':_0xd65fde[_0x32ef('0x24')],'roles':_0x32ef('0x25'),'first_name':_0xd65fde[_0x32ef('0x24')],'active':_0x32ef('0x1c'),'date_format':'System','phone':_0xd65fde[_0x32ef('0x24')]},'auth':_0x5a88a5,'json':!![]};return rp(_0x10e38c)['then'](function(_0x38bf73){logger[_0x32ef('0x14')]('['+[_0xba4b3f['toUpperCase']()]+_0x32ef('0x26'),_0x38bf73[_0x32ef('0xd')]);_0xd65fde[_0x32ef('0x27')]=_0x38bf73[_0x32ef('0xd')][_0x32ef('0xf')];_0x26e207(_0xd65fde);})['catch'](function(_0x50ecd6){logger[_0x32ef('0x12')]('['+[_0xba4b3f['toUpperCase']()]+']',_0x50ecd6[_0x32ef('0x13')]);_0x50a95b(_0x50ecd6[_0x32ef('0x13')]);});});}function getEndUser(_0x2f1349,_0x390670,_0x389583,_0x22fa1a,_0x566b56){return function(_0x482d3a){logger['info']('['+[_0x2f1349[_0x32ef('0x10')]()]+_0x32ef('0x28'),_0x482d3a);return new Promise(function(_0x136b02,_0x5f2443){var _0x4fb402={'method':_0x32ef('0x17'),'uri':_0x389583+_0x32ef('0x29')+_0x482d3a[_0x32ef('0x24')]+'&'+_0x22fa1a+'&'+_0x566b56,'auth':_0x390670,'json':!![]};return rp(_0x4fb402)['then'](function(_0x4abbd6){if(_0x4abbd6[_0x32ef('0xd')][_0x32ef('0x1b')]>0x0){_0x482d3a[_0x32ef('0x27')]=_0x4abbd6[_0x32ef('0xd')][0x0][_0x32ef('0xf')];logger[_0x32ef('0x14')]('['+[_0x2f1349[_0x32ef('0x10')]()]+_0x32ef('0x2a'),_0x482d3a);_0x136b02(_0x482d3a);}else{return createEndUser(_0x2f1349,_0x390670,_0x482d3a,_0x389583,_0x22fa1a)[_0x32ef('0xc')](function(_0x4de939){logger[_0x32ef('0x14')]('['+[_0x2f1349[_0x32ef('0x10')]()]+_0x32ef('0x2b'),_0x4de939);_0x136b02(_0x4de939);});}})['catch'](function(_0x365125){logger[_0x32ef('0x12')]('['+[_0x2f1349[_0x32ef('0x10')]()]+']',_0x365125[_0x32ef('0x13')]);_0x5f2443(_0x365125[_0x32ef('0x13')]);});});};}function getCustomFields(_0x33a0fb,_0x256c40){var _0x1cebed={};if(_0x33a0fb[_0x32ef('0x1b')]>0x0){_[_0x32ef('0x2c')](_0x33a0fb,function(_0xb4db74){if(_0xb4db74[_0x32ef('0x2d')]==='string'&&_0xb4db74[_0x32ef('0x2e')]&&!_0xb4db74[_0x32ef('0x2f')]){_0x1cebed[_0xb4db74[_0x32ef('0x30')][_0x32ef('0x31')]()]=_0xb4db74[_0x32ef('0x32')][_0x32ef('0x33')]();}else if(_0xb4db74[_0x32ef('0x2d')]==='string'&&_0xb4db74['idField']&&_0xb4db74[_0x32ef('0x2f')]){_0x1cebed[_0xb4db74[_0x32ef('0x30')][_0x32ef('0x31')]()]=_0xb4db74[_0x32ef('0x32')]['toString']();}else if(_0xb4db74[_0x32ef('0x2d')]===_0x32ef('0x34')&&_0xb4db74['variableName']&&_0xb4db74[_0x32ef('0x30')]&&_0xb4db74['customField']){_0x1cebed[_0xb4db74[_0x32ef('0x30')][_0x32ef('0x31')]()]=_0x256c40[_0xb4db74[_0x32ef('0x35')]][_0x32ef('0x33')]();}else if(_0xb4db74[_0x32ef('0x2d')]===_0x32ef('0x36')&&_0xb4db74[_0x32ef('0x37')]&&_0xb4db74[_0x32ef('0x37')][_0x32ef('0x38')]&&_0xb4db74[_0x32ef('0x30')]&&_0xb4db74['customField']){_0x1cebed[_0xb4db74[_0x32ef('0x30')]['toLowerCase']()]=_0x256c40[_0xb4db74[_0x32ef('0x37')][_0x32ef('0x38')][_0x32ef('0x31')]()]['toString']();}});}return _0x1cebed;}function getTicket(_0x502113,_0x230ac9,_0x37b954,_0x241f82,_0x35b4e0,_0x40bf12){return function(_0x12c9e6){logger['info']('['+[_0x502113['toUpperCase']()]+_0x32ef('0x39'),_0x12c9e6);return new Promise(function(_0x270826,_0x27d65b){var _0x13b270=_0x502113[_0x32ef('0x31')]()===_0x32ef('0x3a')?_0x12c9e6[_0x32ef('0x1d')]:_0x12c9e6[_0x32ef('0x27')];var _0xc10e7={'method':_0x32ef('0x22'),'uri':_0x37b954+_0x32ef('0x3b')+'?'+_0x40bf12,'body':Object[_0x32ef('0x3c')]({},{'active':_0x32ef('0x1c'),'caller_id':_0x13b270,'assigned_to':_0x12c9e6['userId'],'short_description':intUtil[_0x32ef('0x3d')](_0x241f82[_0x32ef('0x3e')],_0x35b4e0,'\x20'),'description':intUtil[_0x32ef('0x3d')](_0x241f82[_0x32ef('0x3f')],_0x35b4e0,'\x0a')},getCustomFields(_0x241f82[_0x32ef('0x40')],_0x35b4e0)),'auth':_0x230ac9,'json':!![]};return rp(_0xc10e7)[_0x32ef('0xc')](function(_0x278696){logger[_0x32ef('0x14')]('['+[_0x502113[_0x32ef('0x10')]()]+_0x32ef('0x41'),_0x278696[_0x32ef('0xd')]);_0x12c9e6[_0x32ef('0x42')]=_0x278696[_0x32ef('0xd')][_0x32ef('0xf')];_0x12c9e6[_0x32ef('0x43')]=_0x278696[_0x32ef('0xd')][_0x32ef('0x44')];logger[_0x32ef('0x14')]('['+[_0x502113['toUpperCase']()]+']\x20getTicket\x20crm',_0x12c9e6);_0x270826(_0x12c9e6);})[_0x32ef('0x45')](function(_0x259c32){logger[_0x32ef('0x12')]('['+[_0x502113[_0x32ef('0x10')]()]+']',_0x259c32[_0x32ef('0x13')]);_0x27d65b(_0x259c32[_0x32ef('0x13')]);});});};}function createRemoteTag(_0x1572d9,_0x1f105a,_0x15b640,_0x368bf1){return new Promise(function(_0x3697a7,_0x4a6fd2){var _0x21216d={'method':_0x32ef('0x22'),'uri':_0x15b640+_0x32ef('0x46')+'?'+_0x368bf1,'body':{'short_description':_0x1572d9,'global':!![],'active':!![],'name':_0x1572d9},'auth':_0x1f105a,'json':!![]};return rp(_0x21216d)[_0x32ef('0xc')](function(_0x38314a){var _0x387cf0=_0x38314a['result'][_0x32ef('0xf')];_0x3697a7(_0x387cf0);});});}function getRemoteTag(_0x1eeb3e,_0x31d5d8,_0x56b7ce,_0x1b0faa,_0x52692a){return new Promise(function(_0x2ee3dd,_0xbe35b){var _0x579bc1={'method':_0x32ef('0x17'),'uri':_0x56b7ce+'label'+_0x32ef('0x47')+_0x1eeb3e+'&'+_0x1b0faa,'auth':_0x31d5d8,'json':!![]};return rp(_0x579bc1)[_0x32ef('0xc')](function(_0x2bff39){if(_0x2bff39[_0x32ef('0xd')][_0x32ef('0x1b')]>0x0){var _0x30e377=_0x2bff39[_0x32ef('0xd')][0x0]['sys_id'];_0x2ee3dd(_0x30e377);}else{return createRemoteTag(_0x1eeb3e,_0x31d5d8,_0x56b7ce,_0x1b0faa)['then'](function(_0xdfa103){_0x2ee3dd(_0xdfa103);});}});});}function assignTagToIncident(_0x52232a,_0x4fbab6,_0xb519e9,_0x89d0b3,_0x2ef0f8){return new Promise(function(_0x6aae59,_0x2468e6){var _0x356704={'method':_0x32ef('0x22'),'uri':_0xb519e9+_0x32ef('0x48')+'?'+_0x2ef0f8,'body':{'label':_0x52232a,'table':_0x32ef('0x3b'),'id_type':_0x32ef('0x49'),'table_key':_0x89d0b3['ticketId'],'title':'Incident\x20-\x20'+_0x89d0b3[_0x32ef('0x43')],'id_display':_0x89d0b3[_0x32ef('0x43')]},'auth':_0x4fbab6,'json':!![]};return rp(_0x356704)['then'](function(_0xda1d1){_0x6aae59();})[_0x32ef('0x45')](function(){_0x6aae59();});});}function manageTags(_0x2b5703,_0x49c245,_0x2ac877,_0x3c31d0,_0x20dcc5,_0x52dfe0,_0x5e6030){return new Promise(function(_0x13ea1a,_0x47d8bf){var _0x17f447=[];_0x49c245['forEach'](function(_0x58b652){_0x17f447[_0x32ef('0x4a')](getRemoteTag(_0x58b652,_0x2ac877,_0x3c31d0,_0x52dfe0,_0x5e6030));});return Promise[_0x32ef('0x4b')](_0x17f447)[_0x32ef('0xc')](function(_0x5dca6a){if(_0x5dca6a[_0x32ef('0x1b')]){logger[_0x32ef('0x14')]('['+[_0x2b5703[_0x32ef('0x10')]()]+']\x20arrayPromises:\x20IDs\x20in\x20table\x20label',_0x5dca6a);var _0x4557ce=[];_0x5dca6a[_0x32ef('0x2c')](function(_0x4c3bab){_0x4557ce['push'](assignTagToIncident(_0x4c3bab,_0x2ac877,_0x3c31d0,_0x20dcc5,_0x52dfe0));});return Promise[_0x32ef('0x4b')](_0x4557ce)[_0x32ef('0xc')](function(){_0x13ea1a();})[_0x32ef('0x45')](function(){_0x13ea1a();});}else{_0x13ea1a();}});});}function getTags(_0x339625,_0x4c4df8,_0x40700e,_0x4c89e8,_0x285330,_0x63b65){return function(_0x25b6d6){return new Promise(function(_0x36ed97,_0x21e930){var _0x340861=[];var _0x1dc755=_0x4c89e8[_0x32ef('0x4c')];if(_0x1dc755&&_0x1dc755[_0x32ef('0x1b')]>0x0){_0x340861=_['map'](_0x1dc755,_0x32ef('0x38'));}if(_0x340861[_0x32ef('0x1b')]>0x0){return manageTags(_0x339625,_0x340861,_0x4c4df8,_0x40700e,_0x25b6d6,_0x285330,_0x63b65)[_0x32ef('0xc')](function(){_0x36ed97(_0x25b6d6);});}else{_0x36ed97(_0x25b6d6);}});};}function emit(_0x1c629d,_0x79ae28,_0x5ad75c){var _0x47c0ed=_0x32ef('0x4d')+_0x32ef('0x4e')+_0x32ef('0x4f')+_0x32ef('0x50');var _0x1a8bad={'uri':_0x1c629d+'/nav_to.do?uri=incident.do?sys_id%3D'+_0x5ad75c+_0x47c0ed};io['to'](util[_0x32ef('0x51')]('user:%s',_0x79ae28))[_0x32ef('0x52')](_0x32ef('0x53'),_0x1a8bad);}exports['cs']=function(_0x48b6f4,_0x5402b4,_0x2c9f7a,_0x1538d0,_0x2e0873,_0x5b378b,_0x52b63b,_0x3b4a8e){var _0x5edd29={};var _0x7d2c3a={'user':_0x5b378b[_0x32ef('0x54')],'pass':_0x5b378b['password']};var _0x476bbf=_0x32ef('0x55');var _0x974974=_0x32ef('0x56');_0x5b378b[_0x32ef('0x57')]=intUtil[_0x32ef('0x58')](_0x5b378b[_0x32ef('0x57')]);_0x5b378b[_0x32ef('0x59')]=intUtil[_0x32ef('0x58')](_0x5b378b[_0x32ef('0x59')]);var _0x132d9f=util[_0x32ef('0x51')]('%s/api/now/table/',_0x5b378b['remoteUri']);_0x5edd29[_0x32ef('0x16')]=!_[_0x32ef('0x5a')](_0x1538d0)?_0x1538d0['email']:null;_0x5edd29[_0x32ef('0x1e')]=_0x5b378b['email'];_0x5edd29[_0x32ef('0x24')]=_0x3b4a8e[_0x32ef('0x31')]()===_0x32ef('0x3a')?_0x5402b4['destcalleridnum']:_0x5402b4[_0x32ef('0x5b')];_0x5edd29['callDirection']=_0x3b4a8e===_0x32ef('0x5c')||_0x3b4a8e===_0x32ef('0x5d')?'queue':'outbound';var _0x3c9039=util['format'](_0x32ef('0x5e'),_0x5b378b['serverUrl'],_0x5402b4[_0x32ef('0x5f')],md5(_0x5402b4[_0x32ef('0x5f')]));if(_0x2e0873&&_0x2e0873[_0x32ef('0x60')]){logger['info']('[QUEUE]','Recording\x20is\x20enabled!');_0x5402b4[_0x32ef('0x61')]=_0x3c9039;}else if(_0x52b63b&&_0x52b63b['recordingFormat']&&_0x52b63b[_0x32ef('0x62')]!==_0x32ef('0x63')){logger[_0x32ef('0x14')](_0x32ef('0x64'),_0x32ef('0x65'));_0x5402b4[_0x32ef('0x61')]=_0x3c9039;}else{_0x5402b4['recordingURL']='';}return getAdminUser(_0x3b4a8e,_0x7d2c3a,_0x5edd29,_0x132d9f,_0x974974,_0x476bbf)[_0x32ef('0xc')](getUser(_0x3b4a8e,_0x7d2c3a,_0x132d9f,_0x974974,_0x476bbf))['then'](getEndUser(_0x3b4a8e,_0x7d2c3a,_0x132d9f,_0x974974,_0x476bbf))['then'](getTicket(_0x3b4a8e,_0x7d2c3a,_0x132d9f,_0x2c9f7a,_0x5402b4,_0x974974))[_0x32ef('0xc')](function(_0x5c4f2a){logger[_0x32ef('0x14')](util[_0x32ef('0x51')]('The\x20ticket\x20ID\x20is:\x20%s',_0x5c4f2a[_0x32ef('0x42')]));logger[_0x32ef('0x14')](util[_0x32ef('0x51')](_0x32ef('0x66'),_0x3b4a8e));if(_0x3b4a8e!==_0x32ef('0x5d')){logger[_0x32ef('0x14')]('['+[_0x3b4a8e['toUpperCase']()]+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x5b378b[_0x32ef('0x57')],_0x1538d0['name'],_0x5c4f2a[_0x32ef('0x42')]);}})[_0x32ef('0x45')](function(_0x114d8e){logger[_0x32ef('0x12')]('['+[_0x3b4a8e[_0x32ef('0x10')]()]+_0x32ef('0x67'),util['inspect'](_0x114d8e,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/sugarcrm.js b/server/services/ami/trigger/integration/sugarcrm.js index 986b28e..cbb61b1 100644 --- a/server/services/ami/trigger/integration/sugarcrm.js +++ b/server/services/ami/trigger/integration/sugarcrm.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x280b=['duration_hours','duration_minutes','parent_id','Contacts','parent_name','variableName','push','idField','set_entry','JSON','stringify','Calls','format','Basic\x20%s','apiKey','base64','get_server_info','isNil','Getting\x20agent\x20with\x20name','get_entry_list','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','then','entry_list','length','find','name_value_list','user_name','value','Agent\x20found!','resolve','user_id','Searching\x20enduser\x20with\x20phone','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','first_name','','Caller\x20-\x20%s','Enduser\x20created.','debug','merge','map','forEach','type','customField','nameField','content','toString','string','variable','customVariable','Variable','toLowerCase','POST','login','username','password','PLAIN','xCALLY\x20Motion\x20integration','sessionID','set_relationship','remoteUri','stripTrailingSlash','serverUrl','%s/service/v4_1/rest.php','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Inbound','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','users','version','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','catch','error','outbound','recordingFormat','none','[OUTBOUND]','Outbound','contacts','user:%s','trigger:browser:url','unmanaged','uri','monitor_format','calleridname','toUpperCase','request-promise','bluebird','ioredis','./util','redis','defaults','localhost','info','name','getString','created_by','description','Descriptions','date_start','toISOString','slice','replace'];(function(_0x1b00d0,_0x265b67){var _0x31446c=function(_0x4e4679){while(--_0x4e4679){_0x1b00d0['push'](_0x1b00d0['shift']());}};_0x31446c(++_0x265b67);}(_0x280b,0x1bf));var _0xb280=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x280b[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var rp=require(_0xb280('0x0'));var BPromise=require(_0xb280('0x1'));var md5=require('md5');var util=require('util');var Redis=require(_0xb280('0x2'));var intUtil=require(_0xb280('0x3'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')('sugarcrm');config[_0xb280('0x4')]=_[_0xb280('0x5')](config['redis'],{'host':_0xb280('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var def={'method':'POST','json':!![]};function emit(_0xd044e8,_0x4f79cd,_0x17bb79){io['to'](_0xd044e8)['emit'](_0x4f79cd,_0x17bb79);}function getTicket(_0x10eed9,_0x2ba011,_0x48296b,_0x5c98b1,_0x314169,_0x54713e,_0x4672bd,_0x4b0365){logger[_0xb280('0x7')]('Creating\x20new\x20ticket...');var _0x2178a9=new Date();var _0x3a9573=[{'name':_0xb280('0x8'),'value':intUtil[_0xb280('0x9')](_0x5c98b1['Subjects'],_0x314169,'\x20')},{'name':'assigned_user_id','value':_0x2ba011['id']},{'name':_0xb280('0xa'),'value':_0x2ba011['id']},{'name':_0xb280('0xb'),'value':intUtil['getString'](_0x5c98b1[_0xb280('0xc')],_0x314169,'\x0a')},{'name':_0xb280('0xd'),'value':_0x2178a9[_0xb280('0xe')]()[_0xb280('0xf')](0x0,0x13)[_0xb280('0x10')]('T','\x20')},{'name':_0xb280('0x11'),'value':'0'},{'name':_0xb280('0x12'),'value':'15'},{'name':_0xb280('0x13'),'value':_0x48296b['id']},{'name':'parent_type','value':_0xb280('0x14')},{'name':_0xb280('0x15'),'value':_0x48296b[_0xb280('0x8')]},{'name':'direction','value':_0x4b0365}];if(_0x54713e['length']){_['forEach'](_0x54713e,function(_0xa7bb4b){if(_0x314169[_0xa7bb4b[_0xb280('0x16')]]){_0x3a9573[_0xb280('0x17')]({'name':_0xa7bb4b[_0xb280('0x18')],'value':_0x314169[_0xa7bb4b[_0xb280('0x16')]]});}});}return request({'form':{'method':_0xb280('0x19'),'input_type':_0xb280('0x1a'),'response_type':_0xb280('0x1a'),'rest_data':JSON[_0xb280('0x1b')]({'session':_0x4672bd['id'],'module_name':_0xb280('0x1c'),'name_value_list':_0x3a9573})}});}function getAuth(_0x52cc87){return util[_0xb280('0x1d')](_0xb280('0x1e'),new Buffer(_0x52cc87[_0xb280('0x1f')]+':X')['toString'](_0xb280('0x20')));}function getServerInfo(_0x336088){return request({'form':{'method':_0xb280('0x21'),'input_type':_0xb280('0x1a'),'response_type':_0xb280('0x1a'),'rest_data':JSON[_0xb280('0x1b')]({'session':_0x336088['id']})}});}function getUser(_0x760e2,_0x145c92,_0xd7a11d){if(!_[_0xb280('0x22')](_0x145c92)){logger[_0xb280('0x7')](_0xb280('0x23'),_0x145c92);return request({'form':{'method':_0xb280('0x24'),'input_type':_0xb280('0x1a'),'response_type':'JSON','rest_data':JSON['stringify']({'session':_0xd7a11d['id'],'module_name':_0xb280('0x25'),'query':util[_0xb280('0x1d')](_0xb280('0x26'),_0x145c92),'order_by':'','offset':'0','select_fields':['id','name','user_name'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xb280('0x27')](function(_0x42979e){if(_0x42979e[_0xb280('0x28')][_0xb280('0x29')]){var _0x228713=_[_0xb280('0x2a')](_0x42979e[_0xb280('0x28')],function(_0x4942ee){return _0x4942ee[_0xb280('0x2b')][_0xb280('0x2c')][_0xb280('0x2d')]===_0x145c92;});if(_0x228713){logger[_0xb280('0x7')](_0xb280('0x2e'));return BPromise[_0xb280('0x2f')]({'id':_0x228713[_0xb280('0x2b')]['id'][_0xb280('0x2d')],'name':_0x228713[_0xb280('0x2b')]['name'][_0xb280('0x2d')]});}}logger['info']('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise['resolve']({'id':_0xd7a11d[_0xb280('0x2b')][_0xb280('0x30')][_0xb280('0x2d')],'name':_0xd7a11d[_0xb280('0x2b')][_0xb280('0x2c')]['value']});});}else{logger['info']('Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!');return BPromise['resolve']({'id':_0xd7a11d[_0xb280('0x2b')][_0xb280('0x30')][_0xb280('0x2d')],'name':_0xd7a11d[_0xb280('0x2b')]['user_name']['value']});}}function getEndUser(_0x4ce40d,_0x3a6172,_0x951efc,_0x5167ee){logger[_0xb280('0x7')](_0xb280('0x31'),_0x951efc);return request({'form':{'method':_0xb280('0x24'),'input_type':_0xb280('0x1a'),'response_type':_0xb280('0x1a'),'rest_data':JSON[_0xb280('0x1b')]({'session':_0x5167ee['id'],'module_name':'Contacts','query':util[_0xb280('0x1d')](_0xb280('0x32'),_0x951efc),'order_by':'','offset':'0','select_fields':['id','name','phone_home'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xb280('0x27')](function(_0x443dd7){if(_0x443dd7[_0xb280('0x28')][_0xb280('0x29')]){var _0x55be72=_['find'](_0x443dd7[_0xb280('0x28')],function(_0xf674f4){return _0xf674f4[_0xb280('0x2b')][_0xb280('0x33')][_0xb280('0x2d')]===_0x951efc;});if(_0x55be72){logger['info'](_0xb280('0x34'));return BPromise['resolve']({'id':_0x55be72[_0xb280('0x2b')]['id'][_0xb280('0x2d')],'name':_0x55be72[_0xb280('0x2b')]['name'][_0xb280('0x2d')],'phone':_0x55be72['name_value_list'][_0xb280('0x33')][_0xb280('0x2d')]});}}else{logger[_0xb280('0x7')](_0xb280('0x35'));return request({'form':{'method':_0xb280('0x19'),'input_type':_0xb280('0x1a'),'response_type':_0xb280('0x1a'),'rest_data':JSON[_0xb280('0x1b')]({'session':_0x5167ee['id'],'module_name':_0xb280('0x14'),'name_value_list':[{'name':_0xb280('0x36'),'value':_0x3a6172!==_0xb280('0x37')?_0x3a6172:util[_0xb280('0x1d')](_0xb280('0x38'),_0x951efc)},{'name':'phone_home','value':_0x951efc}]})}})[_0xb280('0x27')](function(_0x5d9e4c){logger['info'](_0xb280('0x39'));return BPromise[_0xb280('0x2f')]({'id':_0x5d9e4c['id'],'name':_0x5d9e4c['entry_list'][_0xb280('0x36')]['value'],'phone':_0x5d9e4c['entry_list']['phone_home'][_0xb280('0x2d')]});});}});}function request(_0x36e71a){logger[_0xb280('0x3a')]('[HTTP]',JSON['stringify'](_0x36e71a));return rp(_[_0xb280('0x3b')](def,_0x36e71a));}function getTags(_0x5f44a2,_0x322a0e){var _0x504609=[];if(_0x5f44a2&&_0x5f44a2[_0xb280('0x29')]>0x0){_0x504609=_[_0xb280('0x3c')](_0x5f44a2,_0x322a0e);}return _0x504609;}function getCustomFields(_0x1dc885,_0x5caba3){var _0x508b93=[];var _0x58d04c={'custom_fields':[]};if(_0x1dc885[_0xb280('0x29')]>0x0){_[_0xb280('0x3d')](_0x1dc885,function(_0xd4e079){if(_0xd4e079[_0xb280('0x3e')]==='string'&&_0xd4e079['nameField']&&!_0xd4e079[_0xb280('0x3f')]){_0x58d04c[_0xd4e079[_0xb280('0x40')]['toLowerCase']()]=_0xd4e079[_0xb280('0x41')][_0xb280('0x42')]();}else if(_0xd4e079['type']===_0xb280('0x43')&&_0xd4e079['idField']&&_0xd4e079[_0xb280('0x3f')]){_0x58d04c['custom_fields']['push']({'id':_0xd4e079[_0xb280('0x18')],'value':_0xd4e079[_0xb280('0x41')][_0xb280('0x42')]()});}else if(_0xd4e079[_0xb280('0x3e')]===_0xb280('0x44')&&_0xd4e079['variableName']&&_0xd4e079[_0xb280('0x18')]&&_0xd4e079['customField']){_0x5caba3[_0xd4e079[_0xb280('0x16')]]&&_0x58d04c['custom_fields'][_0xb280('0x17')]({'id':_0xd4e079[_0xb280('0x18')],'value':_0x5caba3[_0xd4e079[_0xb280('0x16')]][_0xb280('0x42')]()});}else if(_0xd4e079[_0xb280('0x3e')]===_0xb280('0x45')&&_0xd4e079['Variable']&&_0xd4e079['Variable'][_0xb280('0x8')]&&_0xd4e079[_0xb280('0x18')]&&_0xd4e079['customField']){_0x5caba3[_0xd4e079[_0xb280('0x46')][_0xb280('0x8')][_0xb280('0x47')]()]&&_0x58d04c['custom_fields'][_0xb280('0x17')]({'id':_0xd4e079[_0xb280('0x18')],'value':_0x5caba3[_0xd4e079[_0xb280('0x46')]['name']['toLowerCase']()][_0xb280('0x42')]()});}});}return _0x58d04c;}function getConnection(_0x45092f){return request({'method':_0xb280('0x48'),'form':{'method':_0xb280('0x49'),'input_type':'JSON','response_type':_0xb280('0x1a'),'rest_data':JSON[_0xb280('0x1b')]({'user_auth':{'user_name':_0x45092f[_0xb280('0x4a')],'password':_0x45092f[_0xb280('0x4b')],'encryption':_0xb280('0x4c')},'application':_0xb280('0x4d')})}})['then'](function(_0x1d38dc){var _0x3e1ed5=_0x1d38dc;if(_0x3e1ed5['id']){def[_0xb280('0x4e')]=_0x3e1ed5['id'];return BPromise[_0xb280('0x2f')](_0x3e1ed5);}else{throw new Error(util[_0xb280('0x1d')]('Account\x20%d\x20is\x20not\x20valid',_0x45092f['id']));}});}function setRelationship(_0x8d1b78,_0x4d051b,_0x33f58b,_0x34604b){return request({'form':{'method':_0xb280('0x4f'),'input_type':_0xb280('0x1a'),'response_type':_0xb280('0x1a'),'rest_data':JSON[_0xb280('0x1b')]({'session':_0x8d1b78['id'],'module_name':'Calls','module_id':_0x33f58b['id'],'link_field_name':_0x34604b,'related_ids':[_0x4d051b['id']],'name_value_list':[],'delete':0x0})}});}exports['queue']=function(_0x25b277,_0x465e29,_0x5b6d76,_0x549e8c,_0x143a9b,_0x317c0c){var _0x45470b,_0x322f03,_0x572032,_0x42ce43;_0x317c0c[_0xb280('0x50')]=intUtil[_0xb280('0x51')](_0x317c0c[_0xb280('0x50')]);_0x317c0c['serverUrl']=intUtil[_0xb280('0x51')](_0x317c0c[_0xb280('0x52')]);def['uri']=util['format'](_0xb280('0x53'),_0x317c0c['remoteUri']);if(_0x143a9b&&_0x143a9b['monitor_format']){logger['info'](_0xb280('0x54'),_0xb280('0x55'));_0x465e29['recordingURL']=util[_0xb280('0x1d')](_0xb280('0x56'),_0x317c0c[_0xb280('0x52')],_0x465e29[_0xb280('0x57')],md5(_0x465e29[_0xb280('0x57')]));}else{_0x465e29[_0xb280('0x58')]='';}return getConnection(_0x317c0c)[_0xb280('0x27')](function(_0x388113){_0x42ce43=_0x388113;return getUser(_0x317c0c,_0x549e8c[_0xb280('0x8')],_0x42ce43);})[_0xb280('0x27')](function(_0x9d4d33){_0x45470b=_0x9d4d33;logger[_0xb280('0x7')](_0xb280('0x59'),_0x45470b['id']);return getEndUser(_0x317c0c,_0x465e29['calleridname'],_0x465e29[_0xb280('0x5a')],_0x42ce43);})[_0xb280('0x27')](function(_0x445146){_0x322f03=_0x445146;logger[_0xb280('0x7')](_0xb280('0x5b'),_0x322f03['id']);return getTicket(_0x317c0c,_0x45470b,_0x322f03,_0x5b6d76,_0x465e29,_0x5b6d76[_0xb280('0x5c')],_0x42ce43,_0xb280('0x5d'));})['then'](function(_0x253be9){_0x572032=_0x253be9;logger[_0xb280('0x7')](_0xb280('0x5e'));logger[_0xb280('0x7')](_0xb280('0x5f'),_0x572032['id']);return setRelationship(_0x42ce43,_0x45470b,_0x572032,_0xb280('0x60'));})['then'](function(){return setRelationship(_0x42ce43,_0x322f03,_0x572032,'contacts');})[_0xb280('0x27')](function(){return getServerInfo(_0x42ce43);})['then'](function(_0x53d731){var _0x23289e=parseInt(_0x53d731[_0xb280('0x61')]['charAt'](0x0));var _0xa49863=util[_0xb280('0x1d')](_0xb280('0x62'),_0x317c0c[_0xb280('0x50')],_0x572032['id']);if(_0x23289e>0x6){_0xa49863=util[_0xb280('0x1d')](_0xb280('0x63'),_0x317c0c['remoteUri'],_0x572032['id']);}logger[_0xb280('0x7')](_0xb280('0x54'),_0xb280('0x64'));emit(util['format']('user:%s',_0x549e8c['name']),'trigger:browser:url',{'uri':_0xa49863});})[_0xb280('0x65')](function(_0x43df8c){logger[_0xb280('0x66')](_0xb280('0x54'),JSON[_0xb280('0x1b')](_0x43df8c));});};exports[_0xb280('0x67')]=function(_0x5c760f,_0x264bba,_0x5b2c92,_0x5542aa,_0x1e74b8,_0x3703fb,_0x4cc30a){var _0x3d3b82,_0x2acedc,_0x5b5340,_0x313cbe;_0x3703fb[_0xb280('0x50')]=intUtil[_0xb280('0x51')](_0x3703fb['remoteUri']);_0x3703fb[_0xb280('0x52')]=intUtil[_0xb280('0x51')](_0x3703fb[_0xb280('0x52')]);def['uri']=util[_0xb280('0x1d')](_0xb280('0x53'),_0x3703fb[_0xb280('0x50')]);if(_0x4cc30a&&_0x4cc30a[_0xb280('0x68')]&&_0x4cc30a[_0xb280('0x68')]!==_0xb280('0x69')){logger[_0xb280('0x7')](_0xb280('0x6a'),_0xb280('0x55'));_0x264bba['recordingURL']=util[_0xb280('0x1d')](_0xb280('0x56'),_0x3703fb['serverUrl'],_0x264bba[_0xb280('0x57')],md5(_0x264bba[_0xb280('0x57')]));}return getConnection(_0x3703fb)[_0xb280('0x27')](function(_0x1fcee2){_0x313cbe=_0x1fcee2;return getUser(_0x3703fb,_0x5542aa['name'],_0x313cbe);})[_0xb280('0x27')](function(_0x36f43c){_0x3d3b82=_0x36f43c;logger[_0xb280('0x7')](_0xb280('0x59'),_0x3d3b82['id']);return getEndUser(_0x3703fb,_0x264bba['destcalleridname'],_0x264bba['destcalleridnum'],_0x313cbe);})[_0xb280('0x27')](function(_0x4cff10){_0x2acedc=_0x4cff10;logger[_0xb280('0x7')](_0xb280('0x5b'),_0x2acedc['id']);return getTicket(_0x3703fb,_0x3d3b82,_0x2acedc,_0x5b2c92,_0x264bba,_0x5b2c92[_0xb280('0x5c')],_0x313cbe,_0xb280('0x6b'));})[_0xb280('0x27')](function(_0x25e632){_0x5b5340=_0x25e632;logger[_0xb280('0x7')](_0xb280('0x5e'));logger[_0xb280('0x7')]('The\x20Ticket\x20ID\x20is:',_0x5b5340['id']);return setRelationship(_0x313cbe,_0x3d3b82,_0x5b5340,_0xb280('0x60'));})[_0xb280('0x27')](function(){return setRelationship(_0x313cbe,_0x2acedc,_0x5b5340,_0xb280('0x6c'));})[_0xb280('0x27')](function(){return getServerInfo(_0x313cbe);})[_0xb280('0x27')](function(_0x11f5e2){var _0x58485d=parseInt(_0x11f5e2[_0xb280('0x61')]['charAt'](0x0));var _0x403805=util[_0xb280('0x1d')](_0xb280('0x62'),_0x3703fb[_0xb280('0x50')],_0x5b5340['id']);if(_0x58485d>0x6){_0x403805=util[_0xb280('0x1d')](_0xb280('0x63'),_0x3703fb[_0xb280('0x50')],_0x5b5340['id']);}logger[_0xb280('0x7')](_0xb280('0x6a'),_0xb280('0x64'));emit(util[_0xb280('0x1d')](_0xb280('0x6d'),_0x5542aa[_0xb280('0x8')]),_0xb280('0x6e'),{'uri':_0x403805});})[_0xb280('0x65')](function(_0x25be72){logger[_0xb280('0x66')]('[OUTBOUND]',JSON[_0xb280('0x1b')](_0x25be72));});};exports[_0xb280('0x6f')]=function(_0x3780b0,_0x4b556d,_0x544e86,_0x2fb468,_0x13500f,_0x2c6d6f){var _0x41b0fb,_0x2841af,_0x1bb55d,_0x13f604;_0x2c6d6f[_0xb280('0x50')]=intUtil[_0xb280('0x51')](_0x2c6d6f[_0xb280('0x50')]);_0x2c6d6f[_0xb280('0x52')]=intUtil[_0xb280('0x51')](_0x2c6d6f[_0xb280('0x52')]);def[_0xb280('0x70')]=util[_0xb280('0x1d')](_0xb280('0x53'),_0x2c6d6f[_0xb280('0x50')]);if(_0x13500f&&_0x13500f[_0xb280('0x71')]){logger[_0xb280('0x7')]('['+_0x4b556d['lastevent']['toUpperCase']()+']',_0xb280('0x55'));_0x4b556d[_0xb280('0x58')]=util[_0xb280('0x1d')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2c6d6f[_0xb280('0x52')],_0x4b556d[_0xb280('0x57')],md5(_0x4b556d[_0xb280('0x57')]));}else{_0x4b556d[_0xb280('0x58')]='';}return getConnection(_0x2c6d6f)[_0xb280('0x27')](function(_0x6eba28){_0x13f604=_0x6eba28;if(!_['isNil'](_0x2fb468)){return getUser(_0x2c6d6f,_0x2fb468[_0xb280('0x8')],_0x13f604);}else{return getUser(_0x2c6d6f,null,_0x13f604);}})['then'](function(_0x149140){_0x41b0fb=_0x149140;logger[_0xb280('0x7')](_0xb280('0x59'),_0x41b0fb['id']);return getEndUser(_0x2c6d6f,_0x4b556d[_0xb280('0x72')],_0x4b556d[_0xb280('0x5a')],_0x13f604);})[_0xb280('0x27')](function(_0x426fbd){_0x2841af=_0x426fbd;logger[_0xb280('0x7')]('The\x20Enduser\x20ID\x20is:',_0x2841af['id']);return getTicket(_0x2c6d6f,_0x41b0fb,_0x2841af,_0x544e86,_0x4b556d,_0x544e86[_0xb280('0x5c')],_0x13f604,'Inbound');})[_0xb280('0x27')](function(_0x139347){_0x1bb55d=_0x139347;logger[_0xb280('0x7')](_0xb280('0x5e'));logger[_0xb280('0x7')](_0xb280('0x5f'),_0x1bb55d['id']);return setRelationship(_0x13f604,_0x41b0fb,_0x1bb55d,_0xb280('0x60'));})[_0xb280('0x27')](function(){return setRelationship(_0x13f604,_0x2841af,_0x1bb55d,'contacts');})[_0xb280('0x27')](function(){return getServerInfo(_0x13f604);})['catch'](function(_0x35de62){logger[_0xb280('0x66')]('['+_0x4b556d['lastevent'][_0xb280('0x73')]()+']',JSON[_0xb280('0x1b')](_0x35de62));});}; \ No newline at end of file +var _0x93ed=['Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Outbound','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','[OUTBOUND]','error','unmanaged','lastevent','lodash','request-promise','bluebird','md5','util','./util','../../../../config/logger','sugarcrm','defaults','redis','localhost','socket.io-emitter','emit','info','Creating\x20new\x20ticket...','name','getString','Subjects','assigned_user_id','date_start','toISOString','slice','duration_hours','parent_id','parent_type','Contacts','parent_name','direction','length','push','idField','variableName','JSON','stringify','Calls','Basic\x20%s','apiKey','toString','base64','isNil','Getting\x20agent\x20with\x20name','get_entry_list','Employees','user_name','entry_list','find','name_value_list','value','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','format','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','then','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','set_entry','first_name','','Caller\x20-\x20%s','Enduser\x20created.','debug','merge','forEach','type','string','nameField','toLowerCase','content','customField','custom_fields','variable','customVariable','Variable','POST','login','username','password','PLAIN','sessionID','resolve','Account\x20%d\x20is\x20not\x20valid','set_relationship','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','Fields','Inbound','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','users','contacts','version','charAt','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','catch','outbound','recordingFormat','none'];(function(_0x3efd17,_0x298d48){var _0x2832a5=function(_0x5d7ead){while(--_0x5d7ead){_0x3efd17['push'](_0x3efd17['shift']());}};_0x2832a5(++_0x298d48);}(_0x93ed,0xfe));var _0xd93e=function(_0x5ce3c8,_0x2503bd){_0x5ce3c8=_0x5ce3c8-0x0;var _0xa76867=_0x93ed[_0x5ce3c8];return _0xa76867;};'use strict';var _=require(_0xd93e('0x0'));var rp=require(_0xd93e('0x1'));var BPromise=require(_0xd93e('0x2'));var md5=require(_0xd93e('0x3'));var util=require(_0xd93e('0x4'));var Redis=require('ioredis');var intUtil=require(_0xd93e('0x5'));var config=require('../../../../config/environment');var logger=require(_0xd93e('0x6'))(_0xd93e('0x7'));config['redis']=_[_0xd93e('0x8')](config[_0xd93e('0x9')],{'host':_0xd93e('0xa'),'port':0x18eb});var io=require(_0xd93e('0xb'))(new Redis(config[_0xd93e('0x9')]));var def={'method':'POST','json':!![]};function emit(_0x4ef1a1,_0x466fca,_0x3b1527){io['to'](_0x4ef1a1)[_0xd93e('0xc')](_0x466fca,_0x3b1527);}function getTicket(_0x14fc46,_0x561e6d,_0x4bb433,_0x25b7c0,_0x5d916b,_0x3f3f19,_0x276b19,_0xc194fe){logger[_0xd93e('0xd')](_0xd93e('0xe'));var _0x5993e5=new Date();var _0x652ac9=[{'name':_0xd93e('0xf'),'value':intUtil[_0xd93e('0x10')](_0x25b7c0[_0xd93e('0x11')],_0x5d916b,'\x20')},{'name':_0xd93e('0x12'),'value':_0x561e6d['id']},{'name':'created_by','value':_0x561e6d['id']},{'name':'description','value':intUtil['getString'](_0x25b7c0['Descriptions'],_0x5d916b,'\x0a')},{'name':_0xd93e('0x13'),'value':_0x5993e5[_0xd93e('0x14')]()[_0xd93e('0x15')](0x0,0x13)['replace']('T','\x20')},{'name':_0xd93e('0x16'),'value':'0'},{'name':'duration_minutes','value':'15'},{'name':_0xd93e('0x17'),'value':_0x4bb433['id']},{'name':_0xd93e('0x18'),'value':_0xd93e('0x19')},{'name':_0xd93e('0x1a'),'value':_0x4bb433[_0xd93e('0xf')]},{'name':_0xd93e('0x1b'),'value':_0xc194fe}];if(_0x3f3f19[_0xd93e('0x1c')]){_['forEach'](_0x3f3f19,function(_0x50c196){if(_0x5d916b[_0x50c196['variableName']]){_0x652ac9[_0xd93e('0x1d')]({'name':_0x50c196[_0xd93e('0x1e')],'value':_0x5d916b[_0x50c196[_0xd93e('0x1f')]]});}});}return request({'form':{'method':'set_entry','input_type':'JSON','response_type':_0xd93e('0x20'),'rest_data':JSON[_0xd93e('0x21')]({'session':_0x276b19['id'],'module_name':_0xd93e('0x22'),'name_value_list':_0x652ac9})}});}function getAuth(_0x235687){return util['format'](_0xd93e('0x23'),new Buffer(_0x235687[_0xd93e('0x24')]+':X')[_0xd93e('0x25')](_0xd93e('0x26')));}function getServerInfo(_0x25193b){return request({'form':{'method':'get_server_info','input_type':'JSON','response_type':_0xd93e('0x20'),'rest_data':JSON[_0xd93e('0x21')]({'session':_0x25193b['id']})}});}function getUser(_0xd34caf,_0xe5553f,_0xd74297){if(!_[_0xd93e('0x27')](_0xe5553f)){logger[_0xd93e('0xd')](_0xd93e('0x28'),_0xe5553f);return request({'form':{'method':_0xd93e('0x29'),'input_type':_0xd93e('0x20'),'response_type':_0xd93e('0x20'),'rest_data':JSON['stringify']({'session':_0xd74297['id'],'module_name':_0xd93e('0x2a'),'query':util['format']('INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200',_0xe5553f),'order_by':'','offset':'0','select_fields':['id',_0xd93e('0xf'),_0xd93e('0x2b')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x2f3fac){if(_0x2f3fac[_0xd93e('0x2c')][_0xd93e('0x1c')]){var _0x49ae2c=_[_0xd93e('0x2d')](_0x2f3fac[_0xd93e('0x2c')],function(_0x5a5f48){return _0x5a5f48[_0xd93e('0x2e')][_0xd93e('0x2b')][_0xd93e('0x2f')]===_0xe5553f;});if(_0x49ae2c){logger[_0xd93e('0xd')]('Agent\x20found!');return BPromise['resolve']({'id':_0x49ae2c['name_value_list']['id'][_0xd93e('0x2f')],'name':_0x49ae2c[_0xd93e('0x2e')][_0xd93e('0xf')][_0xd93e('0x2f')]});}}logger[_0xd93e('0xd')](_0xd93e('0x30'));return BPromise['resolve']({'id':_0xd74297[_0xd93e('0x2e')]['user_id'][_0xd93e('0x2f')],'name':_0xd74297[_0xd93e('0x2e')][_0xd93e('0x2b')][_0xd93e('0x2f')]});});}else{logger[_0xd93e('0xd')]('Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!');return BPromise['resolve']({'id':_0xd74297['name_value_list']['user_id']['value'],'name':_0xd74297[_0xd93e('0x2e')][_0xd93e('0x2b')][_0xd93e('0x2f')]});}}function getEndUser(_0x589412,_0x210e99,_0x59b772,_0x599f40){logger[_0xd93e('0xd')](_0xd93e('0x31'),_0x59b772);return request({'form':{'method':_0xd93e('0x29'),'input_type':_0xd93e('0x20'),'response_type':'JSON','rest_data':JSON['stringify']({'session':_0x599f40['id'],'module_name':_0xd93e('0x19'),'query':util[_0xd93e('0x32')](_0xd93e('0x33'),_0x59b772),'order_by':'','offset':'0','select_fields':['id','name',_0xd93e('0x34')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xd93e('0x35')](function(_0x4f79d4){if(_0x4f79d4['entry_list']['length']){var _0x8849b3=_[_0xd93e('0x2d')](_0x4f79d4[_0xd93e('0x2c')],function(_0x4455dd){return _0x4455dd[_0xd93e('0x2e')][_0xd93e('0x34')][_0xd93e('0x2f')]===_0x59b772;});if(_0x8849b3){logger['info'](_0xd93e('0x36'));return BPromise['resolve']({'id':_0x8849b3[_0xd93e('0x2e')]['id']['value'],'name':_0x8849b3[_0xd93e('0x2e')][_0xd93e('0xf')]['value'],'phone':_0x8849b3[_0xd93e('0x2e')][_0xd93e('0x34')]['value']});}}else{logger[_0xd93e('0xd')](_0xd93e('0x37'));return request({'form':{'method':_0xd93e('0x38'),'input_type':'JSON','response_type':'JSON','rest_data':JSON['stringify']({'session':_0x599f40['id'],'module_name':_0xd93e('0x19'),'name_value_list':[{'name':_0xd93e('0x39'),'value':_0x210e99!==_0xd93e('0x3a')?_0x210e99:util[_0xd93e('0x32')](_0xd93e('0x3b'),_0x59b772)},{'name':_0xd93e('0x34'),'value':_0x59b772}]})}})[_0xd93e('0x35')](function(_0x593c4){logger['info'](_0xd93e('0x3c'));return BPromise['resolve']({'id':_0x593c4['id'],'name':_0x593c4[_0xd93e('0x2c')][_0xd93e('0x39')]['value'],'phone':_0x593c4[_0xd93e('0x2c')][_0xd93e('0x34')][_0xd93e('0x2f')]});});}});}function request(_0x20c463){logger[_0xd93e('0x3d')]('[HTTP]',JSON[_0xd93e('0x21')](_0x20c463));return rp(_[_0xd93e('0x3e')](def,_0x20c463));}function getTags(_0x45e50a,_0x4974c3){var _0x21ea5a=[];if(_0x45e50a&&_0x45e50a['length']>0x0){_0x21ea5a=_['map'](_0x45e50a,_0x4974c3);}return _0x21ea5a;}function getCustomFields(_0x271250,_0x24d369){var _0x161136=[];var _0x4a3772={'custom_fields':[]};if(_0x271250['length']>0x0){_[_0xd93e('0x3f')](_0x271250,function(_0x417fdc){if(_0x417fdc[_0xd93e('0x40')]===_0xd93e('0x41')&&_0x417fdc['nameField']&&!_0x417fdc['customField']){_0x4a3772[_0x417fdc[_0xd93e('0x42')][_0xd93e('0x43')]()]=_0x417fdc[_0xd93e('0x44')][_0xd93e('0x25')]();}else if(_0x417fdc[_0xd93e('0x40')]===_0xd93e('0x41')&&_0x417fdc[_0xd93e('0x1e')]&&_0x417fdc[_0xd93e('0x45')]){_0x4a3772[_0xd93e('0x46')][_0xd93e('0x1d')]({'id':_0x417fdc[_0xd93e('0x1e')],'value':_0x417fdc[_0xd93e('0x44')][_0xd93e('0x25')]()});}else if(_0x417fdc[_0xd93e('0x40')]===_0xd93e('0x47')&&_0x417fdc[_0xd93e('0x1f')]&&_0x417fdc['idField']&&_0x417fdc[_0xd93e('0x45')]){_0x24d369[_0x417fdc[_0xd93e('0x1f')]]&&_0x4a3772[_0xd93e('0x46')][_0xd93e('0x1d')]({'id':_0x417fdc['idField'],'value':_0x24d369[_0x417fdc[_0xd93e('0x1f')]]['toString']()});}else if(_0x417fdc[_0xd93e('0x40')]===_0xd93e('0x48')&&_0x417fdc[_0xd93e('0x49')]&&_0x417fdc[_0xd93e('0x49')][_0xd93e('0xf')]&&_0x417fdc['idField']&&_0x417fdc[_0xd93e('0x45')]){_0x24d369[_0x417fdc[_0xd93e('0x49')][_0xd93e('0xf')][_0xd93e('0x43')]()]&&_0x4a3772[_0xd93e('0x46')]['push']({'id':_0x417fdc[_0xd93e('0x1e')],'value':_0x24d369[_0x417fdc[_0xd93e('0x49')][_0xd93e('0xf')][_0xd93e('0x43')]()]['toString']()});}});}return _0x4a3772;}function getConnection(_0x55a65e){return request({'method':_0xd93e('0x4a'),'form':{'method':_0xd93e('0x4b'),'input_type':_0xd93e('0x20'),'response_type':_0xd93e('0x20'),'rest_data':JSON[_0xd93e('0x21')]({'user_auth':{'user_name':_0x55a65e[_0xd93e('0x4c')],'password':_0x55a65e[_0xd93e('0x4d')],'encryption':_0xd93e('0x4e')},'application':'xCALLY\x20Motion\x20integration'})}})['then'](function(_0x22d8d4){var _0x51438f=_0x22d8d4;if(_0x51438f['id']){def[_0xd93e('0x4f')]=_0x51438f['id'];return BPromise[_0xd93e('0x50')](_0x51438f);}else{throw new Error(util[_0xd93e('0x32')](_0xd93e('0x51'),_0x55a65e['id']));}});}function setRelationship(_0x2b2a88,_0x56197e,_0x21230d,_0x4c953e){return request({'form':{'method':_0xd93e('0x52'),'input_type':_0xd93e('0x20'),'response_type':_0xd93e('0x20'),'rest_data':JSON['stringify']({'session':_0x2b2a88['id'],'module_name':_0xd93e('0x22'),'module_id':_0x21230d['id'],'link_field_name':_0x4c953e,'related_ids':[_0x56197e['id']],'name_value_list':[],'delete':0x0})}});}exports['queue']=function(_0x4e8e14,_0x180303,_0x4080c9,_0x37b306,_0x355401,_0x1272f2){var _0x522310,_0x581115,_0x5cefd4,_0x592fbc;_0x1272f2[_0xd93e('0x53')]=intUtil[_0xd93e('0x54')](_0x1272f2['remoteUri']);_0x1272f2[_0xd93e('0x55')]=intUtil['stripTrailingSlash'](_0x1272f2[_0xd93e('0x55')]);def[_0xd93e('0x56')]=util[_0xd93e('0x32')](_0xd93e('0x57'),_0x1272f2[_0xd93e('0x53')]);if(_0x355401&&_0x355401[_0xd93e('0x58')]){logger[_0xd93e('0xd')](_0xd93e('0x59'),'Recording\x20is\x20enabled!');_0x180303[_0xd93e('0x5a')]=util[_0xd93e('0x32')](_0xd93e('0x5b'),_0x1272f2[_0xd93e('0x55')],_0x180303[_0xd93e('0x5c')],md5(_0x180303['uniqueid']));}else{_0x180303[_0xd93e('0x5a')]='';}return getConnection(_0x1272f2)[_0xd93e('0x35')](function(_0x38bf73){_0x592fbc=_0x38bf73;return getUser(_0x1272f2,_0x37b306[_0xd93e('0xf')],_0x592fbc);})['then'](function(_0x4cee73){_0x522310=_0x4cee73;logger[_0xd93e('0xd')](_0xd93e('0x5d'),_0x522310['id']);return getEndUser(_0x1272f2,_0x180303[_0xd93e('0x5e')],_0x180303[_0xd93e('0x5f')],_0x592fbc);})[_0xd93e('0x35')](function(_0x45f429){_0x581115=_0x45f429;logger[_0xd93e('0xd')]('The\x20Enduser\x20ID\x20is:',_0x581115['id']);return getTicket(_0x1272f2,_0x522310,_0x581115,_0x4080c9,_0x180303,_0x4080c9[_0xd93e('0x60')],_0x592fbc,_0xd93e('0x61'));})['then'](function(_0x3939e5){_0x5cefd4=_0x3939e5;logger['info'](_0xd93e('0x62'));logger[_0xd93e('0xd')](_0xd93e('0x63'),_0x5cefd4['id']);return setRelationship(_0x592fbc,_0x522310,_0x5cefd4,_0xd93e('0x64'));})['then'](function(){return setRelationship(_0x592fbc,_0x581115,_0x5cefd4,_0xd93e('0x65'));})[_0xd93e('0x35')](function(){return getServerInfo(_0x592fbc);})['then'](function(_0xc5d319){var _0x51e692=parseInt(_0xc5d319[_0xd93e('0x66')][_0xd93e('0x67')](0x0));var _0x261902=util['format']('%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s',_0x1272f2[_0xd93e('0x53')],_0x5cefd4['id']);if(_0x51e692>0x6){_0x261902=util['format'](_0xd93e('0x68'),_0x1272f2[_0xd93e('0x53')],_0x5cefd4['id']);}logger['info'](_0xd93e('0x59'),_0xd93e('0x69'));emit(util[_0xd93e('0x32')](_0xd93e('0x6a'),_0x37b306['name']),_0xd93e('0x6b'),{'uri':_0x261902});})[_0xd93e('0x6c')](function(_0x31bf7a){logger['error'](_0xd93e('0x59'),JSON['stringify'](_0x31bf7a));});};exports[_0xd93e('0x6d')]=function(_0x4506dc,_0x3a2cfc,_0x4dd2b3,_0x216240,_0x42e74c,_0x3f368f,_0x2d35b0){var _0x4379b1,_0x3b0e5f,_0x185995,_0x398112;_0x3f368f[_0xd93e('0x53')]=intUtil[_0xd93e('0x54')](_0x3f368f[_0xd93e('0x53')]);_0x3f368f['serverUrl']=intUtil[_0xd93e('0x54')](_0x3f368f[_0xd93e('0x55')]);def[_0xd93e('0x56')]=util[_0xd93e('0x32')](_0xd93e('0x57'),_0x3f368f['remoteUri']);if(_0x2d35b0&&_0x2d35b0[_0xd93e('0x6e')]&&_0x2d35b0[_0xd93e('0x6e')]!==_0xd93e('0x6f')){logger[_0xd93e('0xd')]('[OUTBOUND]',_0xd93e('0x70'));_0x3a2cfc[_0xd93e('0x5a')]=util[_0xd93e('0x32')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3f368f[_0xd93e('0x55')],_0x3a2cfc[_0xd93e('0x5c')],md5(_0x3a2cfc[_0xd93e('0x5c')]));}return getConnection(_0x3f368f)[_0xd93e('0x35')](function(_0x850610){_0x398112=_0x850610;return getUser(_0x3f368f,_0x216240[_0xd93e('0xf')],_0x398112);})[_0xd93e('0x35')](function(_0x25e15f){_0x4379b1=_0x25e15f;logger[_0xd93e('0xd')]('The\x20User\x20ID\x20is:',_0x4379b1['id']);return getEndUser(_0x3f368f,_0x3a2cfc[_0xd93e('0x71')],_0x3a2cfc[_0xd93e('0x72')],_0x398112);})[_0xd93e('0x35')](function(_0x148861){_0x3b0e5f=_0x148861;logger[_0xd93e('0xd')](_0xd93e('0x73'),_0x3b0e5f['id']);return getTicket(_0x3f368f,_0x4379b1,_0x3b0e5f,_0x4dd2b3,_0x3a2cfc,_0x4dd2b3[_0xd93e('0x60')],_0x398112,_0xd93e('0x74'));})[_0xd93e('0x35')](function(_0x1eedd3){_0x185995=_0x1eedd3;logger[_0xd93e('0xd')](_0xd93e('0x62'));logger['info'](_0xd93e('0x63'),_0x185995['id']);return setRelationship(_0x398112,_0x4379b1,_0x185995,_0xd93e('0x64'));})[_0xd93e('0x35')](function(){return setRelationship(_0x398112,_0x3b0e5f,_0x185995,'contacts');})[_0xd93e('0x35')](function(){return getServerInfo(_0x398112);})[_0xd93e('0x35')](function(_0xbdda1d){var _0x19bdc2=parseInt(_0xbdda1d[_0xd93e('0x66')][_0xd93e('0x67')](0x0));var _0x29362f=util['format'](_0xd93e('0x75'),_0x3f368f[_0xd93e('0x53')],_0x185995['id']);if(_0x19bdc2>0x6){_0x29362f=util[_0xd93e('0x32')](_0xd93e('0x68'),_0x3f368f['remoteUri'],_0x185995['id']);}logger['info'](_0xd93e('0x76'),_0xd93e('0x69'));emit(util[_0xd93e('0x32')](_0xd93e('0x6a'),_0x216240['name']),_0xd93e('0x6b'),{'uri':_0x29362f});})['catch'](function(_0x5f1fb4){logger[_0xd93e('0x77')](_0xd93e('0x76'),JSON['stringify'](_0x5f1fb4));});};exports[_0xd93e('0x78')]=function(_0x1c05ff,_0x5e4456,_0x45746d,_0x3b26eb,_0x459217,_0x3abbfe){var _0x1772b6,_0x396215,_0x3681ab,_0x35276c;_0x3abbfe[_0xd93e('0x53')]=intUtil[_0xd93e('0x54')](_0x3abbfe[_0xd93e('0x53')]);_0x3abbfe[_0xd93e('0x55')]=intUtil[_0xd93e('0x54')](_0x3abbfe[_0xd93e('0x55')]);def[_0xd93e('0x56')]=util[_0xd93e('0x32')](_0xd93e('0x57'),_0x3abbfe[_0xd93e('0x53')]);if(_0x459217&&_0x459217[_0xd93e('0x58')]){logger[_0xd93e('0xd')]('['+_0x5e4456['lastevent']['toUpperCase']()+']',_0xd93e('0x70'));_0x5e4456[_0xd93e('0x5a')]=util[_0xd93e('0x32')](_0xd93e('0x5b'),_0x3abbfe[_0xd93e('0x55')],_0x5e4456[_0xd93e('0x5c')],md5(_0x5e4456['uniqueid']));}else{_0x5e4456['recordingURL']='';}return getConnection(_0x3abbfe)[_0xd93e('0x35')](function(_0x427689){_0x35276c=_0x427689;if(!_['isNil'](_0x3b26eb)){return getUser(_0x3abbfe,_0x3b26eb['name'],_0x35276c);}else{return getUser(_0x3abbfe,null,_0x35276c);}})[_0xd93e('0x35')](function(_0x560a1f){_0x1772b6=_0x560a1f;logger[_0xd93e('0xd')](_0xd93e('0x5d'),_0x1772b6['id']);return getEndUser(_0x3abbfe,_0x5e4456[_0xd93e('0x5e')],_0x5e4456['calleridnum'],_0x35276c);})['then'](function(_0x2f55ee){_0x396215=_0x2f55ee;logger[_0xd93e('0xd')]('The\x20Enduser\x20ID\x20is:',_0x396215['id']);return getTicket(_0x3abbfe,_0x1772b6,_0x396215,_0x45746d,_0x5e4456,_0x45746d[_0xd93e('0x60')],_0x35276c,'Inbound');})['then'](function(_0x366310){_0x3681ab=_0x366310;logger[_0xd93e('0xd')]('Ticket\x20created!');logger[_0xd93e('0xd')](_0xd93e('0x63'),_0x3681ab['id']);return setRelationship(_0x35276c,_0x1772b6,_0x3681ab,'users');})['then'](function(){return setRelationship(_0x35276c,_0x396215,_0x3681ab,_0xd93e('0x65'));})[_0xd93e('0x35')](function(){return getServerInfo(_0x35276c);})[_0xd93e('0x6c')](function(_0x489702){logger[_0xd93e('0x77')]('['+_0x5e4456[_0xd93e('0x79')]['toUpperCase']()+']',JSON[_0xd93e('0x21')](_0x489702));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/util.js b/server/services/ami/trigger/integration/util.js index 213fa45..da4d86d 100644 --- a/server/services/ami/trigger/integration/util.js +++ b/server/services/ami/trigger/integration/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0677=['sortBy','type','string','push','content','variable','variableName','toString','customVariable','Variable','name','toLowerCase','keyValue','key','%s:\x20%s','keyType','format','join','stripTrailingSlash','slice','substring','validateEmail','isNil','lodash'];(function(_0x236cab,_0x2c780f){var _0x2f3726=function(_0x2422d8){while(--_0x2422d8){_0x236cab['push'](_0x236cab['shift']());}};_0x2f3726(++_0x2c780f);}(_0x0677,0xd7));var _0x7067=function(_0x5be8cc,_0x4a6037){_0x5be8cc=_0x5be8cc-0x0;var _0x5f1b7e=_0x0677[_0x5be8cc];return _0x5f1b7e;};'use strict';var _=require(_0x7067('0x0'));var util=require('util');exports['getString']=function(_0x218c29,_0x1471f5,_0x24045f){var _0x584e4c=[];if(_0x218c29['length']>0x0){var _0x3c1078=_[_0x7067('0x1')](_0x218c29,['id']);for(var _0x5858f1=0x0;_0x5858f1<_0x3c1078['length'];_0x5858f1++){var _0x4feb29=_0x3c1078[_0x5858f1];if(_0x4feb29[_0x7067('0x2')]===_0x7067('0x3')){_0x584e4c[_0x7067('0x4')](_0x4feb29[_0x7067('0x5')]);}else if(_0x4feb29[_0x7067('0x2')]===_0x7067('0x6')&&_0x4feb29[_0x7067('0x7')]){_0x1471f5[_0x4feb29[_0x7067('0x7')]]&&_0x584e4c['push'](_0x1471f5[_0x4feb29[_0x7067('0x7')]][_0x7067('0x8')]());}else if(_0x4feb29[_0x7067('0x2')]===_0x7067('0x9')&&_0x4feb29[_0x7067('0xa')]&&_0x4feb29[_0x7067('0xa')][_0x7067('0xb')]){_0x1471f5[_0x4feb29['Variable'][_0x7067('0xb')]['toLowerCase']()]&&_0x584e4c[_0x7067('0x4')](_0x1471f5[_0x4feb29['Variable'][_0x7067('0xb')][_0x7067('0xc')]()]['toString']());}else if(_0x4feb29['type']===_0x7067('0xd')){if(_0x4feb29['keyType']===_0x7067('0x3')&&_0x4feb29[_0x7067('0xe')]){_0x584e4c[_0x7067('0x4')](util['format'](_0x7067('0xf'),_0x4feb29[_0x7067('0xe')],_0x4feb29['keyContent']));}else if(_0x4feb29[_0x7067('0x10')]===_0x7067('0x6')&&_0x4feb29[_0x7067('0x7')]&&_0x4feb29['key']){_0x1471f5[_0x4feb29['variableName']]&&_0x584e4c[_0x7067('0x4')](util[_0x7067('0x11')](_0x7067('0xf'),_0x4feb29['key'],_0x1471f5[_0x4feb29[_0x7067('0x7')]]));}else if(_0x4feb29['keyType']===_0x7067('0x9')&&_0x4feb29['Variable']&&_0x4feb29[_0x7067('0xa')][_0x7067('0xb')]&&_0x4feb29[_0x7067('0xe')]){_0x1471f5[_0x4feb29[_0x7067('0xa')]['name']['toLowerCase']()]&&_0x584e4c['push'](util[_0x7067('0x11')](_0x7067('0xf'),_0x4feb29[_0x7067('0xe')],_0x1471f5[_0x4feb29[_0x7067('0xa')][_0x7067('0xb')][_0x7067('0xc')]()]));}}}}return _0x584e4c[_0x7067('0x12')](_0x24045f);};exports[_0x7067('0x13')]=function(_0x122a70){var _0x576e2d=_0x122a70[_0x7067('0x14')](-0x1);if(_0x576e2d==='/'){_0x122a70=_0x122a70[_0x7067('0x15')](0x0,_0x122a70['lastIndexOf'](_0x576e2d));}return _0x122a70;};exports[_0x7067('0x16')]=function(_0x3f8dcb){if(!_[_0x7067('0x17')](_0x3f8dcb)&&_0x3f8dcb!==''){var _0x5a3cd5=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x5a3cd5['test'](String(_0x3f8dcb)[_0x7067('0xc')]());}else{return![];}}; \ No newline at end of file +var _0x96d6=['toString','customVariable','Variable','name','toLowerCase','keyValue','keyType','key','format','%s:\x20%s','keyContent','join','stripTrailingSlash','slice','substring','lastIndexOf','isNil','test','util','getString','length','sortBy','type','string','content','variable','variableName','push'];(function(_0x3a031a,_0xd706bb){var _0x2c71c6=function(_0x2d6b6b){while(--_0x2d6b6b){_0x3a031a['push'](_0x3a031a['shift']());}};_0x2c71c6(++_0xd706bb);}(_0x96d6,0x12a));var _0x696d=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x96d6[_0x1facfa];return _0x9ec701;};'use strict';var _=require('lodash');var util=require(_0x696d('0x0'));exports[_0x696d('0x1')]=function(_0x238d8b,_0x34f7a4,_0x1f222c){var _0x393afc=[];if(_0x238d8b[_0x696d('0x2')]>0x0){var _0x4d03c4=_[_0x696d('0x3')](_0x238d8b,['id']);for(var _0x5d40c7=0x0;_0x5d40c7<_0x4d03c4[_0x696d('0x2')];_0x5d40c7++){var _0x7a2f0f=_0x4d03c4[_0x5d40c7];if(_0x7a2f0f[_0x696d('0x4')]===_0x696d('0x5')){_0x393afc['push'](_0x7a2f0f[_0x696d('0x6')]);}else if(_0x7a2f0f[_0x696d('0x4')]===_0x696d('0x7')&&_0x7a2f0f[_0x696d('0x8')]){_0x34f7a4[_0x7a2f0f[_0x696d('0x8')]]&&_0x393afc[_0x696d('0x9')](_0x34f7a4[_0x7a2f0f[_0x696d('0x8')]][_0x696d('0xa')]());}else if(_0x7a2f0f[_0x696d('0x4')]===_0x696d('0xb')&&_0x7a2f0f[_0x696d('0xc')]&&_0x7a2f0f[_0x696d('0xc')][_0x696d('0xd')]){_0x34f7a4[_0x7a2f0f[_0x696d('0xc')][_0x696d('0xd')][_0x696d('0xe')]()]&&_0x393afc['push'](_0x34f7a4[_0x7a2f0f[_0x696d('0xc')]['name'][_0x696d('0xe')]()][_0x696d('0xa')]());}else if(_0x7a2f0f[_0x696d('0x4')]===_0x696d('0xf')){if(_0x7a2f0f[_0x696d('0x10')]===_0x696d('0x5')&&_0x7a2f0f[_0x696d('0x11')]){_0x393afc['push'](util[_0x696d('0x12')](_0x696d('0x13'),_0x7a2f0f[_0x696d('0x11')],_0x7a2f0f[_0x696d('0x14')]));}else if(_0x7a2f0f[_0x696d('0x10')]===_0x696d('0x7')&&_0x7a2f0f['variableName']&&_0x7a2f0f['key']){_0x34f7a4[_0x7a2f0f[_0x696d('0x8')]]&&_0x393afc[_0x696d('0x9')](util['format']('%s:\x20%s',_0x7a2f0f[_0x696d('0x11')],_0x34f7a4[_0x7a2f0f['variableName']]));}else if(_0x7a2f0f['keyType']===_0x696d('0xb')&&_0x7a2f0f['Variable']&&_0x7a2f0f[_0x696d('0xc')][_0x696d('0xd')]&&_0x7a2f0f[_0x696d('0x11')]){_0x34f7a4[_0x7a2f0f[_0x696d('0xc')]['name'][_0x696d('0xe')]()]&&_0x393afc['push'](util['format'](_0x696d('0x13'),_0x7a2f0f[_0x696d('0x11')],_0x34f7a4[_0x7a2f0f['Variable'][_0x696d('0xd')][_0x696d('0xe')]()]));}}}}return _0x393afc[_0x696d('0x15')](_0x1f222c);};exports[_0x696d('0x16')]=function(_0x44cbf4){var _0x573819=_0x44cbf4[_0x696d('0x17')](-0x1);if(_0x573819==='/'){_0x44cbf4=_0x44cbf4[_0x696d('0x18')](0x0,_0x44cbf4[_0x696d('0x19')](_0x573819));}return _0x44cbf4;};exports['validateEmail']=function(_0x598eee){if(!_[_0x696d('0x1a')](_0x598eee)&&_0x598eee!==''){var _0xe0e693=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0xe0e693[_0x696d('0x1b')](String(_0x598eee)['toLowerCase']());}else{return![];}}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/vtiger.js b/server/services/ami/trigger/integration/vtiger.js index 3ecf420..6a81a04 100644 --- a/server/services/ami/trigger/integration/vtiger.js +++ b/server/services/ami/trigger/integration/vtiger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8f09=['bluebird','md5','util','ioredis','./util','../../../../config/environment','vTiger','redis','defaults','localhost','socket.io-emitter','emit','length','forEach','type','string','idField','content','variable','variableName','toString','customVariable','Variable','name','toLowerCase','Creating\x20new\x20ticket...','Open','getString','Subjects','Descriptions','POST','%s/webservice.php','remoteUri','create','username','sessionName','HelpDesk','stringify','then','success','resolve','result','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','error','catch','createTicket','validateEmail','info','Getting\x20agent\x20with\x20email','format','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','email1','first_name','last_name','userId','admin','statusCode','getUser','[vTiger],\x20%s,\x20%s,\x20%s','Searching\x20end\x20user\x20with\x20phone','GET','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Enduser\x20created.','getEndUser','accessKey','getchallenge','login','token','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','stripTrailingSlash','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','email','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','The\x20User\x20ID\x20is:','destcalleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','unmanaged','toUpperCase','lastevent','request-promise'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x8f09,0x19f));var _0x98f0=function(_0x2f38ca,_0x3bae29){_0x2f38ca=_0x2f38ca-0x0;var _0x2f914d=_0x8f09[_0x2f38ca];return _0x2f914d;};'use strict';var _=require('lodash');var rp=require(_0x98f0('0x0'));var BPromise=require(_0x98f0('0x1'));var md5=require(_0x98f0('0x2'));var util=require(_0x98f0('0x3'));var Redis=require(_0x98f0('0x4'));var intUtil=require(_0x98f0('0x5'));var config=require(_0x98f0('0x6'));var logger=require('../../../../config/logger')(_0x98f0('0x7'));config[_0x98f0('0x8')]=_[_0x98f0('0x9')](config[_0x98f0('0x8')],{'host':_0x98f0('0xa'),'port':0x18eb});var io=require(_0x98f0('0xb'))(new Redis(config[_0x98f0('0x8')]));function emit(_0x2b86b5,_0x2bce67,_0x38131b){io['to'](_0x2b86b5)[_0x98f0('0xc')](_0x2bce67,_0x38131b);}function getCustomFields(_0x3c42ba,_0x592687){var _0x289df9={};if(_0x3c42ba[_0x98f0('0xd')]>0x0){_[_0x98f0('0xe')](_0x3c42ba,function(_0x1d35d4){if(_0x1d35d4[_0x98f0('0xf')]===_0x98f0('0x10')&&_0x1d35d4['idField']){_0x289df9[_0x1d35d4[_0x98f0('0x11')]]=_0x1d35d4[_0x98f0('0x12')]['toString']();}else if(_0x1d35d4[_0x98f0('0xf')]===_0x98f0('0x13')&&_0x1d35d4[_0x98f0('0x14')]&&_0x1d35d4[_0x98f0('0x11')]&&_0x592687[_0x1d35d4['variableName']]){_0x289df9[_0x1d35d4[_0x98f0('0x11')]]=_0x592687[_0x1d35d4[_0x98f0('0x14')]][_0x98f0('0x15')]();}else if(_0x1d35d4[_0x98f0('0xf')]===_0x98f0('0x16')&&_0x1d35d4[_0x98f0('0x17')]&&_0x1d35d4[_0x98f0('0x17')][_0x98f0('0x18')]&&_0x1d35d4['idField']&&_0x592687[_0x1d35d4[_0x98f0('0x17')][_0x98f0('0x18')]['toLowerCase']()]){_0x289df9[_0x1d35d4[_0x98f0('0x11')]]=_0x592687[_0x1d35d4[_0x98f0('0x17')][_0x98f0('0x18')][_0x98f0('0x19')]()][_0x98f0('0x15')]();}});}return _0x289df9;}function createTicket(_0x1548bb,_0x744e8c,_0x4cd9b9,_0x1c2de2,_0x331249,_0x321c78,_0x5ba836){logger['info'](_0x98f0('0x1a'));var _0x3a7557=_['merge']({'parent_id':'','assigned_user_id':_0x744e8c['id'],'ticketpriorities':'Normal','ticketstatus':_0x98f0('0x1b'),'ticket_title':intUtil[_0x98f0('0x1c')](_0x1c2de2[_0x98f0('0x1d')],_0x331249,'\x20'),'description':intUtil[_0x98f0('0x1c')](_0x1c2de2[_0x98f0('0x1e')],_0x331249,'\x0a'),'contact_id':_0x4cd9b9['id']},getCustomFields(_0x321c78,_0x331249));var _0x3d0d08={'method':_0x98f0('0x1f'),'uri':util['format'](_0x98f0('0x20'),_0x1548bb[_0x98f0('0x21')]),'form':{'operation':_0x98f0('0x22'),'username':_0x1548bb[_0x98f0('0x23')],'sessionName':_0x5ba836[_0x98f0('0x24')],'elementType':_0x98f0('0x25'),'element':JSON[_0x98f0('0x26')](_0x3a7557)},'json':!![]};return request(_0x3d0d08)[_0x98f0('0x27')](function(_0x28896c){if(_0x28896c[_0x98f0('0x28')]){return BPromise[_0x98f0('0x29')]({'id':_0x28896c[_0x98f0('0x2a')]['id']});}else{throw new Error(util['format'](_0x98f0('0x2b'),JSON[_0x98f0('0x26')](_0x28896c[_0x98f0('0x2c')])));}})[_0x98f0('0x2d')](function(_0x529987){var _0x4718fd=_0x529987['statusCode']||0x1f4;logger[_0x98f0('0x2c')]('[vTiger],\x20%s,\x20%s,\x20%s',_0x98f0('0x2e'),_0x4718fd,JSON[_0x98f0('0x26')](_0x529987));});}function getUser(_0x1398ec,_0x13eed7,_0x43358d){if(intUtil[_0x98f0('0x2f')](_0x13eed7)){logger[_0x98f0('0x30')](_0x98f0('0x31'),_0x13eed7);return request({'method':'GET','uri':util[_0x98f0('0x32')](_0x98f0('0x20'),_0x1398ec[_0x98f0('0x21')]),'qs':{'operation':'query','username':_0x1398ec['username'],'sessionName':_0x43358d['sessionName'],'query':util[_0x98f0('0x32')](_0x98f0('0x33'),_0x13eed7)},'json':!![]})[_0x98f0('0x27')](function(_0x231c14){if(_0x231c14[_0x98f0('0x28')]&&_0x231c14[_0x98f0('0x2a')]['length']){logger['info']('Agent\x20found!');return BPromise[_0x98f0('0x29')]({'id':_0x231c14[_0x98f0('0x2a')][0x0]['id'],'email':_0x231c14[_0x98f0('0x2a')][0x0][_0x98f0('0x34')],'name':_0x231c14[_0x98f0('0x2a')][0x0][_0x98f0('0x35')]+'\x20'+_0x231c14['result'][_0x98f0('0x36')]});}else{logger[_0x98f0('0x30')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x98f0('0x29')]({'id':_0x43358d[_0x98f0('0x37')],'email':_0x1398ec[_0x98f0('0x23')],'name':_0x98f0('0x38')});}})['catch'](function(_0x72c628){var _0x1befad=_0x72c628[_0x98f0('0x39')]||0x1f4;logger['error']('[vTiger],\x20%s,\x20%s,\x20%s',_0x98f0('0x3a'),_0x1befad,JSON[_0x98f0('0x26')](_0x72c628));});}else{logger[_0x98f0('0x30')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x98f0('0x29')]({'id':_0x43358d[_0x98f0('0x37')],'email':_0x1398ec[_0x98f0('0x23')],'name':_0x98f0('0x38')})[_0x98f0('0x2d')](function(_0xdc2533){var _0x31d208=_0xdc2533[_0x98f0('0x39')]||0x1f4;logger[_0x98f0('0x2c')](_0x98f0('0x3b'),_0x98f0('0x3a'),_0x31d208,JSON[_0x98f0('0x26')](_0xdc2533));});}}function getEndUser(_0xe0a9f4,_0x5ea256,_0x4158d9,_0x3eac17){logger[_0x98f0('0x30')](_0x98f0('0x3c'),_0x4158d9);return request({'method':_0x98f0('0x3d'),'uri':util[_0x98f0('0x32')](_0x98f0('0x20'),_0xe0a9f4[_0x98f0('0x21')]),'qs':{'operation':'query','username':_0xe0a9f4[_0x98f0('0x23')],'sessionName':_0x3eac17[_0x98f0('0x24')],'query':util[_0x98f0('0x32')](_0x98f0('0x3e'),_0x4158d9,_0x4158d9,_0x4158d9,_0x4158d9,_0x4158d9)},'json':!![]})['then'](function(_0x2edfcd){if(_0x2edfcd[_0x98f0('0x28')]&&_0x2edfcd['result'][_0x98f0('0xd')]){logger[_0x98f0('0x30')](_0x98f0('0x3f'));return BPromise['resolve']({'id':_0x2edfcd['result'][0x0]['id'],'name':_0x2edfcd['result'][0x0][_0x98f0('0x40')]+'\x20'+_0x2edfcd[_0x98f0('0x2a')][0x0][_0x98f0('0x41')],'phone':_0x4158d9});}else{logger[_0x98f0('0x30')](_0x98f0('0x42'));return request({'method':_0x98f0('0x1f'),'uri':util[_0x98f0('0x32')]('%s/webservice.php',_0xe0a9f4[_0x98f0('0x21')]),'form':{'operation':'create','sessionName':_0x3eac17[_0x98f0('0x24')],'elementType':'Contacts','element':JSON[_0x98f0('0x26')]({'lastname':_0x5ea256,'phone':_0x4158d9,'assigned_user_id':'\x20'})},'json':!![]})[_0x98f0('0x27')](function(_0x2f8c6b){logger[_0x98f0('0x30')](_0x98f0('0x43'));return BPromise[_0x98f0('0x29')]({'id':_0x2f8c6b[_0x98f0('0x2a')]['id'],'name':_0x2f8c6b['result'][_0x98f0('0x41')],'phone':_0x2f8c6b[_0x98f0('0x2a')]['phone']});})[_0x98f0('0x2d')](function(_0x3aea8f){var _0x497a60=_0x3aea8f[_0x98f0('0x39')]||0x1f4;logger[_0x98f0('0x2c')](_0x98f0('0x3b'),_0x98f0('0x44'),_0x497a60,JSON[_0x98f0('0x26')](_0x3aea8f));});}});}function getConnection(_0x1cf5d9){var _0x479bff=_0x1cf5d9[_0x98f0('0x23')];var _0x15e988=_0x1cf5d9[_0x98f0('0x45')];return request({'method':_0x98f0('0x3d'),'uri':util[_0x98f0('0x32')]('%s/webservice.php',_0x1cf5d9['remoteUri']),'qs':{'operation':_0x98f0('0x46'),'username':_0x479bff},'json':!![]})[_0x98f0('0x27')](function(_0x18c6c9){if(_0x18c6c9[_0x98f0('0x28')]){return request({'method':'POST','uri':util[_0x98f0('0x32')](_0x98f0('0x20'),_0x1cf5d9[_0x98f0('0x21')]),'form':{'operation':_0x98f0('0x47'),'username':_0x479bff,'accessKey':md5(_0x18c6c9['result'][_0x98f0('0x48')]+_0x15e988)},'json':!![]});}})[_0x98f0('0x27')](function(_0x2c54b9){if(_0x2c54b9[_0x98f0('0x28')]){return BPromise[_0x98f0('0x29')](_0x2c54b9[_0x98f0('0x2a')]);}else{throw new Error(util['format'](_0x98f0('0x49'),_0x1cf5d9['id']));}})[_0x98f0('0x2d')](function(_0x4c1f67){var _0x3f00e3=_0x4c1f67[_0x98f0('0x39')]||0x1f4;logger['error'](_0x98f0('0x3b'),_0x98f0('0x4a'),_0x3f00e3,JSON[_0x98f0('0x26')](_0x4c1f67));});}function request(_0x2cdbc0){logger[_0x98f0('0x30')](_0x98f0('0x4b'),JSON['stringify'](_0x2cdbc0));return rp(_0x2cdbc0);}exports[_0x98f0('0x4c')]=function(_0x93c47f,_0x29414f,_0x3ed620,_0x4a293e,_0x4bcbff,_0x5f171e){var _0x21a099,_0x169778,_0x2c345d,_0x2ea2a9;_0x5f171e[_0x98f0('0x21')]=intUtil[_0x98f0('0x4d')](_0x5f171e['remoteUri']);if(_0x4bcbff&&_0x4bcbff[_0x98f0('0x4e')]){logger[_0x98f0('0x30')](_0x98f0('0x4f'),'Recording\x20is\x20enabled!');_0x29414f[_0x98f0('0x50')]=util[_0x98f0('0x32')](_0x98f0('0x51'),_0x5f171e[_0x98f0('0x52')],_0x29414f[_0x98f0('0x53')],md5(_0x29414f[_0x98f0('0x53')]));}else{_0x29414f[_0x98f0('0x50')]='';}return getConnection(_0x5f171e)[_0x98f0('0x27')](function(_0x87cf75){_0x2ea2a9=_0x87cf75;return getUser(_0x5f171e,_0x4a293e[_0x98f0('0x54')],_0x2ea2a9);})[_0x98f0('0x27')](function(_0x243b9c){_0x21a099=_0x243b9c;logger[_0x98f0('0x30')]('The\x20User\x20ID\x20is:',_0x21a099['id']);return getEndUser(_0x5f171e,_0x29414f['calleridname'],_0x29414f[_0x98f0('0x55')],_0x2ea2a9);})['then'](function(_0x857ecb){_0x169778=_0x857ecb;logger[_0x98f0('0x30')](_0x98f0('0x56'),_0x169778['id']);return createTicket(_0x5f171e,_0x21a099,_0x169778,_0x3ed620,_0x29414f,_0x3ed620[_0x98f0('0x57')],_0x2ea2a9);})[_0x98f0('0x27')](function(_0x1cee05){_0x2c345d=_0x1cee05;logger[_0x98f0('0x30')]('Ticket\x20created!');logger['info']('The\x20Ticket\x20ID\x20is:',_0x2c345d['id']);var _0x19a14e=util[_0x98f0('0x32')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x5f171e[_0x98f0('0x21')],_[_0x98f0('0x58')](_0x2c345d['id'],'x')[0x1]);logger[_0x98f0('0x30')](_0x98f0('0x4f'),_0x98f0('0x59'));emit(util[_0x98f0('0x32')](_0x98f0('0x5a'),_0x4a293e[_0x98f0('0x18')]),_0x98f0('0x5b'),{'uri':_0x19a14e});})[_0x98f0('0x2d')](function(_0x5c73c4){logger[_0x98f0('0x2c')](_0x98f0('0x4f'),JSON[_0x98f0('0x26')](_0x5c73c4));});};exports['outbound']=function(_0x56dafa,_0x208a36,_0x2449f4,_0x5e4f4e,_0x1c1ff5,_0x382a44,_0x3d87f1){var _0x170c4f,_0x391bd2,_0x118b75,_0x5c71ea;_0x382a44['remoteUri']=intUtil['stripTrailingSlash'](_0x382a44['remoteUri']);_0x382a44[_0x98f0('0x52')]=intUtil[_0x98f0('0x4d')](_0x382a44['serverUrl']);if(_0x3d87f1&&_0x3d87f1[_0x98f0('0x5c')]&&_0x3d87f1['recordingFormat']!==_0x98f0('0x5d')){logger[_0x98f0('0x30')](_0x98f0('0x5e'),_0x98f0('0x5f'));_0x208a36[_0x98f0('0x50')]=util['format'](_0x98f0('0x51'),_0x382a44[_0x98f0('0x52')],_0x208a36[_0x98f0('0x53')],md5(_0x208a36[_0x98f0('0x53')]));}return getConnection(_0x382a44)['then'](function(_0x1ea348){_0x5c71ea=_0x1ea348;return getUser(_0x382a44,_0x5e4f4e[_0x98f0('0x54')],_0x5c71ea);})['then'](function(_0x37a2ba){_0x170c4f=_0x37a2ba;logger[_0x98f0('0x30')](_0x98f0('0x60'),_0x170c4f['id']);return getEndUser(_0x382a44,_0x208a36['destcalleridname'],_0x208a36[_0x98f0('0x61')],_0x5c71ea);})[_0x98f0('0x27')](function(_0x3e0bf0){_0x391bd2=_0x3e0bf0;logger[_0x98f0('0x30')](_0x98f0('0x56'),_0x391bd2['id']);return createTicket(_0x382a44,_0x170c4f,_0x391bd2,_0x2449f4,_0x208a36,_0x2449f4['Fields'],_0x5c71ea);})['then'](function(_0xbd4c24){_0x118b75=_0xbd4c24;logger[_0x98f0('0x30')](_0x98f0('0x62'));logger[_0x98f0('0x30')](_0x98f0('0x63'),_0x118b75['id']);var _0x3005b4=util[_0x98f0('0x32')](_0x98f0('0x64'),_0x382a44[_0x98f0('0x21')],_[_0x98f0('0x58')](_0x118b75['id'],'x')[0x1]);logger[_0x98f0('0x30')](_0x98f0('0x5e'),_0x98f0('0x59'));emit(util[_0x98f0('0x32')](_0x98f0('0x5a'),_0x5e4f4e['name']),_0x98f0('0x5b'),{'uri':_0x3005b4});})[_0x98f0('0x2d')](function(_0x5b2563){logger[_0x98f0('0x2c')](_0x98f0('0x5e'),JSON[_0x98f0('0x26')](_0x5b2563));});};exports[_0x98f0('0x65')]=function(_0x3d557c,_0x18931b,_0x18fbd8,_0x1ce140,_0x3a2418,_0xa9eadb){var _0x50b878,_0x30f5d8,_0x564e91,_0xffa5ed;_0xa9eadb[_0x98f0('0x21')]=intUtil[_0x98f0('0x4d')](_0xa9eadb[_0x98f0('0x21')]);_0xa9eadb[_0x98f0('0x52')]=intUtil[_0x98f0('0x4d')](_0xa9eadb[_0x98f0('0x52')]);if(_0x3a2418&&_0x3a2418[_0x98f0('0x4e')]){logger[_0x98f0('0x30')]('['+_0x18931b['lastevent'][_0x98f0('0x66')]()+']',_0x98f0('0x5f'));_0x18931b[_0x98f0('0x50')]=util[_0x98f0('0x32')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0xa9eadb[_0x98f0('0x52')],_0x18931b[_0x98f0('0x53')],md5(_0x18931b[_0x98f0('0x53')]));}else{_0x18931b['recordingURL']='';}return getConnection(_0xa9eadb)[_0x98f0('0x27')](function(_0x39820e){_0xffa5ed=_0x39820e;return getUser(_0xa9eadb,'',_0xffa5ed);})[_0x98f0('0x27')](function(_0x94dbe0){_0x50b878=_0x94dbe0;logger[_0x98f0('0x30')]('The\x20User\x20ID\x20is:',_0x50b878['id']);return getEndUser(_0xa9eadb,_0x18931b['calleridname'],_0x18931b[_0x98f0('0x55')],_0xffa5ed);})[_0x98f0('0x27')](function(_0x219eef){_0x30f5d8=_0x219eef;logger['info'](_0x98f0('0x56'),_0x30f5d8['id']);return createTicket(_0xa9eadb,_0x50b878,_0x30f5d8,_0x18fbd8,_0x18931b,_0x18fbd8[_0x98f0('0x57')],_0xffa5ed);})[_0x98f0('0x27')](function(_0x5359f6){_0x564e91=_0x5359f6;logger[_0x98f0('0x30')]('Ticket\x20created!');logger[_0x98f0('0x30')](_0x98f0('0x63'),_0x564e91['id']);})[_0x98f0('0x2d')](function(_0x55d676){logger[_0x98f0('0x2c')]('['+_0x18931b[_0x98f0('0x67')][_0x98f0('0x66')]()+']',JSON['stringify'](_0x55d676));});}; \ No newline at end of file +var _0x87e1=['../../../../config/logger','redis','defaults','localhost','emit','length','forEach','type','string','idField','content','toString','variableName','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','Descriptions','POST','format','remoteUri','create','sessionName','HelpDesk','stringify','then','success','result','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','error','catch','createTicket','validateEmail','%s/webservice.php','query','username','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','Agent\x20found!','email1','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','resolve','userId','admin','statusCode','[vTiger],\x20%s,\x20%s,\x20%s','getUser','Searching\x20end\x20user\x20with\x20phone','GET','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','getEndUser','accessKey','login','token','Account\x20%d\x20is\x20not\x20valid','getConnection','stripTrailingSlash','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','email','destcalleridnum','user:%s','unmanaged','lastevent','toUpperCase','lodash','bluebird','md5','ioredis','./util'];(function(_0x47a12a,_0x70f591){var _0x30cd40=function(_0x46b68f){while(--_0x46b68f){_0x47a12a['push'](_0x47a12a['shift']());}};_0x30cd40(++_0x70f591);}(_0x87e1,0x187));var _0x187e=function(_0x1be448,_0x1fb778){_0x1be448=_0x1be448-0x0;var _0x39a54d=_0x87e1[_0x1be448];return _0x39a54d;};'use strict';var _=require(_0x187e('0x0'));var rp=require('request-promise');var BPromise=require(_0x187e('0x1'));var md5=require(_0x187e('0x2'));var util=require('util');var Redis=require(_0x187e('0x3'));var intUtil=require(_0x187e('0x4'));var config=require('../../../../config/environment');var logger=require(_0x187e('0x5'))('vTiger');config[_0x187e('0x6')]=_[_0x187e('0x7')](config['redis'],{'host':_0x187e('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x187e('0x6')]));function emit(_0x4915f4,_0x1e725f,_0x3e7717){io['to'](_0x4915f4)[_0x187e('0x9')](_0x1e725f,_0x3e7717);}function getCustomFields(_0x5e76fd,_0x2eebee){var _0xa467bb={};if(_0x5e76fd[_0x187e('0xa')]>0x0){_[_0x187e('0xb')](_0x5e76fd,function(_0x2fc86f){if(_0x2fc86f[_0x187e('0xc')]===_0x187e('0xd')&&_0x2fc86f[_0x187e('0xe')]){_0xa467bb[_0x2fc86f[_0x187e('0xe')]]=_0x2fc86f[_0x187e('0xf')][_0x187e('0x10')]();}else if(_0x2fc86f[_0x187e('0xc')]==='variable'&&_0x2fc86f[_0x187e('0x11')]&&_0x2fc86f[_0x187e('0xe')]&&_0x2eebee[_0x2fc86f[_0x187e('0x11')]]){_0xa467bb[_0x2fc86f[_0x187e('0xe')]]=_0x2eebee[_0x2fc86f['variableName']][_0x187e('0x10')]();}else if(_0x2fc86f['type']==='customVariable'&&_0x2fc86f[_0x187e('0x12')]&&_0x2fc86f[_0x187e('0x12')][_0x187e('0x13')]&&_0x2fc86f['idField']&&_0x2eebee[_0x2fc86f[_0x187e('0x12')][_0x187e('0x13')][_0x187e('0x14')]()]){_0xa467bb[_0x2fc86f[_0x187e('0xe')]]=_0x2eebee[_0x2fc86f[_0x187e('0x12')]['name'][_0x187e('0x14')]()][_0x187e('0x10')]();}});}return _0xa467bb;}function createTicket(_0x793504,_0x4d6b65,_0x3a0712,_0x4904be,_0x47b3f8,_0x5e4b0a,_0x3b364c){logger[_0x187e('0x15')](_0x187e('0x16'));var _0x412c17=_[_0x187e('0x17')]({'parent_id':'','assigned_user_id':_0x4d6b65['id'],'ticketpriorities':_0x187e('0x18'),'ticketstatus':_0x187e('0x19'),'ticket_title':intUtil['getString'](_0x4904be['Subjects'],_0x47b3f8,'\x20'),'description':intUtil['getString'](_0x4904be[_0x187e('0x1a')],_0x47b3f8,'\x0a'),'contact_id':_0x3a0712['id']},getCustomFields(_0x5e4b0a,_0x47b3f8));var _0x1409b9={'method':_0x187e('0x1b'),'uri':util[_0x187e('0x1c')]('%s/webservice.php',_0x793504[_0x187e('0x1d')]),'form':{'operation':_0x187e('0x1e'),'username':_0x793504['username'],'sessionName':_0x3b364c[_0x187e('0x1f')],'elementType':_0x187e('0x20'),'element':JSON[_0x187e('0x21')](_0x412c17)},'json':!![]};return request(_0x1409b9)[_0x187e('0x22')](function(_0x463640){if(_0x463640[_0x187e('0x23')]){return BPromise['resolve']({'id':_0x463640[_0x187e('0x24')]['id']});}else{throw new Error(util[_0x187e('0x1c')](_0x187e('0x25'),JSON['stringify'](_0x463640[_0x187e('0x26')])));}})[_0x187e('0x27')](function(_0x425309){var _0xedae39=_0x425309['statusCode']||0x1f4;logger[_0x187e('0x26')]('[vTiger],\x20%s,\x20%s,\x20%s',_0x187e('0x28'),_0xedae39,JSON[_0x187e('0x21')](_0x425309));});}function getUser(_0x219e70,_0x39b0c6,_0x5ab526){if(intUtil[_0x187e('0x29')](_0x39b0c6)){logger[_0x187e('0x15')]('Getting\x20agent\x20with\x20email',_0x39b0c6);return request({'method':'GET','uri':util[_0x187e('0x1c')](_0x187e('0x2a'),_0x219e70[_0x187e('0x1d')]),'qs':{'operation':_0x187e('0x2b'),'username':_0x219e70[_0x187e('0x2c')],'sessionName':_0x5ab526[_0x187e('0x1f')],'query':util[_0x187e('0x1c')](_0x187e('0x2d'),_0x39b0c6)},'json':!![]})[_0x187e('0x22')](function(_0x35cb37){if(_0x35cb37[_0x187e('0x23')]&&_0x35cb37['result'][_0x187e('0xa')]){logger[_0x187e('0x15')](_0x187e('0x2e'));return BPromise['resolve']({'id':_0x35cb37[_0x187e('0x24')][0x0]['id'],'email':_0x35cb37[_0x187e('0x24')][0x0][_0x187e('0x2f')],'name':_0x35cb37['result'][0x0]['first_name']+'\x20'+_0x35cb37['result'][_0x187e('0x30')]});}else{logger[_0x187e('0x15')](_0x187e('0x31'));return BPromise[_0x187e('0x32')]({'id':_0x5ab526[_0x187e('0x33')],'email':_0x219e70[_0x187e('0x2c')],'name':_0x187e('0x34')});}})[_0x187e('0x27')](function(_0x24377c){var _0x25223e=_0x24377c[_0x187e('0x35')]||0x1f4;logger[_0x187e('0x26')](_0x187e('0x36'),_0x187e('0x37'),_0x25223e,JSON[_0x187e('0x21')](_0x24377c));});}else{logger[_0x187e('0x15')](_0x187e('0x31'));return BPromise['resolve']({'id':_0x5ab526[_0x187e('0x33')],'email':_0x219e70[_0x187e('0x2c')],'name':_0x187e('0x34')})[_0x187e('0x27')](function(_0x3b5b08){var _0x21fc97=_0x3b5b08[_0x187e('0x35')]||0x1f4;logger[_0x187e('0x26')](_0x187e('0x36'),_0x187e('0x37'),_0x21fc97,JSON[_0x187e('0x21')](_0x3b5b08));});}}function getEndUser(_0x192dc8,_0xf0e7c3,_0x4637e4,_0x531267){logger[_0x187e('0x15')](_0x187e('0x38'),_0x4637e4);return request({'method':_0x187e('0x39'),'uri':util[_0x187e('0x1c')](_0x187e('0x2a'),_0x192dc8[_0x187e('0x1d')]),'qs':{'operation':'query','username':_0x192dc8['username'],'sessionName':_0x531267[_0x187e('0x1f')],'query':util[_0x187e('0x1c')](_0x187e('0x3a'),_0x4637e4,_0x4637e4,_0x4637e4,_0x4637e4,_0x4637e4)},'json':!![]})['then'](function(_0x440d8c){if(_0x440d8c['success']&&_0x440d8c[_0x187e('0x24')]['length']){logger[_0x187e('0x15')](_0x187e('0x3b'));return BPromise['resolve']({'id':_0x440d8c[_0x187e('0x24')][0x0]['id'],'name':_0x440d8c[_0x187e('0x24')][0x0][_0x187e('0x3c')]+'\x20'+_0x440d8c[_0x187e('0x24')][0x0][_0x187e('0x3d')],'phone':_0x4637e4});}else{logger[_0x187e('0x15')](_0x187e('0x3e'));return request({'method':_0x187e('0x1b'),'uri':util[_0x187e('0x1c')](_0x187e('0x2a'),_0x192dc8[_0x187e('0x1d')]),'form':{'operation':_0x187e('0x1e'),'sessionName':_0x531267[_0x187e('0x1f')],'elementType':_0x187e('0x3f'),'element':JSON[_0x187e('0x21')]({'lastname':_0xf0e7c3,'phone':_0x4637e4,'assigned_user_id':'\x20'})},'json':!![]})[_0x187e('0x22')](function(_0x28e277){logger[_0x187e('0x15')]('Enduser\x20created.');return BPromise[_0x187e('0x32')]({'id':_0x28e277['result']['id'],'name':_0x28e277['result'][_0x187e('0x3d')],'phone':_0x28e277[_0x187e('0x24')]['phone']});})[_0x187e('0x27')](function(_0x38da18){var _0x3b0df6=_0x38da18[_0x187e('0x35')]||0x1f4;logger[_0x187e('0x26')](_0x187e('0x36'),_0x187e('0x40'),_0x3b0df6,JSON[_0x187e('0x21')](_0x38da18));});}});}function getConnection(_0x4f57d4){var _0x22865d=_0x4f57d4['username'];var _0x4f393d=_0x4f57d4[_0x187e('0x41')];return request({'method':_0x187e('0x39'),'uri':util['format'](_0x187e('0x2a'),_0x4f57d4[_0x187e('0x1d')]),'qs':{'operation':'getchallenge','username':_0x22865d},'json':!![]})[_0x187e('0x22')](function(_0x7662f6){if(_0x7662f6['success']){return request({'method':'POST','uri':util['format'](_0x187e('0x2a'),_0x4f57d4[_0x187e('0x1d')]),'form':{'operation':_0x187e('0x42'),'username':_0x22865d,'accessKey':md5(_0x7662f6['result'][_0x187e('0x43')]+_0x4f393d)},'json':!![]});}})['then'](function(_0x1e96c5){if(_0x1e96c5[_0x187e('0x23')]){return BPromise[_0x187e('0x32')](_0x1e96c5[_0x187e('0x24')]);}else{throw new Error(util[_0x187e('0x1c')](_0x187e('0x44'),_0x4f57d4['id']));}})[_0x187e('0x27')](function(_0x1e946c){var _0x78c2f4=_0x1e946c[_0x187e('0x35')]||0x1f4;logger[_0x187e('0x26')](_0x187e('0x36'),_0x187e('0x45'),_0x78c2f4,JSON[_0x187e('0x21')](_0x1e946c));});}function request(_0x43660c){logger['info']('[HTTP]',JSON[_0x187e('0x21')](_0x43660c));return rp(_0x43660c);}exports['queue']=function(_0x561863,_0x24e53e,_0x2a2df0,_0x16a3b4,_0x2a3969,_0x29ec06){var _0x31ba97,_0x3fe433,_0x1d6dc9,_0x5a9a2c;_0x29ec06[_0x187e('0x1d')]=intUtil[_0x187e('0x46')](_0x29ec06[_0x187e('0x1d')]);if(_0x2a3969&&_0x2a3969[_0x187e('0x47')]){logger['info'](_0x187e('0x48'),'Recording\x20is\x20enabled!');_0x24e53e[_0x187e('0x49')]=util['format'](_0x187e('0x4a'),_0x29ec06[_0x187e('0x4b')],_0x24e53e[_0x187e('0x4c')],md5(_0x24e53e[_0x187e('0x4c')]));}else{_0x24e53e[_0x187e('0x49')]='';}return getConnection(_0x29ec06)[_0x187e('0x22')](function(_0x4a89fb){_0x5a9a2c=_0x4a89fb;return getUser(_0x29ec06,_0x16a3b4['email'],_0x5a9a2c);})[_0x187e('0x22')](function(_0x27c44c){_0x31ba97=_0x27c44c;logger[_0x187e('0x15')](_0x187e('0x4d'),_0x31ba97['id']);return getEndUser(_0x29ec06,_0x24e53e[_0x187e('0x4e')],_0x24e53e[_0x187e('0x4f')],_0x5a9a2c);})[_0x187e('0x22')](function(_0x3c604e){_0x3fe433=_0x3c604e;logger['info'](_0x187e('0x50'),_0x3fe433['id']);return createTicket(_0x29ec06,_0x31ba97,_0x3fe433,_0x2a2df0,_0x24e53e,_0x2a2df0[_0x187e('0x51')],_0x5a9a2c);})[_0x187e('0x22')](function(_0x2dd311){_0x1d6dc9=_0x2dd311;logger[_0x187e('0x15')](_0x187e('0x52'));logger[_0x187e('0x15')](_0x187e('0x53'),_0x1d6dc9['id']);var _0x1514c3=util[_0x187e('0x1c')](_0x187e('0x54'),_0x29ec06[_0x187e('0x1d')],_[_0x187e('0x55')](_0x1d6dc9['id'],'x')[0x1]);logger[_0x187e('0x15')]('[QUEUE]',_0x187e('0x56'));emit(util['format']('user:%s',_0x16a3b4['name']),_0x187e('0x57'),{'uri':_0x1514c3});})[_0x187e('0x27')](function(_0x27ab2a){logger['error'](_0x187e('0x48'),JSON[_0x187e('0x21')](_0x27ab2a));});};exports[_0x187e('0x58')]=function(_0x36fc2d,_0x603ec8,_0x79b737,_0x40660c,_0x3f7127,_0x4fad84,_0x17a6e3){var _0xf05f7f,_0x4f7373,_0x2ccf9f,_0x34f5b5;_0x4fad84[_0x187e('0x1d')]=intUtil['stripTrailingSlash'](_0x4fad84[_0x187e('0x1d')]);_0x4fad84['serverUrl']=intUtil['stripTrailingSlash'](_0x4fad84[_0x187e('0x4b')]);if(_0x17a6e3&&_0x17a6e3[_0x187e('0x59')]&&_0x17a6e3[_0x187e('0x59')]!==_0x187e('0x5a')){logger['info'](_0x187e('0x5b'),_0x187e('0x5c'));_0x603ec8['recordingURL']=util[_0x187e('0x1c')](_0x187e('0x4a'),_0x4fad84[_0x187e('0x4b')],_0x603ec8['uniqueid'],md5(_0x603ec8[_0x187e('0x4c')]));}return getConnection(_0x4fad84)[_0x187e('0x22')](function(_0x226e10){_0x34f5b5=_0x226e10;return getUser(_0x4fad84,_0x40660c[_0x187e('0x5d')],_0x34f5b5);})[_0x187e('0x22')](function(_0x35e3bb){_0xf05f7f=_0x35e3bb;logger['info']('The\x20User\x20ID\x20is:',_0xf05f7f['id']);return getEndUser(_0x4fad84,_0x603ec8['destcalleridname'],_0x603ec8[_0x187e('0x5e')],_0x34f5b5);})['then'](function(_0x5e4733){_0x4f7373=_0x5e4733;logger[_0x187e('0x15')]('The\x20Enduser\x20ID\x20is:',_0x4f7373['id']);return createTicket(_0x4fad84,_0xf05f7f,_0x4f7373,_0x79b737,_0x603ec8,_0x79b737['Fields'],_0x34f5b5);})[_0x187e('0x22')](function(_0x58b504){_0x2ccf9f=_0x58b504;logger['info'](_0x187e('0x52'));logger[_0x187e('0x15')](_0x187e('0x53'),_0x2ccf9f['id']);var _0x1c4b09=util[_0x187e('0x1c')](_0x187e('0x54'),_0x4fad84['remoteUri'],_[_0x187e('0x55')](_0x2ccf9f['id'],'x')[0x1]);logger[_0x187e('0x15')]('[OUTBOUND]',_0x187e('0x56'));emit(util[_0x187e('0x1c')](_0x187e('0x5f'),_0x40660c[_0x187e('0x13')]),_0x187e('0x57'),{'uri':_0x1c4b09});})[_0x187e('0x27')](function(_0x53dc89){logger[_0x187e('0x26')]('[OUTBOUND]',JSON[_0x187e('0x21')](_0x53dc89));});};exports[_0x187e('0x60')]=function(_0x8b296c,_0x350622,_0x425684,_0x33717f,_0x535d36,_0x28d769){var _0x46cd62,_0x2c929b,_0x208435,_0x4e4123;_0x28d769['remoteUri']=intUtil[_0x187e('0x46')](_0x28d769[_0x187e('0x1d')]);_0x28d769['serverUrl']=intUtil['stripTrailingSlash'](_0x28d769[_0x187e('0x4b')]);if(_0x535d36&&_0x535d36[_0x187e('0x47')]){logger['info']('['+_0x350622[_0x187e('0x61')]['toUpperCase']()+']',_0x187e('0x5c'));_0x350622['recordingURL']=util[_0x187e('0x1c')](_0x187e('0x4a'),_0x28d769[_0x187e('0x4b')],_0x350622[_0x187e('0x4c')],md5(_0x350622['uniqueid']));}else{_0x350622['recordingURL']='';}return getConnection(_0x28d769)[_0x187e('0x22')](function(_0x2f68d4){_0x4e4123=_0x2f68d4;return getUser(_0x28d769,'',_0x4e4123);})['then'](function(_0xefa2c2){_0x46cd62=_0xefa2c2;logger[_0x187e('0x15')](_0x187e('0x4d'),_0x46cd62['id']);return getEndUser(_0x28d769,_0x350622[_0x187e('0x4e')],_0x350622[_0x187e('0x4f')],_0x4e4123);})[_0x187e('0x22')](function(_0x3e1578){_0x2c929b=_0x3e1578;logger[_0x187e('0x15')]('The\x20Enduser\x20ID\x20is:',_0x2c929b['id']);return createTicket(_0x28d769,_0x46cd62,_0x2c929b,_0x425684,_0x350622,_0x425684['Fields'],_0x4e4123);})[_0x187e('0x22')](function(_0x311dc3){_0x208435=_0x311dc3;logger[_0x187e('0x15')](_0x187e('0x52'));logger[_0x187e('0x15')](_0x187e('0x53'),_0x208435['id']);})['catch'](function(_0x1192f9){logger[_0x187e('0x26')]('['+_0x350622[_0x187e('0x61')][_0x187e('0x62')]()+']',JSON[_0x187e('0x21')](_0x1192f9));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/zendesk.js b/server/services/ami/trigger/integration/zendesk.js index 9648c44..971f5e5 100644 --- a/server/services/ami/trigger/integration/zendesk.js +++ b/server/services/ami/trigger/integration/zendesk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6d4b=['[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','newTab','user:%s','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','inspect','monitor_format','lastevent','toUpperCase','calleridname','calleridnum','\x20Error\x20running\x20Zendesk\x20integration','lodash','request-promise','md5','ioredis','./util','../../../../config/logger','zendesk','redis','defaults','localhost','emit','application/json','info','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri','merge','Tags','Subjects','getString','Descriptions','Fields','validateEmail','Getting\x20agent\x20with\x20email','then','count','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','%s/search.json','type:user\x20role:end-user\x20phone:%s','results','length','filter','end-user','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','POST','Enduser\x20created.','authType','password','username','token','%s/token:%s','Basic\x20%s','toString','base64','debug','[HTTP]','stringify','GET','map','forEach','type','string','nameField','customField','content','idField','custom_fields','push','variable','variableName','customVariable','Variable','name','toLowerCase','queue','stripTrailingSlash','serverUrl','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','Authorization','email','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','replace','/api/v2','error','Zendesk\x20account\x20type\x20not\x20recognized','catch','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','outbound','recordingFormat','none'];(function(_0x581b8c,_0x45fafe){var _0x3e768f=function(_0x194578){while(--_0x194578){_0x581b8c['push'](_0x581b8c['shift']());}};_0x3e768f(++_0x45fafe);}(_0x6d4b,0x158));var _0xb6d4=function(_0x3f1fb2,_0x22be7b){_0x3f1fb2=_0x3f1fb2-0x0;var _0x1d6c89=_0x6d4b[_0x3f1fb2];return _0x1d6c89;};'use strict';var _=require(_0xb6d4('0x0'));var rp=require(_0xb6d4('0x1'));var md5=require(_0xb6d4('0x2'));var util=require('util');var Redis=require(_0xb6d4('0x3'));var intUtil=require(_0xb6d4('0x4'));var config=require('../../../../config/environment');var logger=require(_0xb6d4('0x5'))(_0xb6d4('0x6'));config[_0xb6d4('0x7')]=_[_0xb6d4('0x8')](config[_0xb6d4('0x7')],{'host':_0xb6d4('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xb6d4('0x7')]));function emit(_0x2a792,_0x52a9b5,_0x44ea9d){io['to'](_0x2a792)[_0xb6d4('0xa')](_0x52a9b5,_0x44ea9d);}var headers={'Content-Type':_0xb6d4('0xb'),'Accept':_0xb6d4('0xb')};function getTicket(_0x5e582d,_0x12ff54,_0x118c2f,_0x293b18,_0x17c770){logger[_0xb6d4('0xc')](_0xb6d4('0xd'));return request({'uri':util[_0xb6d4('0xe')](_0xb6d4('0xf'),_0x5e582d[_0xb6d4('0x10')]),'method':'POST','body':{'ticket':_[_0xb6d4('0x11')]({'requester_id':_0x118c2f['id'],'submitter_id':_0x12ff54?_0x12ff54['id']:undefined,'assignee_id':_0x12ff54?_0x12ff54['id']:undefined,'tags':getTags(_0x293b18[_0xb6d4('0x12')],'name'),'subject':intUtil['getString'](_0x293b18[_0xb6d4('0x13')],_0x17c770,'\x20'),'description':intUtil['getString'](_0x293b18['Descriptions'],_0x17c770,'\x0a'),'comment':{'public':![],'body':intUtil[_0xb6d4('0x14')](_0x293b18[_0xb6d4('0x15')],_0x17c770,'\x0a')}},getCustomFields(_0x293b18[_0xb6d4('0x16')],_0x17c770))}})['then'](function(_0x2375c5){logger[_0xb6d4('0xc')]('Ticket\x20created!');return _0x2375c5['ticket'];});}function getUser(_0x582d68,_0x1c7284){if(intUtil[_0xb6d4('0x17')](_0x1c7284)){logger['info'](_0xb6d4('0x18'),_0x1c7284);return request({'uri':util[_0xb6d4('0xe')]('%s/search.json',_0x582d68[_0xb6d4('0x10')]),'qs':{'query':util['format']('type:user\x20role:agent\x20email:%s',_0x1c7284)}})[_0xb6d4('0x19')](function(_0x222cb8){if(_0x222cb8[_0xb6d4('0x1a')]){logger[_0xb6d4('0xc')](_0xb6d4('0x1b'));return _['find'](_0x222cb8['results'],{'email':_0x1c7284,'role':'agent'});}else{logger['info'](_0xb6d4('0x1c'));return request({'uri':util[_0xb6d4('0xe')](_0xb6d4('0x1d'),_0x582d68[_0xb6d4('0x10')])})[_0xb6d4('0x19')](function(_0x91ed3){logger[_0xb6d4('0xc')](_0xb6d4('0x1e'));return _0x91ed3[_0xb6d4('0x1f')];});}});}else{logger['info'](_0xb6d4('0x1c'));return request({'uri':util[_0xb6d4('0xe')](_0xb6d4('0x1d'),_0x582d68[_0xb6d4('0x10')])})[_0xb6d4('0x19')](function(_0x30de95){logger['info'](_0xb6d4('0x1e'));return _0x30de95['user'];});}}function getEndUser(_0xa5942c,_0x2eaf96,_0x48eb84){logger['info']('Searching\x20enduser\x20with\x20phone',_0x48eb84);return request({'uri':util['format'](_0xb6d4('0x20'),_0xa5942c['remoteUri']),'qs':{'query':util['format'](_0xb6d4('0x21'),_0x48eb84)}})[_0xb6d4('0x19')](function(_0x1c1f21){var _0x1a6657;if(_0x1c1f21[_0xb6d4('0x22')][_0xb6d4('0x23')]){_0x1c1f21[_0xb6d4('0x22')]=_[_0xb6d4('0x24')](_0x1c1f21[_0xb6d4('0x22')],{'suspended':![],'role':_0xb6d4('0x25')});if(_0x1c1f21[_0xb6d4('0x22')][_0xb6d4('0x23')]){_0x1a6657=_['first'](_0x1c1f21[_0xb6d4('0x22')]);}}if(_0x1a6657){logger['info'](_0xb6d4('0x26'));return _0x1a6657;}else{logger[_0xb6d4('0xc')](_0xb6d4('0x27'));return request({'uri':util[_0xb6d4('0xe')](_0xb6d4('0x28'),_0xa5942c['remoteUri']),'method':_0xb6d4('0x29'),'body':{'user':{'role':'end-user','name':util[_0xb6d4('0xe')]('Caller\x20-\x20%s',_0x2eaf96||_0x48eb84),'phone':_0x48eb84}}})['then'](function(_0x3fc1ca){logger[_0xb6d4('0xc')](_0xb6d4('0x2a'));return _0x3fc1ca[_0xb6d4('0x1f')];});}});}function getAuth(_0x4501b3){var _0x42b0e6;if(_0x4501b3[_0xb6d4('0x2b')]===_0xb6d4('0x2c')){_0x42b0e6=util['format']('%s:%s',_0x4501b3[_0xb6d4('0x2d')],_0x4501b3[_0xb6d4('0x2c')]);}else if(_0x4501b3[_0xb6d4('0x2b')]===_0xb6d4('0x2e')){_0x42b0e6=util[_0xb6d4('0xe')](_0xb6d4('0x2f'),_0x4501b3[_0xb6d4('0x2d')],_0x4501b3['token']);}return util[_0xb6d4('0xe')](_0xb6d4('0x30'),new Buffer(_0x42b0e6)[_0xb6d4('0x31')](_0xb6d4('0x32')));}function request(_0x44fc22){logger[_0xb6d4('0x33')](_0xb6d4('0x34'),JSON[_0xb6d4('0x35')](_0x44fc22));return rp(_[_0xb6d4('0x8')](_0x44fc22,{'method':_0xb6d4('0x36'),'headers':headers,'json':!![]}));}function getTags(_0x477059,_0x50dbe0){var _0x4a16a7=[];if(_0x477059&&_0x477059[_0xb6d4('0x23')]>0x0){_0x4a16a7=_[_0xb6d4('0x37')](_0x477059,_0x50dbe0);}return _0x4a16a7;}function getCustomFields(_0x2e0ffd,_0x43ba29){var _0x7d9986=[];var _0x31f145={'custom_fields':[]};if(_0x2e0ffd[_0xb6d4('0x23')]>0x0){_[_0xb6d4('0x38')](_0x2e0ffd,function(_0x1e011c){if(_0x1e011c[_0xb6d4('0x39')]===_0xb6d4('0x3a')&&_0x1e011c[_0xb6d4('0x3b')]&&!_0x1e011c[_0xb6d4('0x3c')]){_0x31f145[_0x1e011c[_0xb6d4('0x3b')]['toLowerCase']()]=_0x1e011c[_0xb6d4('0x3d')][_0xb6d4('0x31')]();}else if(_0x1e011c['type']===_0xb6d4('0x3a')&&_0x1e011c[_0xb6d4('0x3e')]&&_0x1e011c[_0xb6d4('0x3c')]){_0x31f145[_0xb6d4('0x3f')][_0xb6d4('0x40')]({'id':_0x1e011c['idField'],'value':_0x1e011c['content'][_0xb6d4('0x31')]()});}else if(_0x1e011c['type']===_0xb6d4('0x41')&&_0x1e011c[_0xb6d4('0x42')]&&_0x1e011c['idField']&&_0x1e011c[_0xb6d4('0x3c')]){_0x43ba29[_0x1e011c[_0xb6d4('0x42')]]&&_0x31f145[_0xb6d4('0x3f')]['push']({'id':_0x1e011c['idField'],'value':_0x43ba29[_0x1e011c['variableName']][_0xb6d4('0x31')]()});}else if(_0x1e011c[_0xb6d4('0x39')]===_0xb6d4('0x43')&&_0x1e011c['Variable']&&_0x1e011c['Variable']['name']&&_0x1e011c[_0xb6d4('0x3e')]&&_0x1e011c['customField']){_0x43ba29[_0x1e011c[_0xb6d4('0x44')][_0xb6d4('0x45')][_0xb6d4('0x46')]()]&&_0x31f145[_0xb6d4('0x3f')][_0xb6d4('0x40')]({'id':_0x1e011c[_0xb6d4('0x3e')],'value':_0x43ba29[_0x1e011c[_0xb6d4('0x44')][_0xb6d4('0x45')][_0xb6d4('0x46')]()]['toString']()});}});}return _0x31f145;}exports[_0xb6d4('0x47')]=function(_0x3323c9,_0x46d9bb,_0x3f1f1b,_0x198c7f,_0x14c547,_0x1a0e54){var _0x51efc6,_0x4ac561;_0x1a0e54['remoteUri']=intUtil[_0xb6d4('0x48')](_0x1a0e54[_0xb6d4('0x10')]);_0x1a0e54[_0xb6d4('0x49')]=intUtil['stripTrailingSlash'](_0x1a0e54['serverUrl']);if(_0x14c547&&_0x14c547['monitor_format']){logger['info'](_0xb6d4('0x4a'),'Recording\x20is\x20enabled!');_0x46d9bb['recordingURL']=util['format'](_0xb6d4('0x4b'),_0x1a0e54[_0xb6d4('0x49')],_0x46d9bb[_0xb6d4('0x4c')],md5(_0x46d9bb[_0xb6d4('0x4c')]));}else{_0x46d9bb[_0xb6d4('0x4d')]='';}headers[_0xb6d4('0x4e')]=getAuth(_0x1a0e54);return getUser(_0x1a0e54,_0x198c7f[_0xb6d4('0x4f')])[_0xb6d4('0x19')](function(_0x5cdcb8){_0x51efc6=_0x5cdcb8;logger[_0xb6d4('0xc')](_0xb6d4('0x50'),_0x51efc6['id']);return getEndUser(_0x1a0e54,_0x46d9bb['calleridname'],_0x46d9bb['calleridnum']);})[_0xb6d4('0x19')](function(_0x52b22f){_0x4ac561=_0x52b22f;logger[_0xb6d4('0xc')](_0xb6d4('0x51'),_0x4ac561['id']);return getTicket(_0x1a0e54,_0x51efc6,_0x4ac561,_0x3f1f1b,_0x46d9bb);})[_0xb6d4('0x19')](function(_0x2fd7a4){if(_0x2fd7a4){logger['info']('The\x20Ticket\x20ID\x20is:',_0x2fd7a4['id']);switch(_0x1a0e54[_0xb6d4('0x39')]){case _0xb6d4('0x52'):logger[_0xb6d4('0xc')](_0xb6d4('0x4a'),_0xb6d4('0x53'));return request({'uri':util['format'](_0xb6d4('0x54'),_0x1a0e54['remoteUri'],_0x51efc6['id'],_0x2fd7a4['id']),'method':_0xb6d4('0x29')});case'newTab':logger[_0xb6d4('0xc')](_0xb6d4('0x4a'),_0xb6d4('0x55'));emit(util[_0xb6d4('0xe')]('user:%s',_0x198c7f[_0xb6d4('0x45')]),_0xb6d4('0x56'),{'uri':util['format']('%s/agent/tickets/%s',_0x1a0e54[_0xb6d4('0x10')][_0xb6d4('0x57')](_0xb6d4('0x58'),''),_0x2fd7a4['id'])});break;default:logger[_0xb6d4('0x59')](_0xb6d4('0x4a'),_0xb6d4('0x5a'));}}})[_0xb6d4('0x5b')](function(_0x21d756){logger[_0xb6d4('0x59')](_0xb6d4('0x5c'),util['inspect'](_0x21d756,{'showHidden':!![],'depth':null}));});};exports[_0xb6d4('0x5d')]=function(_0x28c54b,_0x3a7b0d,_0x55e54e,_0x6349ea,_0x36839f,_0x538b23,_0x200646){var _0x56ef1c,_0x4f8ba3;_0x538b23['remoteUri']=intUtil[_0xb6d4('0x48')](_0x538b23[_0xb6d4('0x10')]);_0x538b23[_0xb6d4('0x49')]=intUtil[_0xb6d4('0x48')](_0x538b23['serverUrl']);if(_0x200646&&_0x200646[_0xb6d4('0x5e')]&&_0x200646['recordingFormat']!==_0xb6d4('0x5f')){logger['info'](_0xb6d4('0x60'),_0xb6d4('0x61'));_0x3a7b0d[_0xb6d4('0x4d')]=util[_0xb6d4('0xe')](_0xb6d4('0x4b'),_0x538b23[_0xb6d4('0x49')],_0x3a7b0d['uniqueid'],md5(_0x3a7b0d[_0xb6d4('0x4c')]));}headers[_0xb6d4('0x4e')]=getAuth(_0x538b23);return getUser(_0x538b23,_0x6349ea[_0xb6d4('0x4f')])['then'](function(_0x367ebc){_0x56ef1c=_0x367ebc;logger[_0xb6d4('0xc')]('The\x20User\x20ID\x20is:',_0x56ef1c['id']);return getEndUser(_0x538b23,_0x3a7b0d[_0xb6d4('0x62')],_0x3a7b0d[_0xb6d4('0x63')]);})[_0xb6d4('0x19')](function(_0x466bbc){_0x4f8ba3=_0x466bbc;logger[_0xb6d4('0xc')]('The\x20Enduser\x20ID\x20is:',_0x4f8ba3['id']);return getTicket(_0x538b23,_0x56ef1c,_0x4f8ba3,_0x55e54e,_0x3a7b0d);})[_0xb6d4('0x19')](function(_0x22764d){if(_0x22764d){logger[_0xb6d4('0xc')]('The\x20Ticket\x20ID\x20is:',_0x22764d['id']);switch(_0x538b23[_0xb6d4('0x39')]){case'integrationTab':logger['info'](_0xb6d4('0x60'),_0xb6d4('0x53'));return request({'uri':util['format']('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x538b23[_0xb6d4('0x10')],_0x56ef1c['id'],_0x22764d['id']),'method':_0xb6d4('0x29')});case _0xb6d4('0x64'):logger[_0xb6d4('0xc')]('[OUTBOUND]',_0xb6d4('0x55'));emit(util[_0xb6d4('0xe')](_0xb6d4('0x65'),_0x6349ea[_0xb6d4('0x45')]),_0xb6d4('0x56'),{'uri':util[_0xb6d4('0xe')]('%s/agent/tickets/%s',_0x538b23[_0xb6d4('0x10')][_0xb6d4('0x57')](_0xb6d4('0x58'),''),_0x22764d['id'])});break;default:logger['error'](_0xb6d4('0x60'),_0xb6d4('0x5a'));}}})[_0xb6d4('0x5b')](function(_0x4c6b73){logger[_0xb6d4('0x59')](_0xb6d4('0x66'),util[_0xb6d4('0x67')](_0x4c6b73,{'showHidden':!![],'depth':null}));});};exports['unmanaged']=function(_0x4b5406,_0x3ff0ea,_0x11db99,_0x4cec02,_0x30e864,_0x1b69ee){var _0x3d5b9,_0x4109ee;_0x1b69ee[_0xb6d4('0x10')]=intUtil[_0xb6d4('0x48')](_0x1b69ee[_0xb6d4('0x10')]);_0x1b69ee['serverUrl']=intUtil['stripTrailingSlash'](_0x1b69ee['serverUrl']);if(_0x30e864&&_0x30e864[_0xb6d4('0x68')]){logger[_0xb6d4('0xc')]('['+_0x3ff0ea[_0xb6d4('0x69')][_0xb6d4('0x6a')]()+']',_0xb6d4('0x61'));_0x3ff0ea[_0xb6d4('0x4d')]=util[_0xb6d4('0xe')](_0xb6d4('0x4b'),_0x1b69ee[_0xb6d4('0x49')],_0x3ff0ea['uniqueid'],md5(_0x3ff0ea[_0xb6d4('0x4c')]));}else{_0x3ff0ea['recordingURL']='';}headers[_0xb6d4('0x4e')]=getAuth(_0x1b69ee);return getUser(_0x1b69ee)[_0xb6d4('0x19')](function(_0x20d2f1){_0x3d5b9=_0x20d2f1;logger[_0xb6d4('0xc')](_0xb6d4('0x50'),_0x3d5b9['id']);return getEndUser(_0x1b69ee,_0x3ff0ea[_0xb6d4('0x6b')],_0x3ff0ea[_0xb6d4('0x6c')]);})[_0xb6d4('0x19')](function(_0x16a7a4){_0x4109ee=_0x16a7a4;logger[_0xb6d4('0xc')](_0xb6d4('0x51'),_0x4109ee['id']);return getTicket(_0x1b69ee,_0x3d5b9,_0x4109ee,_0x11db99,_0x3ff0ea);})[_0xb6d4('0x19')](function(_0x26787c){if(_0x26787c){logger[_0xb6d4('0xc')]('The\x20Ticket\x20ID\x20is:',_0x26787c['id']);}})[_0xb6d4('0x5b')](function(_0x15c202){logger[_0xb6d4('0x59')]('['+_0x3ff0ea[_0xb6d4('0x69')][_0xb6d4('0x6a')]()+']'+_0xb6d4('0x6d'),util['inspect'](_0x15c202,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x0fbd=['then','Ticket\x20created!','ticket','%s/search.json','remoteUri','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','find','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','user','Searching\x20enduser\x20with\x20phone','type:user\x20role:end-user\x20phone:%s','results','length','filter','end-user','first','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Caller\x20-\x20%s','Enduser\x20created.','authType','password','%s/token:%s','username','token','Basic\x20%s','toString','base64','debug','[HTTP]','stringify','map','type','string','nameField','customField','toLowerCase','content','idField','custom_fields','push','variable','variableName','customVariable','Variable','queue','stripTrailingSlash','serverUrl','monitor_format','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','%s/agent/tickets/%s','replace','error','Zendesk\x20account\x20type\x20not\x20recognized','catch','inspect','outbound','recordingFormat','none','email','destcalleridname','[OUTBOUND]','user:%s','/api/v2','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','calleridnum','lastevent','\x20Error\x20running\x20Zendesk\x20integration','lodash','request-promise','md5','util','../../../../config/environment','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','format','POST','merge','Tags','name','getString','Descriptions','Fields'];(function(_0x5a5379,_0x58dee3){var _0x419fcc=function(_0x50cd03){while(--_0x50cd03){_0x5a5379['push'](_0x5a5379['shift']());}};_0x419fcc(++_0x58dee3);}(_0x0fbd,0x1ef));var _0xd0fb=function(_0x3c8068,_0x313b86){_0x3c8068=_0x3c8068-0x0;var _0x25eacb=_0x0fbd[_0x3c8068];return _0x25eacb;};'use strict';var _=require(_0xd0fb('0x0'));var rp=require(_0xd0fb('0x1'));var md5=require(_0xd0fb('0x2'));var util=require(_0xd0fb('0x3'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0xd0fb('0x4'));var logger=require('../../../../config/logger')('zendesk');config[_0xd0fb('0x5')]=_[_0xd0fb('0x6')](config[_0xd0fb('0x5')],{'host':_0xd0fb('0x7'),'port':0x18eb});var io=require(_0xd0fb('0x8'))(new Redis(config[_0xd0fb('0x5')]));function emit(_0x453751,_0x293513,_0x3b14c6){io['to'](_0x453751)[_0xd0fb('0x9')](_0x293513,_0x3b14c6);}var headers={'Content-Type':_0xd0fb('0xa'),'Accept':_0xd0fb('0xa')};function getTicket(_0x35bcbb,_0xe7c4de,_0x1a87e5,_0x121a81,_0x3344b5){logger[_0xd0fb('0xb')]('Creating\x20new\x20ticket...');return request({'uri':util[_0xd0fb('0xc')]('%s/tickets.json',_0x35bcbb['remoteUri']),'method':_0xd0fb('0xd'),'body':{'ticket':_[_0xd0fb('0xe')]({'requester_id':_0x1a87e5['id'],'submitter_id':_0xe7c4de?_0xe7c4de['id']:undefined,'assignee_id':_0xe7c4de?_0xe7c4de['id']:undefined,'tags':getTags(_0x121a81[_0xd0fb('0xf')],_0xd0fb('0x10')),'subject':intUtil[_0xd0fb('0x11')](_0x121a81['Subjects'],_0x3344b5,'\x20'),'description':intUtil[_0xd0fb('0x11')](_0x121a81[_0xd0fb('0x12')],_0x3344b5,'\x0a'),'comment':{'public':![],'body':intUtil['getString'](_0x121a81[_0xd0fb('0x12')],_0x3344b5,'\x0a')}},getCustomFields(_0x121a81[_0xd0fb('0x13')],_0x3344b5))}})[_0xd0fb('0x14')](function(_0x5cc814){logger[_0xd0fb('0xb')](_0xd0fb('0x15'));return _0x5cc814[_0xd0fb('0x16')];});}function getUser(_0x21c0c4,_0x1a4c55){if(intUtil['validateEmail'](_0x1a4c55)){logger['info']('Getting\x20agent\x20with\x20email',_0x1a4c55);return request({'uri':util[_0xd0fb('0xc')](_0xd0fb('0x17'),_0x21c0c4[_0xd0fb('0x18')]),'qs':{'query':util[_0xd0fb('0xc')](_0xd0fb('0x19'),_0x1a4c55)}})[_0xd0fb('0x14')](function(_0x461b0b){if(_0x461b0b[_0xd0fb('0x1a')]){logger[_0xd0fb('0xb')](_0xd0fb('0x1b'));return _[_0xd0fb('0x1c')](_0x461b0b['results'],{'email':_0x1a4c55,'role':_0xd0fb('0x1d')});}else{logger[_0xd0fb('0xb')](_0xd0fb('0x1e'));return request({'uri':util[_0xd0fb('0xc')](_0xd0fb('0x1f'),_0x21c0c4[_0xd0fb('0x18')])})[_0xd0fb('0x14')](function(_0x72ab52){logger[_0xd0fb('0xb')]('Admin\x20account\x20selected.');return _0x72ab52[_0xd0fb('0x20')];});}});}else{logger[_0xd0fb('0xb')](_0xd0fb('0x1e'));return request({'uri':util[_0xd0fb('0xc')](_0xd0fb('0x1f'),_0x21c0c4[_0xd0fb('0x18')])})[_0xd0fb('0x14')](function(_0x5db31f){logger['info']('Admin\x20account\x20selected.');return _0x5db31f[_0xd0fb('0x20')];});}}function getEndUser(_0x5dacb0,_0x177b7b,_0x11ed6){logger[_0xd0fb('0xb')](_0xd0fb('0x21'),_0x11ed6);return request({'uri':util[_0xd0fb('0xc')](_0xd0fb('0x17'),_0x5dacb0[_0xd0fb('0x18')]),'qs':{'query':util['format'](_0xd0fb('0x22'),_0x11ed6)}})[_0xd0fb('0x14')](function(_0x15da5a){var _0x127640;if(_0x15da5a[_0xd0fb('0x23')][_0xd0fb('0x24')]){_0x15da5a[_0xd0fb('0x23')]=_[_0xd0fb('0x25')](_0x15da5a['results'],{'suspended':![],'role':_0xd0fb('0x26')});if(_0x15da5a[_0xd0fb('0x23')][_0xd0fb('0x24')]){_0x127640=_[_0xd0fb('0x27')](_0x15da5a[_0xd0fb('0x23')]);}}if(_0x127640){logger[_0xd0fb('0xb')](_0xd0fb('0x28'));return _0x127640;}else{logger[_0xd0fb('0xb')](_0xd0fb('0x29'));return request({'uri':util[_0xd0fb('0xc')]('%s/users.json',_0x5dacb0[_0xd0fb('0x18')]),'method':_0xd0fb('0xd'),'body':{'user':{'role':_0xd0fb('0x26'),'name':util['format'](_0xd0fb('0x2a'),_0x177b7b||_0x11ed6),'phone':_0x11ed6}}})[_0xd0fb('0x14')](function(_0x3a435b){logger[_0xd0fb('0xb')](_0xd0fb('0x2b'));return _0x3a435b[_0xd0fb('0x20')];});}});}function getAuth(_0x877960){var _0x24c40e;if(_0x877960[_0xd0fb('0x2c')]==='password'){_0x24c40e=util['format']('%s:%s',_0x877960['username'],_0x877960[_0xd0fb('0x2d')]);}else if(_0x877960[_0xd0fb('0x2c')]==='token'){_0x24c40e=util[_0xd0fb('0xc')](_0xd0fb('0x2e'),_0x877960[_0xd0fb('0x2f')],_0x877960[_0xd0fb('0x30')]);}return util['format'](_0xd0fb('0x31'),new Buffer(_0x24c40e)[_0xd0fb('0x32')](_0xd0fb('0x33')));}function request(_0x32554e){logger[_0xd0fb('0x34')](_0xd0fb('0x35'),JSON[_0xd0fb('0x36')](_0x32554e));return rp(_[_0xd0fb('0x6')](_0x32554e,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0xb5e1eb,_0x2c71f6){var _0x1c3492=[];if(_0xb5e1eb&&_0xb5e1eb[_0xd0fb('0x24')]>0x0){_0x1c3492=_[_0xd0fb('0x37')](_0xb5e1eb,_0x2c71f6);}return _0x1c3492;}function getCustomFields(_0x397ee5,_0x343522){var _0x11ac00=[];var _0x57aa2d={'custom_fields':[]};if(_0x397ee5[_0xd0fb('0x24')]>0x0){_['forEach'](_0x397ee5,function(_0x5f2a4c){if(_0x5f2a4c[_0xd0fb('0x38')]===_0xd0fb('0x39')&&_0x5f2a4c[_0xd0fb('0x3a')]&&!_0x5f2a4c[_0xd0fb('0x3b')]){_0x57aa2d[_0x5f2a4c[_0xd0fb('0x3a')][_0xd0fb('0x3c')]()]=_0x5f2a4c[_0xd0fb('0x3d')][_0xd0fb('0x32')]();}else if(_0x5f2a4c[_0xd0fb('0x38')]===_0xd0fb('0x39')&&_0x5f2a4c[_0xd0fb('0x3e')]&&_0x5f2a4c[_0xd0fb('0x3b')]){_0x57aa2d[_0xd0fb('0x3f')][_0xd0fb('0x40')]({'id':_0x5f2a4c[_0xd0fb('0x3e')],'value':_0x5f2a4c[_0xd0fb('0x3d')][_0xd0fb('0x32')]()});}else if(_0x5f2a4c[_0xd0fb('0x38')]===_0xd0fb('0x41')&&_0x5f2a4c[_0xd0fb('0x42')]&&_0x5f2a4c[_0xd0fb('0x3e')]&&_0x5f2a4c[_0xd0fb('0x3b')]){_0x343522[_0x5f2a4c['variableName']]&&_0x57aa2d['custom_fields'][_0xd0fb('0x40')]({'id':_0x5f2a4c[_0xd0fb('0x3e')],'value':_0x343522[_0x5f2a4c[_0xd0fb('0x42')]]['toString']()});}else if(_0x5f2a4c[_0xd0fb('0x38')]===_0xd0fb('0x43')&&_0x5f2a4c[_0xd0fb('0x44')]&&_0x5f2a4c[_0xd0fb('0x44')][_0xd0fb('0x10')]&&_0x5f2a4c['idField']&&_0x5f2a4c[_0xd0fb('0x3b')]){_0x343522[_0x5f2a4c[_0xd0fb('0x44')][_0xd0fb('0x10')][_0xd0fb('0x3c')]()]&&_0x57aa2d[_0xd0fb('0x3f')][_0xd0fb('0x40')]({'id':_0x5f2a4c[_0xd0fb('0x3e')],'value':_0x343522[_0x5f2a4c[_0xd0fb('0x44')][_0xd0fb('0x10')][_0xd0fb('0x3c')]()][_0xd0fb('0x32')]()});}});}return _0x57aa2d;}exports[_0xd0fb('0x45')]=function(_0x49b28f,_0xc48942,_0x59d3b0,_0x4b46f6,_0x14d956,_0x2dde14){var _0x3a9e58,_0x1b4d7d;_0x2dde14[_0xd0fb('0x18')]=intUtil[_0xd0fb('0x46')](_0x2dde14[_0xd0fb('0x18')]);_0x2dde14[_0xd0fb('0x47')]=intUtil[_0xd0fb('0x46')](_0x2dde14[_0xd0fb('0x47')]);if(_0x14d956&&_0x14d956[_0xd0fb('0x48')]){logger['info']('[QUEUE]','Recording\x20is\x20enabled!');_0xc48942['recordingURL']=util['format'](_0xd0fb('0x49'),_0x2dde14[_0xd0fb('0x47')],_0xc48942['uniqueid'],md5(_0xc48942[_0xd0fb('0x4a')]));}else{_0xc48942[_0xd0fb('0x4b')]='';}headers['Authorization']=getAuth(_0x2dde14);return getUser(_0x2dde14,_0x4b46f6['email'])[_0xd0fb('0x14')](function(_0x101361){_0x3a9e58=_0x101361;logger['info'](_0xd0fb('0x4c'),_0x3a9e58['id']);return getEndUser(_0x2dde14,_0xc48942[_0xd0fb('0x4d')],_0xc48942['calleridnum']);})['then'](function(_0x4a4a5e){_0x1b4d7d=_0x4a4a5e;logger[_0xd0fb('0xb')](_0xd0fb('0x4e'),_0x1b4d7d['id']);return getTicket(_0x2dde14,_0x3a9e58,_0x1b4d7d,_0x59d3b0,_0xc48942);})[_0xd0fb('0x14')](function(_0xf088ec){if(_0xf088ec){logger[_0xd0fb('0xb')](_0xd0fb('0x4f'),_0xf088ec['id']);switch(_0x2dde14['type']){case'integrationTab':logger[_0xd0fb('0xb')]('[QUEUE]',_0xd0fb('0x50'));return request({'uri':util['format'](_0xd0fb('0x51'),_0x2dde14['remoteUri'],_0x3a9e58['id'],_0xf088ec['id']),'method':_0xd0fb('0xd')});case _0xd0fb('0x52'):logger[_0xd0fb('0xb')](_0xd0fb('0x53'),_0xd0fb('0x54'));emit(util[_0xd0fb('0xc')]('user:%s',_0x4b46f6[_0xd0fb('0x10')]),'trigger:browser:url',{'uri':util[_0xd0fb('0xc')](_0xd0fb('0x55'),_0x2dde14[_0xd0fb('0x18')][_0xd0fb('0x56')]('/api/v2',''),_0xf088ec['id'])});break;default:logger[_0xd0fb('0x57')](_0xd0fb('0x53'),_0xd0fb('0x58'));}}})[_0xd0fb('0x59')](function(_0x11ba22){logger[_0xd0fb('0x57')]('[QUEUE]\x20Error\x20running\x20Zendesk\x20integration',util[_0xd0fb('0x5a')](_0x11ba22,{'showHidden':!![],'depth':null}));});};exports[_0xd0fb('0x5b')]=function(_0x2de835,_0x56218f,_0x4b7127,_0x54fbcd,_0x305bea,_0x5596d2,_0x2ab83b){var _0x11f9c2,_0x2a67fc;_0x5596d2[_0xd0fb('0x18')]=intUtil[_0xd0fb('0x46')](_0x5596d2[_0xd0fb('0x18')]);_0x5596d2[_0xd0fb('0x47')]=intUtil[_0xd0fb('0x46')](_0x5596d2['serverUrl']);if(_0x2ab83b&&_0x2ab83b['recordingFormat']&&_0x2ab83b[_0xd0fb('0x5c')]!==_0xd0fb('0x5d')){logger[_0xd0fb('0xb')]('[OUTBOUND]','Recording\x20is\x20enabled!');_0x56218f[_0xd0fb('0x4b')]=util[_0xd0fb('0xc')](_0xd0fb('0x49'),_0x5596d2[_0xd0fb('0x47')],_0x56218f[_0xd0fb('0x4a')],md5(_0x56218f[_0xd0fb('0x4a')]));}headers['Authorization']=getAuth(_0x5596d2);return getUser(_0x5596d2,_0x54fbcd[_0xd0fb('0x5e')])['then'](function(_0x5d2505){_0x11f9c2=_0x5d2505;logger[_0xd0fb('0xb')](_0xd0fb('0x4c'),_0x11f9c2['id']);return getEndUser(_0x5596d2,_0x56218f[_0xd0fb('0x5f')],_0x56218f['destcalleridnum']);})['then'](function(_0x77983d){_0x2a67fc=_0x77983d;logger[_0xd0fb('0xb')](_0xd0fb('0x4e'),_0x2a67fc['id']);return getTicket(_0x5596d2,_0x11f9c2,_0x2a67fc,_0x4b7127,_0x56218f);})['then'](function(_0x510de8){if(_0x510de8){logger[_0xd0fb('0xb')]('The\x20Ticket\x20ID\x20is:',_0x510de8['id']);switch(_0x5596d2[_0xd0fb('0x38')]){case'integrationTab':logger[_0xd0fb('0xb')](_0xd0fb('0x60'),_0xd0fb('0x50'));return request({'uri':util['format']('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x5596d2[_0xd0fb('0x18')],_0x11f9c2['id'],_0x510de8['id']),'method':'POST'});case _0xd0fb('0x52'):logger[_0xd0fb('0xb')](_0xd0fb('0x60'),_0xd0fb('0x54'));emit(util['format'](_0xd0fb('0x61'),_0x54fbcd['name']),'trigger:browser:url',{'uri':util['format']('%s/agent/tickets/%s',_0x5596d2[_0xd0fb('0x18')][_0xd0fb('0x56')](_0xd0fb('0x62'),''),_0x510de8['id'])});break;default:logger[_0xd0fb('0x57')](_0xd0fb('0x60'),_0xd0fb('0x58'));}}})['catch'](function(_0x14873f){logger['error'](_0xd0fb('0x63'),util[_0xd0fb('0x5a')](_0x14873f,{'showHidden':!![],'depth':null}));});};exports['unmanaged']=function(_0x19442a,_0x155e2c,_0x2b8380,_0x534c09,_0x43c6be,_0x1c98f1){var _0x1bcf68,_0x38f4e2;_0x1c98f1[_0xd0fb('0x18')]=intUtil[_0xd0fb('0x46')](_0x1c98f1[_0xd0fb('0x18')]);_0x1c98f1[_0xd0fb('0x47')]=intUtil[_0xd0fb('0x46')](_0x1c98f1[_0xd0fb('0x47')]);if(_0x43c6be&&_0x43c6be[_0xd0fb('0x48')]){logger[_0xd0fb('0xb')]('['+_0x155e2c['lastevent']['toUpperCase']()+']','Recording\x20is\x20enabled!');_0x155e2c['recordingURL']=util['format'](_0xd0fb('0x49'),_0x1c98f1[_0xd0fb('0x47')],_0x155e2c[_0xd0fb('0x4a')],md5(_0x155e2c[_0xd0fb('0x4a')]));}else{_0x155e2c[_0xd0fb('0x4b')]='';}headers['Authorization']=getAuth(_0x1c98f1);return getUser(_0x1c98f1)['then'](function(_0x4bc7ce){_0x1bcf68=_0x4bc7ce;logger[_0xd0fb('0xb')](_0xd0fb('0x4c'),_0x1bcf68['id']);return getEndUser(_0x1c98f1,_0x155e2c['calleridname'],_0x155e2c[_0xd0fb('0x64')]);})['then'](function(_0x1ed857){_0x38f4e2=_0x1ed857;logger[_0xd0fb('0xb')](_0xd0fb('0x4e'),_0x38f4e2['id']);return getTicket(_0x1c98f1,_0x1bcf68,_0x38f4e2,_0x2b8380,_0x155e2c);})[_0xd0fb('0x14')](function(_0x287369){if(_0x287369){logger[_0xd0fb('0xb')](_0xd0fb('0x4f'),_0x287369['id']);}})[_0xd0fb('0x59')](function(_0x38a49d){logger[_0xd0fb('0x57')]('['+_0x155e2c[_0xd0fb('0x65')]['toUpperCase']()+']'+_0xd0fb('0x66'),util[_0xd0fb('0x5a')](_0x38a49d,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/zoho.js b/server/services/ami/trigger/integration/zoho.js index 3c11959..1e3b5af 100644 --- a/server/services/ami/trigger/integration/zoho.js +++ b/server/services/ami/trigger/integration/zoho.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a5f=['/crm/v2/Calls','Call\x20created!','err','host','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','recordingURL','zoho.eu','The\x20User\x20ID\x20is:','calleridname','The\x20Call\x20ID\x20is:','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','com','destcalleridname','destcalleridnum','Outbound','[OUTBOUND]','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','unmanaged','toUpperCase','calleridnum','lodash','request-promise','util','./util','ioredis','../../../../config/logger','defaults','localhost','socket.io-emitter','redis','emit','debug','stringify','length','forEach','string','idField','content','type','variableName','toString','customVariable','Variable','name','toLowerCase','split','isNil','access_token','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','add','expires_in','seconds','catch','error','Failing\x20creating\x20the\x20access_token','stack','info','Search\x20user','GET','https://www.zohoapis.%s/crm/v2/users','ActiveUsers','Zoho-oauthtoken\x20','users','email','Using\x20the\x20admin\x20account!','Administrator','user','profile','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','then','data','https://www.zohoapis.','/crm/v2/','startCase','moduleCreate','role','first_name','last_name','SUCCESS','details','enduserType','Error:\x20','log','CREATE\x20ERROR','moduleSearch','contact_lead','uri','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','Leads','contact','nothing','lead','/crm/v2/Leads/search?criteria=((Phone:equals:','administrator','Subject','getString','Subjects','Description','Descriptions','Who_Id','Full_Name','First_Name','Last_Name','$se_module','talktime','utc','format','mm:ss','answertime','endtime','Call_Duration','YYYY-MM-DDTHH:mm:ss','diff','lastevent','called','Call_Result','Called','connect','Answered','rejected','Rejected','Abandoned','timeout','Call_Start_Time','outbound','starttime','agentcalledAt','Call_Type','Inbound','merge','Fields'];(function(_0x2f0519,_0x12ab67){var _0x1bcd06=function(_0x2e2c7e){while(--_0x2e2c7e){_0x2f0519['push'](_0x2f0519['shift']());}};_0x1bcd06(++_0x12ab67);}(_0x6a5f,0xbb));var _0xf6a5=function(_0x5b02ff,_0x4ce260){_0x5b02ff=_0x5b02ff-0x0;var _0xfe3187=_0x6a5f[_0x5b02ff];return _0xfe3187;};'use strict';var _=require(_0xf6a5('0x0'));var rp=require(_0xf6a5('0x1'));var md5=require('md5');var util=require(_0xf6a5('0x2'));var intUtil=require(_0xf6a5('0x3'));var moment=require('moment');var Redis=require(_0xf6a5('0x4'));var BPromise=require('bluebird');var config=require('../../../../config/environment');var logger=require(_0xf6a5('0x5'))('zoho');config['redis']=_[_0xf6a5('0x6')](config['redis'],{'host':_0xf6a5('0x7'),'port':0x18eb});var io=require(_0xf6a5('0x8'))(new Redis(config[_0xf6a5('0x9')]));function emit(_0x1e3360,_0x19facf,_0x476e35){io['to'](_0x1e3360)[_0xf6a5('0xa')](_0x19facf,_0x476e35);}function request(_0x3eaf83){logger[_0xf6a5('0xb')]('[HTTP]',JSON[_0xf6a5('0xc')](_0x3eaf83));return rp(_0x3eaf83);}function getCustomFields(_0x148158,_0x348de4){var _0x4673b2={};if(_0x148158[_0xf6a5('0xd')]>0x0){_[_0xf6a5('0xe')](_0x148158,function(_0x99fbf2){if(_0x99fbf2['type']===_0xf6a5('0xf')&&_0x99fbf2[_0xf6a5('0x10')]){_0x4673b2[_0x99fbf2[_0xf6a5('0x10')]]=_0x99fbf2[_0xf6a5('0x11')]['toString']();}else if(_0x99fbf2[_0xf6a5('0x12')]==='variable'&&_0x99fbf2['variableName']&&_0x99fbf2[_0xf6a5('0x10')]&&_0x348de4[_0x99fbf2[_0xf6a5('0x13')]]){_0x4673b2[_0x99fbf2['idField']]=_0x348de4[_0x99fbf2[_0xf6a5('0x13')]][_0xf6a5('0x14')]();}else if(_0x99fbf2[_0xf6a5('0x12')]===_0xf6a5('0x15')&&_0x99fbf2[_0xf6a5('0x16')]&&_0x99fbf2[_0xf6a5('0x16')][_0xf6a5('0x17')]&&_0x99fbf2['idField']&&_0x348de4[_0x99fbf2[_0xf6a5('0x16')]['name']['toLowerCase']()]){_0x4673b2[_0x99fbf2[_0xf6a5('0x10')]]=_0x348de4[_0x99fbf2[_0xf6a5('0x16')][_0xf6a5('0x17')][_0xf6a5('0x18')]()][_0xf6a5('0x14')]();}});}return _0x4673b2;}function getName(_0x4140bd){if(_0x4140bd['indexOf']('\x20')>0x0){var _0x537dbb=_0x4140bd[_0xf6a5('0x19')](/ (.+)/);if(_0x537dbb[0x1]){return _0x537dbb;}}return[_0x4140bd,_0x4140bd];}var accountsTokens={};function getAccessToken(_0x2d1cc8){return new Promise(function(_0x5b9945,_0x2baeca){if(!_['isNil'](accountsTokens[_0x2d1cc8['id']])&&!_[_0xf6a5('0x1a')](accountsTokens[_0x2d1cc8['id']][_0xf6a5('0x1b')])){if(moment()['isBefore'](accountsTokens[_0x2d1cc8['id']]['expires_in'])){_0x5b9945(accountsTokens[_0x2d1cc8['id']][_0xf6a5('0x1b')]);}}var _0x504b35;switch(_0x2d1cc8[_0xf6a5('0x1c')]){case'US':_0x504b35=_0xf6a5('0x1d');break;case'AU':_0x504b35=_0xf6a5('0x1e');break;case'EU':_0x504b35=_0xf6a5('0x1f');break;case'IN':_0x504b35=_0xf6a5('0x20');break;case'CN':_0x504b35=_0xf6a5('0x21');break;default:_0x504b35=_0xf6a5('0x1f');break;}var _0x812231={'method':_0xf6a5('0x22'),'uri':_0x504b35+_0xf6a5('0x23'),'qs':{'refresh_token':_0x2d1cc8[_0xf6a5('0x24')],'client_id':_0x2d1cc8[_0xf6a5('0x25')],'client_secret':_0x2d1cc8[_0xf6a5('0x26')],'grant_type':'refresh_token'},'json':!![]};return rp(_0x812231)['then'](function(_0x15b4e1){accountsTokens[_0x2d1cc8['id']]={'access_token':_0x15b4e1[_0xf6a5('0x1b')],'expires_in':moment()[_0xf6a5('0x27')](_0x15b4e1[_0xf6a5('0x28')],_0xf6a5('0x29'))};_0x5b9945(_0x15b4e1[_0xf6a5('0x1b')]);})[_0xf6a5('0x2a')](function(_0x4cf574){logger[_0xf6a5('0x2b')](_0xf6a5('0x2c'),_0x4cf574[_0xf6a5('0x2d')]);_0x2baeca(_0x4cf574);});});}function getUser(_0x4a6003,_0x2ef1ca,_0x3f5be9,_0x547cd2){logger[_0xf6a5('0x2e')](_0xf6a5('0x2f'));return request({'method':_0xf6a5('0x30'),'uri':util['format'](_0xf6a5('0x31'),_0x2ef1ca),'qs':{'type':_0xf6a5('0x32')},'headers':{'Authorization':_0xf6a5('0x33')+_0x4a6003},'json':!![]})['then'](function(_0x3034fd){if(_0x3034fd[_0xf6a5('0x34')]){var _0xde005f=-0x1;if(_['isArrayLikeObject'](_0x3034fd['users'])){if(!_[_0xf6a5('0x1a')](_0x547cd2)){_0xde005f=_['findIndex'](_0x3034fd['users'],function(_0x1cb71c){return _0x1cb71c[_0xf6a5('0x35')]===_0x547cd2;});}if(_0xde005f>=0x0){logger['info']('Agent\x20found!');}else{logger['info'](_0xf6a5('0x36'));_0xde005f=_['findIndex'](_0x3034fd[_0xf6a5('0x34')],function(_0x1329c5){return _0x1329c5['profile'][_0xf6a5('0x17')]===_0xf6a5('0x37');});}return _0x3034fd['users'][_0xde005f];}else{if(_0x3034fd[_0xf6a5('0x38')][_0xf6a5('0x39')]['name']===_0xf6a5('0x37')){logger['info'](_0xf6a5('0x36'));user=_0x3034fd[_0xf6a5('0x38')];return user;}else{logger[_0xf6a5('0x2b')](_0xf6a5('0x3a'),JSON[_0xf6a5('0xc')](_0x3034fd));throw new Error(_0xf6a5('0x3b')+JSON[_0xf6a5('0xc')](_0x3034fd));}}}else{logger['error'](_0xf6a5('0x3a'),JSON[_0xf6a5('0xc')](_0x3034fd));throw new Error(_0xf6a5('0x3b')+JSON['stringify'](_0x3034fd));}})['catch'](function(_0x33981e){console[_0xf6a5('0x2b')](_0x33981e);});}function getZohoUser(_0x3e271c,_0x33e620){return new BPromise(function(_0x44b234,_0x4e20c7){request(_0x3e271c)[_0xf6a5('0x3c')](function(_0x211a6b){var _0x37ef7c=null;if(_0x211a6b){_0x37ef7c=_0x211a6b[_0xf6a5('0x3d')][0x0];_0x37ef7c['enduserType']=_0x33e620;}_0x44b234(_0x37ef7c);})[_0xf6a5('0x2a')](function(_0x1b9b26){_0x4e20c7(_0x1b9b26);});});}function createEndUser(_0x442bbe,_0x529c89,_0x5681ce,_0x22cd6e,_0x59b5dd,_0x52c024){var _0x5681ce=getName(_0x5681ce);return request({'method':_0xf6a5('0x22'),'uri':_0xf6a5('0x3e')+_0x529c89+_0xf6a5('0x3f')+_[_0xf6a5('0x40')](_0x52c024[_0xf6a5('0x41')])+'s','body':{'data':[{'Last_Name':_0x5681ce[0x1],'First_Name':_0x5681ce[0x0],'Phone':_0x22cd6e,'Owner':{'name':!_[_0xf6a5('0x1a')](_0x59b5dd[_0xf6a5('0x42')][_0xf6a5('0x17')])?_0x59b5dd[_0xf6a5('0x42')]['name']:!_['isNil'](_0x59b5dd['first_name'])?_0x59b5dd[_0xf6a5('0x43')]+'\x20'+_0x59b5dd[_0xf6a5('0x44')]:_0x59b5dd[_0xf6a5('0x44')],'id':_0x59b5dd['id']}}]},'headers':{'Authorization':_0xf6a5('0x33')+_0x442bbe},'json':!![]})[_0xf6a5('0x3c')](function(_0x3161a9){if(_0x3161a9&&_0x3161a9[_0xf6a5('0x3d')][0x0]['code']===_0xf6a5('0x45')){var _0x1b01dd=_0x3161a9['data'][0x0][_0xf6a5('0x46')];_0x1b01dd[_0xf6a5('0x47')]=_[_0xf6a5('0x40')](_0x52c024['moduleCreate'])+'s';return _0x1b01dd;}logger[_0xf6a5('0x2b')](_0xf6a5('0x3a'),JSON[_0xf6a5('0xc')](data));throw new Error(_0xf6a5('0x48')+JSON['stringify'](data));})[_0xf6a5('0x2a')](function(_0xdfde3f){console[_0xf6a5('0x49')](_0xf6a5('0x4a'),_0xdfde3f);});}function getEndUser(_0x201b70,_0x2abd03,_0x390634,_0x96cf75,_0x1a577f,_0xf6322,_0x2701a3){var _0x4da677={'method':_0xf6a5('0x30'),'uri':'','headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x201b70},'json':!![]};switch(_0x2701a3[_0xf6a5('0x4b')]){case _0xf6a5('0x4c'):_0x4da677[_0xf6a5('0x4d')]=_0xf6a5('0x3e')+_0x2abd03+_0xf6a5('0x4e')+_0x1a577f+'))';return getZohoUser(_0x4da677,_0xf6a5('0x4f'))[_0xf6a5('0x3c')](function(_0x3c042b){if(_0x3c042b)return _0x3c042b;_0x4da677[_0xf6a5('0x4d')]='https://www.zohoapis.'+_0x2abd03+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0x1a577f+'))';return getZohoUser(_0x4da677,_0xf6a5('0x50'))[_0xf6a5('0x3c')](function(_0x17f392){if(_0x17f392)return _0x17f392;if(_0x2701a3[_0xf6a5('0x41')]!='nothing'){return createEndUser(_0x201b70,_0x2abd03,_0x96cf75,_0x1a577f,_0xf6322,_0x2701a3);}else{return{};}});});break;case _0xf6a5('0x51'):_0x4da677[_0xf6a5('0x4d')]=_0xf6a5('0x3e')+_0x2abd03+_0xf6a5('0x4e')+_0x1a577f+'))';return getZohoUser(_0x4da677,_0xf6a5('0x4f'))['then'](function(_0x494be7){if(_0x494be7)return _0x494be7;if(_0x2701a3[_0xf6a5('0x41')]!=_0xf6a5('0x52')){return createEndUser(_0x201b70,_0x2abd03,_0x96cf75,_0x1a577f,_0xf6322,_0x2701a3);}else{return{};}});break;case _0xf6a5('0x53'):_0x4da677[_0xf6a5('0x4d')]='https://www.zohoapis.'+_0x2abd03+_0xf6a5('0x54')+_0x1a577f+'))';return getZohoUser(_0x4da677,_0xf6a5('0x50'))['then'](function(_0x391f62){if(_0x391f62)return _0x391f62;if(_0x2701a3[_0xf6a5('0x41')]!=_0xf6a5('0x52')){return createEndUser(_0x201b70,_0x2abd03,_0x96cf75,_0x1a577f,_0xf6322,_0x2701a3);}else{return{};}});break;}}function getCall(_0x2f1955,_0x569aca,_0x5416b5,_0x1a96a7,_0x42cc21,_0x4f14e3,_0x40bfdb,_0x4c9999){logger[_0xf6a5('0x2e')]('Creating\x20new\x20call...');var _0x143c6f={};_0x143c6f['Owner']={'name':!_[_0xf6a5('0x1a')](_0x1a96a7[_0xf6a5('0x42')][_0xf6a5('0x17')])&&!_[_0xf6a5('0x1a')](_0x1a96a7['profile']['name'])&&_0x1a96a7['profile'][_0xf6a5('0x17')]===_0xf6a5('0x55')?_0x1a96a7[_0xf6a5('0x42')]['name']:!_['isNil'](_0x1a96a7[_0xf6a5('0x43')])?_0x1a96a7['first_name']+'\x20'+_0x1a96a7[_0xf6a5('0x44')]:_0x1a96a7[_0xf6a5('0x44')],'id':_0x1a96a7['id']};_0x143c6f[_0xf6a5('0x56')]=intUtil[_0xf6a5('0x57')](_0x4f14e3[_0xf6a5('0x58')],_0x40bfdb,'\x20');_0x143c6f[_0xf6a5('0x59')]=intUtil[_0xf6a5('0x57')](_0x4f14e3[_0xf6a5('0x5a')],_0x40bfdb,'\x0a');if(_0x42cc21['enduserType']==='Contacts'){_0x143c6f[_0xf6a5('0x5b')]={'name':!_['isNil'](_0x42cc21[_0xf6a5('0x5c')])?_0x42cc21[_0xf6a5('0x5c')]:!_[_0xf6a5('0x1a')](_0x42cc21['First_Name'])?_0x42cc21[_0xf6a5('0x5d')]+'\x20'+_0x42cc21[_0xf6a5('0x5e')]:_0x42cc21[_0xf6a5('0x5e')],'id':_0x42cc21['id']};}if(_0x42cc21[_0xf6a5('0x47')]===_0xf6a5('0x50')){_0x143c6f['What_Id']={'name':!_[_0xf6a5('0x1a')](_0x42cc21[_0xf6a5('0x5c')])?_0x42cc21[_0xf6a5('0x5c')]:!_['isNil'](_0x42cc21['First_Name'])?_0x42cc21[_0xf6a5('0x5d')]+'\x20'+_0x42cc21[_0xf6a5('0x5e')]:_0x42cc21[_0xf6a5('0x5e')],'id':_0x42cc21['id']};_0x143c6f[_0xf6a5('0x5f')]=_[_0xf6a5('0x40')](_0x42cc21[_0xf6a5('0x47')]);}if(_0x40bfdb[_0xf6a5('0x60')]){_0x143c6f['Call_Duration']=moment[_0xf6a5('0x61')](parseInt(_0x40bfdb[_0xf6a5('0x60')])*0x3e8)[_0xf6a5('0x62')](_0xf6a5('0x63'));}else if(_0x40bfdb[_0xf6a5('0x64')]&&_0x40bfdb[_0xf6a5('0x65')]){_0x143c6f[_0xf6a5('0x66')]=moment[_0xf6a5('0x61')](moment(_0x40bfdb[_0xf6a5('0x65')],_0xf6a5('0x67'))[_0xf6a5('0x68')](moment(_0x40bfdb['starttime'],_0xf6a5('0x67'))))[_0xf6a5('0x62')](_0xf6a5('0x63'));}switch(_0x40bfdb[_0xf6a5('0x69')]){case _0xf6a5('0x6a'):_0x143c6f[_0xf6a5('0x6b')]=_0xf6a5('0x6c');break;case'complete':case _0xf6a5('0x6d'):_0x143c6f['Call_Result']=_0xf6a5('0x6e');break;case _0xf6a5('0x6f'):_0x143c6f[_0xf6a5('0x6b')]=_0xf6a5('0x70');break;case'abandoned':_0x143c6f[_0xf6a5('0x6b')]=_0xf6a5('0x71');break;case _0xf6a5('0x72'):_0x143c6f[_0xf6a5('0x6b')]='Timeout';default:}_0x143c6f[_0xf6a5('0x73')]=(_0x4c9999===_0xf6a5('0x74')?moment(_0x40bfdb[_0xf6a5('0x75')])[_0xf6a5('0x62')](_0xf6a5('0x67')):moment(_0x40bfdb[_0xf6a5('0x76')])[_0xf6a5('0x62')](_0xf6a5('0x67')))||moment()[_0xf6a5('0x62')](_0xf6a5('0x67'));_0x143c6f[_0xf6a5('0x77')]=_0x4c9999||_0xf6a5('0x78');_0x143c6f=_[_0xf6a5('0x79')](_0x143c6f,getCustomFields(_0x4f14e3[_0xf6a5('0x7a')],_0x40bfdb));return request({'method':_0xf6a5('0x22'),'uri':_0xf6a5('0x3e')+_0x569aca+_0xf6a5('0x7b'),'headers':{'Authorization':_0xf6a5('0x33')+_0x2f1955},'body':{'data':[_0x143c6f]},'json':!![]})['then'](function(_0x47e329){if(_0x47e329&&_0x47e329['data'][0x0]['code']===_0xf6a5('0x45')){logger[_0xf6a5('0x2e')](_0xf6a5('0x7c'));return{'id':_0x47e329['data'][0x0][_0xf6a5('0x46')]['id']};}})[_0xf6a5('0x2a')](function(_0x4ead82){logger['info'](_0xf6a5('0x7d'),_0x4ead82[_0xf6a5('0x2d')]);console[_0xf6a5('0x49')](_0xf6a5('0x7d'),_0x4ead82);});}exports['queue']=function(_0xc4e248,_0xda0f2,_0x388efb,_0x11f043,_0x3ee7a3,_0xa36168){var _0x2032d6,_0x20bfcc,_0x1108f5;_0xa36168[_0xf6a5('0x7e')]=intUtil[_0xf6a5('0x7f')](_0xa36168[_0xf6a5('0x7e')]);_0xa36168[_0xf6a5('0x80')]=intUtil[_0xf6a5('0x7f')](_0xa36168[_0xf6a5('0x80')]);if(_0x3ee7a3&&_0x3ee7a3[_0xf6a5('0x81')]){logger[_0xf6a5('0x2e')](_0xf6a5('0x82'),_0xf6a5('0x83'));_0xda0f2['recordingURL']=_0xa36168[_0xf6a5('0x80')]+_0xf6a5('0x84')+_0xda0f2[_0xf6a5('0x85')]+_0xf6a5('0x86')+md5(_0xda0f2[_0xf6a5('0x85')]);}else{_0xda0f2[_0xf6a5('0x87')]='';}var _0x40bf6b=_0xa36168['host']===_0xf6a5('0x88')?'eu':'com';return getAccessToken(_0xa36168)[_0xf6a5('0x3c')](function(_0x49c361){_0x1108f5=_0x49c361;return getUser(_0x1108f5,_0x40bf6b,_0xa36168,_0x11f043[_0xf6a5('0x35')]);})[_0xf6a5('0x3c')](function(_0x31e4b3){_0x2032d6=_0x31e4b3;logger[_0xf6a5('0x2e')](_0xf6a5('0x89'),_0x2032d6['id']);return getEndUser(_0x1108f5,_0x40bf6b,_0xa36168,_0xda0f2[_0xf6a5('0x8a')],_0xda0f2['calleridnum'],_0x2032d6,_0x388efb);})['then'](function(_0x67c183){_0x20bfcc=_0x67c183;return getCall(_0x1108f5,_0x40bf6b,_0xa36168,_0x2032d6,_0x20bfcc,_0x388efb,_0xda0f2,_0xf6a5('0x78'));})[_0xf6a5('0x3c')](function(_0x65c897){if(_0x65c897){logger['info'](_0xf6a5('0x8b'),_0x65c897['id']);logger[_0xf6a5('0x2e')](_0xf6a5('0x82'),'Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xf6a5('0x62')](_0xf6a5('0x8c'),_0x11f043[_0xf6a5('0x17')]),_0xf6a5('0x8d'),{'uri':_0xf6a5('0x8e')+_0xa36168[_0xf6a5('0x7e')]+_0xf6a5('0x8f')+_0x65c897['id']});}})[_0xf6a5('0x2a')](function(_0x62684a){logger[_0xf6a5('0x2b')](_0xf6a5('0x82'),JSON[_0xf6a5('0xc')](_0x62684a));});};exports[_0xf6a5('0x74')]=function(_0x288a13,_0x255f46,_0x425717,_0x4cb8aa,_0x1ac159,_0x574218,_0x5a5344){var _0x4f00d5,_0x133c7f,_0xb1d34;_0x574218[_0xf6a5('0x7e')]=intUtil[_0xf6a5('0x7f')](_0x574218[_0xf6a5('0x7e')]);_0x574218[_0xf6a5('0x80')]=intUtil['stripTrailingSlash'](_0x574218[_0xf6a5('0x80')]);if(_0x5a5344&&_0x5a5344[_0xf6a5('0x90')]&&_0x5a5344[_0xf6a5('0x90')]!==_0xf6a5('0x91')){logger[_0xf6a5('0x2e')]('[OUTBOUND]',_0xf6a5('0x83'));_0x255f46[_0xf6a5('0x87')]=_0x574218['serverUrl']+_0xf6a5('0x84')+_0x255f46[_0xf6a5('0x85')]+_0xf6a5('0x86')+md5(_0x255f46[_0xf6a5('0x85')]);}var _0x351efb=_0x574218['host']===_0xf6a5('0x88')?'eu':_0xf6a5('0x92');return getAccessToken(_0x574218)['then'](function(_0x5e8964){_0xb1d34=_0x5e8964;return getUser(_0xb1d34,_0x351efb,_0x574218,_0x4cb8aa[_0xf6a5('0x35')]);})[_0xf6a5('0x3c')](function(_0x53f836){_0x4f00d5=_0x53f836;logger[_0xf6a5('0x2e')](_0xf6a5('0x89'),_0x4f00d5['id']);return getEndUser(_0xb1d34,_0x351efb,_0x574218,_0x255f46[_0xf6a5('0x93')],_0x255f46[_0xf6a5('0x94')],_0x4f00d5,_0x425717);})['then'](function(_0xc393c5){_0x133c7f=_0xc393c5;return getCall(_0xb1d34,_0x351efb,_0x574218,_0x4f00d5,_0x133c7f,_0x425717,_0x255f46,_0xf6a5('0x95'));})['then'](function(_0x8922ec){if(_0x8922ec){logger[_0xf6a5('0x2e')](_0xf6a5('0x8b'),_0x8922ec['id']);logger[_0xf6a5('0x2e')](_0xf6a5('0x96'),_0xf6a5('0x97'));emit(util[_0xf6a5('0x62')](_0xf6a5('0x8c'),_0x4cb8aa[_0xf6a5('0x17')]),_0xf6a5('0x8d'),{'uri':_0xf6a5('0x8e')+_0x574218[_0xf6a5('0x7e')]+_0xf6a5('0x8f')+_0x8922ec['id']});}})[_0xf6a5('0x2a')](function(_0x4213ef){logger[_0xf6a5('0x2b')]('[OUTBOUND]',JSON[_0xf6a5('0xc')](_0x4213ef));});};exports[_0xf6a5('0x98')]=function(_0x4ee0dc,_0x435df2,_0xb1dd22,_0xe60f86,_0xb32285,_0x1cb89b){var _0x5266c8,_0x22d59f,_0x31faba;_0x1cb89b['host']=intUtil['stripTrailingSlash'](_0x1cb89b[_0xf6a5('0x7e')]);_0x1cb89b['serverUrl']=intUtil['stripTrailingSlash'](_0x1cb89b[_0xf6a5('0x80')]);if(_0xb32285&&_0xb32285[_0xf6a5('0x81')]){logger[_0xf6a5('0x2e')]('['+_0x435df2[_0xf6a5('0x69')][_0xf6a5('0x99')]()+']','Recording\x20is\x20enabled!');_0x435df2[_0xf6a5('0x87')]=_0x1cb89b[_0xf6a5('0x80')]+_0xf6a5('0x84')+_0x435df2[_0xf6a5('0x85')]+_0xf6a5('0x86')+md5(_0x435df2[_0xf6a5('0x85')]);}else{_0x435df2['recordingURL']='';}var _0x2ea23a=_0x1cb89b['host']==='zoho.eu'?'eu':_0xf6a5('0x92');return getAccessToken(_0x1cb89b)['then'](function(_0x4ea496){_0x31faba=_0x4ea496;return getUser(_0x31faba,_0x2ea23a,_0x1cb89b);})[_0xf6a5('0x3c')](function(_0x128204){_0x5266c8=_0x128204;logger[_0xf6a5('0x2e')](_0xf6a5('0x89'),_0x5266c8['id']);return getEndUser(_0x31faba,_0x2ea23a,_0x1cb89b,_0x435df2['calleridname'],_0x435df2[_0xf6a5('0x9a')],_0x5266c8,_0xb1dd22);})[_0xf6a5('0x3c')](function(_0x6a353e){_0x22d59f=_0x6a353e;return getCall(_0x31faba,_0x2ea23a,_0x1cb89b,_0x5266c8,_0x22d59f,_0xb1dd22,_0x435df2,'Inbound');})['then'](function(_0x14ed68){if(_0x14ed68){logger[_0xf6a5('0x2e')](_0xf6a5('0x8b'),_0x14ed68['id']);}})['catch'](function(_0x17396b){logger[_0xf6a5('0x2b')]('['+_0x435df2[_0xf6a5('0x69')][_0xf6a5('0x99')]()+']',JSON[_0xf6a5('0xc')](_0x17396b));});}; \ No newline at end of file +var _0x3ace=['CREATE\x20ERROR','moduleSearch','contact_lead','uri','https://www.zohoapis.','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','/crm/v2/Leads/search?criteria=((Phone:equals:','Leads','nothing','Creating\x20new\x20call...','Subjects','Description','getString','Who_Id','Full_Name','First_Name','Last_Name','$se_module','talktime','Call_Duration','utc','mm:ss','answertime','endtime','YYYY-MM-DDTHH:mm:ss','diff','starttime','lastevent','Call_Result','Called','connect','Answered','abandoned','Abandoned','timeout','Call_Start_Time','outbound','agentcalledAt','Call_Type','Inbound','Fields','/crm/v2/Calls','Call\x20created!','queue','stripTrailingSlash','host','serverUrl','monitor_format','/api/voice/recordings/','/downloads?type=uniqueid&token=','uniqueid','recordingURL','zoho.eu','com','calleridname','calleridnum','The\x20Call\x20ID\x20is:','[QUEUE]','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','toUpperCase','request-promise','md5','util','ioredis','bluebird','../../../../config/environment','zoho','redis','socket.io-emitter','emit','[HTTP]','stringify','length','forEach','type','string','idField','content','toString','variable','variableName','customVariable','Variable','name','toLowerCase','indexOf','split','isNil','isBefore','expires_in','access_token','zone','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','refreshToken','clientSecret','refresh_token','then','add','seconds','catch','error','stack','Search\x20user','GET','format','ActiveUsers','Zoho-oauthtoken\x20','users','findIndex','email','info','Agent\x20found!','Using\x20the\x20admin\x20account!','profile','Administrator','user','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','The\x20failing\x20result\x20is','data','startCase','moduleCreate','role','first_name','last_name','code','SUCCESS','details','enduserType','Error:\x20','log'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x3ace,0xda));var _0xe3ac=function(_0x693c8b,_0x162bb5){_0x693c8b=_0x693c8b-0x0;var _0x2e5221=_0x3ace[_0x693c8b];return _0x2e5221;};'use strict';var _=require('lodash');var rp=require(_0xe3ac('0x0'));var md5=require(_0xe3ac('0x1'));var util=require(_0xe3ac('0x2'));var intUtil=require('./util');var moment=require('moment');var Redis=require(_0xe3ac('0x3'));var BPromise=require(_0xe3ac('0x4'));var config=require(_0xe3ac('0x5'));var logger=require('../../../../config/logger')(_0xe3ac('0x6'));config['redis']=_['defaults'](config[_0xe3ac('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0xe3ac('0x8'))(new Redis(config['redis']));function emit(_0x345e51,_0x26eeed,_0x15f13f){io['to'](_0x345e51)[_0xe3ac('0x9')](_0x26eeed,_0x15f13f);}function request(_0x29ba64){logger['debug'](_0xe3ac('0xa'),JSON[_0xe3ac('0xb')](_0x29ba64));return rp(_0x29ba64);}function getCustomFields(_0x1000f8,_0x50fbee){var _0x2b1934={};if(_0x1000f8[_0xe3ac('0xc')]>0x0){_[_0xe3ac('0xd')](_0x1000f8,function(_0x1463fc){if(_0x1463fc[_0xe3ac('0xe')]===_0xe3ac('0xf')&&_0x1463fc[_0xe3ac('0x10')]){_0x2b1934[_0x1463fc[_0xe3ac('0x10')]]=_0x1463fc[_0xe3ac('0x11')][_0xe3ac('0x12')]();}else if(_0x1463fc[_0xe3ac('0xe')]===_0xe3ac('0x13')&&_0x1463fc[_0xe3ac('0x14')]&&_0x1463fc[_0xe3ac('0x10')]&&_0x50fbee[_0x1463fc[_0xe3ac('0x14')]]){_0x2b1934[_0x1463fc[_0xe3ac('0x10')]]=_0x50fbee[_0x1463fc[_0xe3ac('0x14')]]['toString']();}else if(_0x1463fc[_0xe3ac('0xe')]===_0xe3ac('0x15')&&_0x1463fc[_0xe3ac('0x16')]&&_0x1463fc['Variable']['name']&&_0x1463fc[_0xe3ac('0x10')]&&_0x50fbee[_0x1463fc['Variable'][_0xe3ac('0x17')][_0xe3ac('0x18')]()]){_0x2b1934[_0x1463fc['idField']]=_0x50fbee[_0x1463fc[_0xe3ac('0x16')]['name'][_0xe3ac('0x18')]()]['toString']();}});}return _0x2b1934;}function getName(_0x22f661){if(_0x22f661[_0xe3ac('0x19')]('\x20')>0x0){var _0x18508d=_0x22f661[_0xe3ac('0x1a')](/ (.+)/);if(_0x18508d[0x1]){return _0x18508d;}}return[_0x22f661,_0x22f661];}var accountsTokens={};function getAccessToken(_0x3834f9){return new Promise(function(_0xbc852e,_0x5635b7){if(!_[_0xe3ac('0x1b')](accountsTokens[_0x3834f9['id']])&&!_[_0xe3ac('0x1b')](accountsTokens[_0x3834f9['id']]['access_token'])){if(moment()[_0xe3ac('0x1c')](accountsTokens[_0x3834f9['id']][_0xe3ac('0x1d')])){_0xbc852e(accountsTokens[_0x3834f9['id']][_0xe3ac('0x1e')]);}}var _0x1b9983;switch(_0x3834f9[_0xe3ac('0x1f')]){case'US':_0x1b9983='https://accounts.zoho.com';break;case'AU':_0x1b9983=_0xe3ac('0x20');break;case'EU':_0x1b9983=_0xe3ac('0x21');break;case'IN':_0x1b9983=_0xe3ac('0x22');break;case'CN':_0x1b9983=_0xe3ac('0x23');break;default:_0x1b9983='https://accounts.zoho.eu';break;}var _0x20a8ac={'method':_0xe3ac('0x24'),'uri':_0x1b9983+'/oauth/v2/token','qs':{'refresh_token':_0x3834f9[_0xe3ac('0x25')],'client_id':_0x3834f9['clientId'],'client_secret':_0x3834f9[_0xe3ac('0x26')],'grant_type':_0xe3ac('0x27')},'json':!![]};return rp(_0x20a8ac)[_0xe3ac('0x28')](function(_0xd87134){accountsTokens[_0x3834f9['id']]={'access_token':_0xd87134[_0xe3ac('0x1e')],'expires_in':moment()[_0xe3ac('0x29')](_0xd87134['expires_in'],_0xe3ac('0x2a'))};_0xbc852e(_0xd87134['access_token']);})[_0xe3ac('0x2b')](function(_0x1090d2){logger[_0xe3ac('0x2c')]('Failing\x20creating\x20the\x20access_token',_0x1090d2[_0xe3ac('0x2d')]);_0x5635b7(_0x1090d2);});});}function getUser(_0x223827,_0x21cddd,_0x3c9c36,_0x2fbe11){logger['info'](_0xe3ac('0x2e'));return request({'method':_0xe3ac('0x2f'),'uri':util[_0xe3ac('0x30')]('https://www.zohoapis.%s/crm/v2/users',_0x21cddd),'qs':{'type':_0xe3ac('0x31')},'headers':{'Authorization':_0xe3ac('0x32')+_0x223827},'json':!![]})['then'](function(_0x222a40){if(_0x222a40[_0xe3ac('0x33')]){var _0x31ccb7=-0x1;if(_['isArrayLikeObject'](_0x222a40['users'])){if(!_[_0xe3ac('0x1b')](_0x2fbe11)){_0x31ccb7=_[_0xe3ac('0x34')](_0x222a40[_0xe3ac('0x33')],function(_0x2a86f9){return _0x2a86f9[_0xe3ac('0x35')]===_0x2fbe11;});}if(_0x31ccb7>=0x0){logger[_0xe3ac('0x36')](_0xe3ac('0x37'));}else{logger[_0xe3ac('0x36')](_0xe3ac('0x38'));_0x31ccb7=_['findIndex'](_0x222a40[_0xe3ac('0x33')],function(_0x3325e1){return _0x3325e1[_0xe3ac('0x39')][_0xe3ac('0x17')]===_0xe3ac('0x3a');});}return _0x222a40[_0xe3ac('0x33')][_0x31ccb7];}else{if(_0x222a40['user'][_0xe3ac('0x39')][_0xe3ac('0x17')]===_0xe3ac('0x3a')){logger[_0xe3ac('0x36')](_0xe3ac('0x38'));user=_0x222a40[_0xe3ac('0x3b')];return user;}else{logger[_0xe3ac('0x2c')]('The\x20failing\x20result\x20is',JSON[_0xe3ac('0xb')](_0x222a40));throw new Error(_0xe3ac('0x3c')+JSON[_0xe3ac('0xb')](_0x222a40));}}}else{logger['error'](_0xe3ac('0x3d'),JSON[_0xe3ac('0xb')](_0x222a40));throw new Error(_0xe3ac('0x3c')+JSON[_0xe3ac('0xb')](_0x222a40));}})[_0xe3ac('0x2b')](function(_0x48badc){console[_0xe3ac('0x2c')](_0x48badc);});}function getZohoUser(_0x4be11e,_0x68a477){return new BPromise(function(_0x320a06,_0x62e371){request(_0x4be11e)[_0xe3ac('0x28')](function(_0x3831fb){var _0x2ea042=null;if(_0x3831fb){_0x2ea042=_0x3831fb[_0xe3ac('0x3e')][0x0];_0x2ea042['enduserType']=_0x68a477;}_0x320a06(_0x2ea042);})[_0xe3ac('0x2b')](function(_0x2c8ba6){_0x62e371(_0x2c8ba6);});});}function createEndUser(_0x5e191e,_0xa079a5,_0x6231f0,_0x4f317c,_0x163653,_0xe438b3){var _0x6231f0=getName(_0x6231f0);return request({'method':_0xe3ac('0x24'),'uri':'https://www.zohoapis.'+_0xa079a5+'/crm/v2/'+_[_0xe3ac('0x3f')](_0xe438b3[_0xe3ac('0x40')])+'s','body':{'data':[{'Last_Name':_0x6231f0[0x1],'First_Name':_0x6231f0[0x0],'Phone':_0x4f317c,'Owner':{'name':!_[_0xe3ac('0x1b')](_0x163653['role'][_0xe3ac('0x17')])?_0x163653[_0xe3ac('0x41')][_0xe3ac('0x17')]:!_[_0xe3ac('0x1b')](_0x163653[_0xe3ac('0x42')])?_0x163653[_0xe3ac('0x42')]+'\x20'+_0x163653[_0xe3ac('0x43')]:_0x163653['last_name'],'id':_0x163653['id']}}]},'headers':{'Authorization':_0xe3ac('0x32')+_0x5e191e},'json':!![]})['then'](function(_0x244566){if(_0x244566&&_0x244566[_0xe3ac('0x3e')][0x0][_0xe3ac('0x44')]===_0xe3ac('0x45')){var _0x4454f0=_0x244566[_0xe3ac('0x3e')][0x0][_0xe3ac('0x46')];_0x4454f0[_0xe3ac('0x47')]=_['startCase'](_0xe438b3[_0xe3ac('0x40')])+'s';return _0x4454f0;}logger[_0xe3ac('0x2c')](_0xe3ac('0x3d'),JSON['stringify'](data));throw new Error(_0xe3ac('0x48')+JSON[_0xe3ac('0xb')](data));})['catch'](function(_0x4f3135){console[_0xe3ac('0x49')](_0xe3ac('0x4a'),_0x4f3135);});}function getEndUser(_0xe78248,_0x420bcf,_0x4cd692,_0x5e5205,_0x31d5b2,_0xdf883d,_0x5b6f18){var _0xcbee52={'method':_0xe3ac('0x2f'),'uri':'','headers':{'Authorization':'Zoho-oauthtoken\x20'+_0xe78248},'json':!![]};switch(_0x5b6f18[_0xe3ac('0x4b')]){case _0xe3ac('0x4c'):_0xcbee52[_0xe3ac('0x4d')]=_0xe3ac('0x4e')+_0x420bcf+_0xe3ac('0x4f')+_0x31d5b2+'))';return getZohoUser(_0xcbee52,_0xe3ac('0x50'))[_0xe3ac('0x28')](function(_0x58b965){if(_0x58b965)return _0x58b965;_0xcbee52[_0xe3ac('0x4d')]=_0xe3ac('0x4e')+_0x420bcf+_0xe3ac('0x51')+_0x31d5b2+'))';return getZohoUser(_0xcbee52,_0xe3ac('0x52'))[_0xe3ac('0x28')](function(_0xf276d0){if(_0xf276d0)return _0xf276d0;if(_0x5b6f18[_0xe3ac('0x40')]!='nothing'){return createEndUser(_0xe78248,_0x420bcf,_0x5e5205,_0x31d5b2,_0xdf883d,_0x5b6f18);}else{return{};}});});break;case'contact':_0xcbee52['uri']=_0xe3ac('0x4e')+_0x420bcf+_0xe3ac('0x4f')+_0x31d5b2+'))';return getZohoUser(_0xcbee52,_0xe3ac('0x50'))[_0xe3ac('0x28')](function(_0x6c7c0a){if(_0x6c7c0a)return _0x6c7c0a;if(_0x5b6f18[_0xe3ac('0x40')]!='nothing'){return createEndUser(_0xe78248,_0x420bcf,_0x5e5205,_0x31d5b2,_0xdf883d,_0x5b6f18);}else{return{};}});break;case'lead':_0xcbee52[_0xe3ac('0x4d')]='https://www.zohoapis.'+_0x420bcf+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0x31d5b2+'))';return getZohoUser(_0xcbee52,_0xe3ac('0x52'))[_0xe3ac('0x28')](function(_0x5f072a){if(_0x5f072a)return _0x5f072a;if(_0x5b6f18[_0xe3ac('0x40')]!=_0xe3ac('0x53')){return createEndUser(_0xe78248,_0x420bcf,_0x5e5205,_0x31d5b2,_0xdf883d,_0x5b6f18);}else{return{};}});break;}}function getCall(_0x322f4a,_0x368f5d,_0x3e0090,_0x2ab8b4,_0x5c1477,_0x2ca56a,_0x5e7087,_0x361964){logger[_0xe3ac('0x36')](_0xe3ac('0x54'));var _0x4918ef={};_0x4918ef['Owner']={'name':!_['isNil'](_0x2ab8b4[_0xe3ac('0x41')][_0xe3ac('0x17')])&&!_[_0xe3ac('0x1b')](_0x2ab8b4[_0xe3ac('0x39')]['name'])&&_0x2ab8b4[_0xe3ac('0x39')][_0xe3ac('0x17')]==='administrator'?_0x2ab8b4[_0xe3ac('0x41')][_0xe3ac('0x17')]:!_[_0xe3ac('0x1b')](_0x2ab8b4[_0xe3ac('0x42')])?_0x2ab8b4['first_name']+'\x20'+_0x2ab8b4['last_name']:_0x2ab8b4[_0xe3ac('0x43')],'id':_0x2ab8b4['id']};_0x4918ef['Subject']=intUtil['getString'](_0x2ca56a[_0xe3ac('0x55')],_0x5e7087,'\x20');_0x4918ef[_0xe3ac('0x56')]=intUtil[_0xe3ac('0x57')](_0x2ca56a['Descriptions'],_0x5e7087,'\x0a');if(_0x5c1477[_0xe3ac('0x47')]==='Contacts'){_0x4918ef[_0xe3ac('0x58')]={'name':!_[_0xe3ac('0x1b')](_0x5c1477[_0xe3ac('0x59')])?_0x5c1477['Full_Name']:!_[_0xe3ac('0x1b')](_0x5c1477['First_Name'])?_0x5c1477[_0xe3ac('0x5a')]+'\x20'+_0x5c1477[_0xe3ac('0x5b')]:_0x5c1477[_0xe3ac('0x5b')],'id':_0x5c1477['id']};}if(_0x5c1477[_0xe3ac('0x47')]===_0xe3ac('0x52')){_0x4918ef['What_Id']={'name':!_['isNil'](_0x5c1477[_0xe3ac('0x59')])?_0x5c1477['Full_Name']:!_[_0xe3ac('0x1b')](_0x5c1477[_0xe3ac('0x5a')])?_0x5c1477[_0xe3ac('0x5a')]+'\x20'+_0x5c1477['Last_Name']:_0x5c1477[_0xe3ac('0x5b')],'id':_0x5c1477['id']};_0x4918ef[_0xe3ac('0x5c')]=_[_0xe3ac('0x3f')](_0x5c1477[_0xe3ac('0x47')]);}if(_0x5e7087[_0xe3ac('0x5d')]){_0x4918ef[_0xe3ac('0x5e')]=moment[_0xe3ac('0x5f')](parseInt(_0x5e7087[_0xe3ac('0x5d')])*0x3e8)[_0xe3ac('0x30')](_0xe3ac('0x60'));}else if(_0x5e7087[_0xe3ac('0x61')]&&_0x5e7087[_0xe3ac('0x62')]){_0x4918ef[_0xe3ac('0x5e')]=moment[_0xe3ac('0x5f')](moment(_0x5e7087[_0xe3ac('0x62')],_0xe3ac('0x63'))[_0xe3ac('0x64')](moment(_0x5e7087[_0xe3ac('0x65')],_0xe3ac('0x63'))))[_0xe3ac('0x30')]('mm:ss');}switch(_0x5e7087[_0xe3ac('0x66')]){case'called':_0x4918ef[_0xe3ac('0x67')]=_0xe3ac('0x68');break;case'complete':case _0xe3ac('0x69'):_0x4918ef[_0xe3ac('0x67')]=_0xe3ac('0x6a');break;case'rejected':_0x4918ef['Call_Result']='Rejected';break;case _0xe3ac('0x6b'):_0x4918ef['Call_Result']=_0xe3ac('0x6c');break;case _0xe3ac('0x6d'):_0x4918ef[_0xe3ac('0x67')]='Timeout';default:}_0x4918ef[_0xe3ac('0x6e')]=(_0x361964===_0xe3ac('0x6f')?moment(_0x5e7087[_0xe3ac('0x65')])['format'](_0xe3ac('0x63')):moment(_0x5e7087[_0xe3ac('0x70')])[_0xe3ac('0x30')](_0xe3ac('0x63')))||moment()[_0xe3ac('0x30')]('YYYY-MM-DDTHH:mm:ss');_0x4918ef[_0xe3ac('0x71')]=_0x361964||_0xe3ac('0x72');_0x4918ef=_['merge'](_0x4918ef,getCustomFields(_0x2ca56a[_0xe3ac('0x73')],_0x5e7087));return request({'method':_0xe3ac('0x24'),'uri':_0xe3ac('0x4e')+_0x368f5d+_0xe3ac('0x74'),'headers':{'Authorization':_0xe3ac('0x32')+_0x322f4a},'body':{'data':[_0x4918ef]},'json':!![]})['then'](function(_0x4c9055){if(_0x4c9055&&_0x4c9055[_0xe3ac('0x3e')][0x0]['code']===_0xe3ac('0x45')){logger['info'](_0xe3ac('0x75'));return{'id':_0x4c9055[_0xe3ac('0x3e')][0x0][_0xe3ac('0x46')]['id']};}})['catch'](function(_0x1a43cc){logger[_0xe3ac('0x36')]('err',_0x1a43cc['stack']);console['log']('err',_0x1a43cc);});}exports[_0xe3ac('0x76')]=function(_0x2d24f9,_0x9a7f35,_0x468a11,_0x64cd82,_0x43c552,_0xb7d95b){var _0x3534f4,_0x4186b1,_0x392ef9;_0xb7d95b['host']=intUtil[_0xe3ac('0x77')](_0xb7d95b[_0xe3ac('0x78')]);_0xb7d95b['serverUrl']=intUtil[_0xe3ac('0x77')](_0xb7d95b[_0xe3ac('0x79')]);if(_0x43c552&&_0x43c552[_0xe3ac('0x7a')]){logger[_0xe3ac('0x36')]('[QUEUE]','Recording\x20is\x20enabled!');_0x9a7f35['recordingURL']=_0xb7d95b['serverUrl']+_0xe3ac('0x7b')+_0x9a7f35['uniqueid']+_0xe3ac('0x7c')+md5(_0x9a7f35[_0xe3ac('0x7d')]);}else{_0x9a7f35[_0xe3ac('0x7e')]='';}var _0x28a4a3=_0xb7d95b[_0xe3ac('0x78')]===_0xe3ac('0x7f')?'eu':_0xe3ac('0x80');return getAccessToken(_0xb7d95b)['then'](function(_0x257051){_0x392ef9=_0x257051;return getUser(_0x392ef9,_0x28a4a3,_0xb7d95b,_0x64cd82['email']);})['then'](function(_0x370f33){_0x3534f4=_0x370f33;logger['info']('The\x20User\x20ID\x20is:',_0x3534f4['id']);return getEndUser(_0x392ef9,_0x28a4a3,_0xb7d95b,_0x9a7f35[_0xe3ac('0x81')],_0x9a7f35[_0xe3ac('0x82')],_0x3534f4,_0x468a11);})[_0xe3ac('0x28')](function(_0x35f2c9){_0x4186b1=_0x35f2c9;return getCall(_0x392ef9,_0x28a4a3,_0xb7d95b,_0x3534f4,_0x4186b1,_0x468a11,_0x9a7f35,_0xe3ac('0x72'));})[_0xe3ac('0x28')](function(_0x4aa781){if(_0x4aa781){logger['info'](_0xe3ac('0x83'),_0x4aa781['id']);logger['info'](_0xe3ac('0x84'),_0xe3ac('0x85'));emit(util[_0xe3ac('0x30')](_0xe3ac('0x86'),_0x64cd82[_0xe3ac('0x17')]),_0xe3ac('0x87'),{'uri':_0xe3ac('0x88')+_0xb7d95b[_0xe3ac('0x78')]+_0xe3ac('0x89')+_0x4aa781['id']});}})[_0xe3ac('0x2b')](function(_0x5c10f7){logger['error'](_0xe3ac('0x84'),JSON[_0xe3ac('0xb')](_0x5c10f7));});};exports[_0xe3ac('0x6f')]=function(_0x443e64,_0x125507,_0x42c758,_0x10d055,_0x40788b,_0x1055b6,_0x463364){var _0x47a758,_0x47d204,_0x590e3b;_0x1055b6[_0xe3ac('0x78')]=intUtil[_0xe3ac('0x77')](_0x1055b6['host']);_0x1055b6[_0xe3ac('0x79')]=intUtil[_0xe3ac('0x77')](_0x1055b6[_0xe3ac('0x79')]);if(_0x463364&&_0x463364[_0xe3ac('0x8a')]&&_0x463364[_0xe3ac('0x8a')]!==_0xe3ac('0x8b')){logger['info'](_0xe3ac('0x8c'),_0xe3ac('0x8d'));_0x125507['recordingURL']=_0x1055b6[_0xe3ac('0x79')]+_0xe3ac('0x7b')+_0x125507[_0xe3ac('0x7d')]+_0xe3ac('0x7c')+md5(_0x125507[_0xe3ac('0x7d')]);}var _0x452017=_0x1055b6[_0xe3ac('0x78')]===_0xe3ac('0x7f')?'eu':_0xe3ac('0x80');return getAccessToken(_0x1055b6)[_0xe3ac('0x28')](function(_0x51da68){_0x590e3b=_0x51da68;return getUser(_0x590e3b,_0x452017,_0x1055b6,_0x10d055['email']);})['then'](function(_0x2176bb){_0x47a758=_0x2176bb;logger[_0xe3ac('0x36')](_0xe3ac('0x8e'),_0x47a758['id']);return getEndUser(_0x590e3b,_0x452017,_0x1055b6,_0x125507[_0xe3ac('0x8f')],_0x125507[_0xe3ac('0x90')],_0x47a758,_0x42c758);})[_0xe3ac('0x28')](function(_0x1d2607){_0x47d204=_0x1d2607;return getCall(_0x590e3b,_0x452017,_0x1055b6,_0x47a758,_0x47d204,_0x42c758,_0x125507,'Outbound');})[_0xe3ac('0x28')](function(_0x53b153){if(_0x53b153){logger[_0xe3ac('0x36')](_0xe3ac('0x83'),_0x53b153['id']);logger[_0xe3ac('0x36')]('[OUTBOUND]',_0xe3ac('0x85'));emit(util['format'](_0xe3ac('0x86'),_0x10d055[_0xe3ac('0x17')]),'trigger:browser:url',{'uri':'https://crm.'+_0x1055b6[_0xe3ac('0x78')]+_0xe3ac('0x89')+_0x53b153['id']});}})['catch'](function(_0x25a8de){logger['error'](_0xe3ac('0x8c'),JSON['stringify'](_0x25a8de));});};exports['unmanaged']=function(_0x543418,_0x38e54f,_0x3907bf,_0x5684c2,_0x335524,_0x1758a4){var _0x42508a,_0x26d338,_0x1e6f09;_0x1758a4[_0xe3ac('0x78')]=intUtil[_0xe3ac('0x77')](_0x1758a4[_0xe3ac('0x78')]);_0x1758a4[_0xe3ac('0x79')]=intUtil['stripTrailingSlash'](_0x1758a4['serverUrl']);if(_0x335524&&_0x335524['monitor_format']){logger['info']('['+_0x38e54f[_0xe3ac('0x66')][_0xe3ac('0x91')]()+']',_0xe3ac('0x8d'));_0x38e54f['recordingURL']=_0x1758a4[_0xe3ac('0x79')]+_0xe3ac('0x7b')+_0x38e54f[_0xe3ac('0x7d')]+_0xe3ac('0x7c')+md5(_0x38e54f['uniqueid']);}else{_0x38e54f['recordingURL']='';}var _0x3735b3=_0x1758a4[_0xe3ac('0x78')]===_0xe3ac('0x7f')?'eu':_0xe3ac('0x80');return getAccessToken(_0x1758a4)[_0xe3ac('0x28')](function(_0x15609f){_0x1e6f09=_0x15609f;return getUser(_0x1e6f09,_0x3735b3,_0x1758a4);})[_0xe3ac('0x28')](function(_0x30673d){_0x42508a=_0x30673d;logger['info'](_0xe3ac('0x8e'),_0x42508a['id']);return getEndUser(_0x1e6f09,_0x3735b3,_0x1758a4,_0x38e54f[_0xe3ac('0x81')],_0x38e54f[_0xe3ac('0x82')],_0x42508a,_0x3907bf);})[_0xe3ac('0x28')](function(_0x5bf5b6){_0x26d338=_0x5bf5b6;return getCall(_0x1e6f09,_0x3735b3,_0x1758a4,_0x42508a,_0x26d338,_0x3907bf,_0x38e54f,_0xe3ac('0x72'));})['then'](function(_0x16f951){if(_0x16f951){logger[_0xe3ac('0x36')](_0xe3ac('0x83'),_0x16f951['id']);}})[_0xe3ac('0x2b')](function(_0x3af87b){logger[_0xe3ac('0x2c')]('['+_0x38e54f[_0xe3ac('0x66')][_0xe3ac('0x91')]()+']',JSON[_0xe3ac('0xb')](_0x3af87b));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/script/index.js b/server/services/ami/trigger/script/index.js index 9c35e5e..1fea9d3 100644 --- a/server/services/ami/trigger/script/index.js +++ b/server/services/ami/trigger/script/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['mustache','trigger','exec','data2','Script','data3','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs'];(function(_0x1390fb,_0x4bcf9c){var _0x2f5992=function(_0x45c484){while(--_0x45c484){_0x1390fb['push'](_0x1390fb['shift']());}};_0x2f5992(++_0x4bcf9c);}(_0x7a54,0x106));var _0x47a5=function(_0x74f8a1,_0x4f5f3c){_0x74f8a1=_0x74f8a1-0x0;var _0x42d37c=_0x7a54[_0x74f8a1];return _0x42d37c;};'use strict';var util=require(_0x47a5('0x0'));var sh=require(_0x47a5('0x1'));var Mustache=require(_0x47a5('0x2'));var logger=require('../../../../config/logger')(_0x47a5('0x3'));exports[_0x47a5('0x4')]=function(_0x4880bf,_0x5f7f12){var _0x11bf85=_0x4880bf[_0x47a5('0x5')]?_0x4880bf[_0x47a5('0x5')]:_0x47a5('0x6');var _0x545a97=_0x4880bf[_0x47a5('0x7')]?Mustache['render'](_0x4880bf[_0x47a5('0x7')],_0x5f7f12):_0x5f7f12;sh[_0x47a5('0x4')](_0x545a97,function(_0x506eda,_0x194fb0,_0x5077f3){if(_0x506eda!==0x0){logger['error'](util['format'](_0x47a5('0x8'),_0x11bf85,_0x545a97,_0x506eda,_0x5077f3));}else{logger[_0x47a5('0x9')](util['format'](_0x47a5('0xa'),_0x11bf85,_0x545a97,_0x194fb0));}});}; \ No newline at end of file +var _0x7a54=['mustache','trigger','exec','data2','Script','data3','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs'];(function(_0x5abe6c,_0x4ae51e){var _0x2f9a85=function(_0x2bddf4){while(--_0x2bddf4){_0x5abe6c['push'](_0x5abe6c['shift']());}};_0x2f9a85(++_0x4ae51e);}(_0x7a54,0x106));var _0x47a5=function(_0x1a8580,_0x2f0b36){_0x1a8580=_0x1a8580-0x0;var _0x5884f7=_0x7a54[_0x1a8580];return _0x5884f7;};'use strict';var util=require(_0x47a5('0x0'));var sh=require(_0x47a5('0x1'));var Mustache=require(_0x47a5('0x2'));var logger=require('../../../../config/logger')(_0x47a5('0x3'));exports[_0x47a5('0x4')]=function(_0x4880bf,_0x5f7f12){var _0x11bf85=_0x4880bf[_0x47a5('0x5')]?_0x4880bf[_0x47a5('0x5')]:_0x47a5('0x6');var _0x545a97=_0x4880bf[_0x47a5('0x7')]?Mustache['render'](_0x4880bf[_0x47a5('0x7')],_0x5f7f12):_0x5f7f12;sh[_0x47a5('0x4')](_0x545a97,function(_0x506eda,_0x194fb0,_0x5077f3){if(_0x506eda!==0x0){logger['error'](util['format'](_0x47a5('0x8'),_0x11bf85,_0x545a97,_0x506eda,_0x5077f3));}else{logger[_0x47a5('0x9')](util['format'](_0x47a5('0xa'),_0x11bf85,_0x545a97,_0x194fb0));}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/urlforward/index.js b/server/services/ami/trigger/urlforward/index.js index 76df94d..58a1e4f 100644 --- a/server/services/ami/trigger/urlforward/index.js +++ b/server/services/ami/trigger/urlforward/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f2f=['lodash','mustache','../../../../config/logger','trigger','exec','data1','toUpperCase','render','data2','number','data5','headers','data6','parse','stack','GET','DELETE','POST','PUT','data7','body','error','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify','then','isNil',',\x20request\x20body:\x20','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','name','message','request-promise','util'];(function(_0x3113a5,_0x3941f7){var _0x6923e5=function(_0x4749d3){while(--_0x4749d3){_0x3113a5['push'](_0x3113a5['shift']());}};_0x6923e5(++_0x3941f7);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4a574c,_0x97e146){_0x4a574c=_0x4a574c-0x0;var _0xc20a44=_0x5f2f[_0x4a574c];return _0xc20a44;};'use strict';var rp=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var _=require(_0xf5f2('0x2'));var Mustache=require(_0xf5f2('0x3'));var logger=require(_0xf5f2('0x4'))(_0xf5f2('0x5'));exports[_0xf5f2('0x6')]=function(_0x107cf,_0x501fbd){var _0x4854b6,_0x1665c7;var _0x192215={'method':_0x107cf[_0xf5f2('0x7')][_0xf5f2('0x8')](),'uri':Mustache[_0xf5f2('0x9')](_0x107cf[_0xf5f2('0xa')],_0x501fbd),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x107cf['data5'])===_0xf5f2('0xb')&&parseInt(_0x107cf[_0xf5f2('0xc')])>=0x1&&parseInt(_0x107cf[_0xf5f2('0xc')])<=0xa?parseInt(_0x107cf['data5'])*0x3e8:0x5*0x3e8};try{_0x192215[_0xf5f2('0xd')]=_0x107cf[_0xf5f2('0xe')]?JSON[_0xf5f2('0xf')](Mustache['render'](_0x107cf[_0xf5f2('0xe')],_0x501fbd)):{};}catch(_0x4ebbbe){logger['error'](_0x4ebbbe[_0xf5f2('0x10')]);}switch(_0x107cf[_0xf5f2('0x7')]['toUpperCase']()){case _0xf5f2('0x11'):case _0xf5f2('0x12'):_0x4854b6=null;_0x192215['qs']=_0x501fbd;break;case _0xf5f2('0x13'):case _0xf5f2('0x14'):if(_0x107cf[_0xf5f2('0x15')]){try{_0x4854b6=JSON[_0xf5f2('0xf')](Mustache['render'](_0x107cf[_0xf5f2('0x15')],_0x501fbd));_0x192215[_0xf5f2('0x16')]=_0x4854b6;}catch(_0x269909){logger[_0xf5f2('0x17')](_0x269909[_0xf5f2('0x10')]);logger['error'](_0xf5f2('0x18'));}}else{_0x4854b6=_0x501fbd;_0x192215[_0xf5f2('0x16')]=_0x4854b6;}break;}logger[_0xf5f2('0x19')](util[_0xf5f2('0x1a')](_0xf5f2('0x1b'),_0x107cf[_0xf5f2('0x7')],_0x107cf[_0xf5f2('0xa')],JSON[_0xf5f2('0x1c')](_0x192215)));rp(_0x192215)[_0xf5f2('0x1d')](function(_0x228ace){_0x4854b6=!_[_0xf5f2('0x1e')](_0x4854b6)?_0xf5f2('0x1f')+_0x4854b6:'';_0x1665c7=typeof _0x228ace[_0xf5f2('0x16')]===_0xf5f2('0x20')?JSON[_0xf5f2('0x1c')](_0x228ace[_0xf5f2('0x16')]):_0x228ace[_0xf5f2('0x16')];logger['info'](util[_0xf5f2('0x1a')](_0xf5f2('0x21'),_0x107cf['data1'],_0x107cf['data2'],_0x228ace[_0xf5f2('0x22')],_0x1665c7));})[_0xf5f2('0x23')](function(_0x4ae323){logger[_0xf5f2('0x17')](util[_0xf5f2('0x1a')](_0xf5f2('0x24'),_0x107cf[_0xf5f2('0x7')],_0x107cf[_0xf5f2('0xa')],_0x4ae323['statusCode'],_0x4ae323[_0xf5f2('0x25')],_0x4ae323[_0xf5f2('0x26')]));});}; \ No newline at end of file +var _0x5f2f=['lodash','mustache','../../../../config/logger','trigger','exec','data1','toUpperCase','render','data2','number','data5','headers','data6','parse','stack','GET','DELETE','POST','PUT','data7','body','error','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify','then','isNil',',\x20request\x20body:\x20','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','name','message','request-promise','util'];(function(_0x6a25ed,_0x221264){var _0x313f85=function(_0xeb84c7){while(--_0xeb84c7){_0x6a25ed['push'](_0x6a25ed['shift']());}};_0x313f85(++_0x221264);}(_0x5f2f,0x73));var _0xf5f2=function(_0x32b774,_0x785261){_0x32b774=_0x32b774-0x0;var _0x5f2ae3=_0x5f2f[_0x32b774];return _0x5f2ae3;};'use strict';var rp=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var _=require(_0xf5f2('0x2'));var Mustache=require(_0xf5f2('0x3'));var logger=require(_0xf5f2('0x4'))(_0xf5f2('0x5'));exports[_0xf5f2('0x6')]=function(_0x107cf,_0x501fbd){var _0x4854b6,_0x1665c7;var _0x192215={'method':_0x107cf[_0xf5f2('0x7')][_0xf5f2('0x8')](),'uri':Mustache[_0xf5f2('0x9')](_0x107cf[_0xf5f2('0xa')],_0x501fbd),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x107cf['data5'])===_0xf5f2('0xb')&&parseInt(_0x107cf[_0xf5f2('0xc')])>=0x1&&parseInt(_0x107cf[_0xf5f2('0xc')])<=0xa?parseInt(_0x107cf['data5'])*0x3e8:0x5*0x3e8};try{_0x192215[_0xf5f2('0xd')]=_0x107cf[_0xf5f2('0xe')]?JSON[_0xf5f2('0xf')](Mustache['render'](_0x107cf[_0xf5f2('0xe')],_0x501fbd)):{};}catch(_0x4ebbbe){logger['error'](_0x4ebbbe[_0xf5f2('0x10')]);}switch(_0x107cf[_0xf5f2('0x7')]['toUpperCase']()){case _0xf5f2('0x11'):case _0xf5f2('0x12'):_0x4854b6=null;_0x192215['qs']=_0x501fbd;break;case _0xf5f2('0x13'):case _0xf5f2('0x14'):if(_0x107cf[_0xf5f2('0x15')]){try{_0x4854b6=JSON[_0xf5f2('0xf')](Mustache['render'](_0x107cf[_0xf5f2('0x15')],_0x501fbd));_0x192215[_0xf5f2('0x16')]=_0x4854b6;}catch(_0x269909){logger[_0xf5f2('0x17')](_0x269909[_0xf5f2('0x10')]);logger['error'](_0xf5f2('0x18'));}}else{_0x4854b6=_0x501fbd;_0x192215[_0xf5f2('0x16')]=_0x4854b6;}break;}logger[_0xf5f2('0x19')](util[_0xf5f2('0x1a')](_0xf5f2('0x1b'),_0x107cf[_0xf5f2('0x7')],_0x107cf[_0xf5f2('0xa')],JSON[_0xf5f2('0x1c')](_0x192215)));rp(_0x192215)[_0xf5f2('0x1d')](function(_0x228ace){_0x4854b6=!_[_0xf5f2('0x1e')](_0x4854b6)?_0xf5f2('0x1f')+_0x4854b6:'';_0x1665c7=typeof _0x228ace[_0xf5f2('0x16')]===_0xf5f2('0x20')?JSON[_0xf5f2('0x1c')](_0x228ace[_0xf5f2('0x16')]):_0x228ace[_0xf5f2('0x16')];logger['info'](util[_0xf5f2('0x1a')](_0xf5f2('0x21'),_0x107cf['data1'],_0x107cf['data2'],_0x228ace[_0xf5f2('0x22')],_0x1665c7));})[_0xf5f2('0x23')](function(_0x4ae323){logger[_0xf5f2('0x17')](util[_0xf5f2('0x1a')](_0xf5f2('0x24'),_0x107cf[_0xf5f2('0x7')],_0x107cf[_0xf5f2('0xa')],_0x4ae323['statusCode'],_0x4ae323[_0xf5f2('0x25')],_0x4ae323[_0xf5f2('0x26')]));});}; \ No newline at end of file diff --git a/server/services/email/client.js b/server/services/email/client.js index 61297e1..717f85e 100644 --- a/server/services/email/client.js +++ b/server/services/email/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe107=['client','Request','request','debug','rpc','error','message','result','catch','exports','jayson/promise','../../config/logger','routing'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xe107,0xb3));var _0x7e10=function(_0x3087a3,_0xd5e3ad){_0x3087a3=_0x3087a3-0x0;var _0x91e71f=_0xe107[_0x3087a3];return _0x91e71f;};'use strict';var jayson=require(_0x7e10('0x0'));var BPromise=require('bluebird');var logger=require(_0x7e10('0x1'))(_0x7e10('0x2'));var client=jayson[_0x7e10('0x3')]['http']({'port':0x2329});client[_0x7e10('0x4')]=function(_0x56db00,_0x4db676){return new BPromise(function(_0x2bdf3c,_0x46e807){return client[_0x7e10('0x5')](_0x56db00,_0x4db676)['then'](function(_0x5f1edf){logger[_0x7e10('0x6')](_0x7e10('0x7'),_0x7e10('0x2'),_0x56db00,_0x4db676,_0x5f1edf);if(_0x5f1edf[_0x7e10('0x8')]){logger['error']('rpc',_0x7e10('0x2'),_0x56db00,_0x5f1edf['error']['message'],_0x4db676);return _0x46e807(_0x5f1edf[_0x7e10('0x8')][_0x7e10('0x9')]);}else{return _0x2bdf3c(_0x5f1edf[_0x7e10('0xa')]);}})[_0x7e10('0xb')](function(_0x256cb1){logger['error'](_0x7e10('0x7'),'routing',_0x56db00,_0x256cb1,_0x4db676);return _0x46e807(_0x256cb1);});});};module[_0x7e10('0xc')]=client; \ No newline at end of file +var _0xac31=['debug','rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','routing','client','http','Request','then'];(function(_0x537a95,_0x32c06f){var _0x34ecbd=function(_0x3cfc82){while(--_0x3cfc82){_0x537a95['push'](_0x537a95['shift']());}};_0x34ecbd(++_0x32c06f);}(_0xac31,0xca));var _0x1ac3=function(_0x407a59,_0x36c702){_0x407a59=_0x407a59-0x0;var _0x36dd62=_0xac31[_0x407a59];return _0x36dd62;};'use strict';var jayson=require(_0x1ac3('0x0'));var BPromise=require(_0x1ac3('0x1'));var logger=require(_0x1ac3('0x2'))(_0x1ac3('0x3'));var client=jayson[_0x1ac3('0x4')][_0x1ac3('0x5')]({'port':0x2329});client[_0x1ac3('0x6')]=function(_0x59b42c,_0x33b5ab){return new BPromise(function(_0x434b5e,_0x4dcc96){return client['request'](_0x59b42c,_0x33b5ab)[_0x1ac3('0x7')](function(_0x20027f){logger[_0x1ac3('0x8')](_0x1ac3('0x9'),_0x1ac3('0x3'),_0x59b42c,_0x33b5ab,_0x20027f);if(_0x20027f['error']){logger[_0x1ac3('0xa')]('rpc',_0x1ac3('0x3'),_0x59b42c,_0x20027f[_0x1ac3('0xa')][_0x1ac3('0xb')],_0x33b5ab);return _0x4dcc96(_0x20027f['error'][_0x1ac3('0xb')]);}else{return _0x434b5e(_0x20027f[_0x1ac3('0xc')]);}})[_0x1ac3('0xd')](function(_0x24f0d2){logger[_0x1ac3('0xa')](_0x1ac3('0x9'),'routing',_0x59b42c,_0x24f0d2,_0x33b5ab);return _0x4dcc96(_0x24f0d2);});});};module[_0x1ac3('0xe')]=client; \ No newline at end of file diff --git a/server/services/email/index.js b/server/services/email/index.js index 501546d..338421a 100644 --- a/server/services/email/index.js +++ b/server/services/email/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf23b=['log','bluebird','./server','./realtime','./lib/email','./rpc/mailAccount','resolve','then','getMailAccounts','initMailAccounts','refresh','mailAccounts','listen','Setting','findOne','loginMailFrequency','catch'];(function(_0x1c9a2f,_0x42208a){var _0x8eebbc=function(_0x28fca6){while(--_0x28fca6){_0x1c9a2f['push'](_0x1c9a2f['shift']());}};_0x8eebbc(++_0x42208a);}(_0xf23b,0x133));var _0xbf23=function(_0x549d51,_0x2c469a){_0x549d51=_0x549d51-0x0;var _0x40fa44=_0xf23b[_0x549d51];return _0x40fa44;};'use strict';var BPromise=require(_0xbf23('0x0'));var server=require(_0xbf23('0x1'));var Realtime=require(_0xbf23('0x2'));var EmailChannel=require(_0xbf23('0x3'));var mailAccount=require(_0xbf23('0x4'));var realtime=new Realtime();var email=new EmailChannel(realtime);var db=require('../../mysqldb')['db'];function initRealtime(){return BPromise[_0xbf23('0x5')]()[_0xbf23('0x6')](mailAccount[_0xbf23('0x7')]())['then'](realtime[_0xbf23('0x8')]())[_0xbf23('0x6')](function(){email[_0xbf23('0x9')](realtime[_0xbf23('0xa')]);return realtime;});}function main(){return server[_0xbf23('0xb')](realtime,email)['then'](function(_0x4b5e1e){return initRealtime();})[_0xbf23('0x6')](function(_0x486c02){return db[_0xbf23('0xc')][_0xbf23('0xd')]({'attributes':['id',_0xbf23('0xe')],'raw':!![]});})[_0xbf23('0x6')](function(_0x16e09c){return setInterval(initRealtime,_0x16e09c['loginMailFrequency']*0x3e8);})[_0xbf23('0xf')](function(_0x1d372c){console[_0xbf23('0x10')](_0x1d372c);});}main(); \ No newline at end of file +var _0x975f=['resolve','then','initMailAccounts','refresh','mailAccounts','listen','Setting','loginMailFrequency','log','bluebird','./realtime','./lib/email','./rpc/mailAccount','../../mysqldb'];(function(_0x3ba422,_0x53303c){var _0x20b5dd=function(_0x10b8a7){while(--_0x10b8a7){_0x3ba422['push'](_0x3ba422['shift']());}};_0x20b5dd(++_0x53303c);}(_0x975f,0x191));var _0xf975=function(_0x13342f,_0x3d6303){_0x13342f=_0x13342f-0x0;var _0x2fc1fc=_0x975f[_0x13342f];return _0x2fc1fc;};'use strict';var BPromise=require(_0xf975('0x0'));var server=require('./server');var Realtime=require(_0xf975('0x1'));var EmailChannel=require(_0xf975('0x2'));var mailAccount=require(_0xf975('0x3'));var realtime=new Realtime();var email=new EmailChannel(realtime);var db=require(_0xf975('0x4'))['db'];function initRealtime(){return BPromise[_0xf975('0x5')]()[_0xf975('0x6')](mailAccount['getMailAccounts']())[_0xf975('0x6')](realtime[_0xf975('0x7')]())['then'](function(){email[_0xf975('0x8')](realtime[_0xf975('0x9')]);return realtime;});}function main(){return server[_0xf975('0xa')](realtime,email)[_0xf975('0x6')](function(_0xe62d83){return initRealtime();})[_0xf975('0x6')](function(_0x5d5860){return db[_0xf975('0xb')]['findOne']({'attributes':['id',_0xf975('0xc')],'raw':!![]});})['then'](function(_0x32e936){return setInterval(initRealtime,_0x32e936[_0xf975('0xc')]*0x3e8);})['catch'](function(_0x472fc7){console[_0xf975('0xd')](_0x472fc7);});}main(); \ No newline at end of file diff --git a/server/services/email/lib/email.js b/server/services/email/lib/email.js index 4f2452d..3ca57a6 100644 --- a/server/services/email/lib/email.js +++ b/server/services/email/lib/email.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2599=['lastSync','sendMail','send','verifySmtp','Smtp','verify','verified','exports','lodash','bluebird','md5','ioredis','../../../config/environment','../../../config/logger','email','redis','defaults','./imap','../rpc/mailAccount','info','start\x20email\x20channel','mailAccounts','imapAccounts','smtp','prototype','key','active','Imap','status','stringify','emit','mailAccount:update','hasOwnProperty','box','handleImapBox','bind','end','error','isNil','disabled','messageStatus','messages','total','handleImapEmail','firstName','from','notify','then','Mail\x20accepted\x20from\x20routing','catch','handleImapEnd'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0x2599,0x1a0));var _0x9259=function(_0x1d9339,_0x5b8458){_0x1d9339=_0x1d9339-0x0;var _0x5c6960=_0x2599[_0x1d9339];return _0x5c6960;};'use strict';var _=require(_0x9259('0x0'));var moment=require('moment');var BPromise=require(_0x9259('0x1'));var md5=require(_0x9259('0x2'));var Redis=require(_0x9259('0x3'));var config=require(_0x9259('0x4'));var logger=require(_0x9259('0x5'))(_0x9259('0x6'));config[_0x9259('0x7')]=_[_0x9259('0x8')](config['redis'],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x9259('0x7')]));var EmailImap=require(_0x9259('0x9'));var EmailSmtp=require('./smtp');var mailAccount=require(_0x9259('0xa'));var md5Accounts={};function EmailChannel(_0xb71f39){logger[_0x9259('0xb')](_0x9259('0xc'));this[_0x9259('0xd')]=_0xb71f39[_0x9259('0xd')];this[_0x9259('0xe')]={};this[_0x9259('0xf')]=new EmailSmtp();}EmailChannel[_0x9259('0x10')]['emit']=function(_0x3b6595){var _0x2da0d1=this[_0x9259('0xd')][_0x3b6595];var _0x2a7073={'id':_0x2da0d1['id'],'name':_0x2da0d1['name'],'key':_0x2da0d1[_0x9259('0x11')],'active':_0x2da0d1[_0x9259('0x12')],'Imap':{'status':_0x2da0d1[_0x9259('0x13')][_0x9259('0x14')],'messageStatus':_0x2da0d1[_0x9259('0x13')]['messageStatus'],'total':_0x2da0d1[_0x9259('0x13')]['total']}};if(_['isNil'](md5Accounts[_0x3b6595])){md5Accounts[_0x3b6595]={};}var _0x1893bb=md5(JSON[_0x9259('0x15')](_0x2a7073));if(md5Accounts[_0x3b6595][_0x9259('0x2')]!==_0x1893bb){md5Accounts[_0x3b6595]['md5']=_0x1893bb;io[_0x9259('0x16')](_0x9259('0x17'),_0x2a7073);}};EmailChannel[_0x9259('0x10')]['refresh']=function(_0x229952){for(var _0xfc6bc3 in _0x229952){if(_0x229952[_0x9259('0x18')](_0xfc6bc3)){if(_0x229952[_0xfc6bc3][_0x9259('0x13')]&&_0x229952[_0xfc6bc3]['active']){var _0x2d0e34=_0x229952[_0xfc6bc3][_0x9259('0x13')];if(!this['imapAccounts']['hasOwnProperty'](_0x2d0e34['id'])){this['imapAccounts'][_0x2d0e34['id']]=new EmailImap(_0x2d0e34,_0x229952[_0xfc6bc3]['email']);this[_0x9259('0xe')][_0x2d0e34['id']]['on'](_0x9259('0x19'),this[_0x9259('0x1a')][_0x9259('0x1b')](this,_0xfc6bc3));this['imapAccounts'][_0x2d0e34['id']]['on'](_0x9259('0x6'),this['handleImapEmail'][_0x9259('0x1b')](this,_0xfc6bc3));this[_0x9259('0xe')][_0x2d0e34['id']]['on'](_0x9259('0x1c'),this['handleImapEnd']['bind'](this,_0xfc6bc3));this[_0x9259('0xe')][_0x2d0e34['id']]['on'](_0x9259('0x1d'),this['handleImapError'][_0x9259('0x1b')](this,_0xfc6bc3));}}else{if(_[_0x9259('0x1e')](this['mailAccounts'][_0xfc6bc3][_0x9259('0x13')])){this[_0x9259('0xd')][_0xfc6bc3][_0x9259('0x13')]={};}this[_0x9259('0xd')][_0xfc6bc3]['Imap'][_0x9259('0x14')]=_0x9259('0x1f');this[_0x9259('0xd')][_0xfc6bc3][_0x9259('0x13')][_0x9259('0x20')]='';this[_0x9259('0x16')](_0xfc6bc3);}}}};EmailChannel[_0x9259('0x10')][_0x9259('0x1a')]=function(_0x4ba9be,_0x51db15){if(this['mailAccounts'][_0x4ba9be]){this[_0x9259('0xd')][_0x4ba9be][_0x9259('0x13')]['status']='connected';this['mailAccounts'][_0x4ba9be][_0x9259('0x13')][_0x9259('0x20')]=_0x51db15['name'];if(_0x51db15[_0x9259('0x21')]){this[_0x9259('0xd')][_0x4ba9be][_0x9259('0x13')][_0x9259('0x22')]=_0x51db15[_0x9259('0x21')][_0x9259('0x22')];}return this[_0x9259('0x16')](_0x4ba9be);}};EmailChannel['prototype'][_0x9259('0x23')]=function(_0x50c1f3,_0x357ab5){logger[_0x9259('0xb')]('New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s',_0x357ab5[_0x9259('0x24')],_0x357ab5['lastName'],_0x357ab5[_0x9259('0x25')],_0x50c1f3);if(this['mailAccounts'][_0x50c1f3]){return mailAccount[_0x9259('0x26')](_0x50c1f3,_0x357ab5)[_0x9259('0x27')](function(_0xc29577){if(_0xc29577){logger['info'](_0x9259('0x28'));}})[_0x9259('0x29')](function(_0x7739a1){logger[_0x9259('0x1d')]('Mail\x20not\x20accepted\x20from\x20routing\x20%s',JSON[_0x9259('0x15')](_0x7739a1));});}};EmailChannel[_0x9259('0x10')][_0x9259('0x2a')]=function(_0x4dd5b0){if(this[_0x9259('0xd')][_0x4dd5b0]&&this[_0x9259('0xd')][_0x4dd5b0]['Imap']){if(this[_0x9259('0xe')][this[_0x9259('0xd')][_0x4dd5b0][_0x9259('0x13')]['id']]){delete this[_0x9259('0xe')][this['mailAccounts'][_0x4dd5b0][_0x9259('0x13')]['id']];}this[_0x9259('0xd')][_0x4dd5b0][_0x9259('0x13')][_0x9259('0x2b')]=moment();this[_0x9259('0x16')](_0x4dd5b0);}};EmailChannel[_0x9259('0x10')]['handleImapError']=function(_0x573be8,_0x56b4c6){if(this[_0x9259('0xd')][_0x573be8]){this[_0x9259('0xd')][_0x573be8][_0x9259('0x13')][_0x9259('0x14')]=_0x9259('0x1d');this[_0x9259('0xd')][_0x573be8]['Imap']['messageStatus']=_0x56b4c6;return this['emit'](_0x573be8);}};EmailChannel[_0x9259('0x10')][_0x9259('0x2c')]=function(_0x45fd2a,_0x1117ae){return this[_0x9259('0xf')][_0x9259('0x2d')](_0x45fd2a,_0x1117ae);};EmailChannel[_0x9259('0x10')][_0x9259('0x2e')]=function(_0x16645c){var _0x4732bb=this;if(this[_0x9259('0xd')][_0x16645c['id']]){if(_['isNil'](this[_0x9259('0xd')][_0x16645c['id']][_0x9259('0x2f')])){this[_0x9259('0xd')][_0x16645c['id']][_0x9259('0x2f')]={};}this[_0x9259('0xd')][_0x16645c['id']]['Smtp'][_0x9259('0x2b')]=moment();return new BPromise(function(_0x58b663,_0x29894e){return _0x4732bb[_0x9259('0xf')][_0x9259('0x30')](_0x16645c)[_0x9259('0x27')](function(_0x45d5ff){_0x4732bb[_0x9259('0xd')][_0x16645c['id']][_0x9259('0x2f')][_0x9259('0x14')]=_0x9259('0x31');_0x4732bb[_0x9259('0xd')][_0x16645c['id']][_0x9259('0x2f')][_0x9259('0x20')]='';_0x4732bb[_0x9259('0x16')](_0x16645c['id']);_0x58b663(_0x45d5ff);})[_0x9259('0x29')](function(_0x5b421c){_0x4732bb[_0x9259('0xd')][_0x16645c['id']][_0x9259('0x2f')]['status']=_0x9259('0x1d');_0x4732bb[_0x9259('0xd')][_0x16645c['id']][_0x9259('0x2f')][_0x9259('0x20')]=_0x5b421c;_0x4732bb[_0x9259('0x16')](_0x16645c['id']);_0x29894e(_0x5b421c);});});}return this[_0x9259('0xf')][_0x9259('0x30')](_0x16645c);};module[_0x9259('0x32')]=EmailChannel; \ No newline at end of file +var _0xaf5a=['handleImapBox','bind','handleImapEmail','end','handleImapEnd','error','handleImapError','disabled','connected','messages','total','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','lastName','from','notify','then','Mail\x20accepted\x20from\x20routing','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','lastSync','send','verifySmtp','Smtp','verify','verified','lodash','moment','../../../config/logger','email','defaults','redis','localhost','socket.io-emitter','./smtp','info','start\x20email\x20channel','mailAccounts','imapAccounts','smtp','prototype','emit','name','active','Imap','status','messageStatus','isNil','stringify','md5','mailAccount:update','refresh','box'];(function(_0x5d6280,_0x3f72ab){var _0x77b738=function(_0x1b8208){while(--_0x1b8208){_0x5d6280['push'](_0x5d6280['shift']());}};_0x77b738(++_0x3f72ab);}(_0xaf5a,0x84));var _0xaaf5=function(_0x227b64,_0x1c6f72){_0x227b64=_0x227b64-0x0;var _0xc84cb5=_0xaf5a[_0x227b64];return _0xc84cb5;};'use strict';var _=require(_0xaaf5('0x0'));var moment=require(_0xaaf5('0x1'));var BPromise=require('bluebird');var md5=require('md5');var Redis=require('ioredis');var config=require('../../../config/environment');var logger=require(_0xaaf5('0x2'))(_0xaaf5('0x3'));config['redis']=_[_0xaaf5('0x4')](config[_0xaaf5('0x5')],{'host':_0xaaf5('0x6'),'port':0x18eb});var io=require(_0xaaf5('0x7'))(new Redis(config['redis']));var EmailImap=require('./imap');var EmailSmtp=require(_0xaaf5('0x8'));var mailAccount=require('../rpc/mailAccount');var md5Accounts={};function EmailChannel(_0x3d4738){logger[_0xaaf5('0x9')](_0xaaf5('0xa'));this[_0xaaf5('0xb')]=_0x3d4738[_0xaaf5('0xb')];this[_0xaaf5('0xc')]={};this[_0xaaf5('0xd')]=new EmailSmtp();}EmailChannel[_0xaaf5('0xe')][_0xaaf5('0xf')]=function(_0x162d85){var _0xbaf24b=this['mailAccounts'][_0x162d85];var _0x124374={'id':_0xbaf24b['id'],'name':_0xbaf24b[_0xaaf5('0x10')],'key':_0xbaf24b['key'],'active':_0xbaf24b[_0xaaf5('0x11')],'Imap':{'status':_0xbaf24b[_0xaaf5('0x12')][_0xaaf5('0x13')],'messageStatus':_0xbaf24b['Imap'][_0xaaf5('0x14')],'total':_0xbaf24b['Imap']['total']}};if(_[_0xaaf5('0x15')](md5Accounts[_0x162d85])){md5Accounts[_0x162d85]={};}var _0xa07459=md5(JSON[_0xaaf5('0x16')](_0x124374));if(md5Accounts[_0x162d85][_0xaaf5('0x17')]!==_0xa07459){md5Accounts[_0x162d85]['md5']=_0xa07459;io[_0xaaf5('0xf')](_0xaaf5('0x18'),_0x124374);}};EmailChannel[_0xaaf5('0xe')][_0xaaf5('0x19')]=function(_0x71acc9){for(var _0x368b98 in _0x71acc9){if(_0x71acc9['hasOwnProperty'](_0x368b98)){if(_0x71acc9[_0x368b98][_0xaaf5('0x12')]&&_0x71acc9[_0x368b98][_0xaaf5('0x11')]){var _0x16471e=_0x71acc9[_0x368b98][_0xaaf5('0x12')];if(!this['imapAccounts']['hasOwnProperty'](_0x16471e['id'])){this['imapAccounts'][_0x16471e['id']]=new EmailImap(_0x16471e,_0x71acc9[_0x368b98]['email']);this[_0xaaf5('0xc')][_0x16471e['id']]['on'](_0xaaf5('0x1a'),this[_0xaaf5('0x1b')][_0xaaf5('0x1c')](this,_0x368b98));this[_0xaaf5('0xc')][_0x16471e['id']]['on'](_0xaaf5('0x3'),this[_0xaaf5('0x1d')][_0xaaf5('0x1c')](this,_0x368b98));this[_0xaaf5('0xc')][_0x16471e['id']]['on'](_0xaaf5('0x1e'),this[_0xaaf5('0x1f')][_0xaaf5('0x1c')](this,_0x368b98));this[_0xaaf5('0xc')][_0x16471e['id']]['on'](_0xaaf5('0x20'),this[_0xaaf5('0x21')][_0xaaf5('0x1c')](this,_0x368b98));}}else{if(_[_0xaaf5('0x15')](this[_0xaaf5('0xb')][_0x368b98][_0xaaf5('0x12')])){this[_0xaaf5('0xb')][_0x368b98]['Imap']={};}this[_0xaaf5('0xb')][_0x368b98][_0xaaf5('0x12')][_0xaaf5('0x13')]=_0xaaf5('0x22');this[_0xaaf5('0xb')][_0x368b98][_0xaaf5('0x12')][_0xaaf5('0x14')]='';this[_0xaaf5('0xf')](_0x368b98);}}}};EmailChannel[_0xaaf5('0xe')]['handleImapBox']=function(_0x245485,_0x50beb5){if(this['mailAccounts'][_0x245485]){this[_0xaaf5('0xb')][_0x245485][_0xaaf5('0x12')][_0xaaf5('0x13')]=_0xaaf5('0x23');this[_0xaaf5('0xb')][_0x245485][_0xaaf5('0x12')][_0xaaf5('0x14')]=_0x50beb5[_0xaaf5('0x10')];if(_0x50beb5[_0xaaf5('0x24')]){this[_0xaaf5('0xb')][_0x245485]['Imap'][_0xaaf5('0x25')]=_0x50beb5[_0xaaf5('0x24')][_0xaaf5('0x25')];}return this[_0xaaf5('0xf')](_0x245485);}};EmailChannel['prototype'][_0xaaf5('0x1d')]=function(_0x288722,_0xc5a2be){logger['info'](_0xaaf5('0x26'),_0xc5a2be[_0xaaf5('0x27')],_0xc5a2be[_0xaaf5('0x28')],_0xc5a2be[_0xaaf5('0x29')],_0x288722);if(this[_0xaaf5('0xb')][_0x288722]){return mailAccount[_0xaaf5('0x2a')](_0x288722,_0xc5a2be)[_0xaaf5('0x2b')](function(_0x2b8b63){if(_0x2b8b63){logger[_0xaaf5('0x9')](_0xaaf5('0x2c'));}})[_0xaaf5('0x2d')](function(_0x26dc30){logger[_0xaaf5('0x20')](_0xaaf5('0x2e'),JSON['stringify'](_0x26dc30));});}};EmailChannel[_0xaaf5('0xe')][_0xaaf5('0x1f')]=function(_0x479e95){if(this['mailAccounts'][_0x479e95]&&this['mailAccounts'][_0x479e95]['Imap']){if(this[_0xaaf5('0xc')][this[_0xaaf5('0xb')][_0x479e95][_0xaaf5('0x12')]['id']]){delete this[_0xaaf5('0xc')][this[_0xaaf5('0xb')][_0x479e95][_0xaaf5('0x12')]['id']];}this[_0xaaf5('0xb')][_0x479e95][_0xaaf5('0x12')][_0xaaf5('0x2f')]=moment();this['emit'](_0x479e95);}};EmailChannel[_0xaaf5('0xe')][_0xaaf5('0x21')]=function(_0x101b22,_0x388061){if(this[_0xaaf5('0xb')][_0x101b22]){this[_0xaaf5('0xb')][_0x101b22][_0xaaf5('0x12')][_0xaaf5('0x13')]=_0xaaf5('0x20');this[_0xaaf5('0xb')][_0x101b22][_0xaaf5('0x12')][_0xaaf5('0x14')]=_0x388061;return this['emit'](_0x101b22);}};EmailChannel[_0xaaf5('0xe')]['sendMail']=function(_0x286b48,_0x1c2fb0){return this[_0xaaf5('0xd')][_0xaaf5('0x30')](_0x286b48,_0x1c2fb0);};EmailChannel[_0xaaf5('0xe')][_0xaaf5('0x31')]=function(_0x198f49){var _0x26d4d9=this;if(this['mailAccounts'][_0x198f49['id']]){if(_[_0xaaf5('0x15')](this[_0xaaf5('0xb')][_0x198f49['id']][_0xaaf5('0x32')])){this[_0xaaf5('0xb')][_0x198f49['id']][_0xaaf5('0x32')]={};}this[_0xaaf5('0xb')][_0x198f49['id']][_0xaaf5('0x32')][_0xaaf5('0x2f')]=moment();return new BPromise(function(_0x32d774,_0x4e977e){return _0x26d4d9[_0xaaf5('0xd')][_0xaaf5('0x33')](_0x198f49)['then'](function(_0x4d83ed){_0x26d4d9[_0xaaf5('0xb')][_0x198f49['id']][_0xaaf5('0x32')][_0xaaf5('0x13')]=_0xaaf5('0x34');_0x26d4d9['mailAccounts'][_0x198f49['id']][_0xaaf5('0x32')][_0xaaf5('0x14')]='';_0x26d4d9[_0xaaf5('0xf')](_0x198f49['id']);_0x32d774(_0x4d83ed);})['catch'](function(_0x5024be){_0x26d4d9[_0xaaf5('0xb')][_0x198f49['id']][_0xaaf5('0x32')][_0xaaf5('0x13')]='error';_0x26d4d9[_0xaaf5('0xb')][_0x198f49['id']][_0xaaf5('0x32')][_0xaaf5('0x14')]=_0x5024be;_0x26d4d9[_0xaaf5('0xf')](_0x198f49['id']);_0x4e977e(_0x5024be);});});}return this['smtp'][_0xaaf5('0x33')](_0x198f49);};module['exports']=EmailChannel; \ No newline at end of file diff --git a/server/services/email/lib/imap.js b/server/services/email/lib/imap.js index 9ed2978..3ac6685 100644 --- a/server/services/email/lib/imap.js +++ b/server/services/email/lib/imap.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5969=['account','once','ready','handleReady','bind','end','handleEnd','error','handleError','inherits','prototype','authTimeout','isNil','service','authentication','user','password','host','port','tls','autotls','getHost','anonymous@xcally.com','openBox','handleOpenBox','emit','box','readUnseen','search','UNSEEN','handleReadUnseen','length','fetch','message','handleFetchMessage','handleFetchEnd','closeBox','handleCloseBox','body','handleMessageBody','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','handleFetchError','textCode','hasOwnProperty','upperFirst','imap','randomstring','simpleParser','iconv','Iconv','EventEmitter','./utils','../../../config/logger','email','mailbox'];(function(_0x4c8890,_0x34c779){var _0x2e7ed5=function(_0x6ba2c6){while(--_0x6ba2c6){_0x4c8890['push'](_0x4c8890['shift']());}};_0x2e7ed5(++_0x34c779);}(_0x5969,0x18c));var _0x9596=function(_0x3263fc,_0x5a0477){_0x3263fc=_0x3263fc-0x0;var _0x14433f=_0x5969[_0x3263fc];return _0x14433f;};'use strict';var fs=require('fs');var path=require('path');var util=require('util');var Imap=require(_0x9596('0x0'));var _=require('lodash');var rs=require(_0x9596('0x1'));var simpleParser=require('mailparser')[_0x9596('0x2')];var Iconv=require(_0x9596('0x3'))[_0x9596('0x4')];var EventEmitter=require('events')[_0x9596('0x5')];var utils=require(_0x9596('0x6'));var logger=require(_0x9596('0x7'))(_0x9596('0x8'));function EmailImap(_0xb27c3f,_0x4a26b7){this[_0x9596('0x9')]='INBOX';this[_0x9596('0xa')]=this['getAccount'](_0xb27c3f,_0x4a26b7);this[_0x9596('0x0')]=new Imap(this['account']);this[_0x9596('0x0')][_0x9596('0xb')](_0x9596('0xc'),this[_0x9596('0xd')][_0x9596('0xe')](this));this[_0x9596('0x0')][_0x9596('0xb')](_0x9596('0xf'),this[_0x9596('0x10')][_0x9596('0xe')](this));this['imap']['on'](_0x9596('0x11'),this[_0x9596('0x12')]['bind'](this));this['imap']['connect']();}util[_0x9596('0x13')](EmailImap,EventEmitter);EmailImap[_0x9596('0x14')]['getAccount']=function(_0x5949e2,_0x348b42){var _0x5c3ada={'connTimeout':_0x5949e2['connTimeout']?_0x5949e2['connTimeout']*0x3e8:0x2710,'authTimeout':_0x5949e2[_0x9596('0x15')]?_0x5949e2[_0x9596('0x15')]*0x3e8:0x1388};if(_[_0x9596('0x16')](_0x5949e2[_0x9596('0x17')])){if(_0x5949e2[_0x9596('0x18')]){_0x5c3ada[_0x9596('0x19')]=_0x5949e2['user'];_0x5c3ada['password']=_0x5949e2[_0x9596('0x1a')];}_0x5c3ada['host']=_0x5949e2[_0x9596('0x1b')];_0x5c3ada[_0x9596('0x1c')]=_0x5949e2[_0x9596('0x1c')]||0x3e1;if(_0x5949e2['tls']){_0x5c3ada[_0x9596('0x1d')]=!![];}else{_0x5c3ada[_0x9596('0x1d')]=![];_0x5c3ada[_0x9596('0x1e')]='required';}}else{_0x5c3ada[_0x9596('0x19')]=_0x5949e2[_0x9596('0x19')];_0x5c3ada[_0x9596('0x1a')]=_0x5949e2[_0x9596('0x1a')];_0x5c3ada['host']=utils[_0x9596('0x1f')](_0x5949e2[_0x9596('0x17')]);_0x5c3ada[_0x9596('0x1c')]=0x3e1;_0x5c3ada[_0x9596('0x1d')]=!![];}_0x5c3ada[_0x9596('0x8')]=_0x348b42||_0x5949e2[_0x9596('0x19')]||_0x9596('0x20');return _0x5c3ada;};EmailImap[_0x9596('0x14')]['handleReady']=function(){this[_0x9596('0x0')][_0x9596('0x21')](this[_0x9596('0x9')],![],this[_0x9596('0x22')]['bind'](this));};EmailImap['prototype']['handleOpenBox']=function(_0x338bde,_0x24ec0e){if(_0x338bde){this[_0x9596('0x12')](_0x338bde,!![]);}else{this[_0x9596('0x23')](_0x9596('0x24'),_0x24ec0e);this['readUnseen']();}};EmailImap[_0x9596('0x14')]['handleCloseBox']=function(_0x50043c){if(_0x50043c){this[_0x9596('0x12')](_0x50043c,!![]);}else{this[_0x9596('0x0')][_0x9596('0xf')]();}};EmailImap[_0x9596('0x14')][_0x9596('0x25')]=function(){this[_0x9596('0x0')][_0x9596('0x26')]([_0x9596('0x27')],this[_0x9596('0x28')][_0x9596('0xe')](this));};EmailImap[_0x9596('0x14')][_0x9596('0x28')]=function(_0x1c8dbf,_0x1e0667){if(_0x1c8dbf){this[_0x9596('0x12')](_0x1c8dbf,!![]);}else{if(_0x1e0667[_0x9596('0x29')]){try{var _0x1e2c9f=this[_0x9596('0x0')][_0x9596('0x2a')](_0x1e0667,{'bodies':'','markSeen':!![]});_0x1e2c9f['on'](_0x9596('0x2b'),this[_0x9596('0x2c')][_0x9596('0xe')](this));_0x1e2c9f[_0x9596('0xb')]('error',this['handleFetchError'][_0x9596('0xe')](this));_0x1e2c9f[_0x9596('0xb')](_0x9596('0xf'),this[_0x9596('0x2d')][_0x9596('0xe')](this));}catch(_0x2da952){logger['error'](_0x2da952);}}else{this['imap'][_0x9596('0x2e')](!![],this[_0x9596('0x2f')]['bind'](this));}}};EmailImap[_0x9596('0x14')][_0x9596('0x2c')]=function(_0xbdbeaf,_0x67a25f){_0xbdbeaf['on'](_0x9596('0x30'),this[_0x9596('0x31')][_0x9596('0xe')](this));_0xbdbeaf[_0x9596('0xb')](_0x9596('0x32'),this[_0x9596('0x33')][_0x9596('0xe')](this));_0xbdbeaf[_0x9596('0xb')](_0x9596('0xf'),this[_0x9596('0x34')][_0x9596('0xe')](this));};EmailImap[_0x9596('0x14')][_0x9596('0x31')]=function(_0x44eab7,_0x5818be){simpleParser(_0x44eab7,{'Iconv':Iconv},this[_0x9596('0x35')][_0x9596('0xe')](this));};EmailImap[_0x9596('0x14')][_0x9596('0x33')]=function(_0x31cc60){};EmailImap[_0x9596('0x14')]['handleMessageEnd']=function(){};EmailImap[_0x9596('0x14')]['handleSimpleParser']=function(_0x3c7464,_0x3efef6){if(_0x3c7464){logger[_0x9596('0x11')](_0x3c7464);}else{var _0x2067aa=this;utils['parser'](this[_0x9596('0xa')],_0x3efef6,function(_0x9c0e75){_0x2067aa[_0x9596('0x23')](_0x9596('0x8'),_0x9c0e75);});}};EmailImap[_0x9596('0x14')]['handleFetchEnd']=function(){this['imap'][_0x9596('0x2e')](!![],this[_0x9596('0x2f')][_0x9596('0xe')](this));};EmailImap[_0x9596('0x14')][_0x9596('0x36')]=function(_0x29b68a){this['handleError'](_0x29b68a);this[_0x9596('0x0')][_0x9596('0x2e')](!![],this[_0x9596('0x2f')][_0x9596('0xe')](this));};EmailImap[_0x9596('0x14')][_0x9596('0x10')]=function(){this[_0x9596('0x23')](_0x9596('0xf'));};EmailImap[_0x9596('0x14')][_0x9596('0x12')]=function(_0x233b72,_0x358fb4){logger[_0x9596('0x11')](_0x9596('0x12'),this[_0x9596('0xa')][_0x9596('0x8')],JSON['stringify'](_0x233b72));var _0xb3c8ae='';if(_0x233b72){if(_0x233b72[_0x9596('0x37')]){_0xb3c8ae=_0x233b72[_0x9596('0x37')];}else{for(var _0x18daa7 in _0x233b72){if(_0x233b72[_0x9596('0x38')](_0x18daa7)){_0xb3c8ae+=_[_0x9596('0x39')](_0x18daa7)+':\x20'+_0x233b72[_0x18daa7]+'\x0a';}}}}if(_0x358fb4){this['imap'][_0x9596('0xf')]();}else{this[_0x9596('0x23')](_0x9596('0x11'),_0xb3c8ae);this[_0x9596('0x23')](_0x9596('0xf'));}};module['exports']=EmailImap; \ No newline at end of file +var _0xe010=['error','handleError','inherits','connTimeout','authTimeout','isNil','service','user','password','host','port','tls','autotls','required','getHost','anonymous@xcally.com','prototype','handleReady','openBox','handleOpenBox','box','readUnseen','handleCloseBox','end','handleReadUnseen','fetch','message','handleFetchError','handleFetchEnd','handleFetchMessage','body','handleMessageBody','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','emit','closeBox','stringify','textCode','path','lodash','randomstring','mailparser','simpleParser','Iconv','events','EventEmitter','./utils','email','mailbox','INBOX','account','getAccount','imap','ready','bind','once','handleEnd'];(function(_0x23075a,_0xa6e01d){var _0x1c4aee=function(_0x27c24b){while(--_0x27c24b){_0x23075a['push'](_0x23075a['shift']());}};_0x1c4aee(++_0xa6e01d);}(_0xe010,0x18a));var _0x0e01=function(_0x404db5,_0x3f723d){_0x404db5=_0x404db5-0x0;var _0x380a23=_0xe010[_0x404db5];return _0x380a23;};'use strict';var fs=require('fs');var path=require(_0x0e01('0x0'));var util=require('util');var Imap=require('imap');var _=require(_0x0e01('0x1'));var rs=require(_0x0e01('0x2'));var simpleParser=require(_0x0e01('0x3'))[_0x0e01('0x4')];var Iconv=require('iconv')[_0x0e01('0x5')];var EventEmitter=require(_0x0e01('0x6'))[_0x0e01('0x7')];var utils=require(_0x0e01('0x8'));var logger=require('../../../config/logger')(_0x0e01('0x9'));function EmailImap(_0x23ee3d,_0x2c7647){this[_0x0e01('0xa')]=_0x0e01('0xb');this[_0x0e01('0xc')]=this[_0x0e01('0xd')](_0x23ee3d,_0x2c7647);this['imap']=new Imap(this[_0x0e01('0xc')]);this[_0x0e01('0xe')]['once'](_0x0e01('0xf'),this['handleReady'][_0x0e01('0x10')](this));this['imap'][_0x0e01('0x11')]('end',this[_0x0e01('0x12')]['bind'](this));this[_0x0e01('0xe')]['on'](_0x0e01('0x13'),this[_0x0e01('0x14')]['bind'](this));this['imap']['connect']();}util[_0x0e01('0x15')](EmailImap,EventEmitter);EmailImap['prototype'][_0x0e01('0xd')]=function(_0x29c898,_0x4a39fd){var _0xa1b44a={'connTimeout':_0x29c898[_0x0e01('0x16')]?_0x29c898['connTimeout']*0x3e8:0x2710,'authTimeout':_0x29c898[_0x0e01('0x17')]?_0x29c898['authTimeout']*0x3e8:0x1388};if(_[_0x0e01('0x18')](_0x29c898[_0x0e01('0x19')])){if(_0x29c898['authentication']){_0xa1b44a['user']=_0x29c898[_0x0e01('0x1a')];_0xa1b44a[_0x0e01('0x1b')]=_0x29c898['password'];}_0xa1b44a[_0x0e01('0x1c')]=_0x29c898[_0x0e01('0x1c')];_0xa1b44a[_0x0e01('0x1d')]=_0x29c898[_0x0e01('0x1d')]||0x3e1;if(_0x29c898[_0x0e01('0x1e')]){_0xa1b44a[_0x0e01('0x1e')]=!![];}else{_0xa1b44a[_0x0e01('0x1e')]=![];_0xa1b44a[_0x0e01('0x1f')]=_0x0e01('0x20');}}else{_0xa1b44a[_0x0e01('0x1a')]=_0x29c898['user'];_0xa1b44a['password']=_0x29c898[_0x0e01('0x1b')];_0xa1b44a[_0x0e01('0x1c')]=utils[_0x0e01('0x21')](_0x29c898[_0x0e01('0x19')]);_0xa1b44a[_0x0e01('0x1d')]=0x3e1;_0xa1b44a[_0x0e01('0x1e')]=!![];}_0xa1b44a[_0x0e01('0x9')]=_0x4a39fd||_0x29c898[_0x0e01('0x1a')]||_0x0e01('0x22');return _0xa1b44a;};EmailImap[_0x0e01('0x23')][_0x0e01('0x24')]=function(){this[_0x0e01('0xe')][_0x0e01('0x25')](this[_0x0e01('0xa')],![],this['handleOpenBox'][_0x0e01('0x10')](this));};EmailImap[_0x0e01('0x23')][_0x0e01('0x26')]=function(_0x2ed6bc,_0x5b4ac6){if(_0x2ed6bc){this[_0x0e01('0x14')](_0x2ed6bc,!![]);}else{this['emit'](_0x0e01('0x27'),_0x5b4ac6);this[_0x0e01('0x28')]();}};EmailImap['prototype'][_0x0e01('0x29')]=function(_0x20447d){if(_0x20447d){this[_0x0e01('0x14')](_0x20447d,!![]);}else{this[_0x0e01('0xe')][_0x0e01('0x2a')]();}};EmailImap['prototype'][_0x0e01('0x28')]=function(){this[_0x0e01('0xe')]['search'](['UNSEEN'],this[_0x0e01('0x2b')]['bind'](this));};EmailImap[_0x0e01('0x23')]['handleReadUnseen']=function(_0x445ff5,_0x36363d){if(_0x445ff5){this[_0x0e01('0x14')](_0x445ff5,!![]);}else{if(_0x36363d['length']){try{var _0x2c7dd=this[_0x0e01('0xe')][_0x0e01('0x2c')](_0x36363d,{'bodies':'','markSeen':!![]});_0x2c7dd['on'](_0x0e01('0x2d'),this['handleFetchMessage'][_0x0e01('0x10')](this));_0x2c7dd[_0x0e01('0x11')](_0x0e01('0x13'),this[_0x0e01('0x2e')][_0x0e01('0x10')](this));_0x2c7dd[_0x0e01('0x11')](_0x0e01('0x2a'),this[_0x0e01('0x2f')][_0x0e01('0x10')](this));}catch(_0x24309b){logger[_0x0e01('0x13')](_0x24309b);}}else{this[_0x0e01('0xe')]['closeBox'](!![],this['handleCloseBox'][_0x0e01('0x10')](this));}}};EmailImap[_0x0e01('0x23')][_0x0e01('0x30')]=function(_0x3afbcf,_0x40fd16){_0x3afbcf['on'](_0x0e01('0x31'),this[_0x0e01('0x32')]['bind'](this));_0x3afbcf[_0x0e01('0x11')](_0x0e01('0x33'),this[_0x0e01('0x34')][_0x0e01('0x10')](this));_0x3afbcf[_0x0e01('0x11')]('end',this[_0x0e01('0x35')][_0x0e01('0x10')](this));};EmailImap[_0x0e01('0x23')][_0x0e01('0x32')]=function(_0x1427f3,_0x2252f4){simpleParser(_0x1427f3,{'Iconv':Iconv},this[_0x0e01('0x36')][_0x0e01('0x10')](this));};EmailImap['prototype'][_0x0e01('0x34')]=function(_0x703d4b){};EmailImap[_0x0e01('0x23')]['handleMessageEnd']=function(){};EmailImap[_0x0e01('0x23')]['handleSimpleParser']=function(_0x1d27c3,_0x1b1bef){if(_0x1d27c3){logger['error'](_0x1d27c3);}else{var _0x5126cd=this;utils['parser'](this['account'],_0x1b1bef,function(_0x187489){_0x5126cd[_0x0e01('0x37')](_0x0e01('0x9'),_0x187489);});}};EmailImap[_0x0e01('0x23')][_0x0e01('0x2f')]=function(){this['imap'][_0x0e01('0x38')](!![],this[_0x0e01('0x29')][_0x0e01('0x10')](this));};EmailImap[_0x0e01('0x23')][_0x0e01('0x2e')]=function(_0x5c2cc7){this[_0x0e01('0x14')](_0x5c2cc7);this['imap']['closeBox'](!![],this[_0x0e01('0x29')][_0x0e01('0x10')](this));};EmailImap[_0x0e01('0x23')][_0x0e01('0x12')]=function(){this[_0x0e01('0x37')](_0x0e01('0x2a'));};EmailImap[_0x0e01('0x23')][_0x0e01('0x14')]=function(_0xd7cc3a,_0x47836b){logger['error'](_0x0e01('0x14'),this['account'][_0x0e01('0x9')],JSON[_0x0e01('0x39')](_0xd7cc3a));var _0x338c04='';if(_0xd7cc3a){if(_0xd7cc3a[_0x0e01('0x3a')]){_0x338c04=_0xd7cc3a['textCode'];}else{for(var _0x294992 in _0xd7cc3a){if(_0xd7cc3a['hasOwnProperty'](_0x294992)){_0x338c04+=_['upperFirst'](_0x294992)+':\x20'+_0xd7cc3a[_0x294992]+'\x0a';}}}}if(_0x47836b){this[_0x0e01('0xe')][_0x0e01('0x2a')]();}else{this[_0x0e01('0x37')](_0x0e01('0x13'),_0x338c04);this[_0x0e01('0x37')]('end');}};module['exports']=EmailImap; \ No newline at end of file diff --git a/server/services/email/lib/smtp.js b/server/services/email/lib/smtp.js index a67cb18..d0ae3d1 100644 --- a/server/services/email/lib/smtp.js +++ b/server/services/email/lib/smtp.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7409=['createTransport','compile','sendMail','prototype','verify','toString','Not\x20verifired','nodemailer','bluebird','nodemailer-plugin-inline-base64','send'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7409,0xee));var _0x9740=function(_0x5a09f3,_0x9ce907){_0x5a09f3=_0x5a09f3-0x0;var _0x3665c2=_0x7409[_0x5a09f3];return _0x3665c2;};'use strict';var nodemailer=require(_0x9740('0x0'));var BPromise=require(_0x9740('0x1'));var inlineBase64=require(_0x9740('0x2'));function EmailSmtp(){}EmailSmtp['prototype'][_0x9740('0x3')]=function(_0x2ac826,_0x7c0223){return new BPromise(function(_0x70b603,_0x1c9a4e){var _0x317a91=nodemailer[_0x9740('0x4')](_0x2ac826);_0x317a91['use'](_0x9740('0x5'),inlineBase64());_0x317a91[_0x9740('0x6')](_0x7c0223,function(_0x19836a,_0x376992){if(_0x19836a){_0x1c9a4e(_0x19836a['toString']());}else{_0x70b603(_0x376992);}});});};EmailSmtp[_0x9740('0x7')][_0x9740('0x8')]=function(_0x37ab93){return new BPromise(function(_0x42b80e,_0x5cb6b5){var _0x3f4e1d=nodemailer['createTransport'](_0x37ab93);_0x3f4e1d[_0x9740('0x8')](function(_0x4f301e,_0x123bb7){if(_0x4f301e){_0x5cb6b5(_0x4f301e[_0x9740('0x9')]());}else{if(_0x123bb7){_0x42b80e(_0x123bb7);}else{_0x5cb6b5(_0x9740('0xa'));}}});});};module['exports']=EmailSmtp; \ No newline at end of file +var _0x2aea=['use','compile','verify','toString','Not\x20verifired','exports','bluebird','prototype','send','createTransport'];(function(_0xfe1d02,_0x542261){var _0x44a3f1=function(_0x15866e){while(--_0x15866e){_0xfe1d02['push'](_0xfe1d02['shift']());}};_0x44a3f1(++_0x542261);}(_0x2aea,0x1dc));var _0xa2ae=function(_0x1f7413,_0x3388c3){_0x1f7413=_0x1f7413-0x0;var _0x2d2775=_0x2aea[_0x1f7413];return _0x2d2775;};'use strict';var nodemailer=require('nodemailer');var BPromise=require(_0xa2ae('0x0'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0xa2ae('0x1')][_0xa2ae('0x2')]=function(_0x1ee3eb,_0x5b8691){return new BPromise(function(_0x5cfeeb,_0x36f7cc){var _0xbb4add=nodemailer[_0xa2ae('0x3')](_0x1ee3eb);_0xbb4add[_0xa2ae('0x4')](_0xa2ae('0x5'),inlineBase64());_0xbb4add['sendMail'](_0x5b8691,function(_0x53f695,_0x4d41a1){if(_0x53f695){_0x36f7cc(_0x53f695['toString']());}else{_0x5cfeeb(_0x4d41a1);}});});};EmailSmtp[_0xa2ae('0x1')][_0xa2ae('0x6')]=function(_0x2f7f9e){return new BPromise(function(_0x3f97c7,_0x5c4b5c){var _0x29be4c=nodemailer[_0xa2ae('0x3')](_0x2f7f9e);_0x29be4c[_0xa2ae('0x6')](function(_0x431fb0,_0x53cbf4){if(_0x431fb0){_0x5c4b5c(_0x431fb0[_0xa2ae('0x7')]());}else{if(_0x53cbf4){_0x3f97c7(_0x53cbf4);}else{_0x5c4b5c(_0xa2ae('0x8'));}}});});};module[_0xa2ae('0x9')]=EmailSmtp; \ No newline at end of file diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index 89baf42..6f58b94 100644 --- a/server/services/email/lib/utils.js +++ b/server/services/email/lib/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x020f=['email','includes','originTo','originCc','bcc','attachments','attach','type','filename','attachment-','format','%s-%s','root','server/files/attachments/','writeFileSync','push','contentType','parser','from','subject','messageId','inReplyTo','YYYY-MM-DD\x20HH:mm:ss','filter','application/ms-tnef','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','first','content','BodyHTML','

Empty\x20message

','Attachments','Title','Data','gmail','yahoo','imap.mail.yahoo.com','hotmail','outlook365','outlook.office365.com','127.0.0.1','randomstring','path','util','../../../config/logger','../../../config/environment','head','value','address','generate','@xcally.com','name','split','slice','join','Anonymous','length','pop','isEmpty','anonymous','html','replace','body','textAsHtml','0x1?_0x3268c6[_0xf020('0x10')]():'';}return'';}function getMails(_0x159cb9,_0x38dd81){var _0x558b50='';for(var _0x56685a=0x0;_0x56685a<_0x38dd81['value'][_0xf020('0xf')];_0x56685a+=0x1){if(_0x38dd81[_0xf020('0x6')][_0x56685a][_0xf020('0x7')]!==_0x159cb9){if(!_[_0xf020('0x11')](_0x558b50)){_0x558b50+=',';}_0x558b50+=_0x38dd81[_0xf020('0x6')][_0x56685a][_0xf020('0xa')]||_0x38dd81[_0xf020('0x6')][_0x56685a][_0xf020('0x7')]||'';_0x558b50+='\x20<';_0x558b50+=_0x38dd81[_0xf020('0x6')][_0x56685a][_0xf020('0x7')]?_0x38dd81[_0xf020('0x6')][_0x56685a][_0xf020('0x7')]:_0xf020('0x12')+random[_0xf020('0x8')](0x6)+_0xf020('0x9');_0x558b50+='>';}}return _0x558b50;}function parseEmail(_0x233410,_0x40dcc1,_0xb4c9b8){if(_0x40dcc1['html']){var _0x2406c7=/)<[^<]*)*<\/script>/gi;while(_0x2406c7['test'](_0x40dcc1[_0xf020('0x13')])){_0x40dcc1['html']=_0x40dcc1[_0xf020('0x13')][_0xf020('0x14')](_0x2406c7,'');}_0xb4c9b8[_0xf020('0x15')]=_0x40dcc1[_0xf020('0x13')];}else{_0xb4c9b8[_0xf020('0x15')]=_0x40dcc1[_0xf020('0x16')];}if(_0xb4c9b8['body']){_0xb4c9b8[_0xf020('0x15')]=_0xb4c9b8[_0xf020('0x15')][_0xf020('0x14')](/\x20[Attachment:\x20','\x20]','body','Empty\x20message

','Attachments'];(function(_0xb08260,_0x442585){var _0x18ac94=function(_0x1d5630){while(--_0x1d5630){_0xb08260['push'](_0xb08260['shift']());}};_0x18ac94(++_0x442585);}(_0x730b,0x91));var _0xb730=function(_0x419f71,_0xaefd05){_0x419f71=_0x419f71-0x0;var _0x4b182a=_0x730b[_0x419f71];return _0x4b182a;};'use strict';var _=require(_0xb730('0x0'));var moment=require('moment');var random=require(_0xb730('0x1'));var fs=require('fs');var path=require(_0xb730('0x2'));var util=require('util');var tnef=require(_0xb730('0x3'));var logger=require(_0xb730('0x4'))(_0xb730('0x5'));var config=require(_0xb730('0x6'));function getAddress(_0xc39513){var _0x3ebef4=_[_0xb730('0x7')](_0xc39513[_0xb730('0x8')]);return _0x3ebef4&&_0x3ebef4[_0xb730('0x9')]?_0x3ebef4[_0xb730('0x9')]:_0xb730('0xa')+random[_0xb730('0xb')](0x6)+'@xcally.com';}function getFirstName(_0x154b65){var _0x222df7=_[_0xb730('0x7')](_0x154b65[_0xb730('0x8')]);if(_0x222df7&&_0x222df7[_0xb730('0xc')]){var _0x24261d=_0x222df7[_0xb730('0xc')][_0xb730('0xd')](/\s+/);return _0x24261d[_0xb730('0xe')]?_0x24261d[_0xb730('0xf')](0x0,-0x1)[_0xb730('0x10')]('\x20'):_0x222df7['name'];}return'Anonymous';}function getLastName(_0x536e41){var _0x1586d1=_['head'](_0x536e41['value']);if(_0x1586d1&&_0x1586d1[_0xb730('0xc')]){var _0x55e864=_0x1586d1[_0xb730('0xc')][_0xb730('0xd')](/\s+/);return _0x55e864[_0xb730('0xe')]>0x1?_0x55e864[_0xb730('0x11')]():'';}return'';}function getMails(_0x197a03,_0x51086f){var _0x3f43b8='';for(var _0xd352fc=0x0;_0xd352fc<_0x51086f[_0xb730('0x8')][_0xb730('0xe')];_0xd352fc+=0x1){if(_0x51086f['value'][_0xd352fc][_0xb730('0x9')]!==_0x197a03){if(!_['isEmpty'](_0x3f43b8)){_0x3f43b8+=',';}_0x3f43b8+=_0x51086f[_0xb730('0x8')][_0xd352fc][_0xb730('0xc')]||_0x51086f['value'][_0xd352fc][_0xb730('0x9')]||'';_0x3f43b8+='\x20<';_0x3f43b8+=_0x51086f[_0xb730('0x8')][_0xd352fc][_0xb730('0x9')]?_0x51086f[_0xb730('0x8')][_0xd352fc][_0xb730('0x9')]:_0xb730('0xa')+random[_0xb730('0xb')](0x6)+'@xcally.com';_0x3f43b8+='>';}}return _0x3f43b8;}function parseEmail(_0x2723b9,_0x580cbc,_0x313bda){if(_0x580cbc['html']){var _0x4809ac=/)<[^<]*)*<\/script>/gi;while(_0x4809ac[_0xb730('0x12')](_0x580cbc['html'])){_0x580cbc['html']=_0x580cbc['html'][_0xb730('0x13')](_0x4809ac,'');}if(_0x580cbc['html'][_0xb730('0x14')](_0xb730('0x15'))){var _0x3f6897=[];_0x580cbc[_0xb730('0x16')]['forEach'](_0x3cea08=>{_0x3f6897[_0xb730('0x17')](_0x3cea08[_0xb730('0x18')]);});var _0x32463d=/]+>/g;var _0x40a401=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x78ef7c=_0x580cbc[_0xb730('0x19')][_0xb730('0x13')](_0x40a401,_0xb730('0x1a'));var _0x6ddde1=_0x78ef7c['replace'](_0x32463d,_0xb730('0x1b'));for(let _0x1b6fc9=0x0;_0x1b6fc9<_0x3f6897[_0xb730('0xe')];_0x1b6fc9++){var _0x67d893=_0x6ddde1['replace'](_0xb730('0x1b'),_0xb730('0x1c')+_0x3f6897[_0x1b6fc9]+_0xb730('0x1d'));_0x6ddde1=_0x67d893;}_0x580cbc[_0xb730('0x19')]=_0x6ddde1;}_0x313bda[_0xb730('0x1e')]=_0x580cbc[_0xb730('0x19')];}else{_0x313bda['body']=_0x580cbc['textAsHtml'];}if(_0x313bda[_0xb730('0x1e')]){_0x313bda['body']=_0x313bda['body'][_0xb730('0x13')](/0x0){if(this[_0x38e166+_0x6683('0x2c')]>0x0&&this[_0x38e166+_0x6683('0x2b')]>=this[_0x38e166+_0x6683('0x2c')]){return _0x6683('0x2d');}else{return'working';}}else{return _0x6683('0x2e');}};Agent[_0x6683('0x29')]['updateRealtime']=function(){var _0x3250e5=[_0x6683('0x2f'),_0x6683('0x30'),'openchannel',_0x6683('0x31'),_0x6683('0x32'),_0x6683('0x33')];for(var _0xd93a1=0x0;_0xd93a1<_0x3250e5['length'];_0xd93a1+=0x1){var _0x1e9c1e=this[_0x6683('0x2a')](_0x3250e5[_0xd93a1]);if(this[_0x3250e5[_0xd93a1]+_0x6683('0x34')]!==_0x1e9c1e){this[_0x3250e5[_0xd93a1]+_0x6683('0x35')]=_['toNumber'](moment()[_0x6683('0x36')]('x'));}this[_0x3250e5[_0xd93a1]+_0x6683('0x34')]=_0x1e9c1e;}var _0x2324ba={'id':this['id'],'name':this[_0x6683('0x7')],'online':this[_0x6683('0x8')],'voicePause':this[_0x6683('0x9')],'chatPause':this[_0x6683('0xa')],'mailPause':this[_0x6683('0xb')],'smsPause':this[_0x6683('0xd')],'faxPause':this['faxPause'],'openchannelPause':this[_0x6683('0xe')],'chatStatus':this[_0x6683('0x37')],'chatStatusTime':this['chatStatusTime'],'chatCapacity':this[_0x6683('0x11')],'chatCurrentCapacity':this[_0x6683('0x12')],'mailStatus':this['mailStatus'],'mailStatusTime':this[_0x6683('0x14')],'mailCapacity':this['mailCapacity'],'mailCurrentCapacity':this[_0x6683('0x16')],'faxStatus':this[_0x6683('0x17')],'faxStatusTime':this[_0x6683('0x18')],'faxCapacity':this[_0x6683('0x19')],'faxCurrentCapacity':this['faxCurrentCapacity'],'smsStatus':this[_0x6683('0x1b')],'smsStatusTime':this[_0x6683('0x1c')],'smsCapacity':this[_0x6683('0x1d')],'smsCurrentCapacity':this[_0x6683('0x1e')],'whatsappStatus':this[_0x6683('0x1f')],'whatsappStatusTime':this[_0x6683('0x38')],'whatsappCapacity':this[_0x6683('0x20')],'whatsappCurrentCapacity':this[_0x6683('0x21')],'openchannelStatus':this[_0x6683('0x22')],'openchannelStatusTime':this[_0x6683('0x23')],'openchannelCapacity':this[_0x6683('0x24')],'openchannelCurrentCapacity':this[_0x6683('0x25')],'busy':this[_0x6683('0x26')],'busyQueue':this[_0x6683('0x27')]};var _0x3f0c25=md5(JSON['stringify'](_0x2324ba));if(this[_0x6683('0x2')]!==_0x3f0c25){this['md5']=_0x3f0c25;io['emit'](_0x6683('0x39'),_0x2324ba);}};module[_0x6683('0x3a')]=Agent; \ No newline at end of file +var _0x2fe3=['busyQueue','md5','updateRealtime','CurrentCapacity','Capacity','maxcapacity','working','idle','mail','chat','fax','sms','whatsapp','getChannelStatus','toNumber','Status','chatCapacity','whatsappStatus','emit','user:save','exports','lodash','moment','../../../config/environment','defaults','socket.io-emitter','redis','name','online','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','chatStatusTime','chatCurrentCapacity','mailStatus','unknown','mailStatusTime','mailCapacity','mailCurrentCapacity','faxStatus','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsCapacity','smsCurrentCapacity','whatsappStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','busy'];(function(_0x8a1b6c,_0x3f10c4){var _0x1a8e81=function(_0x1cde0d){while(--_0x1cde0d){_0x8a1b6c['push'](_0x8a1b6c['shift']());}};_0x1a8e81(++_0x3f10c4);}(_0x2fe3,0x87));var _0x32fe=function(_0x3e47f8,_0x3eb8ff){_0x3e47f8=_0x3e47f8-0x0;var _0x149737=_0x2fe3[_0x3e47f8];return _0x149737;};'use strict';var _=require(_0x32fe('0x0'));var moment=require(_0x32fe('0x1'));var md5=require('md5');var Redis=require('ioredis');var config=require(_0x32fe('0x2'));config['redis']=_[_0x32fe('0x3')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x32fe('0x4'))(new Redis(config[_0x32fe('0x5')]));function Agent(_0x532c57){this['id']=_0x532c57['id']||0x0;this[_0x32fe('0x6')]=_0x532c57[_0x32fe('0x6')]||'';this[_0x32fe('0x7')]=_0x532c57[_0x32fe('0x7')]||!![];this[_0x32fe('0x8')]=_0x532c57[_0x32fe('0x8')]||![];this['chatPause']=_0x532c57[_0x32fe('0x9')]||![];this[_0x32fe('0xa')]=_0x532c57[_0x32fe('0xa')]||![];this[_0x32fe('0xb')]=_0x532c57['faxPause']||![];this['smsPause']=_0x532c57[_0x32fe('0xc')]||![];this[_0x32fe('0xd')]=_0x532c57[_0x32fe('0xd')]||![];this[_0x32fe('0xe')]='unknown';this[_0x32fe('0xf')]=0x0;this['chatCapacity']=_0x532c57['chatCapacity']||0x0;this[_0x32fe('0x10')]=0x0;this[_0x32fe('0x11')]=_0x32fe('0x12');this[_0x32fe('0x13')]=0x0;this[_0x32fe('0x14')]=_0x532c57[_0x32fe('0x14')]||0x0;this[_0x32fe('0x15')]=0x0;this[_0x32fe('0x16')]=_0x32fe('0x12');this[_0x32fe('0x17')]=0x0;this[_0x32fe('0x18')]=_0x532c57[_0x32fe('0x18')]||0x0;this[_0x32fe('0x19')]=0x0;this[_0x32fe('0x1a')]=_0x32fe('0x12');this['smsStatusTime']=0x0;this['smsCapacity']=_0x532c57[_0x32fe('0x1b')]||0x0;this[_0x32fe('0x1c')]=0x0;this['whatsappStatus']=_0x32fe('0x12');this[_0x32fe('0x1d')]=0x0;this[_0x32fe('0x1e')]=_0x532c57['whatsappCapacity']||0x0;this[_0x32fe('0x1f')]=0x0;this[_0x32fe('0x20')]=_0x32fe('0x12');this[_0x32fe('0x21')]=0x0;this['openchannelCapacity']=_0x532c57[_0x32fe('0x22')]||0x0;this['openchannelCurrentCapacity']=0x0;this[_0x32fe('0x23')]=![];this[_0x32fe('0x24')]=undefined;this[_0x32fe('0x25')]='';this[_0x32fe('0x26')]();}Agent['prototype']['getChannelStatus']=function(_0x30f3d1){if(this[_0x30f3d1+_0x32fe('0x27')]>0x0){if(this[_0x30f3d1+_0x32fe('0x28')]>0x0&&this[_0x30f3d1+_0x32fe('0x27')]>=this[_0x30f3d1+_0x32fe('0x28')]){return _0x32fe('0x29');}else{return _0x32fe('0x2a');}}else{return _0x32fe('0x2b');}};Agent['prototype'][_0x32fe('0x26')]=function(){var _0x5a8331=[_0x32fe('0x2c'),_0x32fe('0x2d'),'openchannel',_0x32fe('0x2e'),_0x32fe('0x2f'),_0x32fe('0x30')];for(var _0x435b43=0x0;_0x435b43<_0x5a8331['length'];_0x435b43+=0x1){var _0x50e340=this[_0x32fe('0x31')](_0x5a8331[_0x435b43]);if(this[_0x5a8331[_0x435b43]+'Status']!==_0x50e340){this[_0x5a8331[_0x435b43]+'StatusTime']=_[_0x32fe('0x32')](moment()['format']('x'));}this[_0x5a8331[_0x435b43]+_0x32fe('0x33')]=_0x50e340;}var _0x9c9933={'id':this['id'],'name':this[_0x32fe('0x6')],'online':this[_0x32fe('0x7')],'voicePause':this['voicePause'],'chatPause':this[_0x32fe('0x9')],'mailPause':this['mailPause'],'smsPause':this[_0x32fe('0xc')],'faxPause':this['faxPause'],'openchannelPause':this['openchannelPause'],'chatStatus':this[_0x32fe('0xe')],'chatStatusTime':this['chatStatusTime'],'chatCapacity':this[_0x32fe('0x34')],'chatCurrentCapacity':this['chatCurrentCapacity'],'mailStatus':this[_0x32fe('0x11')],'mailStatusTime':this[_0x32fe('0x13')],'mailCapacity':this[_0x32fe('0x14')],'mailCurrentCapacity':this[_0x32fe('0x15')],'faxStatus':this[_0x32fe('0x16')],'faxStatusTime':this[_0x32fe('0x17')],'faxCapacity':this[_0x32fe('0x18')],'faxCurrentCapacity':this[_0x32fe('0x19')],'smsStatus':this[_0x32fe('0x1a')],'smsStatusTime':this['smsStatusTime'],'smsCapacity':this[_0x32fe('0x1b')],'smsCurrentCapacity':this[_0x32fe('0x1c')],'whatsappStatus':this[_0x32fe('0x35')],'whatsappStatusTime':this['whatsappStatusTime'],'whatsappCapacity':this[_0x32fe('0x1e')],'whatsappCurrentCapacity':this[_0x32fe('0x1f')],'openchannelStatus':this[_0x32fe('0x20')],'openchannelStatusTime':this[_0x32fe('0x21')],'openchannelCapacity':this[_0x32fe('0x22')],'openchannelCurrentCapacity':this['openchannelCurrentCapacity'],'busy':this['busy'],'busyQueue':this[_0x32fe('0x24')]};var _0x239766=md5(JSON['stringify'](_0x9c9933));if(this[_0x32fe('0x25')]!==_0x239766){this[_0x32fe('0x25')]=_0x239766;io[_0x32fe('0x36')](_0x32fe('0x37'),_0x9c9933);}};module[_0x32fe('0x38')]=Agent; \ No newline at end of file diff --git a/server/services/routing/model/chatQueue.js b/server/services/routing/model/chatQueue.js index fc70d7d..c1b6da4 100644 --- a/server/services/routing/model/chatQueue.js +++ b/server/services/routing/model/chatQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadb9=['waiting','updateRouting','updateRealtime','prototype','_rr','loggedIn','paused','length','online','chatPause','available','stringify','format','chat:queue:%s','md5','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId'];(function(_0x6cf19c,_0x2f3f02){var _0xce14f3=function(_0x474587){while(--_0x474587){_0x6cf19c['push'](_0x6cf19c['shift']());}};_0xce14f3(++_0x2f3f02);}(_0xadb9,0x12c));var _0x9adb=function(_0x384412,_0x6ad830){_0x384412=_0x384412-0x0;var _0x4c3e4f=_0xadb9[_0x384412];return _0x4c3e4f;};'use strict';var _=require('lodash');var md5=require(_0x9adb('0x0'));var util=require('util');var Redis=require('ioredis');var config=require(_0x9adb('0x1'));config[_0x9adb('0x2')]=_[_0x9adb('0x3')](config[_0x9adb('0x2')],{'host':_0x9adb('0x4'),'port':0x18eb});var io=require(_0x9adb('0x5'))(new Redis(config[_0x9adb('0x2')]));function ChatQueue(_0x1d9f30){this['id']=_0x1d9f30['id']||0x0;this[_0x9adb('0x6')]=_0x1d9f30[_0x9adb('0x6')]||'';this[_0x9adb('0x7')]=_0x1d9f30['timeout']||0xa;this[_0x9adb('0x8')]=_0x1d9f30[_0x9adb('0x8')]||_0x9adb('0x9');this[_0x9adb('0xa')]=_0x1d9f30[_0x9adb('0xa')];this[_0x9adb('0xb')]={};this[_0x9adb('0xc')]=0x0;this[_0x9adb('0x0')]='';this[_0x9adb('0xd')]();this[_0x9adb('0xe')]();}ChatQueue[_0x9adb('0xf')][_0x9adb('0xd')]=function(){var _0x57243a=this[_0x9adb('0xb')][_0x9adb('0x10')];this[_0x9adb('0xb')]=_['map'](this[_0x9adb('0xa')],'id');this[_0x9adb('0xb')][_0x9adb('0x10')]=_0x57243a;};ChatQueue[_0x9adb('0xf')][_0x9adb('0xe')]=function(){this[_0x9adb('0x11')]=0x0;this[_0x9adb('0x12')]=0x0;for(var _0x2ad45c=0x0;_0x2ad45c=0x0?this[_0x9adb('0x16')]:0x0;var _0x3f3244={'id':this['id'],'available':this[_0x9adb('0x16')],'loggedIn':this[_0x9adb('0x11')],'name':this['name'],'paused':this[_0x9adb('0x12')],'waiting':this[_0x9adb('0xc')]};var _0x4b5b7f=md5(JSON[_0x9adb('0x17')](_0x3f3244));if(this[_0x9adb('0x0')]!==_0x4b5b7f){this['md5']=_0x4b5b7f;io['to'](util[_0x9adb('0x18')](_0x9adb('0x19'),_0x3f3244[_0x9adb('0x6')]))['emit']('chat_queue:save',_0x3f3244);}};module['exports']=ChatQueue; \ No newline at end of file +var _0x56f0=['socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRealtime','prototype','updateRouting','_rr','map','paused','length','loggedIn','chatPause','available','md5','format','chat:queue:%s','emit','chat_queue:save','lodash','util','ioredis','../../../config/environment','defaults','redis'];(function(_0x1c5742,_0x31c1a7){var _0x3fcf9f=function(_0x3e9939){while(--_0x3e9939){_0x1c5742['push'](_0x1c5742['shift']());}};_0x3fcf9f(++_0x31c1a7);}(_0x56f0,0x1ba));var _0x056f=function(_0x45c48f,_0x4aa891){_0x45c48f=_0x45c48f-0x0;var _0xaf5037=_0x56f0[_0x45c48f];return _0xaf5037;};'use strict';var _=require(_0x056f('0x0'));var md5=require('md5');var util=require(_0x056f('0x1'));var Redis=require(_0x056f('0x2'));var config=require(_0x056f('0x3'));config['redis']=_[_0x056f('0x4')](config[_0x056f('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x056f('0x6'))(new Redis(config['redis']));function ChatQueue(_0x21616e){this['id']=_0x21616e['id']||0x0;this[_0x056f('0x7')]=_0x21616e[_0x056f('0x7')]||'';this[_0x056f('0x8')]=_0x21616e[_0x056f('0x8')]||0xa;this[_0x056f('0x9')]=_0x21616e[_0x056f('0x9')]||'beepall';this[_0x056f('0xa')]=_0x21616e['Agents'];this[_0x056f('0xb')]={};this[_0x056f('0xc')]=0x0;this['md5']='';this['updateRouting']();this[_0x056f('0xd')]();}ChatQueue[_0x056f('0xe')][_0x056f('0xf')]=function(){var _0x5e5c59=this[_0x056f('0xb')][_0x056f('0x10')];this[_0x056f('0xb')]=_[_0x056f('0x11')](this[_0x056f('0xa')],'id');this[_0x056f('0xb')]['_rr']=_0x5e5c59;};ChatQueue['prototype'][_0x056f('0xd')]=function(){this['loggedIn']=0x0;this[_0x056f('0x12')]=0x0;for(var _0x3c20fd=0x0;_0x3c20fd=0x0?this[_0x056f('0x16')]:0x0;var _0x20c0d8={'id':this['id'],'available':this[_0x056f('0x16')],'loggedIn':this[_0x056f('0x14')],'name':this['name'],'paused':this[_0x056f('0x12')],'waiting':this[_0x056f('0xc')]};var _0x214eca=md5(JSON['stringify'](_0x20c0d8));if(this[_0x056f('0x17')]!==_0x214eca){this[_0x056f('0x17')]=_0x214eca;io['to'](util[_0x056f('0x18')](_0x056f('0x19'),_0x20c0d8['name']))[_0x056f('0x1a')](_0x056f('0x1b'),_0x20c0d8);}};module['exports']=ChatQueue; \ No newline at end of file diff --git a/server/services/routing/model/faxQueue.js b/server/services/routing/model/faxQueue.js index 0fcf17f..39cad07 100644 --- a/server/services/routing/model/faxQueue.js +++ b/server/services/routing/model/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['available','stringify','format','emit','exports','lodash','md5','util','redis','localhost','socket.io-emitter','name','timeout','beepall','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','map','Agents','_rr','loggedIn','paused','length','faxPause'];(function(_0x3f8667,_0x526ac1){var _0x413586=function(_0x5b4a70){while(--_0x5b4a70){_0x3f8667['push'](_0x3f8667['shift']());}};_0x413586(++_0x526ac1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xa9e0[_0x43d11d];return _0x38cd08;};'use strict';var _=require(_0x0a9e('0x0'));var md5=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var Redis=require('ioredis');var config=require('../../../config/environment');config[_0x0a9e('0x3')]=_['defaults'](config[_0x0a9e('0x3')],{'host':_0x0a9e('0x4'),'port':0x18eb});var io=require(_0x0a9e('0x5'))(new Redis(config[_0x0a9e('0x3')]));function FaxQueue(_0x981158){this['id']=_0x981158['id']||0x0;this['name']=_0x981158[_0x0a9e('0x6')]||'';this[_0x0a9e('0x7')]=_0x981158[_0x0a9e('0x7')]||0xa;this['strategy']=_0x981158['strategy']||_0x0a9e('0x8');this['Agents']=_0x981158['Agents'];this[_0x0a9e('0x9')]={};this[_0x0a9e('0xa')]=0x0;this[_0x0a9e('0x1')]='';this[_0x0a9e('0xb')]();this[_0x0a9e('0xc')]();}FaxQueue[_0x0a9e('0xd')]['updateRouting']=function(){var _0x50dfb2=this['mapAgentsId']['_rr'];this[_0x0a9e('0x9')]=_[_0x0a9e('0xe')](this[_0x0a9e('0xf')],'id');this[_0x0a9e('0x9')][_0x0a9e('0x10')]=_0x50dfb2;};FaxQueue[_0x0a9e('0xd')]['updateRealtime']=function(){this[_0x0a9e('0x11')]=0x0;this[_0x0a9e('0x12')]=0x0;for(var _0x2b4227=0x0;_0x2b4227=0x0?this[_0x0a9e('0x15')]:0x0;var _0x478723={'id':this['id'],'available':this[_0x0a9e('0x15')],'loggedIn':this[_0x0a9e('0x11')],'name':this[_0x0a9e('0x6')],'paused':this[_0x0a9e('0x12')],'waiting':this[_0x0a9e('0xa')]};var _0x20559e=md5(JSON[_0x0a9e('0x16')](_0x478723));if(this[_0x0a9e('0x1')]!==_0x20559e){this[_0x0a9e('0x1')]=_0x20559e;io['to'](util[_0x0a9e('0x17')]('fax:queue:%s',_0x478723[_0x0a9e('0x6')]))[_0x0a9e('0x18')]('fax_queue:save',_0x478723);}};module[_0x0a9e('0x19')]=FaxQueue; \ No newline at end of file +var _0xa9e0=['available','stringify','format','emit','exports','lodash','md5','util','redis','localhost','socket.io-emitter','name','timeout','beepall','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','map','Agents','_rr','loggedIn','paused','length','faxPause'];(function(_0x342c62,_0x158fda){var _0x5eb4a2=function(_0x1090ca){while(--_0x1090ca){_0x342c62['push'](_0x342c62['shift']());}};_0x5eb4a2(++_0x158fda);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1c546c,_0x5c57cb){_0x1c546c=_0x1c546c-0x0;var _0x2cc384=_0xa9e0[_0x1c546c];return _0x2cc384;};'use strict';var _=require(_0x0a9e('0x0'));var md5=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var Redis=require('ioredis');var config=require('../../../config/environment');config[_0x0a9e('0x3')]=_['defaults'](config[_0x0a9e('0x3')],{'host':_0x0a9e('0x4'),'port':0x18eb});var io=require(_0x0a9e('0x5'))(new Redis(config[_0x0a9e('0x3')]));function FaxQueue(_0x981158){this['id']=_0x981158['id']||0x0;this['name']=_0x981158[_0x0a9e('0x6')]||'';this[_0x0a9e('0x7')]=_0x981158[_0x0a9e('0x7')]||0xa;this['strategy']=_0x981158['strategy']||_0x0a9e('0x8');this['Agents']=_0x981158['Agents'];this[_0x0a9e('0x9')]={};this[_0x0a9e('0xa')]=0x0;this[_0x0a9e('0x1')]='';this[_0x0a9e('0xb')]();this[_0x0a9e('0xc')]();}FaxQueue[_0x0a9e('0xd')]['updateRouting']=function(){var _0x50dfb2=this['mapAgentsId']['_rr'];this[_0x0a9e('0x9')]=_[_0x0a9e('0xe')](this[_0x0a9e('0xf')],'id');this[_0x0a9e('0x9')][_0x0a9e('0x10')]=_0x50dfb2;};FaxQueue[_0x0a9e('0xd')]['updateRealtime']=function(){this[_0x0a9e('0x11')]=0x0;this[_0x0a9e('0x12')]=0x0;for(var _0x2b4227=0x0;_0x2b4227=0x0?this[_0x0a9e('0x15')]:0x0;var _0x478723={'id':this['id'],'available':this[_0x0a9e('0x15')],'loggedIn':this[_0x0a9e('0x11')],'name':this[_0x0a9e('0x6')],'paused':this[_0x0a9e('0x12')],'waiting':this[_0x0a9e('0xa')]};var _0x20559e=md5(JSON[_0x0a9e('0x16')](_0x478723));if(this[_0x0a9e('0x1')]!==_0x20559e){this[_0x0a9e('0x1')]=_0x20559e;io['to'](util[_0x0a9e('0x17')]('fax:queue:%s',_0x478723[_0x0a9e('0x6')]))[_0x0a9e('0x18')]('fax_queue:save',_0x478723);}};module[_0x0a9e('0x19')]=FaxQueue; \ No newline at end of file diff --git a/server/services/routing/model/interval.js b/server/services/routing/model/interval.js index e126687..46eea37 100644 --- a/server/services/routing/model/interval.js +++ b/server/services/routing/model/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x13a8=['Intervals','exports','name'];(function(_0x166dcd,_0x1ba118){var _0x1731d4=function(_0xa31e02){while(--_0xa31e02){_0x166dcd['push'](_0x166dcd['shift']());}};_0x1731d4(++_0x1ba118);}(_0x13a8,0xc8));var _0x813a=function(_0x3ab4c9,_0x4ae876){_0x3ab4c9=_0x3ab4c9-0x0;var _0x305291=_0x13a8[_0x3ab4c9];return _0x305291;};'use strict';function Interval(_0x464bad){this['id']=_0x464bad['id']||0x0;this[_0x813a('0x0')]=_0x464bad[_0x813a('0x0')]||'';this[_0x813a('0x1')]=_0x464bad[_0x813a('0x1')]||{};}module[_0x813a('0x2')]=Interval; \ No newline at end of file +var _0x0c78=['Intervals','exports'];(function(_0x44e6d4,_0x868699){var _0x529177=function(_0x58cc61){while(--_0x58cc61){_0x44e6d4['push'](_0x44e6d4['shift']());}};_0x529177(++_0x868699);}(_0x0c78,0x176));var _0x80c7=function(_0x13b8f3,_0x442821){_0x13b8f3=_0x13b8f3-0x0;var _0x1a6d06=_0x0c78[_0x13b8f3];return _0x1a6d06;};'use strict';function Interval(_0x21dde6){this['id']=_0x21dde6['id']||0x0;this['name']=_0x21dde6['name']||'';this[_0x80c7('0x0')]=_0x21dde6[_0x80c7('0x0')]||{};}module[_0x80c7('0x1')]=Interval; \ No newline at end of file diff --git a/server/services/routing/model/mailQueue.js b/server/services/routing/model/mailQueue.js index eab2f83..d11ee0d 100644 --- a/server/services/routing/model/mailQueue.js +++ b/server/services/routing/model/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e8b=['ioredis','defaults','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','md5','updateRouting','prototype','mapAgentsId','_rr','map','updateRealtime','loggedIn','length','mailPause','paused','available','waiting','stringify','format','mail:queue:%s','emit','exports','lodash','util'];(function(_0x5964d1,_0x543132){var _0x3f13e5=function(_0x39f500){while(--_0x39f500){_0x5964d1['push'](_0x5964d1['shift']());}};_0x3f13e5(++_0x543132);}(_0x1e8b,0x1eb));var _0xb1e8=function(_0x13b7c4,_0x32d511){_0x13b7c4=_0x13b7c4-0x0;var _0x5a1efe=_0x1e8b[_0x13b7c4];return _0x5a1efe;};'use strict';var _=require(_0xb1e8('0x0'));var md5=require('md5');var util=require(_0xb1e8('0x1'));var Redis=require(_0xb1e8('0x2'));var config=require('../../../config/environment');config['redis']=_[_0xb1e8('0x3')](config[_0xb1e8('0x4')],{'host':_0xb1e8('0x5'),'port':0x18eb});var io=require(_0xb1e8('0x6'))(new Redis(config[_0xb1e8('0x4')]));function MailQueue(_0x2d1b42){this['id']=_0x2d1b42['id']||0x0;this['name']=_0x2d1b42[_0xb1e8('0x7')]||'';this[_0xb1e8('0x8')]=_0x2d1b42['timeout']||0xa;this[_0xb1e8('0x9')]=_0x2d1b42[_0xb1e8('0x9')]||'beepall';this[_0xb1e8('0xa')]=_0x2d1b42[_0xb1e8('0xa')];this['mapAgentsId']={};this['waiting']=0x0;this[_0xb1e8('0xb')]='';this[_0xb1e8('0xc')]();this['updateRealtime']();}MailQueue[_0xb1e8('0xd')][_0xb1e8('0xc')]=function(){var _0x1f929f=this[_0xb1e8('0xe')][_0xb1e8('0xf')];this[_0xb1e8('0xe')]=_[_0xb1e8('0x10')](this['Agents'],'id');this[_0xb1e8('0xe')][_0xb1e8('0xf')]=_0x1f929f;};MailQueue[_0xb1e8('0xd')][_0xb1e8('0x11')]=function(){this[_0xb1e8('0x12')]=0x0;this['paused']=0x0;for(var _0x6ecaa7=0x0;_0x6ecaa7=0x0?this['available']:0x0;var _0x19faa3={'id':this['id'],'available':this[_0xb1e8('0x16')],'loggedIn':this[_0xb1e8('0x12')],'name':this[_0xb1e8('0x7')],'paused':this['paused'],'waiting':this[_0xb1e8('0x17')]};var _0x572f29=md5(JSON[_0xb1e8('0x18')](_0x19faa3));if(this['md5']!==_0x572f29){this[_0xb1e8('0xb')]=_0x572f29;io['to'](util[_0xb1e8('0x19')](_0xb1e8('0x1a'),_0x19faa3[_0xb1e8('0x7')]))[_0xb1e8('0x1b')]('mail_queue:save',_0x19faa3);}};module[_0xb1e8('0x1c')]=MailQueue; \ No newline at end of file +var _0x9901=['stringify','mail:queue:%s','name','emit','mail_queue:save','md5','ioredis','../../../config/environment','redis','defaults','localhost','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','loggedIn','length','online','mailPause','paused','available'];(function(_0x90841e,_0x5bb5d2){var _0x3e9249=function(_0x2340e4){while(--_0x2340e4){_0x90841e['push'](_0x90841e['shift']());}};_0x3e9249(++_0x5bb5d2);}(_0x9901,0x1bf));var _0x1990=function(_0x4de8c4,_0x75f17f){_0x4de8c4=_0x4de8c4-0x0;var _0x276b10=_0x9901[_0x4de8c4];return _0x276b10;};'use strict';var _=require('lodash');var md5=require(_0x1990('0x0'));var util=require('util');var Redis=require(_0x1990('0x1'));var config=require(_0x1990('0x2'));config[_0x1990('0x3')]=_[_0x1990('0x4')](config['redis'],{'host':_0x1990('0x5'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function MailQueue(_0x29a081){this['id']=_0x29a081['id']||0x0;this['name']=_0x29a081['name']||'';this[_0x1990('0x6')]=_0x29a081[_0x1990('0x6')]||0xa;this[_0x1990('0x7')]=_0x29a081['strategy']||'beepall';this['Agents']=_0x29a081[_0x1990('0x8')];this[_0x1990('0x9')]={};this[_0x1990('0xa')]=0x0;this['md5']='';this[_0x1990('0xb')]();this[_0x1990('0xc')]();}MailQueue[_0x1990('0xd')][_0x1990('0xb')]=function(){var _0x289c25=this[_0x1990('0x9')][_0x1990('0xe')];this[_0x1990('0x9')]=_['map'](this[_0x1990('0x8')],'id');this[_0x1990('0x9')][_0x1990('0xe')]=_0x289c25;};MailQueue[_0x1990('0xd')][_0x1990('0xc')]=function(){this[_0x1990('0xf')]=0x0;this['paused']=0x0;for(var _0x472d8a=0x0;_0x472d8a=0x0?this[_0x1990('0x14')]:0x0;var _0x1a5f4e={'id':this['id'],'available':this[_0x1990('0x14')],'loggedIn':this[_0x1990('0xf')],'name':this['name'],'paused':this[_0x1990('0x13')],'waiting':this[_0x1990('0xa')]};var _0x3040ae=md5(JSON[_0x1990('0x15')](_0x1a5f4e));if(this[_0x1990('0x0')]!==_0x3040ae){this['md5']=_0x3040ae;io['to'](util['format'](_0x1990('0x16'),_0x1a5f4e[_0x1990('0x17')]))[_0x1990('0x18')](_0x1990('0x19'),_0x1a5f4e);}};module['exports']=MailQueue; \ No newline at end of file diff --git a/server/services/routing/model/openchannelQueue.js b/server/services/routing/model/openchannelQueue.js index c3bd904..295d457 100644 --- a/server/services/routing/model/openchannelQueue.js +++ b/server/services/routing/model/openchannelQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd0be=['defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','loggedIn','paused','length','online','openchannelPause','available','stringify','openchannel:queue:%s','emit','exports','lodash','md5','util','ioredis','redis'];(function(_0x54db14,_0x5a3cee){var _0x587884=function(_0x941121){while(--_0x941121){_0x54db14['push'](_0x54db14['shift']());}};_0x587884(++_0x5a3cee);}(_0xd0be,0x6f));var _0xed0b=function(_0x5a4935,_0x9a0cee){_0x5a4935=_0x5a4935-0x0;var _0x116100=_0xd0be[_0x5a4935];return _0x116100;};'use strict';var _=require(_0xed0b('0x0'));var md5=require(_0xed0b('0x1'));var util=require(_0xed0b('0x2'));var Redis=require(_0xed0b('0x3'));var config=require('../../../config/environment');config[_0xed0b('0x4')]=_[_0xed0b('0x5')](config[_0xed0b('0x4')],{'host':_0xed0b('0x6'),'port':0x18eb});var io=require(_0xed0b('0x7'))(new Redis(config[_0xed0b('0x4')]));function OpenchannelQueue(_0x355a31){this['id']=_0x355a31['id']||0x0;this[_0xed0b('0x8')]=_0x355a31[_0xed0b('0x8')]||'';this[_0xed0b('0x9')]=_0x355a31[_0xed0b('0x9')]||0xa;this[_0xed0b('0xa')]=_0x355a31[_0xed0b('0xa')]||_0xed0b('0xb');this[_0xed0b('0xc')]=_0x355a31['Agents'];this[_0xed0b('0xd')]={};this[_0xed0b('0xe')]=0x0;this[_0xed0b('0x1')]='';this[_0xed0b('0xf')]();this[_0xed0b('0x10')]();}OpenchannelQueue[_0xed0b('0x11')]['updateRouting']=function(){var _0x415cc5=this[_0xed0b('0xd')][_0xed0b('0x12')];this[_0xed0b('0xd')]=_['map'](this[_0xed0b('0xc')],'id');this[_0xed0b('0xd')]['_rr']=_0x415cc5;};OpenchannelQueue[_0xed0b('0x11')][_0xed0b('0x10')]=function(){this[_0xed0b('0x13')]=0x0;this[_0xed0b('0x14')]=0x0;for(var _0x1f5627=0x0;_0x1f5627=0x0?this[_0xed0b('0x18')]:0x0;var _0x5efc18={'id':this['id'],'available':this[_0xed0b('0x18')],'loggedIn':this['loggedIn'],'name':this[_0xed0b('0x8')],'paused':this['paused'],'waiting':this[_0xed0b('0xe')]};var _0x822cfe=md5(JSON[_0xed0b('0x19')](_0x5efc18));if(this['md5']!==_0x822cfe){this[_0xed0b('0x1')]=_0x822cfe;io['to'](util['format'](_0xed0b('0x1a'),_0x5efc18[_0xed0b('0x8')]))[_0xed0b('0x1b')]('openchannel_queue:save',_0x5efc18);}};module[_0xed0b('0x1c')]=OpenchannelQueue; \ No newline at end of file +var _0x36ce=['format','openchannel:queue:%s','emit','openchannel_queue:save','exports','md5','util','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','waiting','updateRouting','updateRealtime','prototype','mapAgentsId','map','_rr','loggedIn','length','online','openchannelPause','paused','available'];(function(_0x11270e,_0x3f7c7e){var _0x561007=function(_0x3ed1c8){while(--_0x3ed1c8){_0x11270e['push'](_0x11270e['shift']());}};_0x561007(++_0x3f7c7e);}(_0x36ce,0x15a));var _0xe36c=function(_0x4c17c3,_0x1b13c3){_0x4c17c3=_0x4c17c3-0x0;var _0x1275ca=_0x36ce[_0x4c17c3];return _0x1275ca;};'use strict';var _=require('lodash');var md5=require(_0xe36c('0x0'));var util=require(_0xe36c('0x1'));var Redis=require(_0xe36c('0x2'));var config=require(_0xe36c('0x3'));config[_0xe36c('0x4')]=_[_0xe36c('0x5')](config['redis'],{'host':_0xe36c('0x6'),'port':0x18eb});var io=require(_0xe36c('0x7'))(new Redis(config[_0xe36c('0x4')]));function OpenchannelQueue(_0x7c584a){this['id']=_0x7c584a['id']||0x0;this['name']=_0x7c584a[_0xe36c('0x8')]||'';this[_0xe36c('0x9')]=_0x7c584a[_0xe36c('0x9')]||0xa;this[_0xe36c('0xa')]=_0x7c584a[_0xe36c('0xa')]||_0xe36c('0xb');this['Agents']=_0x7c584a[_0xe36c('0xc')];this['mapAgentsId']={};this[_0xe36c('0xd')]=0x0;this[_0xe36c('0x0')]='';this[_0xe36c('0xe')]();this[_0xe36c('0xf')]();}OpenchannelQueue[_0xe36c('0x10')][_0xe36c('0xe')]=function(){var _0xbe0e90=this[_0xe36c('0x11')]['_rr'];this[_0xe36c('0x11')]=_[_0xe36c('0x12')](this[_0xe36c('0xc')],'id');this[_0xe36c('0x11')][_0xe36c('0x13')]=_0xbe0e90;};OpenchannelQueue[_0xe36c('0x10')][_0xe36c('0xf')]=function(){this[_0xe36c('0x14')]=0x0;this['paused']=0x0;for(var _0x538052=0x0;_0x538052=0x0?this[_0xe36c('0x19')]:0x0;var _0x36b460={'id':this['id'],'available':this[_0xe36c('0x19')],'loggedIn':this[_0xe36c('0x14')],'name':this[_0xe36c('0x8')],'paused':this['paused'],'waiting':this[_0xe36c('0xd')]};var _0x1ea3a9=md5(JSON['stringify'](_0x36b460));if(this[_0xe36c('0x0')]!==_0x1ea3a9){this['md5']=_0x1ea3a9;io['to'](util[_0xe36c('0x1a')](_0xe36c('0x1b'),_0x36b460[_0xe36c('0x8')]))[_0xe36c('0x1c')](_0xe36c('0x1d'),_0x36b460);}};module[_0xe36c('0x1e')]=OpenchannelQueue; \ No newline at end of file diff --git a/server/services/routing/model/smsQueue.js b/server/services/routing/model/smsQueue.js index dadd186..3432588 100644 --- a/server/services/routing/model/smsQueue.js +++ b/server/services/routing/model/smsQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['loggedIn','paused','length','online','available','stringify','sms:queue:%s','emit','sms_queue:save','util','ioredis','../../../config/environment','redis','localhost','name','timeout','strategy','Agents','waiting','md5','updateRouting','updateRealtime','prototype','mapAgentsId','_rr','map'];(function(_0xc17427,_0x57cf5d){var _0x35a8c1=function(_0x231e3d){while(--_0x231e3d){_0xc17427['push'](_0xc17427['shift']());}};_0x35a8c1(++_0x57cf5d);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x334d1e,_0x28a488){_0x334d1e=_0x334d1e-0x0;var _0x3b33ba=_0xcb91[_0x334d1e];return _0x3b33ba;};'use strict';var _=require('lodash');var md5=require('md5');var util=require(_0x1cb9('0x0'));var Redis=require(_0x1cb9('0x1'));var config=require(_0x1cb9('0x2'));config[_0x1cb9('0x3')]=_['defaults'](config[_0x1cb9('0x3')],{'host':_0x1cb9('0x4'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x1cb9('0x3')]));function SmsQueue(_0x1b26cd){this['id']=_0x1b26cd['id']||0x0;this['name']=_0x1b26cd[_0x1cb9('0x5')]||'';this[_0x1cb9('0x6')]=_0x1b26cd['timeout']||0xa;this[_0x1cb9('0x7')]=_0x1b26cd[_0x1cb9('0x7')]||'beepall';this[_0x1cb9('0x8')]=_0x1b26cd['Agents'];this['mapAgentsId']={};this[_0x1cb9('0x9')]=0x0;this[_0x1cb9('0xa')]='';this[_0x1cb9('0xb')]();this[_0x1cb9('0xc')]();}SmsQueue[_0x1cb9('0xd')]['updateRouting']=function(){var _0x9b58f1=this[_0x1cb9('0xe')][_0x1cb9('0xf')];this[_0x1cb9('0xe')]=_[_0x1cb9('0x10')](this['Agents'],'id');this['mapAgentsId']['_rr']=_0x9b58f1;};SmsQueue[_0x1cb9('0xd')][_0x1cb9('0xc')]=function(){this[_0x1cb9('0x11')]=0x0;this[_0x1cb9('0x12')]=0x0;for(var _0x56884d=0x0;_0x56884d=0x0?this[_0x1cb9('0x15')]:0x0;var _0x4e1340={'id':this['id'],'available':this['available'],'loggedIn':this[_0x1cb9('0x11')],'name':this[_0x1cb9('0x5')],'paused':this[_0x1cb9('0x12')],'waiting':this[_0x1cb9('0x9')]};var _0x280a84=md5(JSON[_0x1cb9('0x16')](_0x4e1340));if(this[_0x1cb9('0xa')]!==_0x280a84){this['md5']=_0x280a84;io['to'](util['format'](_0x1cb9('0x17'),_0x4e1340['name']))[_0x1cb9('0x18')](_0x1cb9('0x19'),_0x4e1340);}};module['exports']=SmsQueue; \ No newline at end of file +var _0x0713=['smsPause','paused','available','stringify','sms:queue:%s','emit','sms_queue:save','exports','util','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','waiting','md5','updateRouting','updateRealtime','prototype','mapAgentsId','_rr','map','loggedIn','length','online'];(function(_0x4af6bb,_0x2ca5d1){var _0x4a4981=function(_0x381135){while(--_0x381135){_0x4af6bb['push'](_0x4af6bb['shift']());}};_0x4a4981(++_0x2ca5d1);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var md5=require('md5');var util=require(_0x3071('0x0'));var Redis=require(_0x3071('0x1'));var config=require(_0x3071('0x2'));config[_0x3071('0x3')]=_[_0x3071('0x4')](config['redis'],{'host':_0x3071('0x5'),'port':0x18eb});var io=require(_0x3071('0x6'))(new Redis(config[_0x3071('0x3')]));function SmsQueue(_0x3137c8){this['id']=_0x3137c8['id']||0x0;this[_0x3071('0x7')]=_0x3137c8[_0x3071('0x7')]||'';this[_0x3071('0x8')]=_0x3137c8[_0x3071('0x8')]||0xa;this[_0x3071('0x9')]=_0x3137c8[_0x3071('0x9')]||_0x3071('0xa');this[_0x3071('0xb')]=_0x3137c8[_0x3071('0xb')];this['mapAgentsId']={};this[_0x3071('0xc')]=0x0;this[_0x3071('0xd')]='';this[_0x3071('0xe')]();this[_0x3071('0xf')]();}SmsQueue[_0x3071('0x10')]['updateRouting']=function(){var _0x2ace21=this[_0x3071('0x11')][_0x3071('0x12')];this[_0x3071('0x11')]=_[_0x3071('0x13')](this['Agents'],'id');this['mapAgentsId'][_0x3071('0x12')]=_0x2ace21;};SmsQueue['prototype'][_0x3071('0xf')]=function(){this[_0x3071('0x14')]=0x0;this['paused']=0x0;for(var _0x104e73=0x0;_0x104e73=0x0?this[_0x3071('0x19')]:0x0;var _0x1068d9={'id':this['id'],'available':this[_0x3071('0x19')],'loggedIn':this[_0x3071('0x14')],'name':this[_0x3071('0x7')],'paused':this[_0x3071('0x18')],'waiting':this[_0x3071('0xc')]};var _0x502a16=md5(JSON[_0x3071('0x1a')](_0x1068d9));if(this[_0x3071('0xd')]!==_0x502a16){this[_0x3071('0xd')]=_0x502a16;io['to'](util['format'](_0x3071('0x1b'),_0x1068d9['name']))[_0x3071('0x1c')](_0x3071('0x1d'),_0x1068d9);}};module[_0x3071('0x1e')]=SmsQueue; \ No newline at end of file diff --git a/server/services/routing/model/whatsappQueue.js b/server/services/routing/model/whatsappQueue.js index 4a9e960..a2ba85d 100644 --- a/server/services/routing/model/whatsappQueue.js +++ b/server/services/routing/model/whatsappQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a8c=['strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','paused','whatsappPause','loggedIn','available','stringify','format','whatsapp:queue:%s','whatsapp_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','redis','defaults','localhost','name','timeout'];(function(_0x4ee9f4,_0x484733){var _0x4a80cb=function(_0x5a0490){while(--_0x5a0490){_0x4ee9f4['push'](_0x4ee9f4['shift']());}};_0x4a80cb(++_0x484733);}(_0x7a8c,0x146));var _0xc7a8=function(_0x88cd7b,_0x4c884c){_0x88cd7b=_0x88cd7b-0x0;var _0x56fcc8=_0x7a8c[_0x88cd7b];return _0x56fcc8;};'use strict';var _=require(_0xc7a8('0x0'));var md5=require(_0xc7a8('0x1'));var util=require(_0xc7a8('0x2'));var Redis=require(_0xc7a8('0x3'));var config=require(_0xc7a8('0x4'));config[_0xc7a8('0x5')]=_[_0xc7a8('0x6')](config['redis'],{'host':_0xc7a8('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xc7a8('0x5')]));function WhatsappQueue(_0x5545bc){this['id']=_0x5545bc['id']||0x0;this['name']=_0x5545bc[_0xc7a8('0x8')]||'';this[_0xc7a8('0x9')]=_0x5545bc['timeout']||0xa;this[_0xc7a8('0xa')]=_0x5545bc['strategy']||_0xc7a8('0xb');this[_0xc7a8('0xc')]=_0x5545bc['Agents'];this[_0xc7a8('0xd')]={};this[_0xc7a8('0xe')]=0x0;this[_0xc7a8('0x1')]='';this[_0xc7a8('0xf')]();this[_0xc7a8('0x10')]();}WhatsappQueue[_0xc7a8('0x11')]['updateRouting']=function(){var _0x283d93=this[_0xc7a8('0xd')][_0xc7a8('0x12')];this[_0xc7a8('0xd')]=_['map'](this['Agents'],'id');this[_0xc7a8('0xd')][_0xc7a8('0x12')]=_0x283d93;};WhatsappQueue['prototype']['updateRealtime']=function(){this['loggedIn']=0x0;this[_0xc7a8('0x13')]=0x0;for(var _0x599870=0x0;_0x599870=0x0?this['available']:0x0;var _0x59cdb3={'id':this['id'],'available':this[_0xc7a8('0x16')],'loggedIn':this[_0xc7a8('0x15')],'name':this['name'],'paused':this[_0xc7a8('0x13')],'waiting':this[_0xc7a8('0xe')]};var _0x4081af=md5(JSON[_0xc7a8('0x17')](_0x59cdb3));if(this[_0xc7a8('0x1')]!==_0x4081af){this[_0xc7a8('0x1')]=_0x4081af;io['to'](util[_0xc7a8('0x18')](_0xc7a8('0x19'),_0x59cdb3[_0xc7a8('0x8')]))['emit'](_0xc7a8('0x1a'),_0x59cdb3);}};module[_0xc7a8('0x1b')]=WhatsappQueue; \ No newline at end of file +var _0x141a=['waiting','updateRouting','updateRealtime','map','_rr','prototype','loggedIn','paused','length','whatsappPause','available','stringify','format','whatsapp_queue:save','exports','lodash','md5','util','redis','defaults','name','timeout','strategy','beepall','Agents','mapAgentsId'];(function(_0x484432,_0x132d67){var _0x4ff446=function(_0x5c82af){while(--_0x5c82af){_0x484432['push'](_0x484432['shift']());}};_0x4ff446(++_0x132d67);}(_0x141a,0xf9));var _0xa141=function(_0x4c7d67,_0x4f47c8){_0x4c7d67=_0x4c7d67-0x0;var _0x4b2781=_0x141a[_0x4c7d67];return _0x4b2781;};'use strict';var _=require(_0xa141('0x0'));var md5=require(_0xa141('0x1'));var util=require(_0xa141('0x2'));var Redis=require('ioredis');var config=require('../../../config/environment');config[_0xa141('0x3')]=_[_0xa141('0x4')](config['redis'],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xa141('0x3')]));function WhatsappQueue(_0x144a75){this['id']=_0x144a75['id']||0x0;this[_0xa141('0x5')]=_0x144a75['name']||'';this[_0xa141('0x6')]=_0x144a75[_0xa141('0x6')]||0xa;this[_0xa141('0x7')]=_0x144a75[_0xa141('0x7')]||_0xa141('0x8');this[_0xa141('0x9')]=_0x144a75['Agents'];this[_0xa141('0xa')]={};this[_0xa141('0xb')]=0x0;this['md5']='';this[_0xa141('0xc')]();this[_0xa141('0xd')]();}WhatsappQueue['prototype'][_0xa141('0xc')]=function(){var _0xfffa9c=this[_0xa141('0xa')]['_rr'];this[_0xa141('0xa')]=_[_0xa141('0xe')](this[_0xa141('0x9')],'id');this[_0xa141('0xa')][_0xa141('0xf')]=_0xfffa9c;};WhatsappQueue[_0xa141('0x10')][_0xa141('0xd')]=function(){this[_0xa141('0x11')]=0x0;this[_0xa141('0x12')]=0x0;for(var _0x10ce1e=0x0;_0x10ce1e=0x0?this[_0xa141('0x15')]:0x0;var _0x3cc7d3={'id':this['id'],'available':this[_0xa141('0x15')],'loggedIn':this[_0xa141('0x11')],'name':this['name'],'paused':this[_0xa141('0x12')],'waiting':this[_0xa141('0xb')]};var _0x203374=md5(JSON[_0xa141('0x16')](_0x3cc7d3));if(this['md5']!==_0x203374){this[_0xa141('0x1')]=_0x203374;io['to'](util[_0xa141('0x17')]('whatsapp:queue:%s',_0x3cc7d3['name']))['emit'](_0xa141('0x18'),_0x3cc7d3);}};module[_0xa141('0x19')]=WhatsappQueue; \ No newline at end of file diff --git a/server/services/routing/realtime/index.js b/server/services/routing/realtime/index.js index 40b8e3d..00dbfdc 100644 --- a/server/services/routing/realtime/index.js +++ b/server/services/routing/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4b84=['../model/agent','../model/chatQueue','../model/smsQueue','../model/mailQueue','intervals','chatQueues','mailQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','mapKeys','prototype','hasOwnProperty','agents','isUndefined','mergeFromDatabase','length','initOpenchannelQueues','openchannelQueues','updateRouting','updateRealtime','initChatQueues','initSmsQueues','smsQueues','initMailQueues','initFaxQueues','faxQueues','initWhatsappQueues','whatsappQueues','bluebird','util'];(function(_0x24db36,_0x50b247){var _0x541cd7=function(_0x1b83fe){while(--_0x1b83fe){_0x24db36['push'](_0x24db36['shift']());}};_0x541cd7(++_0x50b247);}(_0x4b84,0x1cc));var _0x44b8=function(_0x265003,_0xf0f023){_0x265003=_0x265003-0x0;var _0x33c743=_0x4b84[_0x265003];return _0x33c743;};'use strict';var BPromise=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var _=require('lodash');var moment=require('moment');var Agent=require(_0x44b8('0x2'));var Interval=require('../model/interval');var OpenchannelQueue=require('../model/openchannelQueue');var ChatQueue=require(_0x44b8('0x3'));var SmsQueue=require(_0x44b8('0x4'));var MailQueue=require(_0x44b8('0x5'));var FaxQueue=require('../model/faxQueue');var WhatsappQueue=require('../model/whatsappQueue');var Realtime=function(){this['agents']={};this[_0x44b8('0x6')]={};this['openchannelQueues']={};this[_0x44b8('0x7')]={};this['smsQueues']={};this[_0x44b8('0x8')]={};this['faxQueues']={};this['whatsappQueues']={};this[_0x44b8('0x9')]={};this[_0x44b8('0xa')]={};this[_0x44b8('0xb')]={};this['smsQueuesWaitingInteractions']={};this[_0x44b8('0xc')]={};this[_0x44b8('0xd')]={};};function freeIsNotKey(_0x4315f6,_0x9b6048,_0x24dd10){var _0x37e471=_[_0x44b8('0xe')](_0x4315f6,function(_0x4ae8a1,_0x147529){return _0x4ae8a1[_0x24dd10];});for(var _0x4301a6 in _0x9b6048){if(_0x9b6048['hasOwnProperty'](_0x4301a6)){if(!_0x37e471[_0x4301a6]){delete _0x9b6048[_0x4301a6];}}}}Realtime[_0x44b8('0xf')]['mergeFromDatabase']=function(_0x833ea3,_0x18d642){for(var _0x4df670 in _0x18d642){if(_0x833ea3[_0x44b8('0x10')](_0x4df670)){_0x833ea3[_0x4df670]=_0x18d642[_0x4df670];}}};Realtime['prototype']['initAgents']=function(){var _0x2a3e4c=this;return function(_0x2af0ad){if(_0x2af0ad){freeIsNotKey(_0x2af0ad,_0x2a3e4c[_0x44b8('0x11')],'id');for(var _0x41ab46=0x0,_0x5e52f2={},_0x495c74={};_0x41ab46<_0x2af0ad['length'];_0x41ab46+=0x1){_0x5e52f2=_0x2af0ad[_0x41ab46];if(_[_0x44b8('0x12')](_0x2a3e4c['agents'][_0x5e52f2['id']])){_0x2a3e4c[_0x44b8('0x11')][_0x5e52f2['id']]=new Agent(_0x5e52f2);}else{_0x2a3e4c[_0x44b8('0x13')](_0x2a3e4c['agents'][_0x5e52f2['id']],_0x5e52f2);}}}return _0x2a3e4c[_0x44b8('0x11')];};};Realtime[_0x44b8('0xf')]['initIntervals']=function(){var _0x89bc30=this;return function(_0x3f4688){if(_0x3f4688){freeIsNotKey(_0x3f4688,_0x89bc30['intervals'],'id');for(var _0xcce202=0x0,_0x8b4301={},_0xebfe79={};_0xcce202<_0x3f4688[_0x44b8('0x14')];_0xcce202+=0x1){_0x8b4301=_0x3f4688[_0xcce202];if(_[_0x44b8('0x12')](_0x89bc30[_0x44b8('0x6')][_0x8b4301['id']])){_0x89bc30[_0x44b8('0x6')][_0x8b4301['id']]=new Interval(_0x8b4301);}else{_0x89bc30[_0x44b8('0x13')](_0x89bc30[_0x44b8('0x6')][_0x8b4301['id']],_0x8b4301);}}}return _0x89bc30[_0x44b8('0x6')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x15')]=function(){var _0x48327e=this;return function(_0x56549a){if(_0x56549a){freeIsNotKey(_0x56549a,_0x48327e[_0x44b8('0x16')],'id');for(var _0x416b34=0x0,_0x1418db={},_0x305a5c={};_0x416b34<_0x56549a['length'];_0x416b34+=0x1){_0x1418db=_0x56549a[_0x416b34];if(_[_0x44b8('0x12')](_0x48327e['openchannelQueues'][_0x1418db['id']])){_0x48327e[_0x44b8('0x16')][_0x1418db['id']]=new OpenchannelQueue(_0x1418db);}else{_0x48327e[_0x44b8('0x13')](_0x48327e[_0x44b8('0x16')][_0x1418db['id']],_0x1418db);}_0x48327e[_0x44b8('0x16')][_0x1418db['id']][_0x44b8('0x17')]();_0x48327e['openchannelQueues'][_0x1418db['id']][_0x44b8('0x18')]();}}return _0x48327e['openchannelQueues'];};};Realtime[_0x44b8('0xf')][_0x44b8('0x19')]=function(){var _0x549a26=this;return function(_0x17ac44){if(_0x17ac44){freeIsNotKey(_0x17ac44,_0x549a26[_0x44b8('0x7')],'id');for(var _0x2656d7=0x0,_0x59c1bf={},_0xb22107={};_0x2656d7<_0x17ac44[_0x44b8('0x14')];_0x2656d7+=0x1){_0x59c1bf=_0x17ac44[_0x2656d7];if(_['isUndefined'](_0x549a26[_0x44b8('0x7')][_0x59c1bf['id']])){_0x549a26['chatQueues'][_0x59c1bf['id']]=new ChatQueue(_0x59c1bf);}else{_0x549a26[_0x44b8('0x13')](_0x549a26['chatQueues'][_0x59c1bf['id']],_0x59c1bf);}_0x549a26['chatQueues'][_0x59c1bf['id']]['updateRouting']();_0x549a26[_0x44b8('0x7')][_0x59c1bf['id']][_0x44b8('0x18')]();}}return _0x549a26[_0x44b8('0x7')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1a')]=function(){var _0xc3f667=this;return function(_0x2cf205){if(_0x2cf205){freeIsNotKey(_0x2cf205,_0xc3f667[_0x44b8('0x1b')],'id');for(var _0xd1d320=0x0,_0x28f918={},_0x5e1129={};_0xd1d320<_0x2cf205[_0x44b8('0x14')];_0xd1d320+=0x1){_0x28f918=_0x2cf205[_0xd1d320];if(_[_0x44b8('0x12')](_0xc3f667['smsQueues'][_0x28f918['id']])){_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']]=new SmsQueue(_0x28f918);}else{_0xc3f667['mergeFromDatabase'](_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']],_0x28f918);}_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']][_0x44b8('0x17')]();_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']][_0x44b8('0x18')]();}}return _0xc3f667['smsQueues'];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1c')]=function(){var _0x26265f=this;return function(_0x339f0f){if(_0x339f0f){freeIsNotKey(_0x339f0f,_0x26265f[_0x44b8('0x8')],'id');for(var _0x5f541d=0x0,_0x3875a5={},_0x400edc={};_0x5f541d<_0x339f0f[_0x44b8('0x14')];_0x5f541d+=0x1){_0x3875a5=_0x339f0f[_0x5f541d];if(_[_0x44b8('0x12')](_0x26265f[_0x44b8('0x8')][_0x3875a5['id']])){_0x26265f[_0x44b8('0x8')][_0x3875a5['id']]=new MailQueue(_0x3875a5);}else{_0x26265f[_0x44b8('0x13')](_0x26265f[_0x44b8('0x8')][_0x3875a5['id']],_0x3875a5);}_0x26265f[_0x44b8('0x8')][_0x3875a5['id']][_0x44b8('0x17')]();_0x26265f[_0x44b8('0x8')][_0x3875a5['id']][_0x44b8('0x18')]();}}return _0x26265f[_0x44b8('0x8')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1d')]=function(){var _0x1becb0=this;return function(_0x323c50){if(_0x323c50){freeIsNotKey(_0x323c50,_0x1becb0[_0x44b8('0x1e')],'id');for(var _0x28faa9=0x0,_0x3984f8={},_0x2c02d6={};_0x28faa9<_0x323c50[_0x44b8('0x14')];_0x28faa9+=0x1){_0x3984f8=_0x323c50[_0x28faa9];if(_['isUndefined'](_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']])){_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']]=new FaxQueue(_0x3984f8);}else{_0x1becb0['mergeFromDatabase'](_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']],_0x3984f8);}_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']][_0x44b8('0x17')]();_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']]['updateRealtime']();}}return _0x1becb0[_0x44b8('0x1e')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1f')]=function(){var _0x1ee3cc=this;return function(_0x9cb2a){if(_0x9cb2a){freeIsNotKey(_0x9cb2a,_0x1ee3cc[_0x44b8('0x20')],'id');for(var _0x46aadd=0x0,_0x3581b8={},_0x209039={};_0x46aadd<_0x9cb2a[_0x44b8('0x14')];_0x46aadd+=0x1){_0x3581b8=_0x9cb2a[_0x46aadd];if(_[_0x44b8('0x12')](_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']])){_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']]=new WhatsappQueue(_0x3581b8);}else{_0x1ee3cc[_0x44b8('0x13')](_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']],_0x3581b8);}_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']]['updateRouting']();_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']][_0x44b8('0x18')]();}}return _0x1ee3cc[_0x44b8('0x20')];};};module['exports']=Realtime; \ No newline at end of file +var _0x4b84=['../model/agent','../model/chatQueue','../model/smsQueue','../model/mailQueue','intervals','chatQueues','mailQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','mapKeys','prototype','hasOwnProperty','agents','isUndefined','mergeFromDatabase','length','initOpenchannelQueues','openchannelQueues','updateRouting','updateRealtime','initChatQueues','initSmsQueues','smsQueues','initMailQueues','initFaxQueues','faxQueues','initWhatsappQueues','whatsappQueues','bluebird','util'];(function(_0x537c8c,_0x37d938){var _0x41987c=function(_0x550c05){while(--_0x550c05){_0x537c8c['push'](_0x537c8c['shift']());}};_0x41987c(++_0x37d938);}(_0x4b84,0x1cc));var _0x44b8=function(_0x25fc41,_0x250864){_0x25fc41=_0x25fc41-0x0;var _0x1371d1=_0x4b84[_0x25fc41];return _0x1371d1;};'use strict';var BPromise=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var _=require('lodash');var moment=require('moment');var Agent=require(_0x44b8('0x2'));var Interval=require('../model/interval');var OpenchannelQueue=require('../model/openchannelQueue');var ChatQueue=require(_0x44b8('0x3'));var SmsQueue=require(_0x44b8('0x4'));var MailQueue=require(_0x44b8('0x5'));var FaxQueue=require('../model/faxQueue');var WhatsappQueue=require('../model/whatsappQueue');var Realtime=function(){this['agents']={};this[_0x44b8('0x6')]={};this['openchannelQueues']={};this[_0x44b8('0x7')]={};this['smsQueues']={};this[_0x44b8('0x8')]={};this['faxQueues']={};this['whatsappQueues']={};this[_0x44b8('0x9')]={};this[_0x44b8('0xa')]={};this[_0x44b8('0xb')]={};this['smsQueuesWaitingInteractions']={};this[_0x44b8('0xc')]={};this[_0x44b8('0xd')]={};};function freeIsNotKey(_0x4315f6,_0x9b6048,_0x24dd10){var _0x37e471=_[_0x44b8('0xe')](_0x4315f6,function(_0x4ae8a1,_0x147529){return _0x4ae8a1[_0x24dd10];});for(var _0x4301a6 in _0x9b6048){if(_0x9b6048['hasOwnProperty'](_0x4301a6)){if(!_0x37e471[_0x4301a6]){delete _0x9b6048[_0x4301a6];}}}}Realtime[_0x44b8('0xf')]['mergeFromDatabase']=function(_0x833ea3,_0x18d642){for(var _0x4df670 in _0x18d642){if(_0x833ea3[_0x44b8('0x10')](_0x4df670)){_0x833ea3[_0x4df670]=_0x18d642[_0x4df670];}}};Realtime['prototype']['initAgents']=function(){var _0x2a3e4c=this;return function(_0x2af0ad){if(_0x2af0ad){freeIsNotKey(_0x2af0ad,_0x2a3e4c[_0x44b8('0x11')],'id');for(var _0x41ab46=0x0,_0x5e52f2={},_0x495c74={};_0x41ab46<_0x2af0ad['length'];_0x41ab46+=0x1){_0x5e52f2=_0x2af0ad[_0x41ab46];if(_[_0x44b8('0x12')](_0x2a3e4c['agents'][_0x5e52f2['id']])){_0x2a3e4c[_0x44b8('0x11')][_0x5e52f2['id']]=new Agent(_0x5e52f2);}else{_0x2a3e4c[_0x44b8('0x13')](_0x2a3e4c['agents'][_0x5e52f2['id']],_0x5e52f2);}}}return _0x2a3e4c[_0x44b8('0x11')];};};Realtime[_0x44b8('0xf')]['initIntervals']=function(){var _0x89bc30=this;return function(_0x3f4688){if(_0x3f4688){freeIsNotKey(_0x3f4688,_0x89bc30['intervals'],'id');for(var _0xcce202=0x0,_0x8b4301={},_0xebfe79={};_0xcce202<_0x3f4688[_0x44b8('0x14')];_0xcce202+=0x1){_0x8b4301=_0x3f4688[_0xcce202];if(_[_0x44b8('0x12')](_0x89bc30[_0x44b8('0x6')][_0x8b4301['id']])){_0x89bc30[_0x44b8('0x6')][_0x8b4301['id']]=new Interval(_0x8b4301);}else{_0x89bc30[_0x44b8('0x13')](_0x89bc30[_0x44b8('0x6')][_0x8b4301['id']],_0x8b4301);}}}return _0x89bc30[_0x44b8('0x6')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x15')]=function(){var _0x48327e=this;return function(_0x56549a){if(_0x56549a){freeIsNotKey(_0x56549a,_0x48327e[_0x44b8('0x16')],'id');for(var _0x416b34=0x0,_0x1418db={},_0x305a5c={};_0x416b34<_0x56549a['length'];_0x416b34+=0x1){_0x1418db=_0x56549a[_0x416b34];if(_[_0x44b8('0x12')](_0x48327e['openchannelQueues'][_0x1418db['id']])){_0x48327e[_0x44b8('0x16')][_0x1418db['id']]=new OpenchannelQueue(_0x1418db);}else{_0x48327e[_0x44b8('0x13')](_0x48327e[_0x44b8('0x16')][_0x1418db['id']],_0x1418db);}_0x48327e[_0x44b8('0x16')][_0x1418db['id']][_0x44b8('0x17')]();_0x48327e['openchannelQueues'][_0x1418db['id']][_0x44b8('0x18')]();}}return _0x48327e['openchannelQueues'];};};Realtime[_0x44b8('0xf')][_0x44b8('0x19')]=function(){var _0x549a26=this;return function(_0x17ac44){if(_0x17ac44){freeIsNotKey(_0x17ac44,_0x549a26[_0x44b8('0x7')],'id');for(var _0x2656d7=0x0,_0x59c1bf={},_0xb22107={};_0x2656d7<_0x17ac44[_0x44b8('0x14')];_0x2656d7+=0x1){_0x59c1bf=_0x17ac44[_0x2656d7];if(_['isUndefined'](_0x549a26[_0x44b8('0x7')][_0x59c1bf['id']])){_0x549a26['chatQueues'][_0x59c1bf['id']]=new ChatQueue(_0x59c1bf);}else{_0x549a26[_0x44b8('0x13')](_0x549a26['chatQueues'][_0x59c1bf['id']],_0x59c1bf);}_0x549a26['chatQueues'][_0x59c1bf['id']]['updateRouting']();_0x549a26[_0x44b8('0x7')][_0x59c1bf['id']][_0x44b8('0x18')]();}}return _0x549a26[_0x44b8('0x7')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1a')]=function(){var _0xc3f667=this;return function(_0x2cf205){if(_0x2cf205){freeIsNotKey(_0x2cf205,_0xc3f667[_0x44b8('0x1b')],'id');for(var _0xd1d320=0x0,_0x28f918={},_0x5e1129={};_0xd1d320<_0x2cf205[_0x44b8('0x14')];_0xd1d320+=0x1){_0x28f918=_0x2cf205[_0xd1d320];if(_[_0x44b8('0x12')](_0xc3f667['smsQueues'][_0x28f918['id']])){_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']]=new SmsQueue(_0x28f918);}else{_0xc3f667['mergeFromDatabase'](_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']],_0x28f918);}_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']][_0x44b8('0x17')]();_0xc3f667[_0x44b8('0x1b')][_0x28f918['id']][_0x44b8('0x18')]();}}return _0xc3f667['smsQueues'];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1c')]=function(){var _0x26265f=this;return function(_0x339f0f){if(_0x339f0f){freeIsNotKey(_0x339f0f,_0x26265f[_0x44b8('0x8')],'id');for(var _0x5f541d=0x0,_0x3875a5={},_0x400edc={};_0x5f541d<_0x339f0f[_0x44b8('0x14')];_0x5f541d+=0x1){_0x3875a5=_0x339f0f[_0x5f541d];if(_[_0x44b8('0x12')](_0x26265f[_0x44b8('0x8')][_0x3875a5['id']])){_0x26265f[_0x44b8('0x8')][_0x3875a5['id']]=new MailQueue(_0x3875a5);}else{_0x26265f[_0x44b8('0x13')](_0x26265f[_0x44b8('0x8')][_0x3875a5['id']],_0x3875a5);}_0x26265f[_0x44b8('0x8')][_0x3875a5['id']][_0x44b8('0x17')]();_0x26265f[_0x44b8('0x8')][_0x3875a5['id']][_0x44b8('0x18')]();}}return _0x26265f[_0x44b8('0x8')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1d')]=function(){var _0x1becb0=this;return function(_0x323c50){if(_0x323c50){freeIsNotKey(_0x323c50,_0x1becb0[_0x44b8('0x1e')],'id');for(var _0x28faa9=0x0,_0x3984f8={},_0x2c02d6={};_0x28faa9<_0x323c50[_0x44b8('0x14')];_0x28faa9+=0x1){_0x3984f8=_0x323c50[_0x28faa9];if(_['isUndefined'](_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']])){_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']]=new FaxQueue(_0x3984f8);}else{_0x1becb0['mergeFromDatabase'](_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']],_0x3984f8);}_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']][_0x44b8('0x17')]();_0x1becb0[_0x44b8('0x1e')][_0x3984f8['id']]['updateRealtime']();}}return _0x1becb0[_0x44b8('0x1e')];};};Realtime[_0x44b8('0xf')][_0x44b8('0x1f')]=function(){var _0x1ee3cc=this;return function(_0x9cb2a){if(_0x9cb2a){freeIsNotKey(_0x9cb2a,_0x1ee3cc[_0x44b8('0x20')],'id');for(var _0x46aadd=0x0,_0x3581b8={},_0x209039={};_0x46aadd<_0x9cb2a[_0x44b8('0x14')];_0x46aadd+=0x1){_0x3581b8=_0x9cb2a[_0x46aadd];if(_[_0x44b8('0x12')](_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']])){_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']]=new WhatsappQueue(_0x3581b8);}else{_0x1ee3cc[_0x44b8('0x13')](_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']],_0x3581b8);}_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']]['updateRouting']();_0x1ee3cc[_0x44b8('0x20')][_0x3581b8['id']][_0x44b8('0x18')]();}}return _0x1ee3cc[_0x44b8('0x20')];};};module['exports']=Realtime; \ No newline at end of file diff --git a/server/services/routing/rpc/chatInteraction.js b/server/services/routing/rpc/chatInteraction.js index f019766..03877c1 100644 --- a/server/services/routing/rpc/chatInteraction.js +++ b/server/services/routing/rpc/chatInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f59=['update','Request','addTags','AddTagsToChatInteraction','addTagsToChatInteraction','../client'];(function(_0x2245ab,_0x388bad){var _0x125382=function(_0x10f8ab){while(--_0x10f8ab){_0x2245ab['push'](_0x2245ab['shift']());}};_0x125382(++_0x388bad);}(_0x5f59,0x131));var _0x95f5=function(_0x474c24,_0x35b08b){_0x474c24=_0x474c24-0x0;var _0x2857b7=_0x5f59[_0x474c24];return _0x2857b7;};'use strict';var client=require(_0x95f5('0x0'));exports[_0x95f5('0x1')]=function(_0x3fb029,_0x48cfd3){return client[_0x95f5('0x2')]('UpdateChatInteraction',{'body':_0x48cfd3,'options':{'where':{'id':_0x3fb029}},'log':'updateChatInteraction'});};exports[_0x95f5('0x3')]=function(_0xcb03cf,_0x4008b6){return client[_0x95f5('0x2')](_0x95f5('0x4'),{'body':_0x4008b6,'options':{'where':{'id':_0xcb03cf}},'log':_0x95f5('0x5')});}; \ No newline at end of file +var _0x476c=['updateChatInteraction','addTagsToChatInteraction','../client','update','Request'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0x476c,0x1a6));var _0xc476=function(_0x3f1000,_0x4746a9){_0x3f1000=_0x3f1000-0x0;var _0x5a07e6=_0x476c[_0x3f1000];return _0x5a07e6;};'use strict';var client=require(_0xc476('0x0'));exports[_0xc476('0x1')]=function(_0x2f7699,_0xa7cbdf){return client[_0xc476('0x2')]('UpdateChatInteraction',{'body':_0xa7cbdf,'options':{'where':{'id':_0x2f7699}},'log':_0xc476('0x3')});};exports['addTags']=function(_0x33fc8b,_0x29c6ad){return client[_0xc476('0x2')]('AddTagsToChatInteraction',{'body':_0x29c6ad,'options':{'where':{'id':_0x33fc8b}},'log':_0xc476('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatMessage.js b/server/services/routing/rpc/chatMessage.js index dd3d546..1524227 100644 --- a/server/services/routing/rpc/chatMessage.js +++ b/server/services/routing/rpc/chatMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5ef0=['create','createChatMessage'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5ef0,0x130));var _0x05ef=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x5ef0[_0x14add3];return _0x4a174f;};'use strict';var client=require('../client');exports[_0x05ef('0x0')]=function(_0x4d9988){return client['Request']('CreateChatMessage',{'body':_0x4d9988,'log':_0x05ef('0x1')});}; \ No newline at end of file +var _0x53fc=['CreateChatMessage','createChatMessage','Request'];(function(_0x21648b,_0x4c0dc6){var _0x190592=function(_0x2a0e00){while(--_0x2a0e00){_0x21648b['push'](_0x21648b['shift']());}};_0x190592(++_0x4c0dc6);}(_0x53fc,0x1b5));var _0xc53f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x53fc[_0x3dd15e];return _0x231fd0;};'use strict';var client=require('../client');exports['create']=function(_0x687817){return client[_0xc53f('0x0')](_0xc53f('0x1'),{'body':_0x687817,'log':_0xc53f('0x2')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueue.js b/server/services/routing/rpc/chatQueue.js index 0b93182..ab00270 100644 --- a/server/services/routing/rpc/chatQueue.js +++ b/server/services/routing/rpc/chatQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x86e3=['GetChatQueue','name','User','Agents','online','getChatQueues'];(function(_0x5fe9ac,_0x587f42){var _0x37d039=function(_0x4cea7f){while(--_0x4cea7f){_0x5fe9ac['push'](_0x5fe9ac['shift']());}};_0x37d039(++_0x587f42);}(_0x86e3,0x1aa));var _0x386e=function(_0x457549,_0x3e0f46){_0x457549=_0x457549-0x0;var _0x3c1d6f=_0x86e3[_0x457549];return _0x3c1d6f;};'use strict';var client=require('../client');exports['getChatQueues']=function(){return function(){return client['Request'](_0x386e('0x0'),{'options':{'raw':![],'attributes':['id',_0x386e('0x1'),'timeout','strategy'],'include':[{'model':_0x386e('0x2'),'as':_0x386e('0x3'),'attributes':['id',_0x386e('0x1'),_0x386e('0x4'),'chatPause']}]},'log':_0x386e('0x5')});};}; \ No newline at end of file +var _0xb606=['getChatQueues','Request','name','strategy','Agents','online','chatPause','../client'];(function(_0x25ea2b,_0x3c841a){var _0x358d86=function(_0x55da97){while(--_0x55da97){_0x25ea2b['push'](_0x25ea2b['shift']());}};_0x358d86(++_0x3c841a);}(_0xb606,0x10f));var _0x6b60=function(_0x4b2436,_0x452299){_0x4b2436=_0x4b2436-0x0;var _0x4f5ab2=_0xb606[_0x4b2436];return _0x4f5ab2;};'use strict';var client=require(_0x6b60('0x0'));exports[_0x6b60('0x1')]=function(){return function(){return client[_0x6b60('0x2')]('GetChatQueue',{'options':{'raw':![],'attributes':['id',_0x6b60('0x3'),'timeout',_0x6b60('0x4')],'include':[{'model':'User','as':_0x6b60('0x5'),'attributes':['id',_0x6b60('0x3'),_0x6b60('0x6'),_0x6b60('0x7')]}]},'log':'getChatQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueueReport.js b/server/services/routing/rpc/chatQueueReport.js index 0e8ef14..910f055 100644 --- a/server/services/routing/rpc/chatQueueReport.js +++ b/server/services/routing/rpc/chatQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1542=['Request','CreateChatQueueReport','update','UpdateChatQueueReport','DESC','../client','create'];(function(_0x9aada2,_0xd2d349){var _0x196dff=function(_0x5ad061){while(--_0x5ad061){_0x9aada2['push'](_0x9aada2['shift']());}};_0x196dff(++_0xd2d349);}(_0x1542,0x116));var _0x2154=function(_0x41c53f,_0x452056){_0x41c53f=_0x41c53f-0x0;var _0x2aadb1=_0x1542[_0x41c53f];return _0x2aadb1;};'use strict';var client=require(_0x2154('0x0'));exports[_0x2154('0x1')]=function(_0x24448e){return client[_0x2154('0x2')](_0x2154('0x3'),{'body':_0x24448e,'log':'CreateChatQueueReport'});};exports[_0x2154('0x4')]=function(_0x376a87,_0x13e41b){return client['Request'](_0x2154('0x5'),{'body':_0x13e41b,'options':{'where':{'uniqueid':_0x376a87},'order':[['id',_0x2154('0x6')]],'limit':0x1},'log':'UpdateChatQueueReport'});}; \ No newline at end of file +var _0xe9e8=['create','Request','CreateChatQueueReport','update','UpdateChatQueueReport','DESC','../client'];(function(_0x5d7dc6,_0x5d48cc){var _0x28349f=function(_0xfd1f90){while(--_0xfd1f90){_0x5d7dc6['push'](_0x5d7dc6['shift']());}};_0x28349f(++_0x5d48cc);}(_0xe9e8,0x179));var _0x8e9e=function(_0x14edd6,_0x39a78e){_0x14edd6=_0x14edd6-0x0;var _0x3ac21e=_0xe9e8[_0x14edd6];return _0x3ac21e;};'use strict';var client=require(_0x8e9e('0x0'));exports[_0x8e9e('0x1')]=function(_0x38ef03){return client[_0x8e9e('0x2')](_0x8e9e('0x3'),{'body':_0x38ef03,'log':_0x8e9e('0x3')});};exports[_0x8e9e('0x4')]=function(_0x48f1bc,_0x1508fb){return client['Request'](_0x8e9e('0x5'),{'body':_0x1508fb,'options':{'where':{'uniqueid':_0x48f1bc},'order':[['id',_0x8e9e('0x6')]],'limit':0x1},'log':_0x8e9e('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxInteraction.js b/server/services/routing/rpc/faxInteraction.js index 06e27f7..71d9cbb 100644 --- a/server/services/routing/rpc/faxInteraction.js +++ b/server/services/routing/rpc/faxInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3693=['../client','update','UpdateFaxInteraction','updateFaxInteraction','addTags','Request'];(function(_0x4c05da,_0x414720){var _0x1614db=function(_0xa19cf6){while(--_0xa19cf6){_0x4c05da['push'](_0x4c05da['shift']());}};_0x1614db(++_0x414720);}(_0x3693,0x9c));var _0x3369=function(_0x178686,_0x3cd6a5){_0x178686=_0x178686-0x0;var _0x36b82e=_0x3693[_0x178686];return _0x36b82e;};'use strict';var client=require(_0x3369('0x0'));exports[_0x3369('0x1')]=function(_0x138391,_0x357981){return client['Request'](_0x3369('0x2'),{'body':_0x357981,'options':{'where':{'id':_0x138391}},'log':_0x3369('0x3')});};exports[_0x3369('0x4')]=function(_0x11984f,_0x94676e){return client[_0x3369('0x5')]('AddTagsToFaxInteraction',{'body':_0x94676e,'options':{'where':{'id':_0x11984f}},'log':'addTagsToFaxInteraction'});}; \ No newline at end of file +var _0x05a5=['AddTagsToFaxInteraction','addTagsToFaxInteraction','../client','update','Request','UpdateFaxInteraction','addTags'];(function(_0x9afb6,_0x9c85c1){var _0x1da6cd=function(_0x4ab1d2){while(--_0x4ab1d2){_0x9afb6['push'](_0x9afb6['shift']());}};_0x1da6cd(++_0x9c85c1);}(_0x05a5,0x19f));var _0x505a=function(_0x340f91,_0x2fc3f3){_0x340f91=_0x340f91-0x0;var _0x35dcf8=_0x05a5[_0x340f91];return _0x35dcf8;};'use strict';var client=require(_0x505a('0x0'));exports[_0x505a('0x1')]=function(_0xa738f0,_0x39ba2d){return client[_0x505a('0x2')](_0x505a('0x3'),{'body':_0x39ba2d,'options':{'where':{'id':_0xa738f0}},'log':'updateFaxInteraction'});};exports[_0x505a('0x4')]=function(_0x1340ab,_0x58ff29){return client[_0x505a('0x2')](_0x505a('0x5'),{'body':_0x58ff29,'options':{'where':{'id':_0x1340ab}},'log':_0x505a('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxMessage.js b/server/services/routing/rpc/faxMessage.js index 064ff93..66f49ae 100644 --- a/server/services/routing/rpc/faxMessage.js +++ b/server/services/routing/rpc/faxMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x01c1=['create','Request','CreateFaxMessage','createFaxMessage'];(function(_0x40db20,_0x5c5ef7){var _0x27ee31=function(_0x573468){while(--_0x573468){_0x40db20['push'](_0x40db20['shift']());}};_0x27ee31(++_0x5c5ef7);}(_0x01c1,0x94));var _0x101c=function(_0x1b212b,_0xfed4e){_0x1b212b=_0x1b212b-0x0;var _0x138cd0=_0x01c1[_0x1b212b];return _0x138cd0;};'use strict';var client=require('../client');exports[_0x101c('0x0')]=function(_0x1a7892){return client[_0x101c('0x1')](_0x101c('0x2'),{'body':_0x1a7892,'log':_0x101c('0x3')});}; \ No newline at end of file +var _0x581a=['createFaxMessage','../client','create','Request','CreateFaxMessage'];(function(_0x5cce63,_0x4eda40){var _0x12aa27=function(_0x4c73f7){while(--_0x4c73f7){_0x5cce63['push'](_0x5cce63['shift']());}};_0x12aa27(++_0x4eda40);}(_0x581a,0x18c));var _0xa581=function(_0x18e441,_0x279668){_0x18e441=_0x18e441-0x0;var _0x19a98c=_0x581a[_0x18e441];return _0x19a98c;};'use strict';var client=require(_0xa581('0x0'));exports[_0xa581('0x1')]=function(_0x3e703b){return client[_0xa581('0x2')](_0xa581('0x3'),{'body':_0x3e703b,'log':_0xa581('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueue.js b/server/services/routing/rpc/faxQueue.js index e407c20..b8cb69e 100644 --- a/server/services/routing/rpc/faxQueue.js +++ b/server/services/routing/rpc/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f50=['strategy','User','faxPause','../client','getFaxQueues','GetFaxQueue','name'];(function(_0x3727ae,_0x165f88){var _0x1c3f01=function(_0x5cd5a5){while(--_0x5cd5a5){_0x3727ae['push'](_0x3727ae['shift']());}};_0x1c3f01(++_0x165f88);}(_0x5f50,0x1ca));var _0x05f5=function(_0xe2a1aa,_0x525d7b){_0xe2a1aa=_0xe2a1aa-0x0;var _0x5a8362=_0x5f50[_0xe2a1aa];return _0x5a8362;};'use strict';var client=require(_0x05f5('0x0'));exports[_0x05f5('0x1')]=function(){return function(){return client['Request'](_0x05f5('0x2'),{'options':{'raw':![],'attributes':['id',_0x05f5('0x3'),'timeout',_0x05f5('0x4')],'include':[{'model':_0x05f5('0x5'),'as':'Agents','attributes':['id',_0x05f5('0x3'),'online',_0x05f5('0x6')]}]},'log':_0x05f5('0x1')});};}; \ No newline at end of file +var _0x79f5=['../client','getFaxQueues','Request','name','timeout','online'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x79f5,0x18c));var _0x579f=function(_0x1ddedd,_0x485606){_0x1ddedd=_0x1ddedd-0x0;var _0xa3e1ac=_0x79f5[_0x1ddedd];return _0xa3e1ac;};'use strict';var client=require(_0x579f('0x0'));exports[_0x579f('0x1')]=function(){return function(){return client[_0x579f('0x2')]('GetFaxQueue',{'options':{'raw':![],'attributes':['id',_0x579f('0x3'),_0x579f('0x4'),'strategy'],'include':[{'model':'User','as':'Agents','attributes':['id',_0x579f('0x3'),_0x579f('0x5'),'faxPause']}]},'log':_0x579f('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueueReport.js b/server/services/routing/rpc/faxQueueReport.js index af05f15..d057459 100644 --- a/server/services/routing/rpc/faxQueueReport.js +++ b/server/services/routing/rpc/faxQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6523=['CreateFaxQueueReport','UpdateFaxQueueReport','../client','create','Request'];(function(_0x7a112,_0x2eb4a0){var _0x136dc5=function(_0x437650){while(--_0x437650){_0x7a112['push'](_0x7a112['shift']());}};_0x136dc5(++_0x2eb4a0);}(_0x6523,0x1a6));var _0x3652=function(_0x24c178,_0x2e588b){_0x24c178=_0x24c178-0x0;var _0x35a2d8=_0x6523[_0x24c178];return _0x35a2d8;};'use strict';var client=require(_0x3652('0x0'));exports[_0x3652('0x1')]=function(_0x4a5fdf){return client[_0x3652('0x2')](_0x3652('0x3'),{'body':_0x4a5fdf,'log':_0x3652('0x3')});};exports['update']=function(_0x18a487,_0x35dcd9){return client[_0x3652('0x2')](_0x3652('0x4'),{'body':_0x35dcd9,'options':{'where':{'uniqueid':_0x18a487},'order':[['id','DESC']],'limit':0x1},'log':_0x3652('0x4')});}; \ No newline at end of file +var _0x2926=['DESC','UpdateFaxQueueReport','create','Request','CreateFaxQueueReport','update'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x2926,0x170));var _0x6292=function(_0x5e2751,_0x518a55){_0x5e2751=_0x5e2751-0x0;var _0x139a39=_0x2926[_0x5e2751];return _0x139a39;};'use strict';var client=require('../client');exports[_0x6292('0x0')]=function(_0x1821e7){return client[_0x6292('0x1')](_0x6292('0x2'),{'body':_0x1821e7,'log':'CreateFaxQueueReport'});};exports[_0x6292('0x3')]=function(_0x3840fc,_0x43f028){return client['Request']('UpdateFaxQueueReport',{'body':_0x43f028,'options':{'where':{'uniqueid':_0x3840fc},'order':[['id',_0x6292('0x4')]],'limit':0x1},'log':_0x6292('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/interval.js b/server/services/routing/rpc/interval.js index 1d5c934..994f6f2 100644 --- a/server/services/routing/rpc/interval.js +++ b/server/services/routing/rpc/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x49f8=['../client','GetInterval','name','Intervals','interval'];(function(_0x56c7b9,_0xedf603){var _0x513097=function(_0x20d8db){while(--_0x20d8db){_0x56c7b9['push'](_0x56c7b9['shift']());}};_0x513097(++_0xedf603);}(_0x49f8,0xff));var _0x849f=function(_0x5cdf85,_0x4f5610){_0x5cdf85=_0x5cdf85-0x0;var _0x109a19=_0x49f8[_0x5cdf85];return _0x109a19;};'use strict';var client=require(_0x849f('0x0'));exports['getIntervals']=function(){return function(){return client['Request'](_0x849f('0x1'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x849f('0x2')],'include':[{'model':'Interval','as':_0x849f('0x3'),'attributes':['id','name',_0x849f('0x4')]}]},'log':'getIntervals'});};}; \ No newline at end of file +var _0xb574=['GetInterval','name','Intervals','interval','../client','getIntervals'];(function(_0x2309c3,_0x47d8c9){var _0x1ab894=function(_0x7d15fd){while(--_0x7d15fd){_0x2309c3['push'](_0x2309c3['shift']());}};_0x1ab894(++_0x47d8c9);}(_0xb574,0x106));var _0x4b57=function(_0x23aaaa,_0x33c920){_0x23aaaa=_0x23aaaa-0x0;var _0x49e44d=_0xb574[_0x23aaaa];return _0x49e44d;};'use strict';var client=require(_0x4b57('0x0'));exports[_0x4b57('0x1')]=function(){return function(){return client['Request'](_0x4b57('0x2'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x4b57('0x3')],'include':[{'model':'Interval','as':_0x4b57('0x4'),'attributes':['id',_0x4b57('0x3'),_0x4b57('0x5')]}]},'log':_0x4b57('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailInteraction.js b/server/services/routing/rpc/mailInteraction.js index 8eb750e..7bd40dd 100644 --- a/server/services/routing/rpc/mailInteraction.js +++ b/server/services/routing/rpc/mailInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9b7d=['addTags','AddTagsToMailInteraction','addTagsToChatInteraction','../client','update','Request','updateMailInteraction'];(function(_0x243e82,_0x50326d){var _0x44babd=function(_0x4504f8){while(--_0x4504f8){_0x243e82['push'](_0x243e82['shift']());}};_0x44babd(++_0x50326d);}(_0x9b7d,0x88));var _0xd9b7=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x9b7d[_0xa464c9];return _0x3d73c4;};'use strict';var client=require(_0xd9b7('0x0'));exports[_0xd9b7('0x1')]=function(_0x4363a6,_0x261bfd){return client[_0xd9b7('0x2')]('UpdateMailInteraction',{'body':_0x261bfd,'options':{'where':{'id':_0x4363a6}},'log':_0xd9b7('0x3')});};exports[_0xd9b7('0x4')]=function(_0x560425,_0x3ec0a8){return client['Request'](_0xd9b7('0x5'),{'body':_0x3ec0a8,'options':{'where':{'id':_0x560425}},'log':_0xd9b7('0x6')});}; \ No newline at end of file +var _0x20c3=['update','Request','UpdateMailInteraction','updateMailInteraction','AddTagsToMailInteraction','addTagsToChatInteraction','../client'];(function(_0x3566c2,_0xd6bcff){var _0x4b7fc1=function(_0x2514ec){while(--_0x2514ec){_0x3566c2['push'](_0x3566c2['shift']());}};_0x4b7fc1(++_0xd6bcff);}(_0x20c3,0x110));var _0x320c=function(_0x4ef1bb,_0x33ccf4){_0x4ef1bb=_0x4ef1bb-0x0;var _0x39e424=_0x20c3[_0x4ef1bb];return _0x39e424;};'use strict';var client=require(_0x320c('0x0'));exports[_0x320c('0x1')]=function(_0x32441b,_0x54ea8e){return client[_0x320c('0x2')](_0x320c('0x3'),{'body':_0x54ea8e,'options':{'where':{'id':_0x32441b}},'log':_0x320c('0x4')});};exports['addTags']=function(_0x2af1be,_0x582cdf){return client[_0x320c('0x2')](_0x320c('0x5'),{'body':_0x582cdf,'options':{'where':{'id':_0x2af1be}},'log':_0x320c('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailMessage.js b/server/services/routing/rpc/mailMessage.js index 860e660..60d643e 100644 --- a/server/services/routing/rpc/mailMessage.js +++ b/server/services/routing/rpc/mailMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xee6e=['CreateMailMessage','createMailMessage','../client','create','Request'];(function(_0x55dcef,_0x13de5c){var _0x40e2e7=function(_0x1eed20){while(--_0x1eed20){_0x55dcef['push'](_0x55dcef['shift']());}};_0x40e2e7(++_0x13de5c);}(_0xee6e,0x75));var _0xeee6=function(_0x29e0c8,_0x41a939){_0x29e0c8=_0x29e0c8-0x0;var _0x2e356f=_0xee6e[_0x29e0c8];return _0x2e356f;};'use strict';var client=require(_0xeee6('0x0'));exports[_0xeee6('0x1')]=function(_0x41137c){return client[_0xeee6('0x2')](_0xeee6('0x3'),{'body':_0x41137c,'log':_0xeee6('0x4')});}; \ No newline at end of file +var _0xc701=['../client','create','Request'];(function(_0x33ce40,_0x56016a){var _0x40a535=function(_0x153e51){while(--_0x153e51){_0x33ce40['push'](_0x33ce40['shift']());}};_0x40a535(++_0x56016a);}(_0xc701,0x168));var _0x1c70=function(_0x332ff9,_0x2a6021){_0x332ff9=_0x332ff9-0x0;var _0x11ca93=_0xc701[_0x332ff9];return _0x11ca93;};'use strict';var client=require(_0x1c70('0x0'));exports[_0x1c70('0x1')]=function(_0x4defe8){return client[_0x1c70('0x2')]('CreateMailMessage',{'body':_0x4defe8,'log':'createMailMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueue.js b/server/services/routing/rpc/mailQueue.js index 98b91bb..0f2edd0 100644 --- a/server/services/routing/rpc/mailQueue.js +++ b/server/services/routing/rpc/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c36=['../client','getMailQueues','Request','name','timeout','strategy','User','Agents','mailPause'];(function(_0x1ab313,_0x12bccc){var _0x2d73f4=function(_0x225f28){while(--_0x225f28){_0x1ab313['push'](_0x1ab313['shift']());}};_0x2d73f4(++_0x12bccc);}(_0x9c36,0x117));var _0x69c3=function(_0xd39e58,_0xe2c0ec){_0xd39e58=_0xd39e58-0x0;var _0x3664ea=_0x9c36[_0xd39e58];return _0x3664ea;};'use strict';var client=require(_0x69c3('0x0'));exports[_0x69c3('0x1')]=function(){return function(){return client[_0x69c3('0x2')]('GetMailQueue',{'options':{'raw':![],'attributes':['id',_0x69c3('0x3'),_0x69c3('0x4'),_0x69c3('0x5')],'include':[{'model':_0x69c3('0x6'),'as':_0x69c3('0x7'),'attributes':['id','name','online',_0x69c3('0x8')]}]},'log':'getMailQueues'});};}; \ No newline at end of file +var _0xb03b=['Request','GetMailQueue','timeout','strategy','User','Agents','name','online','mailPause','../client','getMailQueues'];(function(_0x5655fd,_0x2f47af){var _0x3a9e68=function(_0x2ca508){while(--_0x2ca508){_0x5655fd['push'](_0x5655fd['shift']());}};_0x3a9e68(++_0x2f47af);}(_0xb03b,0x77));var _0xbb03=function(_0x570ab6,_0xb3d513){_0x570ab6=_0x570ab6-0x0;var _0x4a66d5=_0xb03b[_0x570ab6];return _0x4a66d5;};'use strict';var client=require(_0xbb03('0x0'));exports[_0xbb03('0x1')]=function(){return function(){return client[_0xbb03('0x2')](_0xbb03('0x3'),{'options':{'raw':![],'attributes':['id','name',_0xbb03('0x4'),_0xbb03('0x5')],'include':[{'model':_0xbb03('0x6'),'as':_0xbb03('0x7'),'attributes':['id',_0xbb03('0x8'),_0xbb03('0x9'),_0xbb03('0xa')]}]},'log':_0xbb03('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueueReport.js b/server/services/routing/rpc/mailQueueReport.js index d895f91..124f859 100644 --- a/server/services/routing/rpc/mailQueueReport.js +++ b/server/services/routing/rpc/mailQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5687=['update','Request','UpdateMailQueueReport','DESC','../client','CreateMailQueueReport'];(function(_0x161714,_0x5373c0){var _0x145f39=function(_0xac262){while(--_0xac262){_0x161714['push'](_0x161714['shift']());}};_0x145f39(++_0x5373c0);}(_0x5687,0xca));var _0x7568=function(_0xf6b560,_0x2b637a){_0xf6b560=_0xf6b560-0x0;var _0x49562f=_0x5687[_0xf6b560];return _0x49562f;};'use strict';var client=require(_0x7568('0x0'));exports['create']=function(_0x45a6ca){return client['Request'](_0x7568('0x1'),{'body':_0x45a6ca,'log':'CreateMailQueueReport'});};exports[_0x7568('0x2')]=function(_0x3038f1,_0x4b7b3d){return client[_0x7568('0x3')](_0x7568('0x4'),{'body':_0x4b7b3d,'options':{'where':{'uniqueid':_0x3038f1},'order':[['id',_0x7568('0x5')]],'limit':0x1},'log':'UpdateMailQueueReport'});}; \ No newline at end of file +var _0x994a=['create','Request','CreateMailQueueReport','update','UpdateMailQueueReport','../client'];(function(_0x3b2c8e,_0x53910b){var _0x3ebe3d=function(_0x57220b){while(--_0x57220b){_0x3b2c8e['push'](_0x3b2c8e['shift']());}};_0x3ebe3d(++_0x53910b);}(_0x994a,0xef));var _0xa994=function(_0x488ed9,_0x4dd310){_0x488ed9=_0x488ed9-0x0;var _0x14b8ff=_0x994a[_0x488ed9];return _0x14b8ff;};'use strict';var client=require(_0xa994('0x0'));exports[_0xa994('0x1')]=function(_0x1a7a73){return client[_0xa994('0x2')](_0xa994('0x3'),{'body':_0x1a7a73,'log':_0xa994('0x3')});};exports[_0xa994('0x4')]=function(_0x457639,_0xb3bf18){return client[_0xa994('0x2')]('UpdateMailQueueReport',{'body':_0xb3bf18,'options':{'where':{'uniqueid':_0x457639},'order':[['id','DESC']],'limit':0x1},'log':_0xa994('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelInteraction.js b/server/services/routing/rpc/openchannelInteraction.js index dbff471..228cd12 100644 --- a/server/services/routing/rpc/openchannelInteraction.js +++ b/server/services/routing/rpc/openchannelInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1a23=['addTags','AddTagsToOpenchannelInteraction','addTagsToChatInteraction','../client','update','Request','UpdateOpenchannelInteraction'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x1a23,0x96));var _0x31a2=function(_0x86de53,_0x2a2bd9){_0x86de53=_0x86de53-0x0;var _0x573f28=_0x1a23[_0x86de53];return _0x573f28;};'use strict';var client=require(_0x31a2('0x0'));exports[_0x31a2('0x1')]=function(_0x397b6d,_0x8663e1){return client[_0x31a2('0x2')](_0x31a2('0x3'),{'body':_0x8663e1,'options':{'where':{'id':_0x397b6d}},'log':'updateOpenchannelInteraction'});};exports[_0x31a2('0x4')]=function(_0x311869,_0x5854ba){return client[_0x31a2('0x2')](_0x31a2('0x5'),{'body':_0x5854ba,'options':{'where':{'id':_0x311869}},'log':_0x31a2('0x6')});}; \ No newline at end of file +var _0x425c=['Request','updateOpenchannelInteraction','addTags','AddTagsToOpenchannelInteraction','addTagsToChatInteraction','../client','update'];(function(_0x47b58b,_0x41a189){var _0x46bebe=function(_0x22bbfa){while(--_0x22bbfa){_0x47b58b['push'](_0x47b58b['shift']());}};_0x46bebe(++_0x41a189);}(_0x425c,0xa6));var _0xc425=function(_0x122096,_0x60c295){_0x122096=_0x122096-0x0;var _0x3d1966=_0x425c[_0x122096];return _0x3d1966;};'use strict';var client=require(_0xc425('0x0'));exports[_0xc425('0x1')]=function(_0x5d0028,_0x5de88d){return client[_0xc425('0x2')]('UpdateOpenchannelInteraction',{'body':_0x5de88d,'options':{'where':{'id':_0x5d0028}},'log':_0xc425('0x3')});};exports[_0xc425('0x4')]=function(_0xbc0233,_0x1d1120){return client[_0xc425('0x2')](_0xc425('0x5'),{'body':_0x1d1120,'options':{'where':{'id':_0xbc0233}},'log':_0xc425('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelMessage.js b/server/services/routing/rpc/openchannelMessage.js index 9ae62b6..a0764d5 100644 --- a/server/services/routing/rpc/openchannelMessage.js +++ b/server/services/routing/rpc/openchannelMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0bb5=['../client','create','CreateOpenchannelMessage','createOpenchannelMessage'];(function(_0x535e1e,_0x2b3930){var _0x5161d2=function(_0x4296ba){while(--_0x4296ba){_0x535e1e['push'](_0x535e1e['shift']());}};_0x5161d2(++_0x2b3930);}(_0x0bb5,0x148));var _0x50bb=function(_0x31437a,_0x3d97d0){_0x31437a=_0x31437a-0x0;var _0x440658=_0x0bb5[_0x31437a];return _0x440658;};'use strict';var client=require(_0x50bb('0x0'));exports[_0x50bb('0x1')]=function(_0x5e61cf){return client['Request'](_0x50bb('0x2'),{'body':_0x5e61cf,'log':_0x50bb('0x3')});}; \ No newline at end of file +var _0xf109=['../client','create'];(function(_0x33aded,_0x173eb7){var _0x3e1558=function(_0x4d6e8c){while(--_0x4d6e8c){_0x33aded['push'](_0x33aded['shift']());}};_0x3e1558(++_0x173eb7);}(_0xf109,0xce));var _0x9f10=function(_0x346737,_0x3e6081){_0x346737=_0x346737-0x0;var _0x1ade2e=_0xf109[_0x346737];return _0x1ade2e;};'use strict';var client=require(_0x9f10('0x0'));exports[_0x9f10('0x1')]=function(_0x44c4f2){return client['Request']('CreateOpenchannelMessage',{'body':_0x44c4f2,'log':'createOpenchannelMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueue.js b/server/services/routing/rpc/openchannelQueue.js index 10fba66..ffe1414 100644 --- a/server/services/routing/rpc/openchannelQueue.js +++ b/server/services/routing/rpc/openchannelQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b9f=['Request','name','strategy','User','Agents','online','openchannelPause','getOpenchannelQueues'];(function(_0x44fd4c,_0x101855){var _0x3ffc14=function(_0xffc8c9){while(--_0xffc8c9){_0x44fd4c['push'](_0x44fd4c['shift']());}};_0x3ffc14(++_0x101855);}(_0x3b9f,0xf8));var _0xf3b9=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x3b9f[_0x122ef9];return _0x42fba0;};'use strict';var client=require('../client');exports['getOpenchannelQueues']=function(){return function(){return client[_0xf3b9('0x0')]('GetOpenchannelQueue',{'options':{'raw':![],'attributes':['id',_0xf3b9('0x1'),'timeout',_0xf3b9('0x2')],'include':[{'model':_0xf3b9('0x3'),'as':_0xf3b9('0x4'),'attributes':['id','name',_0xf3b9('0x5'),_0xf3b9('0x6')]}]},'log':_0xf3b9('0x7')});};}; \ No newline at end of file +var _0x04d6=['../client','getOpenchannelQueues','GetOpenchannelQueue','name','timeout','strategy','User','Agents','openchannelPause'];(function(_0x335e20,_0x3b998c){var _0x410b0f=function(_0x5c4075){while(--_0x5c4075){_0x335e20['push'](_0x335e20['shift']());}};_0x410b0f(++_0x3b998c);}(_0x04d6,0x15f));var _0x604d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x04d6[_0x20a584];return _0x4b41a8;};'use strict';var client=require(_0x604d('0x0'));exports[_0x604d('0x1')]=function(){return function(){return client['Request'](_0x604d('0x2'),{'options':{'raw':![],'attributes':['id',_0x604d('0x3'),_0x604d('0x4'),_0x604d('0x5')],'include':[{'model':_0x604d('0x6'),'as':_0x604d('0x7'),'attributes':['id',_0x604d('0x3'),'online',_0x604d('0x8')]}]},'log':'getOpenchannelQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueueReport.js b/server/services/routing/rpc/openchannelQueueReport.js index cfd7fba..3b7ca2e 100644 --- a/server/services/routing/rpc/openchannelQueueReport.js +++ b/server/services/routing/rpc/openchannelQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5584=['update','DESC','UpdateOpenchannelQueueReport','../client','create','Request','CreateOpenchannelQueueReport'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x5584,0x122));var _0x4558=function(_0x3035b5,_0x1e009c){_0x3035b5=_0x3035b5-0x0;var _0x3cbf66=_0x5584[_0x3035b5];return _0x3cbf66;};'use strict';var client=require(_0x4558('0x0'));exports[_0x4558('0x1')]=function(_0x37ed7b){return client[_0x4558('0x2')](_0x4558('0x3'),{'body':_0x37ed7b,'log':_0x4558('0x3')});};exports[_0x4558('0x4')]=function(_0x4e61f4,_0x3066ee){return client['Request']('UpdateOpenchannelQueueReport',{'body':_0x3066ee,'options':{'where':{'uniqueid':_0x4e61f4},'order':[['id',_0x4558('0x5')]],'limit':0x1},'log':_0x4558('0x6')});}; \ No newline at end of file +var _0x322e=['CreateOpenchannelQueueReport','update','UpdateOpenchannelQueueReport','DESC','../client','create','Request'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x322e,0x177));var _0xe322=function(_0xaa8797,_0x426785){_0xaa8797=_0xaa8797-0x0;var _0x50353d=_0x322e[_0xaa8797];return _0x50353d;};'use strict';var client=require(_0xe322('0x0'));exports[_0xe322('0x1')]=function(_0x20b1f5){return client[_0xe322('0x2')](_0xe322('0x3'),{'body':_0x20b1f5,'log':_0xe322('0x3')});};exports[_0xe322('0x4')]=function(_0x3a4b59,_0x303b50){return client[_0xe322('0x2')](_0xe322('0x5'),{'body':_0x303b50,'options':{'where':{'uniqueid':_0x3a4b59},'order':[['id',_0xe322('0x6')]],'limit':0x1},'log':_0xe322('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsInteraction.js b/server/services/routing/rpc/smsInteraction.js index 925158a..182fd43 100644 --- a/server/services/routing/rpc/smsInteraction.js +++ b/server/services/routing/rpc/smsInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb403=['Request','UpdateSmsInteraction','updateSmsInteraction','addTags','AddTagsToSmsInteraction','addTagsToSmsInteraction','../client','update'];(function(_0xb7a68d,_0x165077){var _0x4a9e91=function(_0x4d8984){while(--_0x4d8984){_0xb7a68d['push'](_0xb7a68d['shift']());}};_0x4a9e91(++_0x165077);}(_0xb403,0x15e));var _0x3b40=function(_0x4f6afc,_0x4dfa88){_0x4f6afc=_0x4f6afc-0x0;var _0x256eeb=_0xb403[_0x4f6afc];return _0x256eeb;};'use strict';var client=require(_0x3b40('0x0'));exports[_0x3b40('0x1')]=function(_0x3a92b7,_0x10f26c){return client[_0x3b40('0x2')](_0x3b40('0x3'),{'body':_0x10f26c,'options':{'where':{'id':_0x3a92b7}},'log':_0x3b40('0x4')});};exports[_0x3b40('0x5')]=function(_0x992302,_0x5d56d7){return client[_0x3b40('0x2')](_0x3b40('0x6'),{'body':_0x5d56d7,'options':{'where':{'id':_0x992302}},'log':_0x3b40('0x7')});}; \ No newline at end of file +var _0xc5ce=['Request','UpdateSmsInteraction','updateSmsInteraction','addTags','AddTagsToSmsInteraction','addTagsToSmsInteraction','update'];(function(_0xfdeae5,_0x3aa003){var _0x398b51=function(_0x51817b){while(--_0x51817b){_0xfdeae5['push'](_0xfdeae5['shift']());}};_0x398b51(++_0x3aa003);}(_0xc5ce,0x7d));var _0xec5c=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xc5ce[_0xfae23b];return _0x200640;};'use strict';var client=require('../client');exports[_0xec5c('0x0')]=function(_0x51f9da,_0x45cecb){return client[_0xec5c('0x1')](_0xec5c('0x2'),{'body':_0x45cecb,'options':{'where':{'id':_0x51f9da}},'log':_0xec5c('0x3')});};exports[_0xec5c('0x4')]=function(_0x5a4a31,_0x4180cd){return client[_0xec5c('0x1')](_0xec5c('0x5'),{'body':_0x4180cd,'options':{'where':{'id':_0x5a4a31}},'log':_0xec5c('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsMessage.js b/server/services/routing/rpc/smsMessage.js index 82e597a..2382b4e 100644 --- a/server/services/routing/rpc/smsMessage.js +++ b/server/services/routing/rpc/smsMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc748=['Request','CreateSmsMessage','createSmsMessage','create'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xc748,0x137));var _0x8c74=function(_0x1a21ff,_0x4a7550){_0x1a21ff=_0x1a21ff-0x0;var _0x25afc1=_0xc748[_0x1a21ff];return _0x25afc1;};'use strict';var client=require('../client');exports[_0x8c74('0x0')]=function(_0x4ae0ef){return client[_0x8c74('0x1')](_0x8c74('0x2'),{'body':_0x4ae0ef,'log':_0x8c74('0x3')});}; \ No newline at end of file +var _0xd72b=['CreateSmsMessage','createSmsMessage','../client','create','Request'];(function(_0x5d7686,_0x5d11b1){var _0x408ab4=function(_0x424411){while(--_0x424411){_0x5d7686['push'](_0x5d7686['shift']());}};_0x408ab4(++_0x5d11b1);}(_0xd72b,0x1ba));var _0xbd72=function(_0x1a0a14,_0x33f734){_0x1a0a14=_0x1a0a14-0x0;var _0x588fd1=_0xd72b[_0x1a0a14];return _0x588fd1;};'use strict';var client=require(_0xbd72('0x0'));exports[_0xbd72('0x1')]=function(_0x3ed6e9){return client[_0xbd72('0x2')](_0xbd72('0x3'),{'body':_0x3ed6e9,'log':_0xbd72('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueue.js b/server/services/routing/rpc/smsQueue.js index 62501d1..955ed22 100644 --- a/server/services/routing/rpc/smsQueue.js +++ b/server/services/routing/rpc/smsQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xee2f=['Agents','name','online','smsPause','../client','getSmsQueues','Request','timeout','strategy','User'];(function(_0x18546c,_0x4daf94){var _0x46ef43=function(_0x559377){while(--_0x559377){_0x18546c['push'](_0x18546c['shift']());}};_0x46ef43(++_0x4daf94);}(_0xee2f,0x11c));var _0xfee2=function(_0x5c6daf,_0x333aec){_0x5c6daf=_0x5c6daf-0x0;var _0x21f4bc=_0xee2f[_0x5c6daf];return _0x21f4bc;};'use strict';var client=require(_0xfee2('0x0'));exports[_0xfee2('0x1')]=function(){return function(){return client[_0xfee2('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id','name',_0xfee2('0x3'),_0xfee2('0x4')],'include':[{'model':_0xfee2('0x5'),'as':_0xfee2('0x6'),'attributes':['id',_0xfee2('0x7'),_0xfee2('0x8'),_0xfee2('0x9')]}]},'log':_0xfee2('0x1')});};}; \ No newline at end of file +var _0x3e5a=['smsPause','getSmsQueues','../client','Request','GetSmsQueue','name','timeout','strategy','User','Agents'];(function(_0xd3da2a,_0x22241c){var _0x10ab61=function(_0x12b964){while(--_0x12b964){_0xd3da2a['push'](_0xd3da2a['shift']());}};_0x10ab61(++_0x22241c);}(_0x3e5a,0x12e));var _0xa3e5=function(_0x339d1d,_0x203feb){_0x339d1d=_0x339d1d-0x0;var _0x3536bf=_0x3e5a[_0x339d1d];return _0x3536bf;};'use strict';var client=require(_0xa3e5('0x0'));exports['getSmsQueues']=function(){return function(){return client[_0xa3e5('0x1')](_0xa3e5('0x2'),{'options':{'raw':![],'attributes':['id',_0xa3e5('0x3'),_0xa3e5('0x4'),_0xa3e5('0x5')],'include':[{'model':_0xa3e5('0x6'),'as':_0xa3e5('0x7'),'attributes':['id','name','online',_0xa3e5('0x8')]}]},'log':_0xa3e5('0x9')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueueReport.js b/server/services/routing/rpc/smsQueueReport.js index da3ae21..0a2e8ce 100644 --- a/server/services/routing/rpc/smsQueueReport.js +++ b/server/services/routing/rpc/smsQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe93=['create','Request','CreateSmsQueueReport','update','DESC','UpdateSmsQueueReport','../client'];(function(_0x50d7f8,_0x10b533){var _0xee409a=function(_0x701fd2){while(--_0x701fd2){_0x50d7f8['push'](_0x50d7f8['shift']());}};_0xee409a(++_0x10b533);}(_0xfe93,0xf4));var _0x3fe9=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xfe93[_0x2be8c2];return _0x97f531;};'use strict';var client=require(_0x3fe9('0x0'));exports[_0x3fe9('0x1')]=function(_0x57c6ac){return client[_0x3fe9('0x2')](_0x3fe9('0x3'),{'body':_0x57c6ac,'log':_0x3fe9('0x3')});};exports[_0x3fe9('0x4')]=function(_0x1247d9,_0x16f2b8){return client['Request']('UpdateSmsQueueReport',{'body':_0x16f2b8,'options':{'where':{'uniqueid':_0x1247d9},'order':[['id',_0x3fe9('0x5')]],'limit':0x1},'log':_0x3fe9('0x6')});}; \ No newline at end of file +var _0x73a1=['update','DESC','UpdateSmsQueueReport','Request','CreateSmsQueueReport'];(function(_0x40a2dd,_0x7898c7){var _0x1d21d6=function(_0x4055b8){while(--_0x4055b8){_0x40a2dd['push'](_0x40a2dd['shift']());}};_0x1d21d6(++_0x7898c7);}(_0x73a1,0x161));var _0x173a=function(_0x3e25c1,_0x1d15f9){_0x3e25c1=_0x3e25c1-0x0;var _0x52e7f2=_0x73a1[_0x3e25c1];return _0x52e7f2;};'use strict';var client=require('../client');exports['create']=function(_0x25c3a3){return client[_0x173a('0x0')]('CreateSmsQueueReport',{'body':_0x25c3a3,'log':_0x173a('0x1')});};exports[_0x173a('0x2')]=function(_0xeec920,_0xf2a2c8){return client[_0x173a('0x0')]('UpdateSmsQueueReport',{'body':_0xf2a2c8,'options':{'where':{'uniqueid':_0xeec920},'order':[['id',_0x173a('0x3')]],'limit':0x1},'log':_0x173a('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/user.js b/server/services/routing/rpc/user.js index 92b73f4..f92ff32 100644 --- a/server/services/routing/rpc/user.js +++ b/server/services/routing/rpc/user.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fe0=['online','pauseType','mailPause','faxPause','smsPause','whatsappPause','openchannelPause','chatCapacity','mailCapacity','smsCapacity','whatsappCapacity','../client','getAgents','Request','GetUser','agent','name'];(function(_0x245d0b,_0x2c27d8){var _0xc4d061=function(_0x3f481c){while(--_0x3f481c){_0x245d0b['push'](_0x245d0b['shift']());}};_0xc4d061(++_0x2c27d8);}(_0x7fe0,0x14e));var _0x07fe=function(_0x24a35b,_0x1d7cfa){_0x24a35b=_0x24a35b-0x0;var _0x1ac632=_0x7fe0[_0x24a35b];return _0x1ac632;};'use strict';var client=require(_0x07fe('0x0'));exports[_0x07fe('0x1')]=function(){return function(){return client[_0x07fe('0x2')](_0x07fe('0x3'),{'options':{'raw':!![],'where':{'role':_0x07fe('0x4')},'attributes':['id',_0x07fe('0x5'),_0x07fe('0x6'),_0x07fe('0x7'),'lastPauseAt','voicePause','chatPause',_0x07fe('0x8'),_0x07fe('0x9'),_0x07fe('0xa'),_0x07fe('0xb'),_0x07fe('0xc'),_0x07fe('0xd'),_0x07fe('0xe'),'faxCapacity',_0x07fe('0xf'),_0x07fe('0x10'),'openchannelCapacity']},'log':_0x07fe('0x1')});};}; \ No newline at end of file +var _0x6386=['whatsappPause','faxCapacity','smsCapacity','whatsappCapacity','getAgents','Request','GetUser','name','online','pauseType','chatPause','faxPause','smsPause'];(function(_0x495054,_0x304104){var _0x146d2e=function(_0x350426){while(--_0x350426){_0x495054['push'](_0x495054['shift']());}};_0x146d2e(++_0x304104);}(_0x6386,0x197));var _0x6638=function(_0x40b032,_0xe41c4b){_0x40b032=_0x40b032-0x0;var _0x3ffbda=_0x6386[_0x40b032];return _0x3ffbda;};'use strict';var client=require('../client');exports[_0x6638('0x0')]=function(){return function(){return client[_0x6638('0x1')](_0x6638('0x2'),{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x6638('0x3'),_0x6638('0x4'),_0x6638('0x5'),'lastPauseAt','voicePause',_0x6638('0x6'),'mailPause',_0x6638('0x7'),_0x6638('0x8'),_0x6638('0x9'),'openchannelPause','chatCapacity','mailCapacity',_0x6638('0xa'),_0x6638('0xb'),_0x6638('0xc'),'openchannelCapacity']},'log':_0x6638('0x0')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappInteraction.js b/server/services/routing/rpc/whatsappInteraction.js index 4d53198..120431e 100644 --- a/server/services/routing/rpc/whatsappInteraction.js +++ b/server/services/routing/rpc/whatsappInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb32d=['../client','update','Request','addTags','AddTagsToWhatsappInteraction','addTagsToWhatsappInteraction'];(function(_0x15bcc9,_0x1ceef8){var _0x57a290=function(_0x1345a7){while(--_0x1345a7){_0x15bcc9['push'](_0x15bcc9['shift']());}};_0x57a290(++_0x1ceef8);}(_0xb32d,0x1da));var _0xdb32=function(_0x2ddd52,_0x4e3b17){_0x2ddd52=_0x2ddd52-0x0;var _0x4bb4ec=_0xb32d[_0x2ddd52];return _0x4bb4ec;};'use strict';var client=require(_0xdb32('0x0'));exports[_0xdb32('0x1')]=function(_0x2d50e1,_0x7c2c59){return client[_0xdb32('0x2')]('UpdateWhatsappInteraction',{'body':_0x7c2c59,'options':{'where':{'id':_0x2d50e1}},'log':'updateWhatsappInteraction'});};exports[_0xdb32('0x3')]=function(_0x2c5527,_0x581ceb){return client[_0xdb32('0x2')](_0xdb32('0x4'),{'body':_0x581ceb,'options':{'where':{'id':_0x2c5527}},'log':_0xdb32('0x5')});}; \ No newline at end of file +var _0x919e=['addTags','AddTagsToWhatsappInteraction','addTagsToWhatsappInteraction','../client','update','Request'];(function(_0x1d3366,_0x335df9){var _0x4ed3a0=function(_0x34bb84){while(--_0x34bb84){_0x1d3366['push'](_0x1d3366['shift']());}};_0x4ed3a0(++_0x335df9);}(_0x919e,0x1d7));var _0xe919=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x919e[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xe919('0x0'));exports[_0xe919('0x1')]=function(_0x24d2f4,_0x5d7d06){return client[_0xe919('0x2')]('UpdateWhatsappInteraction',{'body':_0x5d7d06,'options':{'where':{'id':_0x24d2f4}},'log':'updateWhatsappInteraction'});};exports[_0xe919('0x3')]=function(_0x3a1192,_0x2bf552){return client[_0xe919('0x2')](_0xe919('0x4'),{'body':_0x2bf552,'options':{'where':{'id':_0x3a1192}},'log':_0xe919('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappMessage.js b/server/services/routing/rpc/whatsappMessage.js index 1e8255b..4b31354 100644 --- a/server/services/routing/rpc/whatsappMessage.js +++ b/server/services/routing/rpc/whatsappMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfc8a=['../client','create','Request','createWhatsappMessage'];(function(_0x92c450,_0x41f1e3){var _0x2a9599=function(_0x4f27df){while(--_0x4f27df){_0x92c450['push'](_0x92c450['shift']());}};_0x2a9599(++_0x41f1e3);}(_0xfc8a,0xc4));var _0xafc8=function(_0x322246,_0x21d668){_0x322246=_0x322246-0x0;var _0x3b29f4=_0xfc8a[_0x322246];return _0x3b29f4;};'use strict';var client=require(_0xafc8('0x0'));exports[_0xafc8('0x1')]=function(_0x13f5d9){return client[_0xafc8('0x2')]('CreateWhatsappMessage',{'body':_0x13f5d9,'log':_0xafc8('0x3')});}; \ No newline at end of file +var _0x66b3=['createWhatsappMessage','create','Request','CreateWhatsappMessage'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x66b3,0x181));var _0x366b=function(_0x59e223,_0x430a2c){_0x59e223=_0x59e223-0x0;var _0xcbf87e=_0x66b3[_0x59e223];return _0xcbf87e;};'use strict';var client=require('../client');exports[_0x366b('0x0')]=function(_0x34e7af){return client[_0x366b('0x1')](_0x366b('0x2'),{'body':_0x34e7af,'log':_0x366b('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueue.js b/server/services/routing/rpc/whatsappQueue.js index 09da011..0afb890 100644 --- a/server/services/routing/rpc/whatsappQueue.js +++ b/server/services/routing/rpc/whatsappQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1775=['strategy','User','Agents','online','whatsappPause','getWhatsappQueues','Request','GetWhatsappQueue','name','timeout'];(function(_0x457d45,_0x1802b9){var _0x765bc9=function(_0x583387){while(--_0x583387){_0x457d45['push'](_0x457d45['shift']());}};_0x765bc9(++_0x1802b9);}(_0x1775,0x1db));var _0x5177=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x1775[_0x17d9e3];return _0x14192d;};'use strict';var client=require('../client');exports[_0x5177('0x0')]=function(){return function(){return client[_0x5177('0x1')](_0x5177('0x2'),{'options':{'raw':![],'attributes':['id',_0x5177('0x3'),_0x5177('0x4'),_0x5177('0x5')],'include':[{'model':_0x5177('0x6'),'as':_0x5177('0x7'),'attributes':['id',_0x5177('0x3'),_0x5177('0x8'),_0x5177('0x9')]}]},'log':_0x5177('0x0')});};}; \ No newline at end of file +var _0xe2cf=['whatsappPause','getWhatsappQueues','GetWhatsappQueue','timeout','strategy','User','Agents','online'];(function(_0x513047,_0x2199c5){var _0x15b779=function(_0x412fd5){while(--_0x412fd5){_0x513047['push'](_0x513047['shift']());}};_0x15b779(++_0x2199c5);}(_0xe2cf,0x1a1));var _0xfe2c=function(_0x1e4f2d,_0x22e2bb){_0x1e4f2d=_0x1e4f2d-0x0;var _0xd05ce5=_0xe2cf[_0x1e4f2d];return _0xd05ce5;};'use strict';var client=require('../client');exports[_0xfe2c('0x0')]=function(){return function(){return client['Request'](_0xfe2c('0x1'),{'options':{'raw':![],'attributes':['id','name',_0xfe2c('0x2'),_0xfe2c('0x3')],'include':[{'model':_0xfe2c('0x4'),'as':_0xfe2c('0x5'),'attributes':['id','name',_0xfe2c('0x6'),_0xfe2c('0x7')]}]},'log':'getWhatsappQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueueReport.js b/server/services/routing/rpc/whatsappQueueReport.js index bbf3b5e..ccfd52c 100644 --- a/server/services/routing/rpc/whatsappQueueReport.js +++ b/server/services/routing/rpc/whatsappQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x57ee=['create','Request','CreateWhatsappQueueReport','update','UpdateWhatsappQueueReport','DESC','../client'];(function(_0x845505,_0x19e5f3){var _0x2513b9=function(_0x10e7af){while(--_0x10e7af){_0x845505['push'](_0x845505['shift']());}};_0x2513b9(++_0x19e5f3);}(_0x57ee,0x1aa));var _0xe57e=function(_0x18a632,_0x484afd){_0x18a632=_0x18a632-0x0;var _0x1f0a0b=_0x57ee[_0x18a632];return _0x1f0a0b;};'use strict';var client=require(_0xe57e('0x0'));exports[_0xe57e('0x1')]=function(_0x585c4f){return client[_0xe57e('0x2')](_0xe57e('0x3'),{'body':_0x585c4f,'log':_0xe57e('0x3')});};exports[_0xe57e('0x4')]=function(_0x8ea51b,_0x1e56d6){return client[_0xe57e('0x2')](_0xe57e('0x5'),{'body':_0x1e56d6,'options':{'where':{'uniqueid':_0x8ea51b},'order':[['id',_0xe57e('0x6')]],'limit':0x1},'log':_0xe57e('0x5')});}; \ No newline at end of file +var _0xad2c=['Request','CreateWhatsappQueueReport','update','UpdateWhatsappQueueReport','DESC','../client','create'];(function(_0x22d58a,_0x361d0f){var _0x342330=function(_0x19c030){while(--_0x19c030){_0x22d58a['push'](_0x22d58a['shift']());}};_0x342330(++_0x361d0f);}(_0xad2c,0x194));var _0xcad2=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xad2c[_0x397e5f];return _0x5302b8;};'use strict';var client=require(_0xcad2('0x0'));exports[_0xcad2('0x1')]=function(_0x1f5d7c){return client[_0xcad2('0x2')](_0xcad2('0x3'),{'body':_0x1f5d7c,'log':_0xcad2('0x3')});};exports[_0xcad2('0x4')]=function(_0x5f2107,_0x1ee947){return client[_0xcad2('0x2')](_0xcad2('0x5'),{'body':_0x1ee947,'options':{'where':{'uniqueid':_0x5f2107},'order':[['id',_0xcad2('0x6')]],'limit':0x1},'log':_0xcad2('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/server/applications/agent.js b/server/services/routing/server/applications/agent.js index 60a5da1..689bbb7 100644 --- a/server/services/routing/server/applications/agent.js +++ b/server/services/routing/server/applications/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d84=['info','format','name','toLowerCase','consequence','validate','error','map','message','find','agents','timeout','createQueue','atimeout','channel','rules','end','close','stop','complete','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','log','[%s][QUEUE]\x20%s','stack','lodash','seq-queue','./strategy','string','number','timeout\x20is\x20a\x20number'];(function(_0x2c994b,_0x4c2871){var _0x17f78c=function(_0x22fb24){while(--_0x22fb24){_0x2c994b['push'](_0x2c994b['shift']());}};_0x17f78c(++_0x4c2871);}(_0x8d84,0x1ba));var _0x48d8=function(_0x63885,_0x5d0a2e){_0x63885=_0x63885-0x0;var _0x4eba18=_0x8d84[_0x63885];return _0x4eba18;};'use strict';var schema=require('validate');var _=require(_0x48d8('0x0'));var util=require('util');var seqqueue=require(_0x48d8('0x1'));var logger=require('../../../../config/logger')('routing');var strategy=require(_0x48d8('0x2'));var queue=schema({'name':{'type':_0x48d8('0x3'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x48d8('0x4'),'message':_0x48d8('0x5')}});function writeLog(_0x487e35,_0x27b9fd,_0x42cb85){return logger[_0x48d8('0x6')](util[_0x48d8('0x7')]('[%s][AGENT][NAME:%s][STATUS:%s]',_0x487e35,_0x27b9fd[_0x48d8('0x8')],_0x42cb85));}function handleFindAgent(_0x3c4f56){return function(_0x3a3b5d){return _0x3a3b5d[_0x48d8('0x8')][_0x48d8('0x9')]()===_0x3c4f56[_0x48d8('0x9')]();};}exports[_0x48d8('0xa')]=function(_0x299f2e,_0x4cbb39,_0x269ce1,_0x574abe){return function(_0x40641b){try{var _0x2246e8={'name':_0x4cbb39[0x0],'timeout':_0x4cbb39[0x1]};var _0x46270e=queue[_0x48d8('0xb')](_0x2246e8,{'typecast':!![]});if(_0x46270e['length']){logger[_0x48d8('0xc')]('[%s][AGENT]\x20%s',_0x299f2e,_[_0x48d8('0xd')](_0x46270e,_0x48d8('0xe'))['join'](',\x20'));_0x40641b['stop']();}else{var _0x5a1038=_[_0x48d8('0xf')](_0x269ce1[_0x48d8('0x10')],handleFindAgent(_0x2246e8[_0x48d8('0x8')]));if(_0x5a1038){var _0x4fff25=(_0x2246e8[_0x48d8('0x11')]||0xa)*0x3e8;var _0x3ed7b1,_0x2fe59f;var _0x5a9d1c=seqqueue[_0x48d8('0x12')](_0x4fff25);_0x5a9d1c['id']=_0x299f2e;_0x5a9d1c[_0x48d8('0x13')]=_0x4fff25;_0x5a9d1c[_0x48d8('0x14')]=_0x574abe[_0x48d8('0x14')];writeLog(_0x299f2e,_0x5a1038,util[_0x48d8('0x7')]('START:%s',_0x4fff25));_0x269ce1[_0x48d8('0x15')][_0x299f2e]['on'](_0x48d8('0x16'),function(){logger['info']('[%s][AGENT]\x20ROUTING\x20STOPPED',_0x299f2e);clearTimeout(_0x2fe59f);_0x2fe59f=undefined;_0x5a9d1c[_0x48d8('0x17')]();if(_0x269ce1[_0x48d8('0x15')][_0x299f2e]){delete _0x269ce1['rules'][_0x299f2e];}_0x40641b[_0x48d8('0x18')]();});_0x269ce1[_0x48d8('0x15')][_0x299f2e]['on'](_0x48d8('0x19'),function(){if(_0x269ce1[_0x48d8('0x15')][_0x299f2e]){delete _0x269ce1[_0x48d8('0x15')][_0x299f2e];}});_0x2fe59f=setTimeout(function(){logger[_0x48d8('0x6')]('[%s][AGENT]\x20ROUTING\x20END',_0x299f2e);clearTimeout(_0x2fe59f);_0x5a9d1c[_0x48d8('0x17')]();_0x40641b[_0x48d8('0x1a')]();},_0x4fff25);strategy[_0x48d8('0x1b')](_0x5a9d1c,_0x5a1038,_0x269ce1,_0x574abe);}else{logger[_0x48d8('0xc')](_0x48d8('0x1c'),_0x299f2e,_0x2246e8[_0x48d8('0x8')]);_0x40641b[_0x48d8('0x18')]();}}}catch(_0x29fb1b){console[_0x48d8('0x1d')](_0x29fb1b);logger[_0x48d8('0xc')](_0x48d8('0x1e'),_0x299f2e,_0x29fb1b[_0x48d8('0x1f')]);_0x40641b[_0x48d8('0x18')]();}};}; \ No newline at end of file +var _0x16bc=['rules','complete','[%s][AGENT]\x20ROUTING\x20END','close','next','[%s][AGENT]\x20agent\x20not\x20found\x20%s','[%s][QUEUE]\x20%s','validate','lodash','util','seq-queue','../../../../config/logger','./strategy','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','info','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence','length','error','map','join','stop','find','createQueue','atimeout','channel','START:%s','end','[%s][AGENT]\x20ROUTING\x20STOPPED'];(function(_0xc2cbce,_0xc5c997){var _0x1bac5e=function(_0x4893bf){while(--_0x4893bf){_0xc2cbce['push'](_0xc2cbce['shift']());}};_0x1bac5e(++_0xc5c997);}(_0x16bc,0x8b));var _0xc16b=function(_0x219e2c,_0x49bdf2){_0x219e2c=_0x219e2c-0x0;var _0x1dee0a=_0x16bc[_0x219e2c];return _0x1dee0a;};'use strict';var schema=require(_0xc16b('0x0'));var _=require(_0xc16b('0x1'));var util=require(_0xc16b('0x2'));var seqqueue=require(_0xc16b('0x3'));var logger=require(_0xc16b('0x4'))('routing');var strategy=require(_0xc16b('0x5'));var queue=schema({'name':{'type':_0xc16b('0x6'),'required':!![],'message':_0xc16b('0x7')},'timeout':{'type':'number','message':'timeout\x20is\x20a\x20number'}});function writeLog(_0x4a1eaf,_0x499ff8,_0x401260){return logger[_0xc16b('0x8')](util[_0xc16b('0x9')](_0xc16b('0xa'),_0x4a1eaf,_0x499ff8[_0xc16b('0xb')],_0x401260));}function handleFindAgent(_0x562a99){return function(_0x556303){return _0x556303['name'][_0xc16b('0xc')]()===_0x562a99[_0xc16b('0xc')]();};}exports[_0xc16b('0xd')]=function(_0x1fe519,_0x31fac1,_0x12dea9,_0x393e1c){return function(_0x41520e){try{var _0x147c45={'name':_0x31fac1[0x0],'timeout':_0x31fac1[0x1]};var _0xae2697=queue[_0xc16b('0x0')](_0x147c45,{'typecast':!![]});if(_0xae2697[_0xc16b('0xe')]){logger[_0xc16b('0xf')]('[%s][AGENT]\x20%s',_0x1fe519,_[_0xc16b('0x10')](_0xae2697,'message')[_0xc16b('0x11')](',\x20'));_0x41520e[_0xc16b('0x12')]();}else{var _0x3a4ca0=_[_0xc16b('0x13')](_0x12dea9['agents'],handleFindAgent(_0x147c45[_0xc16b('0xb')]));if(_0x3a4ca0){var _0x50d12d=(_0x147c45['timeout']||0xa)*0x3e8;var _0x67ba3e,_0x3252d4;var _0x16286b=seqqueue[_0xc16b('0x14')](_0x50d12d);_0x16286b['id']=_0x1fe519;_0x16286b[_0xc16b('0x15')]=_0x50d12d;_0x16286b[_0xc16b('0x16')]=_0x393e1c[_0xc16b('0x16')];writeLog(_0x1fe519,_0x3a4ca0,util[_0xc16b('0x9')](_0xc16b('0x17'),_0x50d12d));_0x12dea9['rules'][_0x1fe519]['on'](_0xc16b('0x18'),function(){logger[_0xc16b('0x8')](_0xc16b('0x19'),_0x1fe519);clearTimeout(_0x3252d4);_0x3252d4=undefined;_0x16286b['close']();if(_0x12dea9[_0xc16b('0x1a')][_0x1fe519]){delete _0x12dea9[_0xc16b('0x1a')][_0x1fe519];}_0x41520e[_0xc16b('0x12')]();});_0x12dea9['rules'][_0x1fe519]['on'](_0xc16b('0x1b'),function(){if(_0x12dea9[_0xc16b('0x1a')][_0x1fe519]){delete _0x12dea9[_0xc16b('0x1a')][_0x1fe519];}});_0x3252d4=setTimeout(function(){logger[_0xc16b('0x8')](_0xc16b('0x1c'),_0x1fe519);clearTimeout(_0x3252d4);_0x16286b[_0xc16b('0x1d')]();_0x41520e[_0xc16b('0x1e')]();},_0x50d12d);strategy['agent'](_0x16286b,_0x3a4ca0,_0x12dea9,_0x393e1c);}else{logger[_0xc16b('0xf')](_0xc16b('0x1f'),_0x1fe519,_0x147c45['name']);_0x41520e['stop']();}}}catch(_0x437604){console['log'](_0x437604);logger[_0xc16b('0xf')](_0xc16b('0x20'),_0x1fe519,_0x437604['stack']);_0x41520e['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/amazonlex.js b/server/services/routing/server/applications/amazonlex.js index 29767b2..30e156d 100644 --- a/server/services/routing/server/applications/amazonlex.js +++ b/server/services/routing/server/applications/amazonlex.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6593=['../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','isNil','interaction','UserId','info','[%s][AMAZONLEX]\x20%s','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','channel','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','isEmpty','body','getMustacheRender','Message','create','then','error','stringify','finally','stop','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','LexRuntime','$LATEST','message','providerName','amazonlex','providerResponse','dialogState','Failed','lodash','moment','aws-sdk','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage'];(function(_0x56338e,_0x444bf7){var _0x346c7d=function(_0x5203f3){while(--_0x5203f3){_0x56338e['push'](_0x56338e['shift']());}};_0x346c7d(++_0x444bf7);}(_0x6593,0xf7));var _0x3659=function(_0x2ed1a0,_0x36acd9){_0x2ed1a0=_0x2ed1a0-0x0;var _0x3d272e=_0x6593[_0x2ed1a0];return _0x3d272e;};'use strict';var _=require(_0x3659('0x0'));var moment=require(_0x3659('0x1'));var AWS=require(_0x3659('0x2'));var utils=require(_0x3659('0x3'));var logger=require(_0x3659('0x4'))(_0x3659('0x5'));var rpc={'chatMessage':require(_0x3659('0x6')),'openchannelMessage':require(_0x3659('0x7')),'mailMessage':require(_0x3659('0x8')),'smsMessage':require(_0x3659('0x9')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0x3659('0xa'))};exports[_0x3659('0xb')]=function(_0x384f30,_0x2f9a2a){return function(_0x4445b0){try{if(!_[_0x3659('0xc')](this[_0x3659('0xd')][_0x3659('0xe')])){logger[_0x3659('0xf')](_0x3659('0x10'),_0x384f30,_0x3659('0x11'));return _0x4445b0[_0x3659('0x12')]();}var _0x52ef2b={'ContactId':this[_0x3659('0x13')]['id'],'sentAt':moment()[_0x3659('0x14')](_0x3659('0x15')),'direction':'out'};if(this['channel']==='sms'||this[_0x3659('0x16')]===_0x3659('0x17')){_0x52ef2b[_0x3659('0x18')]=this[_0x3659('0xd')][_0x3659('0x18')];}var _0x1c1972=this[_0x3659('0x16')];if(_0x1c1972===_0x3659('0x19')){_0x52ef2b[_0x3659('0x1a')]=this[_0x3659('0x1b')]['id'];}else{_0x52ef2b[_[_0x3659('0x1c')](_0x1c1972)+_0x3659('0x1d')]=this['account']['id'];}_0x52ef2b[_[_0x3659('0x1c')](_0x1c1972)+_0x3659('0x1e')]=this[_0x3659('0xd')]['id'];if(this[_0x3659('0xd')][_0x3659('0x1f')]){var _0x4d772e=_0x2f9a2a[0x4];if(!_[_0x3659('0x20')](_0x4d772e)){_0x52ef2b[_0x3659('0x21')]=utils[_0x3659('0x22')](_0x4d772e,this);return rpc[_0x1c1972+_0x3659('0x23')][_0x3659('0x24')](_0x52ef2b)[_0x3659('0x25')](function(_0x189bd0){logger['info'](_0x3659('0x10'),_0x384f30,_0x52ef2b['body']);})['catch'](function(_0x5436ca){logger[_0x3659('0x26')](_0x3659('0x10'),_0x384f30,JSON[_0x3659('0x27')](_0x5436ca));})[_0x3659('0x28')](function(){logger['info']('[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x384f30);_0x4445b0[_0x3659('0x29')]();});}else{logger[_0x3659('0xf')](_0x3659('0x2a'),_0x384f30);_0x4445b0[_0x3659('0x29')]();}}else{var _0x1853b1=this;var _0x575516=new AWS[(_0x3659('0x2b'))]({'accessKeyId':_0x2f9a2a[0x0],'secretAccessKey':_0x2f9a2a[0x1],'region':_0x2f9a2a[0x2]});var _0x5af507={'botAlias':_0x3659('0x2c'),'botName':_0x2f9a2a[0x3],'inputText':this[_0x3659('0x2d')][_0x3659('0x21')],'userId':this[_0x3659('0x16')]+':'+this[_0x3659('0xd')]['id']['toString']()};_0x575516['postText'](_0x5af507,function(_0x4d1141,_0x37f4cc){if(_0x4d1141){logger[_0x3659('0x26')](_0x3659('0x10'),_0x384f30,_0x4d1141[_0x3659('0x2d')]);_0x4445b0[_0x3659('0x12')]();}else if(_0x37f4cc&&_0x37f4cc[_0x3659('0x2d')]){_0x1853b1[_0x3659('0x21')]['amazonlex']=_0x37f4cc;_0x52ef2b['body']=_0x37f4cc[_0x3659('0x2d')];_0x52ef2b[_0x3659('0x2e')]=_0x3659('0x2f');_0x52ef2b[_0x3659('0x30')]=JSON[_0x3659('0x27')](_0x37f4cc);return rpc[_0x1c1972+'Message'][_0x3659('0x24')](_0x52ef2b)[_0x3659('0x25')](function(_0x14c58a){logger[_0x3659('0xf')](_0x3659('0x10'),_0x384f30,_0x52ef2b['body']);if(_0x37f4cc[_0x3659('0x31')]==_0x3659('0x32')){_0x4445b0[_0x3659('0x12')]();}else{_0x4445b0[_0x3659('0x29')]();}})['catch'](function(_0x253025){logger[_0x3659('0x26')](_0x3659('0x10'),_0x384f30,JSON['stringify'](_0x253025));_0x4445b0[_0x3659('0x12')]();});}else{_0x4445b0[_0x3659('0x12')]();}});}}catch(_0x1d7205){logger[_0x3659('0x26')](_0x3659('0x10'),_0x384f30,JSON[_0x3659('0x27')](_0x1d7205));_0x4445b0[_0x3659('0x29')]();}};}; \ No newline at end of file +var _0xa285=['sms','whatsapp','phone','interaction','channel','chat','account','AccountId','upperFirst','InteractionId','body','getMustacheRender','Message','then','catch','error','finally','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','stop','LexRuntime','$LATEST','message','toString','next','providerName','providerResponse','stringify','create','Failed','lodash','moment','./utils','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','isNil','UserId','info','[%s][AMAZONLEX]\x20%s','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','contact','format','YYYY-MM-DD\x20HH:mm:ss','out'];(function(_0x534f7c,_0x3eb489){var _0x5c3e22=function(_0x5dd4a4){while(--_0x5dd4a4){_0x534f7c['push'](_0x534f7c['shift']());}};_0x5c3e22(++_0x3eb489);}(_0xa285,0x80));var _0x5a28=function(_0x4ec8ce,_0xf20520){_0x4ec8ce=_0x4ec8ce-0x0;var _0x75a47c=_0xa285[_0x4ec8ce];return _0x75a47c;};'use strict';var _=require(_0x5a28('0x0'));var moment=require(_0x5a28('0x1'));var AWS=require('aws-sdk');var utils=require(_0x5a28('0x2'));var logger=require(_0x5a28('0x3'))(_0x5a28('0x4'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x5a28('0x5')),'mailMessage':require(_0x5a28('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x5a28('0x7')),'whatsappMessage':require(_0x5a28('0x8'))};exports[_0x5a28('0x9')]=function(_0x2cd6c4,_0x4f0f1b){return function(_0x3b4dc1){try{if(!_[_0x5a28('0xa')](this['interaction'][_0x5a28('0xb')])){logger[_0x5a28('0xc')](_0x5a28('0xd'),_0x2cd6c4,_0x5a28('0xe'));return _0x3b4dc1['next']();}var _0x20be58={'ContactId':this[_0x5a28('0xf')]['id'],'sentAt':moment()[_0x5a28('0x10')](_0x5a28('0x11')),'direction':_0x5a28('0x12')};if(this['channel']===_0x5a28('0x13')||this['channel']===_0x5a28('0x14')){_0x20be58[_0x5a28('0x15')]=this[_0x5a28('0x16')][_0x5a28('0x15')];}var _0x2760f1=this[_0x5a28('0x17')];if(_0x2760f1===_0x5a28('0x18')){_0x20be58['ChatWebsiteId']=this[_0x5a28('0x19')]['id'];}else{_0x20be58[_['upperFirst'](_0x2760f1)+_0x5a28('0x1a')]=this[_0x5a28('0x19')]['id'];}_0x20be58[_[_0x5a28('0x1b')](_0x2760f1)+_0x5a28('0x1c')]=this[_0x5a28('0x16')]['id'];if(this[_0x5a28('0x16')]['created']){var _0x49cdcf=_0x4f0f1b[0x4];if(!_['isEmpty'](_0x49cdcf)){_0x20be58[_0x5a28('0x1d')]=utils[_0x5a28('0x1e')](_0x49cdcf,this);return rpc[_0x2760f1+_0x5a28('0x1f')]['create'](_0x20be58)[_0x5a28('0x20')](function(_0x219a24){logger[_0x5a28('0xc')](_0x5a28('0xd'),_0x2cd6c4,_0x20be58[_0x5a28('0x1d')]);})[_0x5a28('0x21')](function(_0x1a2a31){logger[_0x5a28('0x22')](_0x5a28('0xd'),_0x2cd6c4,JSON['stringify'](_0x1a2a31));})[_0x5a28('0x23')](function(){logger[_0x5a28('0xc')](_0x5a28('0x24'),_0x2cd6c4);_0x3b4dc1['stop']();});}else{logger[_0x5a28('0xc')](_0x5a28('0x25'),_0x2cd6c4);_0x3b4dc1[_0x5a28('0x26')]();}}else{var _0x410186=this;var _0x5efe7b=new AWS[(_0x5a28('0x27'))]({'accessKeyId':_0x4f0f1b[0x0],'secretAccessKey':_0x4f0f1b[0x1],'region':_0x4f0f1b[0x2]});var _0x4f8160={'botAlias':_0x5a28('0x28'),'botName':_0x4f0f1b[0x3],'inputText':this[_0x5a28('0x29')][_0x5a28('0x1d')],'userId':this[_0x5a28('0x17')]+':'+this['interaction']['id'][_0x5a28('0x2a')]()};_0x5efe7b['postText'](_0x4f8160,function(_0x431fb6,_0x547c34){if(_0x431fb6){logger[_0x5a28('0x22')]('[%s][AMAZONLEX]\x20%s',_0x2cd6c4,_0x431fb6[_0x5a28('0x29')]);_0x3b4dc1[_0x5a28('0x2b')]();}else if(_0x547c34&&_0x547c34[_0x5a28('0x29')]){_0x410186[_0x5a28('0x1d')]['amazonlex']=_0x547c34;_0x20be58[_0x5a28('0x1d')]=_0x547c34[_0x5a28('0x29')];_0x20be58[_0x5a28('0x2c')]='amazonlex';_0x20be58[_0x5a28('0x2d')]=JSON[_0x5a28('0x2e')](_0x547c34);return rpc[_0x2760f1+_0x5a28('0x1f')][_0x5a28('0x2f')](_0x20be58)[_0x5a28('0x20')](function(_0x560882){logger[_0x5a28('0xc')](_0x5a28('0xd'),_0x2cd6c4,_0x20be58[_0x5a28('0x1d')]);if(_0x547c34['dialogState']==_0x5a28('0x30')){_0x3b4dc1[_0x5a28('0x2b')]();}else{_0x3b4dc1[_0x5a28('0x26')]();}})[_0x5a28('0x21')](function(_0x54e1c4){logger[_0x5a28('0x22')](_0x5a28('0xd'),_0x2cd6c4,JSON['stringify'](_0x54e1c4));_0x3b4dc1[_0x5a28('0x2b')]();});}else{_0x3b4dc1[_0x5a28('0x2b')]();}});}}catch(_0x548be5){logger[_0x5a28('0x22')]('[%s][AMAZONLEX]\x20%s',_0x2cd6c4,JSON['stringify'](_0x548be5));_0x3b4dc1[_0x5a28('0x26')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/autoreply.js b/server/services/routing/server/applications/autoreply.js index 64b958d..57e6e1c 100644 --- a/server/services/routing/server/applications/autoreply.js +++ b/server/services/routing/server/applications/autoreply.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7550=['sendMailMessage','then','create','catch','error','stringify','finally','stop','lodash','moment','./utils','routing','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','../../mailRpc','isNil','interaction','created','info','[%s][AUTOREPLY]\x20%s','Autoreply\x20already\x20sent','next','channel','getMustacheRender','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','message','phone','subject','startsWith','Re:','Re:\x20','chat','upperFirst','AccountId','InteractionId','Message','mail','account','Smtp','service','host','port','secure','authentication','auth','user','pass','messageId','html','replace','body','','auto-replied','All'];(function(_0x49748c,_0x3d2005){var _0xedf6b6=function(_0x11628d){while(--_0x11628d){_0x49748c['push'](_0x49748c['shift']());}};_0xedf6b6(++_0x3d2005);}(_0x7550,0x12f));var _0x0755=function(_0x216158,_0x345de2){_0x216158=_0x216158-0x0;var _0x5d99d2=_0x7550[_0x216158];return _0x5d99d2;};'use strict';var _=require(_0x0755('0x0'));var moment=require(_0x0755('0x1'));var utils=require(_0x0755('0x2'));var logger=require('../../../../config/logger')(_0x0755('0x3'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x0755('0x4')),'faxMessage':require(_0x0755('0x5')),'whatsappMessage':require(_0x0755('0x6'))};var mailRpc=require(_0x0755('0x7'));exports['consequence']=function(_0x305ff4,_0x2ea8b2){return function(_0x45c9d0){try{if(_0x2ea8b2[0x0]==='1'&&(_[_0x0755('0x8')](this[_0x0755('0x9')][_0x0755('0xa')])||!this[_0x0755('0x9')][_0x0755('0xa')])){logger[_0x0755('0xb')](_0x0755('0xc'),_0x305ff4,_0x0755('0xd'));return _0x45c9d0[_0x0755('0xe')]();}var _0x116522=this[_0x0755('0xf')];var _0x4f008f={'body':utils[_0x0755('0x10')](_0x2ea8b2[0x1],this),'ContactId':this[_0x0755('0x11')]['id'],'sentAt':moment()[_0x0755('0x12')](_0x0755('0x13')),'direction':_0x0755('0x14')};if(this['message']){_0x4f008f['to']=this[_0x0755('0x15')]['from']||'';_0x4f008f['cc']=this['message']['cc']||'';_0x4f008f['from']=this[_0x0755('0x15')]['to']||'';_0x4f008f[_0x0755('0x16')]=this[_0x0755('0x15')][_0x0755('0x16')]||'';_0x4f008f['read']=!![];if(this[_0x0755('0x15')][_0x0755('0x17')]){_0x4f008f[_0x0755('0x17')]='';_0x4f008f[_0x0755('0x17')]+=_[_0x0755('0x18')](this[_0x0755('0x15')]['subject'],_0x0755('0x19'))?'':_0x0755('0x1a');_0x4f008f['subject']+=this[_0x0755('0x15')][_0x0755('0x17')];}}if(this[_0x0755('0xf')]===_0x0755('0x1b')){_0x4f008f['ChatWebsiteId']=this['account']['id'];}else{_0x4f008f[_[_0x0755('0x1c')](this[_0x0755('0xf')])+_0x0755('0x1d')]=this['account']['id'];}_0x4f008f[_[_0x0755('0x1c')](this[_0x0755('0xf')])+_0x0755('0x1e')]=this[_0x0755('0x9')]['id'];if(rpc[this[_0x0755('0xf')]+_0x0755('0x1f')]){if(this[_0x0755('0xf')]===_0x0755('0x20')){var _0x12b495={'tls':{'rejectUnauthorized':![]}};if(this[_0x0755('0x21')][_0x0755('0x22')]['service']){_0x12b495[_0x0755('0x23')]=this[_0x0755('0x21')][_0x0755('0x22')][_0x0755('0x23')];}else{_0x12b495['host']=this['account'][_0x0755('0x22')][_0x0755('0x24')];_0x12b495[_0x0755('0x25')]=this[_0x0755('0x21')][_0x0755('0x22')][_0x0755('0x25')];_0x12b495[_0x0755('0x26')]=this[_0x0755('0x21')]['Smtp'][_0x0755('0x26')];}if(this[_0x0755('0x21')]['Smtp'][_0x0755('0x27')]){_0x12b495[_0x0755('0x28')]={'user':this['account']['Smtp'][_0x0755('0x29')],'pass':this[_0x0755('0x21')][_0x0755('0x22')][_0x0755('0x2a')]};}_0x4f008f['inReplyTo']=this[_0x0755('0x15')][_0x0755('0x2b')];_0x4f008f[_0x0755('0x2c')]=''+_[_0x0755('0x2d')](_0x4f008f[_0x0755('0x2e')],_0x0755('0x2f'),'','replace','';_0x4bf71d['headers']={'Auto-Submitted':_0x2bdc('0x33'),'X-Auto-Response-Suppress':_0x2bdc('0x34'),'Precedence':_0x2bdc('0x35')};return mailRpc[_0x2bdc('0x36')](_0x3af3be,_0x4bf71d)[_0x2bdc('0x37')](function(_0x17817f){logger[_0x2bdc('0xc')](_0x2bdc('0x38'),_0x4bf5cd);_0x4bf71d[_0x2bdc('0x2d')]=_0x17817f[_0x2bdc('0x16')]['messageId'];return rpc[_0x386e58+_0x2bdc('0x39')][_0x2bdc('0x3a')](_0x4bf71d);})[_0x2bdc('0x37')](function(_0x2e0e99){logger[_0x2bdc('0xc')](_0x2bdc('0xd'),_0x4bf5cd,JSON[_0x2bdc('0x3b')](_0x2e0e99));})['catch'](function(_0x2c0d14){logger['error'](_0x2bdc('0x3c'),_0x4bf5cd,JSON['stringify'](_0x2c0d14));})[_0x2bdc('0x3d')](function(){_0x9e129f[_0x2bdc('0xf')]();});}else{return rpc[this[_0x2bdc('0x10')]+_0x2bdc('0x39')]['create'](_0x4bf71d)[_0x2bdc('0x37')](function(_0x22b453){logger['info'](_0x2bdc('0xd'),_0x4bf5cd,_0x4bf71d[_0x2bdc('0x14')]);})[_0x2bdc('0x3e')](function(_0x379232){logger[_0x2bdc('0x3f')]('[%s][AUTOREPLY]\x20%s',_0x4bf5cd,JSON['stringify'](_0x379232));})['finally'](function(){_0x9e129f['next']();});}}}catch(_0x3e63cc){logger[_0x2bdc('0x3f')](_0x2bdc('0xd'),_0x4bf5cd,JSON[_0x2bdc('0x3b')](_0x3e63cc));_0x9e129f['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/close.js b/server/services/routing/server/applications/close.js index 64153a0..8f46df8 100644 --- a/server/services/routing/server/applications/close.js +++ b/server/services/routing/server/applications/close.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfb8f=['../../../../config/logger','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','then','info','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','[%s][CLOSE]\x20%s','stringify','finally','stop'];(function(_0xdf1d42,_0x31d6d5){var _0x1e8978=function(_0x1e8ce8){while(--_0x1e8ce8){_0xdf1d42['push'](_0xdf1d42['shift']());}};_0x1e8978(++_0x31d6d5);}(_0xfb8f,0x18c));var _0xffb8=function(_0x57b29c,_0x2bc516){_0x57b29c=_0x57b29c-0x0;var _0x407fac=_0xfb8f[_0x57b29c];return _0x407fac;};'use strict';var moment=require('moment');var logger=require(_0xffb8('0x0'))('routing');var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0xffb8('0x1')),'smsInteraction':require(_0xffb8('0x2')),'mailInteraction':require(_0xffb8('0x3')),'faxInteraction':require(_0xffb8('0x4')),'whatsappInteraction':require(_0xffb8('0x5'))};exports['consequence']=function(_0x356a11,_0x399708,_0x463cfb,_0x47b1e5){return function(_0x5a70ab){try{logger['info'](_0xffb8('0x6'),_0x356a11,_0x399708[0x0]);var _0xb71c21={'closed':0x1,'closedAt':moment()[_0xffb8('0x7')](_0xffb8('0x8')),'closeReason':_0xffb8('0x9'),'disposition':_0x399708[0x0]};if(rpc[_0x47b1e5['channel']+'Interaction']){rpc[_0x47b1e5[_0xffb8('0xa')]+_0xffb8('0xb')][_0xffb8('0xc')](_0x47b1e5[_0xffb8('0xd')]['id'],_0xb71c21)[_0xffb8('0xe')](function(_0x507f8a){logger[_0xffb8('0xf')](_0xffb8('0x10'),_0x356a11,_0x47b1e5[_0xffb8('0xd')]['id']);})[_0xffb8('0x11')](function(_0x40d9e4){logger['error'](_0xffb8('0x12'),_0x356a11,JSON[_0xffb8('0x13')](_0x40d9e4));})[_0xffb8('0x14')](function(){_0x5a70ab['stop']();});}}catch(_0x79b08b){logger['error']('[%s][CLOSE]\x20%s',_0x356a11,JSON[_0xffb8('0x13')](_0x79b08b));_0x5a70ab[_0xffb8('0x15')]();}};}; \ No newline at end of file +var _0x5db2=['[%s][CLOSE]\x20reason\x20%s','format','channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','stop','moment','../../../../config/logger','routing','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info'];(function(_0x4c1a00,_0xcbd8e5){var _0xe74851=function(_0x2c4253){while(--_0x2c4253){_0x4c1a00['push'](_0x4c1a00['shift']());}};_0xe74851(++_0xcbd8e5);}(_0x5db2,0xf3));var _0x25db=function(_0x199dfd,_0x320a1c){_0x199dfd=_0x199dfd-0x0;var _0x34c290=_0x5db2[_0x199dfd];return _0x34c290;};'use strict';var moment=require(_0x25db('0x0'));var logger=require(_0x25db('0x1'))(_0x25db('0x2'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0x25db('0x3')),'smsInteraction':require(_0x25db('0x4')),'mailInteraction':require(_0x25db('0x5')),'faxInteraction':require(_0x25db('0x6')),'whatsappInteraction':require(_0x25db('0x7'))};exports[_0x25db('0x8')]=function(_0x40e4bc,_0x1d0224,_0x4b9260,_0x248306){return function(_0x497759){try{logger[_0x25db('0x9')](_0x25db('0xa'),_0x40e4bc,_0x1d0224[0x0]);var _0x40f7eb={'closed':0x1,'closedAt':moment()[_0x25db('0xb')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':'system','disposition':_0x1d0224[0x0]};if(rpc[_0x248306[_0x25db('0xc')]+_0x25db('0xd')]){rpc[_0x248306[_0x25db('0xc')]+_0x25db('0xd')][_0x25db('0xe')](_0x248306[_0x25db('0xf')]['id'],_0x40f7eb)[_0x25db('0x10')](function(_0x470d43){logger[_0x25db('0x9')](_0x25db('0x11'),_0x40e4bc,_0x248306[_0x25db('0xf')]['id']);})[_0x25db('0x12')](function(_0x4879c2){logger[_0x25db('0x13')](_0x25db('0x14'),_0x40e4bc,JSON[_0x25db('0x15')](_0x4879c2));})['finally'](function(){_0x497759[_0x25db('0x16')]();});}}catch(_0x1ad722){logger[_0x25db('0x13')](_0x25db('0x14'),_0x40e4bc,JSON[_0x25db('0x15')](_0x1ad722));_0x497759[_0x25db('0x16')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/dialogflow.js b/server/services/routing/server/applications/dialogflow.js index ec5d00e..8e105fc 100644 --- a/server/services/routing/server/applications/dialogflow.js +++ b/server/services/routing/server/applications/dialogflow.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf322=['YYYY-MM-DD\x20HH:mm:ss','channel','sms','whatsapp','phone','account','AccountId','InteractionId','created','isEmpty','body','Message','create','then','catch','finally','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','textRequest','dialogflow','result','fulfillment','speech','providerName','providerResponse','stringify','metadata','endConversation','message','error','lodash','moment','apiai-promise','./utils','../../../../config/logger','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','isNil','interaction','UserId','info','[%s][DIALOGFLOW]\x20%s','next'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xf322,0xac));var _0x2f32=function(_0x50641e,_0x3bc2fe){_0x50641e=_0x50641e-0x0;var _0x426fa1=_0xf322[_0x50641e];return _0x426fa1;};'use strict';var _=require(_0x2f32('0x0'));var moment=require(_0x2f32('0x1'));var apiai=require(_0x2f32('0x2'));var md5=require('md5');var utils=require(_0x2f32('0x3'));var logger=require(_0x2f32('0x4'))('routing');var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x2f32('0x5')),'smsMessage':require(_0x2f32('0x6')),'faxMessage':require(_0x2f32('0x7')),'whatsappMessage':require(_0x2f32('0x8'))};exports[_0x2f32('0x9')]=function(_0x4eb81f,_0x4d3ccf){return function(_0x1e25d1){try{if(!_[_0x2f32('0xa')](this[_0x2f32('0xb')][_0x2f32('0xc')])){logger[_0x2f32('0xd')](_0x2f32('0xe'),_0x4eb81f,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x1e25d1[_0x2f32('0xf')]();}var _0x280c24={'ContactId':this['contact']['id'],'sentAt':moment()['format'](_0x2f32('0x10')),'direction':'out'};if(this[_0x2f32('0x11')]===_0x2f32('0x12')||this[_0x2f32('0x11')]===_0x2f32('0x13')){_0x280c24[_0x2f32('0x14')]=this[_0x2f32('0xb')]['phone'];}var _0x8e4e47=this[_0x2f32('0x11')];if(_0x8e4e47==='chat'){_0x280c24['ChatWebsiteId']=this[_0x2f32('0x15')]['id'];}else{_0x280c24[_['upperFirst'](_0x8e4e47)+_0x2f32('0x16')]=this[_0x2f32('0x15')]['id'];}_0x280c24[_['upperFirst'](_0x8e4e47)+_0x2f32('0x17')]=this['interaction']['id'];if(this['interaction'][_0x2f32('0x18')]){var _0x2f949d=_0x4d3ccf[0x2];if(!_[_0x2f32('0x19')](_0x2f949d)){_0x280c24[_0x2f32('0x1a')]=utils['getMustacheRender'](_0x2f949d,this);return rpc[_0x8e4e47+_0x2f32('0x1b')][_0x2f32('0x1c')](_0x280c24)[_0x2f32('0x1d')](function(_0xa9650c){logger[_0x2f32('0xd')](_0x2f32('0xe'),_0x4eb81f,_0x280c24['body']);})[_0x2f32('0x1e')](function(_0x363725){logger['error'](_0x2f32('0xe'),_0x4eb81f,JSON['stringify'](_0x363725));})[_0x2f32('0x1f')](function(){logger[_0x2f32('0xd')](_0x2f32('0x20'),_0x4eb81f);_0x1e25d1[_0x2f32('0x21')]();});}else{logger[_0x2f32('0xd')](_0x2f32('0x22'),_0x4eb81f);_0x1e25d1['stop']();}}else{var _0x182f56=this;var _0xb5be70=apiai(_0x4d3ccf[0x0],{'language':_0x4d3ccf[0x1]||'en'});return _0xb5be70[_0x2f32('0x23')](this['message']['body'],{'sessionId':md5(this[_0x2f32('0xb')]['id'])})['then'](function(_0x43ae57){_0x182f56[_0x2f32('0x1a')][_0x2f32('0x24')]=_0x43ae57;_0x280c24[_0x2f32('0x1a')]=_0x43ae57[_0x2f32('0x25')][_0x2f32('0x26')][_0x2f32('0x27')];_0x280c24[_0x2f32('0x28')]='dialogflow';_0x280c24[_0x2f32('0x29')]=JSON[_0x2f32('0x2a')](_0x43ae57);return rpc[_0x8e4e47+_0x2f32('0x1b')][_0x2f32('0x1c')](_0x280c24)[_0x2f32('0x1d')](function(_0xdda3ad){logger[_0x2f32('0xd')](_0x2f32('0xe'),_0x4eb81f,_0x280c24[_0x2f32('0x1a')]);if(_0x43ae57[_0x2f32('0x25')][_0x2f32('0x2b')][_0x2f32('0x2c')]){_0x1e25d1[_0x2f32('0xf')]();}else{_0x1e25d1[_0x2f32('0x21')]();}})['catch'](function(_0x207e18){logger['error'](_0x2f32('0xe'),_0x4eb81f,JSON[_0x2f32('0x2a')](_0x207e18));_0x1e25d1[_0x2f32('0xf')]();});})[_0x2f32('0x1e')](function(_0x34277b){logger['error']('[%s][DIALOGFLOW]\x20%s',_0x4eb81f,_0x34277b[_0x2f32('0x2d')]);_0x1e25d1[_0x2f32('0xf')]();});}}catch(_0x33a190){logger[_0x2f32('0x2e')](_0x2f32('0xe'),_0x4eb81f,JSON[_0x2f32('0x2a')](_0x33a190));_0x1e25d1['stop']();}};}; \ No newline at end of file +var _0x4edf=['consequence','isNil','interaction','UserId','info','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','created','isEmpty','getMustacheRender','then','body','catch','error','[%s][DIALOGFLOW]\x20%s','stringify','finally','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','textRequest','result','fulfillment','speech','providerName','providerResponse','Message','metadata','endConversation','next','message','lodash','moment','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage'];(function(_0x2a6809,_0x44edde){var _0x11c371=function(_0x1a4888){while(--_0x1a4888){_0x2a6809['push'](_0x2a6809['shift']());}};_0x11c371(++_0x44edde);}(_0x4edf,0x196));var _0xf4ed=function(_0x13524d,_0x505b49){_0x13524d=_0x13524d-0x0;var _0x9918b4=_0x4edf[_0x13524d];return _0x9918b4;};'use strict';var _=require(_0xf4ed('0x0'));var moment=require(_0xf4ed('0x1'));var apiai=require('apiai-promise');var md5=require('md5');var utils=require(_0xf4ed('0x2'));var logger=require(_0xf4ed('0x3'))(_0xf4ed('0x4'));var rpc={'chatMessage':require(_0xf4ed('0x5')),'openchannelMessage':require(_0xf4ed('0x6')),'mailMessage':require(_0xf4ed('0x7')),'smsMessage':require(_0xf4ed('0x8')),'faxMessage':require(_0xf4ed('0x9')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0xf4ed('0xa')]=function(_0x174d4b,_0x477cb2){return function(_0x2f0995){try{if(!_[_0xf4ed('0xb')](this[_0xf4ed('0xc')][_0xf4ed('0xd')])){logger[_0xf4ed('0xe')]('[%s][DIALOGFLOW]\x20%s',_0x174d4b,_0xf4ed('0xf'));return _0x2f0995['next']();}var _0x2e9388={'ContactId':this[_0xf4ed('0x10')]['id'],'sentAt':moment()[_0xf4ed('0x11')](_0xf4ed('0x12')),'direction':_0xf4ed('0x13')};if(this[_0xf4ed('0x14')]===_0xf4ed('0x15')||this[_0xf4ed('0x14')]===_0xf4ed('0x16')){_0x2e9388[_0xf4ed('0x17')]=this[_0xf4ed('0xc')]['phone'];}var _0x5cc7dd=this[_0xf4ed('0x14')];if(_0x5cc7dd===_0xf4ed('0x18')){_0x2e9388[_0xf4ed('0x19')]=this[_0xf4ed('0x1a')]['id'];}else{_0x2e9388[_[_0xf4ed('0x1b')](_0x5cc7dd)+_0xf4ed('0x1c')]=this[_0xf4ed('0x1a')]['id'];}_0x2e9388[_['upperFirst'](_0x5cc7dd)+'InteractionId']=this[_0xf4ed('0xc')]['id'];if(this[_0xf4ed('0xc')][_0xf4ed('0x1d')]){var _0x32d3bd=_0x477cb2[0x2];if(!_[_0xf4ed('0x1e')](_0x32d3bd)){_0x2e9388['body']=utils[_0xf4ed('0x1f')](_0x32d3bd,this);return rpc[_0x5cc7dd+'Message']['create'](_0x2e9388)[_0xf4ed('0x20')](function(_0x5e03a3){logger['info']('[%s][DIALOGFLOW]\x20%s',_0x174d4b,_0x2e9388[_0xf4ed('0x21')]);})[_0xf4ed('0x22')](function(_0xd196c9){logger[_0xf4ed('0x23')](_0xf4ed('0x24'),_0x174d4b,JSON[_0xf4ed('0x25')](_0xd196c9));})[_0xf4ed('0x26')](function(){logger[_0xf4ed('0xe')](_0xf4ed('0x27'),_0x174d4b);_0x2f0995[_0xf4ed('0x28')]();});}else{logger[_0xf4ed('0xe')]('[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x174d4b);_0x2f0995[_0xf4ed('0x28')]();}}else{var _0x1e0010=this;var _0x20c308=apiai(_0x477cb2[0x0],{'language':_0x477cb2[0x1]||'en'});return _0x20c308[_0xf4ed('0x29')](this['message']['body'],{'sessionId':md5(this[_0xf4ed('0xc')]['id'])})[_0xf4ed('0x20')](function(_0x7dc8fc){_0x1e0010['body']['dialogflow']=_0x7dc8fc;_0x2e9388['body']=_0x7dc8fc[_0xf4ed('0x2a')][_0xf4ed('0x2b')][_0xf4ed('0x2c')];_0x2e9388[_0xf4ed('0x2d')]='dialogflow';_0x2e9388[_0xf4ed('0x2e')]=JSON['stringify'](_0x7dc8fc);return rpc[_0x5cc7dd+_0xf4ed('0x2f')]['create'](_0x2e9388)[_0xf4ed('0x20')](function(_0x4f92b8){logger['info'](_0xf4ed('0x24'),_0x174d4b,_0x2e9388['body']);if(_0x7dc8fc['result'][_0xf4ed('0x30')][_0xf4ed('0x31')]){_0x2f0995[_0xf4ed('0x32')]();}else{_0x2f0995['stop']();}})[_0xf4ed('0x22')](function(_0x6dd95){logger[_0xf4ed('0x23')]('[%s][DIALOGFLOW]\x20%s',_0x174d4b,JSON[_0xf4ed('0x25')](_0x6dd95));_0x2f0995[_0xf4ed('0x32')]();});})[_0xf4ed('0x22')](function(_0x1ca371){logger[_0xf4ed('0x23')](_0xf4ed('0x24'),_0x174d4b,_0x1ca371[_0xf4ed('0x33')]);_0x2f0995[_0xf4ed('0x32')]();});}}catch(_0x244f61){logger[_0xf4ed('0x23')](_0xf4ed('0x24'),_0x174d4b,JSON[_0xf4ed('0x25')](_0x244f61));_0x2f0995['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/dialogflowV2.js b/server/services/routing/server/applications/dialogflowV2.js index 9b8192b..922864f 100644 --- a/server/services/routing/server/applications/dialogflowV2.js +++ b/server/services/routing/server/applications/dialogflowV2.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x43ff=['../../../../config/logger','routing','./utils','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','clone','body','Message','create','then','info','[%s][DIALOGFLOWV2]\x20%s','catch','stringify','isNil','interaction','UserId','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','whatsapp','phone','account','upperFirst','AccountId','created','isEmpty','getMustacheRender','stop','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','replace','SessionsClient','detectIntent','length','dialogflowV2','queryResult','diagnosticInfo','fields','end_conversation','boolValue','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent','DIALOGFLOWV2_INTENTNAME','intent','name','DIALOGFLOWV2_INTENTDISPLAYNAME','isFallback','DIALOGFLOWV2_LANGUAGECODE','languageCode','queryText','DIALOGFLOWV2_SCORE','intentDetectionConfidence','providerName','providerResponse','fulfillmentText','push','all','error','message','lodash','dialogflow','md5','moment'];(function(_0x2d688d,_0x20fa88){var _0x536961=function(_0x199992){while(--_0x199992){_0x2d688d['push'](_0x2d688d['shift']());}};_0x536961(++_0x20fa88);}(_0x43ff,0x164));var _0xf43f=function(_0x2f87cd,_0xcaf299){_0x2f87cd=_0x2f87cd-0x0;var _0x5d7eda=_0x43ff[_0x2f87cd];return _0x5d7eda;};'use strict';var _=require(_0xf43f('0x0'));var dialogflow=require(_0xf43f('0x1'));var md5=require(_0xf43f('0x2'));var moment=require(_0xf43f('0x3'));var Promise=require('bluebird');var logger=require(_0xf43f('0x4'))(_0xf43f('0x5'));var utils=require(_0xf43f('0x6'));var rpc={'chatMessage':require(_0xf43f('0x7')),'openchannelMessage':require(_0xf43f('0x8')),'mailMessage':require(_0xf43f('0x9')),'smsMessage':require(_0xf43f('0xa')),'faxMessage':require(_0xf43f('0xb')),'whatsappMessage':require(_0xf43f('0xc'))};function createMessage(_0xf26afa,_0x290e8a,_0x14765a,_0x48e86f){return new Promise(function(_0x1992e0,_0x28357d){var _0x187d13=_[_0xf43f('0xd')](_0x14765a);_0x187d13[_0xf43f('0xe')]=_0x48e86f;return rpc[_0x290e8a+_0xf43f('0xf')][_0xf43f('0x10')](_0x187d13)[_0xf43f('0x11')](function(){logger[_0xf43f('0x12')](_0xf43f('0x13'),_0xf26afa,_0x187d13[_0xf43f('0xe')]);_0x1992e0();})[_0xf43f('0x14')](function(_0x5a1464){logger['error'](_0xf43f('0x13'),_0xf26afa,JSON[_0xf43f('0x15')](_0x5a1464));_0x28357d(_0x5a1464);});});}exports['consequence']=function(_0x2141ca,_0x471db5){return function(_0x1fd1bc){try{if(!_[_0xf43f('0x16')](this[_0xf43f('0x17')][_0xf43f('0x18')])){logger[_0xf43f('0x12')](_0xf43f('0x13'),_0x2141ca,_0xf43f('0x19'));return _0x1fd1bc[_0xf43f('0x1a')]();}var _0x12968d={'ContactId':this[_0xf43f('0x1b')]['id'],'sentAt':moment()[_0xf43f('0x1c')](_0xf43f('0x1d')),'direction':_0xf43f('0x1e')};if(this[_0xf43f('0x1f')]===_0xf43f('0x20')||this[_0xf43f('0x1f')]===_0xf43f('0x21')){_0x12968d[_0xf43f('0x22')]=this[_0xf43f('0x17')][_0xf43f('0x22')];}var _0x15284a=this[_0xf43f('0x1f')];if(_0x15284a==='chat'){_0x12968d['ChatWebsiteId']=this[_0xf43f('0x23')]['id'];}else{_0x12968d[_[_0xf43f('0x24')](_0x15284a)+_0xf43f('0x25')]=this[_0xf43f('0x23')]['id'];}_0x12968d[_[_0xf43f('0x24')](_0x15284a)+'InteractionId']=this[_0xf43f('0x17')]['id'];if(this['interaction'][_0xf43f('0x26')]){var _0x291278=_0x471db5[0x4];if(!_[_0xf43f('0x27')](_0x291278)){_0x12968d[_0xf43f('0xe')]=utils[_0xf43f('0x28')](_0x291278,this);return rpc[_0x15284a+_0xf43f('0xf')][_0xf43f('0x10')](_0x12968d)['then'](function(_0x4e83ac){logger['info']('[%s][DIALOGFLOWV2]\x20%s',_0x2141ca,_0x12968d[_0xf43f('0xe')]);})[_0xf43f('0x14')](function(_0xdb9a58){logger['error'](_0xf43f('0x13'),_0x2141ca,JSON[_0xf43f('0x15')](_0xdb9a58));})['finally'](function(){logger['info']('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x2141ca);_0x1fd1bc[_0xf43f('0x29')]();});}else{logger[_0xf43f('0x12')](_0xf43f('0x2a'),_0x2141ca);_0x1fd1bc['stop']();}}else{var _0x257f60=this;var _0x4f8315=_0x471db5[0x2][_0xf43f('0x2b')](/\\n/g,'\x0a');var _0x3647c3={'credentials':{'private_key':_0x4f8315,'client_email':_0x471db5[0x1]}};var _0x2ae6c2=new dialogflow[(_0xf43f('0x2c'))](_0x3647c3);var _0x333a77=_0x2ae6c2['sessionPath'](_0x471db5[0x0],md5(_0x257f60[_0xf43f('0x17')]['id']));var _0x143190={'session':_0x333a77,'queryInput':{'text':{'text':_0x257f60['message'][_0xf43f('0xe')],'languageCode':_0x471db5[0x3]||'en'}}};return _0x2ae6c2[_0xf43f('0x2d')](_0x143190)[_0xf43f('0x11')](function(_0x7b11c5){if(_0x7b11c5&&_0x7b11c5[_0xf43f('0x2e')]){_0x257f60[_0xf43f('0xe')][_0xf43f('0x2f')]=_0x7b11c5;var _0x169d2c=_0x7b11c5[0x0];var _0x235494=_0x169d2c[_0xf43f('0x30')][_0xf43f('0x31')]&&_0x169d2c[_0xf43f('0x30')][_0xf43f('0x31')]['fields']?_0x169d2c[_0xf43f('0x30')][_0xf43f('0x31')][_0xf43f('0x32')][_0xf43f('0x33')][_0xf43f('0x34')]:![];_0x257f60[_0xf43f('0xe')]['DIALOGFLOWV2_ACTION']=_0x169d2c[_0xf43f('0x30')]['action'];_0x257f60[_0xf43f('0xe')][_0xf43f('0x35')]=_0x169d2c[_0xf43f('0x30')][_0xf43f('0x36')];_0x257f60[_0xf43f('0xe')]['DIALOGFLOWV2_ENDCONVERSATION']=_0x169d2c['queryResult'][_0xf43f('0x31')]&&_0x169d2c['queryResult'][_0xf43f('0x31')][_0xf43f('0x32')]?_0x169d2c[_0xf43f('0x30')][_0xf43f('0x31')][_0xf43f('0x32')][_0xf43f('0x33')][_0xf43f('0x34')]:![];_0x257f60[_0xf43f('0xe')][_0xf43f('0x37')]=_0x169d2c['queryResult'][_0xf43f('0x38')][_0xf43f('0x39')];_0x257f60['body'][_0xf43f('0x3a')]=_0x169d2c[_0xf43f('0x30')][_0xf43f('0x38')]['displayName'];_0x257f60[_0xf43f('0xe')]['DIALOGFLOWV2_ISFALLBACKINTENT']=_0x169d2c[_0xf43f('0x30')]['intent'][_0xf43f('0x3b')];_0x257f60[_0xf43f('0xe')][_0xf43f('0x3c')]=_0x169d2c[_0xf43f('0x30')][_0xf43f('0x3d')];_0x257f60[_0xf43f('0xe')]['DIALOGFLOWV2_QUERYTEXT']=_0x169d2c[_0xf43f('0x30')][_0xf43f('0x3e')];_0x257f60[_0xf43f('0xe')][_0xf43f('0x3f')]=_0x169d2c[_0xf43f('0x30')][_0xf43f('0x40')];_0x12968d[_0xf43f('0x41')]='dialogflowV2';_0x12968d[_0xf43f('0x42')]=JSON[_0xf43f('0x15')](_0x7b11c5);var _0x2dbf43=[];for(var _0xf50cac=0x0;_0xf50cac<_0x7b11c5[_0xf43f('0x2e')];_0xf50cac++){var _0x2094b0=_0x7b11c5[_0xf50cac];if(_0x2094b0&&_0x2094b0[_0xf43f('0x30')]&&_0x2094b0[_0xf43f('0x30')][_0xf43f('0x43')]){_0x2dbf43[_0xf43f('0x44')](createMessage(_0x2141ca,_0x15284a,_0x12968d,_0x2094b0[_0xf43f('0x30')][_0xf43f('0x43')]));}}return Promise[_0xf43f('0x45')](_0x2dbf43)[_0xf43f('0x11')](function(){if(_0x235494){_0x1fd1bc[_0xf43f('0x1a')]();}else{_0x1fd1bc[_0xf43f('0x29')]();}})[_0xf43f('0x14')](function(_0x82788){logger[_0xf43f('0x46')](_0xf43f('0x13'),_0x2141ca,JSON[_0xf43f('0x15')](_0x82788));_0x1fd1bc[_0xf43f('0x1a')]();});}})[_0xf43f('0x14')](function(_0x993773){logger['error'](_0xf43f('0x13'),_0x2141ca,_0x993773[_0xf43f('0x47')]);_0x1fd1bc[_0xf43f('0x1a')]();});}}catch(_0x3676ef){logger[_0xf43f('0x46')](_0xf43f('0x13'),_0x2141ca,JSON[_0xf43f('0x15')](_0x3676ef));_0x1fd1bc[_0xf43f('0x29')]();}};}; \ No newline at end of file +var _0xff71=['providerName','dialogflowV2','providerResponse','length','fulfillmentText','push','lodash','dialogflow','md5','moment','bluebird','../../../../config/logger','routing','./utils','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','clone','body','Message','create','then','info','[%s][DIALOGFLOWV2]\x20%s','error','stringify','consequence','isNil','interaction','UserId','next','contact','format','out','channel','sms','whatsapp','phone','account','upperFirst','AccountId','isEmpty','getMustacheRender','catch','finally','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','replace','SessionsClient','sessionPath','message','detectIntent','queryResult','diagnosticInfo','fields','end_conversation','boolValue','action','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent','DIALOGFLOWV2_ENDCONVERSATION','intent','name','DIALOGFLOWV2_INTENTDISPLAYNAME','displayName','DIALOGFLOWV2_ISFALLBACKINTENT','isFallback','DIALOGFLOWV2_SCORE'];(function(_0x529c58,_0x5040d0){var _0x5ad8d8=function(_0x571785){while(--_0x571785){_0x529c58['push'](_0x529c58['shift']());}};_0x5ad8d8(++_0x5040d0);}(_0xff71,0x1b0));var _0x1ff7=function(_0x5ea2f9,_0x320917){_0x5ea2f9=_0x5ea2f9-0x0;var _0x36e586=_0xff71[_0x5ea2f9];return _0x36e586;};'use strict';var _=require(_0x1ff7('0x0'));var dialogflow=require(_0x1ff7('0x1'));var md5=require(_0x1ff7('0x2'));var moment=require(_0x1ff7('0x3'));var Promise=require(_0x1ff7('0x4'));var logger=require(_0x1ff7('0x5'))(_0x1ff7('0x6'));var utils=require(_0x1ff7('0x7'));var rpc={'chatMessage':require(_0x1ff7('0x8')),'openchannelMessage':require(_0x1ff7('0x9')),'mailMessage':require(_0x1ff7('0xa')),'smsMessage':require(_0x1ff7('0xb')),'faxMessage':require(_0x1ff7('0xc')),'whatsappMessage':require(_0x1ff7('0xd'))};function createMessage(_0x1c37b9,_0x4caaf4,_0x270b7c,_0x26a6fc){return new Promise(function(_0x536412,_0x19d0d1){var _0x3b9d0b=_[_0x1ff7('0xe')](_0x270b7c);_0x3b9d0b[_0x1ff7('0xf')]=_0x26a6fc;return rpc[_0x4caaf4+_0x1ff7('0x10')][_0x1ff7('0x11')](_0x3b9d0b)[_0x1ff7('0x12')](function(){logger[_0x1ff7('0x13')](_0x1ff7('0x14'),_0x1c37b9,_0x3b9d0b['body']);_0x536412();})['catch'](function(_0x5baf2c){logger[_0x1ff7('0x15')](_0x1ff7('0x14'),_0x1c37b9,JSON[_0x1ff7('0x16')](_0x5baf2c));_0x19d0d1(_0x5baf2c);});});}exports[_0x1ff7('0x17')]=function(_0x5089cd,_0x1cd479){return function(_0x53cca9){try{if(!_[_0x1ff7('0x18')](this[_0x1ff7('0x19')][_0x1ff7('0x1a')])){logger['info'](_0x1ff7('0x14'),_0x5089cd,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x53cca9[_0x1ff7('0x1b')]();}var _0x19d917={'ContactId':this[_0x1ff7('0x1c')]['id'],'sentAt':moment()[_0x1ff7('0x1d')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0x1ff7('0x1e')};if(this[_0x1ff7('0x1f')]===_0x1ff7('0x20')||this[_0x1ff7('0x1f')]===_0x1ff7('0x21')){_0x19d917[_0x1ff7('0x22')]=this[_0x1ff7('0x19')][_0x1ff7('0x22')];}var _0x309074=this[_0x1ff7('0x1f')];if(_0x309074==='chat'){_0x19d917['ChatWebsiteId']=this[_0x1ff7('0x23')]['id'];}else{_0x19d917[_[_0x1ff7('0x24')](_0x309074)+_0x1ff7('0x25')]=this[_0x1ff7('0x23')]['id'];}_0x19d917[_[_0x1ff7('0x24')](_0x309074)+'InteractionId']=this['interaction']['id'];if(this[_0x1ff7('0x19')]['created']){var _0x224f09=_0x1cd479[0x4];if(!_[_0x1ff7('0x26')](_0x224f09)){_0x19d917[_0x1ff7('0xf')]=utils[_0x1ff7('0x27')](_0x224f09,this);return rpc[_0x309074+_0x1ff7('0x10')][_0x1ff7('0x11')](_0x19d917)[_0x1ff7('0x12')](function(_0x45df14){logger[_0x1ff7('0x13')]('[%s][DIALOGFLOWV2]\x20%s',_0x5089cd,_0x19d917[_0x1ff7('0xf')]);})[_0x1ff7('0x28')](function(_0x2bfbed){logger[_0x1ff7('0x15')](_0x1ff7('0x14'),_0x5089cd,JSON[_0x1ff7('0x16')](_0x2bfbed));})[_0x1ff7('0x29')](function(){logger[_0x1ff7('0x13')](_0x1ff7('0x2a'),_0x5089cd);_0x53cca9['stop']();});}else{logger[_0x1ff7('0x13')]('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x5089cd);_0x53cca9[_0x1ff7('0x2b')]();}}else{var _0x3f95f8=this;var _0x3cec39=_0x1cd479[0x2][_0x1ff7('0x2c')](/\\n/g,'\x0a');var _0x31844a={'credentials':{'private_key':_0x3cec39,'client_email':_0x1cd479[0x1]}};var _0x444787=new dialogflow[(_0x1ff7('0x2d'))](_0x31844a);var _0x27b73b=_0x444787[_0x1ff7('0x2e')](_0x1cd479[0x0],md5(_0x3f95f8['interaction']['id']));var _0x4ecc54={'session':_0x27b73b,'queryInput':{'text':{'text':_0x3f95f8[_0x1ff7('0x2f')][_0x1ff7('0xf')],'languageCode':_0x1cd479[0x3]||'en'}}};return _0x444787[_0x1ff7('0x30')](_0x4ecc54)[_0x1ff7('0x12')](function(_0x40bec1){if(_0x40bec1&&_0x40bec1['length']){_0x3f95f8[_0x1ff7('0xf')]['dialogflowV2']=_0x40bec1;var _0x4f431f=_0x40bec1[0x0];var _0x2ab3ba=_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x32')]&&_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x32')][_0x1ff7('0x33')]?_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x32')][_0x1ff7('0x33')][_0x1ff7('0x34')][_0x1ff7('0x35')]:![];_0x3f95f8[_0x1ff7('0xf')]['DIALOGFLOWV2_ACTION']=_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x36')];_0x3f95f8[_0x1ff7('0xf')][_0x1ff7('0x37')]=_0x4f431f['queryResult'][_0x1ff7('0x38')];_0x3f95f8['body'][_0x1ff7('0x39')]=_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x32')]&&_0x4f431f[_0x1ff7('0x31')]['diagnosticInfo'][_0x1ff7('0x33')]?_0x4f431f['queryResult']['diagnosticInfo']['fields'][_0x1ff7('0x34')]['boolValue']:![];_0x3f95f8[_0x1ff7('0xf')]['DIALOGFLOWV2_INTENTNAME']=_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x3a')][_0x1ff7('0x3b')];_0x3f95f8[_0x1ff7('0xf')][_0x1ff7('0x3c')]=_0x4f431f[_0x1ff7('0x31')]['intent'][_0x1ff7('0x3d')];_0x3f95f8[_0x1ff7('0xf')][_0x1ff7('0x3e')]=_0x4f431f[_0x1ff7('0x31')][_0x1ff7('0x3a')][_0x1ff7('0x3f')];_0x3f95f8[_0x1ff7('0xf')]['DIALOGFLOWV2_LANGUAGECODE']=_0x4f431f[_0x1ff7('0x31')]['languageCode'];_0x3f95f8[_0x1ff7('0xf')]['DIALOGFLOWV2_QUERYTEXT']=_0x4f431f[_0x1ff7('0x31')]['queryText'];_0x3f95f8[_0x1ff7('0xf')][_0x1ff7('0x40')]=_0x4f431f[_0x1ff7('0x31')]['intentDetectionConfidence'];_0x19d917[_0x1ff7('0x41')]=_0x1ff7('0x42');_0x19d917[_0x1ff7('0x43')]=JSON[_0x1ff7('0x16')](_0x40bec1);var _0x3cc064=[];for(var _0x8abfb1=0x0;_0x8abfb1<_0x40bec1[_0x1ff7('0x44')];_0x8abfb1++){var _0x5a7a47=_0x40bec1[_0x8abfb1];if(_0x5a7a47&&_0x5a7a47[_0x1ff7('0x31')]&&_0x5a7a47['queryResult'][_0x1ff7('0x45')]){_0x3cc064[_0x1ff7('0x46')](createMessage(_0x5089cd,_0x309074,_0x19d917,_0x5a7a47[_0x1ff7('0x31')][_0x1ff7('0x45')]));}}return Promise['all'](_0x3cc064)['then'](function(){if(_0x2ab3ba){_0x53cca9[_0x1ff7('0x1b')]();}else{_0x53cca9[_0x1ff7('0x2b')]();}})['catch'](function(_0x674718){logger[_0x1ff7('0x15')]('[%s][DIALOGFLOWV2]\x20%s',_0x5089cd,JSON[_0x1ff7('0x16')](_0x674718));_0x53cca9[_0x1ff7('0x1b')]();});}})[_0x1ff7('0x28')](function(_0x583bdc){logger['error'](_0x1ff7('0x14'),_0x5089cd,_0x583bdc[_0x1ff7('0x2f')]);_0x53cca9[_0x1ff7('0x1b')]();});}}catch(_0x2babe9){logger[_0x1ff7('0x15')](_0x1ff7('0x14'),_0x5089cd,JSON[_0x1ff7('0x16')](_0x2babe9));_0x53cca9[_0x1ff7('0x2b')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/gotoif.js b/server/services/routing/server/applications/gotoif.js index 82a1055..2b9c2f6 100644 --- a/server/services/routing/server/applications/gotoif.js +++ b/server/services/routing/server/applications/gotoif.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xee9a=['rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','message','validate','lodash','html-to-text','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','consequence','fromString','replace','length','error','[%s][GOTOIF]\x20%s','map','stop','condition','priorityFalse','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex'];(function(_0x488ca1,_0xf6858e){var _0x4dd0a4=function(_0x40fb65){while(--_0x40fb65){_0x488ca1['push'](_0x488ca1['shift']());}};_0x4dd0a4(++_0xf6858e);}(_0xee9a,0xe6));var _0xaee9=function(_0x53bbf5,_0x313f09){_0x53bbf5=_0x53bbf5-0x0;var _0x533499=_0xee9a[_0x53bbf5];return _0x533499;};'use strict';var schema=require(_0xaee9('0x0'));var _=require(_0xaee9('0x1'));var htmlToText=require(_0xaee9('0x2'));var utils=require('./utils');var logger=require('../../../../config/logger')(_0xaee9('0x3'));var gotoif=schema({'condition':{'type':_0xaee9('0x4'),'required':!![],'message':_0xaee9('0x5')},'priorityTrue':{'type':_0xaee9('0x6'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0xaee9('0x6'),'message':'priority\x20false\x20is\x20a\x20number'}});exports[_0xaee9('0x7')]=function(_0x281d3b,_0x3a100d){return function(_0x167dda){try{var _0x47d1c5={'condition':htmlToText[_0xaee9('0x8')](utils['getMustacheRender'](_0x3a100d[0x0],this),{'wordwrap':![]})[_0xaee9('0x9')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x3a100d[0x1],'priorityFalse':_0x3a100d[0x2]};var _0x4c1dec=gotoif['validate'](_0x47d1c5,{'typecast':!![]});if(_0x4c1dec[_0xaee9('0xa')]){logger[_0xaee9('0xb')](_0xaee9('0xc'),_0x281d3b,_[_0xaee9('0xd')](_0x4c1dec,'message')['join'](',\x20'));_0x167dda[_0xaee9('0xe')]();}else{try{var _0x3dcea9=eval('('+_0x47d1c5[_0xaee9('0xf')]+')');var _0x11fc0b=_0x3dcea9?_0x47d1c5['priorityTrue']:_0x47d1c5[_0xaee9('0x10')];logger['info'](_0xaee9('0x11'),_0x281d3b,_0x47d1c5['condition'],_0x3dcea9,_0x11fc0b||_0xaee9('0x12'));if(_0x11fc0b){var _0x372ea5=_[_0xaee9('0x13')](_0x167dda[_0xaee9('0x14')](),{'p':_0x11fc0b});if(_0x372ea5>=0x0){logger[_0xaee9('0x15')](_0xaee9('0x16'),_0x281d3b,_0x11fc0b||_0xaee9('0x12'),_0x372ea5);_0x167dda[_0xaee9('0x12')](_0x372ea5);}else{logger[_0xaee9('0x15')](_0xaee9('0x17'),_0x281d3b,_0x11fc0b||_0xaee9('0x12'));_0x167dda[_0xaee9('0xe')]();}}else{_0x167dda[_0xaee9('0x12')]();}}catch(_0x217ce3){logger[_0xaee9('0xb')]('[%s][GOTOIF]\x20eval\x20error:\x20%s',_0x281d3b,_0x217ce3[_0xaee9('0x18')]);_0x167dda['stop']();}}}catch(_0x837d41){logger[_0xaee9('0xb')]('[%s][GOTOIF]\x20%s',_0x281d3b,JSON['stringify'](_0x837d41));_0x167dda['stop']();}};}; \ No newline at end of file +var _0x0b2f=['priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','error','stringify','validate','html-to-text','./utils','../../../../config/logger','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','consequence','getMustacheRender','replace','length','[%s][GOTOIF]\x20%s','map','message','join','stop','condition','priorityTrue'];(function(_0x725a4c,_0x102507){var _0x37b2cc=function(_0x505fc9){while(--_0x505fc9){_0x725a4c['push'](_0x725a4c['shift']());}};_0x37b2cc(++_0x102507);}(_0x0b2f,0x191));var _0xf0b2=function(_0x3b9be0,_0x47ccb1){_0x3b9be0=_0x3b9be0-0x0;var _0x12d30c=_0x0b2f[_0x3b9be0];return _0x12d30c;};'use strict';var schema=require(_0xf0b2('0x0'));var _=require('lodash');var htmlToText=require(_0xf0b2('0x1'));var utils=require(_0xf0b2('0x2'));var logger=require(_0xf0b2('0x3'))('routing');var gotoif=schema({'condition':{'type':_0xf0b2('0x4'),'required':!![],'message':_0xf0b2('0x5')},'priorityTrue':{'type':_0xf0b2('0x6'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0xf0b2('0x6'),'message':_0xf0b2('0x7')}});exports[_0xf0b2('0x8')]=function(_0x435e0f,_0x213205){return function(_0x2a10fb){try{var _0x4a7454={'condition':htmlToText['fromString'](utils[_0xf0b2('0x9')](_0x213205[0x0],this),{'wordwrap':![]})[_0xf0b2('0xa')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x213205[0x1],'priorityFalse':_0x213205[0x2]};var _0x3afbd8=gotoif['validate'](_0x4a7454,{'typecast':!![]});if(_0x3afbd8[_0xf0b2('0xb')]){logger['error'](_0xf0b2('0xc'),_0x435e0f,_[_0xf0b2('0xd')](_0x3afbd8,_0xf0b2('0xe'))[_0xf0b2('0xf')](',\x20'));_0x2a10fb[_0xf0b2('0x10')]();}else{try{var _0x1c1220=eval('('+_0x4a7454[_0xf0b2('0x11')]+')');var _0x48c646=_0x1c1220?_0x4a7454[_0xf0b2('0x12')]:_0x4a7454[_0xf0b2('0x13')];logger[_0xf0b2('0x14')](_0xf0b2('0x15'),_0x435e0f,_0x4a7454[_0xf0b2('0x11')],_0x1c1220,_0x48c646||'next');if(_0x48c646){var _0x19c79c=_[_0xf0b2('0x16')](_0x2a10fb[_0xf0b2('0x17')](),{'p':_0x48c646});if(_0x19c79c>=0x0){logger['info'](_0xf0b2('0x18'),_0x435e0f,_0x48c646||_0xf0b2('0x19'),_0x19c79c);_0x2a10fb[_0xf0b2('0x19')](_0x19c79c);}else{logger['info'](_0xf0b2('0x1a'),_0x435e0f,_0x48c646||_0xf0b2('0x19'));_0x2a10fb[_0xf0b2('0x10')]();}}else{_0x2a10fb[_0xf0b2('0x19')]();}}catch(_0x2e53b3){logger['error'](_0xf0b2('0x1b'),_0x435e0f,_0x2e53b3[_0xf0b2('0xe')]);_0x2a10fb['stop']();}}}catch(_0x7fd920){logger[_0xf0b2('0x1c')](_0xf0b2('0xc'),_0x435e0f,JSON[_0xf0b2('0x1d')](_0x7fd920));_0x2a10fb[_0xf0b2('0x10')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/gotop.js b/server/services/routing/server/applications/gotop.js index 2f30ec6..69cad05 100644 --- a/server/services/routing/server/applications/gotop.js +++ b/server/services/routing/server/applications/gotop.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x05a4=['stop','[%s][GOTOP]\x20priority\x20%s','priority','findIndex','rules','info','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','stringify','validate','lodash','routing','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','[%s][GOTOP]\x20%s','map','message','join'];(function(_0x299028,_0x4d7e9f){var _0x12154e=function(_0x558d18){while(--_0x558d18){_0x299028['push'](_0x299028['shift']());}};_0x12154e(++_0x4d7e9f);}(_0x05a4,0x199));var _0x405a=function(_0x1f93b2,_0xac1aa){_0x1f93b2=_0x1f93b2-0x0;var _0xaeab8c=_0x05a4[_0x1f93b2];return _0xaeab8c;};'use strict';var schema=require(_0x405a('0x0'));var _=require(_0x405a('0x1'));var logger=require('../../../../config/logger')(_0x405a('0x2'));var gotop=schema({'priority':{'type':'number','required':!![],'message':_0x405a('0x3')}});exports[_0x405a('0x4')]=function(_0x52c47e,_0x25ffcf){return function(_0x1a4945){try{var _0x531fd0={'priority':_0x25ffcf[0x0]};var _0x4d7310=gotop[_0x405a('0x0')](_0x531fd0,{'typecast':!![]});if(_0x4d7310['length']){logger['error'](_0x405a('0x5'),_0x52c47e,_[_0x405a('0x6')](_0x4d7310,_0x405a('0x7'))[_0x405a('0x8')](',\x20'));_0x1a4945[_0x405a('0x9')]();}else{logger['info'](_0x405a('0xa'),_0x52c47e,_0x531fd0[_0x405a('0xb')]);if(_0x531fd0[_0x405a('0xb')]){var _0x33cbac=_[_0x405a('0xc')](_0x1a4945[_0x405a('0xd')](),{'p':_0x531fd0['priority']});if(_0x33cbac>=0x0){logger[_0x405a('0xe')](_0x405a('0xf'),_0x52c47e,_0x531fd0[_0x405a('0xb')]||'next',_0x33cbac);_0x1a4945[_0x405a('0x10')](_0x33cbac);}else{logger[_0x405a('0xe')](_0x405a('0x11'),_0x52c47e,_0x531fd0[_0x405a('0xb')]||_0x405a('0x10'));_0x1a4945[_0x405a('0x9')]();}}else{_0x1a4945[_0x405a('0x10')]();}}}catch(_0x70e832){logger['error']('[%s][GOTOP]\x20%s',_0x52c47e,JSON[_0x405a('0x12')](_0x70e832));_0x1a4945[_0x405a('0x9')]();}};}; \ No newline at end of file +var _0x6b41=['info','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','stringify','stop','../../../../config/logger','number','consequence','validate','length','error','[%s][GOTOP]\x20%s','message','priority','findIndex','rules','next'];(function(_0xd46033,_0xa8f11f){var _0x2c64d9=function(_0x54475c){while(--_0x54475c){_0xd46033['push'](_0xd46033['shift']());}};_0x2c64d9(++_0xa8f11f);}(_0x6b41,0x74));var _0x16b4=function(_0x5ceda4,_0x56bb73){_0x5ceda4=_0x5ceda4-0x0;var _0x2c3f77=_0x6b41[_0x5ceda4];return _0x2c3f77;};'use strict';var schema=require('validate');var _=require('lodash');var logger=require(_0x16b4('0x0'))('routing');var gotop=schema({'priority':{'type':_0x16b4('0x1'),'required':!![],'message':'priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required'}});exports[_0x16b4('0x2')]=function(_0x553f87,_0xf2b03c){return function(_0x1bcc3f){try{var _0x5e38f4={'priority':_0xf2b03c[0x0]};var _0x15259e=gotop[_0x16b4('0x3')](_0x5e38f4,{'typecast':!![]});if(_0x15259e[_0x16b4('0x4')]){logger[_0x16b4('0x5')](_0x16b4('0x6'),_0x553f87,_['map'](_0x15259e,_0x16b4('0x7'))['join'](',\x20'));_0x1bcc3f['stop']();}else{logger['info']('[%s][GOTOP]\x20priority\x20%s',_0x553f87,_0x5e38f4[_0x16b4('0x8')]);if(_0x5e38f4['priority']){var _0x36d0a1=_[_0x16b4('0x9')](_0x1bcc3f[_0x16b4('0xa')](),{'p':_0x5e38f4[_0x16b4('0x8')]});if(_0x36d0a1>=0x0){logger['info']('[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0x553f87,_0x5e38f4[_0x16b4('0x8')]||_0x16b4('0xb'),_0x36d0a1);_0x1bcc3f[_0x16b4('0xb')](_0x36d0a1);}else{logger[_0x16b4('0xc')](_0x16b4('0xd'),_0x553f87,_0x5e38f4[_0x16b4('0x8')]||'next');_0x1bcc3f['stop']();}}else{_0x1bcc3f['next']();}}}catch(_0x4a0512){logger[_0x16b4('0x5')](_0x16b4('0x6'),_0x553f87,JSON[_0x16b4('0xe')](_0x4a0512));_0x1bcc3f[_0x16b4('0xf')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/message.js b/server/services/routing/server/applications/message.js index 59bcfe9..d223bce 100644 --- a/server/services/routing/server/applications/message.js +++ b/server/services/routing/server/applications/message.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2946=['routing','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','AccountId','account','upperFirst','InteractionId','interaction','Message','then','info','[%s][MESSAGE]\x20%s','body','catch','error','stop','stringify','lodash'];(function(_0x4d4a61,_0x32075f){var _0x1b0b7d=function(_0x2bd4ed){while(--_0x2bd4ed){_0x4d4a61['push'](_0x4d4a61['shift']());}};_0x1b0b7d(++_0x32075f);}(_0x2946,0x1da));var _0x6294=function(_0x5ec420,_0x2e0af1){_0x5ec420=_0x5ec420-0x0;var _0x4768f2=_0x2946[_0x5ec420];return _0x4768f2;};'use strict';var _=require(_0x6294('0x0'));var utils=require('./utils');var logger=require('../../../../config/logger')(_0x6294('0x1'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x6294('0x2')),'smsMessage':require(_0x6294('0x3')),'faxMessage':require(_0x6294('0x4')),'whatsappMessage':require(_0x6294('0x5'))};exports[_0x6294('0x6')]=function(_0x29ee78,_0x4b672f){return function(_0x2d699b){try{var _0x5e973c={'body':utils[_0x6294('0x7')](_0x4b672f[0x0],this),'ContactId':this[_0x6294('0x8')]['id']};if(this[_0x6294('0x9')]===_0x6294('0xa')){_0x5e973c['ChatWebsiteId']=this['account']['id'];}else{_0x5e973c[_['upperFirst'](this[_0x6294('0x9')])+_0x6294('0xb')]=this[_0x6294('0xc')]['id'];}_0x5e973c[_[_0x6294('0xd')](this['channel'])+_0x6294('0xe')]=this[_0x6294('0xf')]['id'];if(rpc[this[_0x6294('0x9')]+'Message']){return rpc[this[_0x6294('0x9')]+_0x6294('0x10')]['create'](_0x5e973c)[_0x6294('0x11')](function(_0x560300){logger[_0x6294('0x12')](_0x6294('0x13'),_0x29ee78,_0x5e973c[_0x6294('0x14')]);_0x2d699b['next']();})[_0x6294('0x15')](function(_0x2bc84e){logger[_0x6294('0x16')](_0x6294('0x13'),_0x29ee78,JSON['stringify'](_0x2bc84e));_0x2d699b[_0x6294('0x17')]();});}}catch(_0x59e817){logger['error'](_0x6294('0x13'),_0x29ee78,JSON[_0x6294('0x18')](_0x59e817));_0x2d699b['stop']();}};}; \ No newline at end of file +var _0xf3cc=['then','[%s][MESSAGE]\x20%s','next','catch','error','stop','stringify','lodash','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','contact','chat','account','upperFirst','channel','AccountId','InteractionId','interaction','Message','create'];(function(_0x37c46b,_0x211aee){var _0x1ae8f7=function(_0x2adc97){while(--_0x2adc97){_0x37c46b['push'](_0x37c46b['shift']());}};_0x1ae8f7(++_0x211aee);}(_0xf3cc,0x14c));var _0xcf3c=function(_0x457bc6,_0x431adc){_0x457bc6=_0x457bc6-0x0;var _0x337f06=_0xf3cc[_0x457bc6];return _0x337f06;};'use strict';var _=require(_0xcf3c('0x0'));var utils=require('./utils');var logger=require('../../../../config/logger')(_0xcf3c('0x1'));var rpc={'chatMessage':require(_0xcf3c('0x2')),'openchannelMessage':require(_0xcf3c('0x3')),'mailMessage':require(_0xcf3c('0x4')),'smsMessage':require(_0xcf3c('0x5')),'faxMessage':require(_0xcf3c('0x6')),'whatsappMessage':require(_0xcf3c('0x7'))};exports['consequence']=function(_0x3968e2,_0x5a51fe){return function(_0x1931f4){try{var _0x2d55b8={'body':utils['getMustacheRender'](_0x5a51fe[0x0],this),'ContactId':this[_0xcf3c('0x8')]['id']};if(this['channel']===_0xcf3c('0x9')){_0x2d55b8['ChatWebsiteId']=this[_0xcf3c('0xa')]['id'];}else{_0x2d55b8[_[_0xcf3c('0xb')](this[_0xcf3c('0xc')])+_0xcf3c('0xd')]=this['account']['id'];}_0x2d55b8[_[_0xcf3c('0xb')](this[_0xcf3c('0xc')])+_0xcf3c('0xe')]=this[_0xcf3c('0xf')]['id'];if(rpc[this['channel']+_0xcf3c('0x10')]){return rpc[this[_0xcf3c('0xc')]+_0xcf3c('0x10')][_0xcf3c('0x11')](_0x2d55b8)[_0xcf3c('0x12')](function(_0x31e1ab){logger['info'](_0xcf3c('0x13'),_0x3968e2,_0x2d55b8['body']);_0x1931f4[_0xcf3c('0x14')]();})[_0xcf3c('0x15')](function(_0x49811c){logger[_0xcf3c('0x16')](_0xcf3c('0x13'),_0x3968e2,JSON['stringify'](_0x49811c));_0x1931f4[_0xcf3c('0x17')]();});}}catch(_0x5a21e2){logger[_0xcf3c('0x16')](_0xcf3c('0x13'),_0x3968e2,JSON[_0xcf3c('0x18')](_0x5a21e2));_0x1931f4[_0xcf3c('0x17')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/noop.js b/server/services/routing/server/applications/noop.js index aaa792f..834d7e2 100644 --- a/server/services/routing/server/applications/noop.js +++ b/server/services/routing/server/applications/noop.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5310=['../../../../config/logger','routing','info','[%s][NOOP]\x20%s','getMustacheRender','next','stringify','stop','./utils'];(function(_0x4b2436,_0x452299){var _0x4f5ab2=function(_0x5c6679){while(--_0x5c6679){_0x4b2436['push'](_0x4b2436['shift']());}};_0x4f5ab2(++_0x452299);}(_0x5310,0x14c));var _0x0531=function(_0x3a9661,_0x530b12){_0x3a9661=_0x3a9661-0x0;var _0x5bb119=_0x5310[_0x3a9661];return _0x5bb119;};'use strict';var utils=require(_0x0531('0x0'));var logger=require(_0x0531('0x1'))(_0x0531('0x2'));exports['consequence']=function(_0xd38913,_0x383117){return function(_0x394cfe){try{logger[_0x0531('0x3')](_0x0531('0x4'),_0xd38913,utils[_0x0531('0x5')](_0x383117[0x0],this));_0x394cfe[_0x0531('0x6')]();}catch(_0x35e2c3){logger['error']('[%s][NOOP]\x20%s',_0xd38913,JSON[_0x0531('0x7')](_0x35e2c3));_0x394cfe[_0x0531('0x8')]();}};}; \ No newline at end of file +var _0x776b=['stringify','../../../../config/logger','routing','[%s][NOOP]\x20%s','getMustacheRender','next','error'];(function(_0x16b1b8,_0x432d03){var _0x558b1e=function(_0xf47f2f){while(--_0xf47f2f){_0x16b1b8['push'](_0x16b1b8['shift']());}};_0x558b1e(++_0x432d03);}(_0x776b,0x1cf));var _0xb776=function(_0x58c4b5,_0x3e2e36){_0x58c4b5=_0x58c4b5-0x0;var _0x238715=_0x776b[_0x58c4b5];return _0x238715;};'use strict';var utils=require('./utils');var logger=require(_0xb776('0x0'))(_0xb776('0x1'));exports['consequence']=function(_0x534ade,_0x136062){return function(_0x320168){try{logger['info'](_0xb776('0x2'),_0x534ade,utils[_0xb776('0x3')](_0x136062[0x0],this));_0x320168[_0xb776('0x4')]();}catch(_0x4be704){logger[_0xb776('0x5')]('[%s][NOOP]\x20%s',_0x534ade,JSON[_0xb776('0x6')](_0x4be704));_0x320168['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/queue.js b/server/services/routing/server/applications/queue.js index 7d67d6d..69a6928 100644 --- a/server/services/routing/server/applications/queue.js +++ b/server/services/routing/server/applications/queue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3e74=['beepall','log','stack','validate','util','seq-queue','moment','../../../../config/logger','./strategy','redis','defaults','localhost','queue_id','account','queue','from','emit','clone','format','%sQueuesWaitingInteractions','pick','%s:queue:%s','%s_queue_waiting_interaction:%s','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/faxQueueReport','../../rpc/whatsappQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','QueueId','InteractionId','interaction','MessageId','message','channel','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error','create\x20queue\x20report','accepted','update\x20queue\x20report','timeout','[%s][END:QUEUE][NAME:%s]','update','toLowerCase','consequence','length','[%s][QUEUE]\x20%s','map','stop','find','atimeout','qtimeout','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','close','rules','complete','next','strategy','rrmemory'];(function(_0x334651,_0x6e99f6){var _0x29657c=function(_0x420a94){while(--_0x420a94){_0x334651['push'](_0x334651['shift']());}};_0x29657c(++_0x6e99f6);}(_0x3e74,0x175));var _0x43e7=function(_0x5b78c3,_0x373f66){_0x5b78c3=_0x5b78c3-0x0;var _0x12c9b5=_0x3e74[_0x5b78c3];return _0x12c9b5;};'use strict';var schema=require(_0x43e7('0x0'));var _=require('lodash');var util=require(_0x43e7('0x1'));var seqqueue=require(_0x43e7('0x2'));var moment=require(_0x43e7('0x3'));var Redis=require('ioredis');var config=require('../../../../config/environment');var logger=require(_0x43e7('0x4'))('routing');var strategy=require(_0x43e7('0x5'));config[_0x43e7('0x6')]=_[_0x43e7('0x7')](config[_0x43e7('0x6')],{'host':_0x43e7('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x43e7('0x6')]));var attributes=['id',_0x43e7('0x9'),_0x43e7('0xa'),_0x43e7('0xb'),_0x43e7('0xc'),'joinAt'];function emit(_0x212c6c,_0x554d44,_0x54948c){io['to'](_0x212c6c)[_0x43e7('0xd')](_0x554d44,_0x54948c);}function emitChannelQueueInteraction(_0x4139c9,_0x5c34f4,_0x2803d9,_0x513707,_0xf7c520,_0x37302c,_0x4ebc8e,_0x3eb206){var _0xc960ea=_[_0x43e7('0xe')](_0x2803d9);_0xc960ea[_0x43e7('0x9')]=_0x3eb206;_0xc960ea['queue']=_0x5c34f4;_0xc960ea['account']=_0x513707;_0xc960ea['id']=_0xf7c520;if(_0x37302c){_0x4ebc8e[util[_0x43e7('0xf')](_0x43e7('0x10'),_0x4139c9)][_0xf7c520]=_[_0x43e7('0x11')](_0xc960ea,attributes);}else{delete _0x4ebc8e[util['format']('%sQueuesWaitingInteractions',_0x4139c9)][_0xf7c520];}emit(util[_0x43e7('0xf')](_0x43e7('0x12'),_0x4139c9,_0x5c34f4),util[_0x43e7('0xf')](_0x43e7('0x13'),_0x4139c9,_0x37302c?'save':'remove'),_[_0x43e7('0x11')](_0xc960ea,attributes));}var rpc={'openchannelQueueReport':require(_0x43e7('0x14')),'mailQueueReport':require(_0x43e7('0x15')),'chatQueueReport':require('../../rpc/chatQueueReport'),'smsQueueReport':require('../../rpc/smsQueueReport'),'faxQueueReport':require(_0x43e7('0x16')),'whatsappQueueReport':require(_0x43e7('0x17'))};var queue=schema({'name':{'type':_0x43e7('0x18'),'required':!![],'message':_0x43e7('0x19')},'timeout':{'type':_0x43e7('0x1a'),'message':_0x43e7('0x1b')}});function startRouting(_0x619236,_0x1441ef,_0x2377a3,_0xab63cf){if(_0x619236&&_0x1441ef&&_0x2377a3){_0x1441ef[_0x43e7('0x1c')]+=0x1;var _0x177ee1={'uniqueid':_0x619236,'from':_0x2377a3['body']?_0x2377a3[_0x43e7('0x1d')][_0x43e7('0xc')]:'','joinAt':moment()['format'](_0x43e7('0x1e')),'ContactId':_0x2377a3[_0x43e7('0x1f')]?_0x2377a3[_0x43e7('0x1f')]['id']:null,'ListId':_0x2377a3[_0x43e7('0x20')]?_0x2377a3[_0x43e7('0x20')]['id']:null};_0x177ee1[_[_0x43e7('0x21')](_0x2377a3['channel'])+_0x43e7('0x22')]=_0x1441ef['id']||null;_0x177ee1[_['upperFirst'](_0x2377a3['channel'])+_0x43e7('0x23')]=_0x2377a3[_0x43e7('0x24')]?_0x2377a3['interaction']['id']:null;_0x177ee1[_[_0x43e7('0x21')](_0x2377a3['channel'])+_0x43e7('0x25')]=_0x2377a3['message']?_0x2377a3[_0x43e7('0x26')]['id']:null;_0x177ee1[_[_0x43e7('0x21')](_0x2377a3[_0x43e7('0x27')])+(_0x2377a3[_0x43e7('0x27')]!=='chat'?'AccountId':_0x43e7('0x28'))]=_0x2377a3['account']?_0x2377a3[_0x43e7('0xa')]['id']:null;logger[_0x43e7('0x29')](util[_0x43e7('0xf')](_0x43e7('0x2a'),_0x619236,_0x1441ef['name']));emitChannelQueueInteraction(_0x2377a3[_0x43e7('0x27')],_0x1441ef[_0x43e7('0x2b')],_0x177ee1,_0x2377a3[_0x43e7('0xa')][_0x43e7('0x2b')],_0x2377a3[_0x43e7('0x26')]['id'],!![],_0xab63cf,_0x1441ef['id']);if(rpc[_0x2377a3[_0x43e7('0x27')]+_0x43e7('0x2c')]){return rpc[_0x2377a3[_0x43e7('0x27')]+_0x43e7('0x2c')][_0x43e7('0x2d')](_0x177ee1)[_0x43e7('0x2e')](function(_0x19725a){logger[_0x43e7('0x2f')](_0x43e7('0x30'));});}}}function stopRouting(_0x4bdb17,_0x238321,_0x44f6b0,_0x3b8f78){if(_0x4bdb17&&_0x238321){_0x238321[_0x43e7('0x1c')]-=0x1;var _0x4251c8={'leaveAt':moment()['format'](_0x43e7('0x1e')),'acceptAt':moment()[_0x43e7('0xf')](_0x43e7('0x1e')),'reason':_0x43e7('0x31')};logger['info'](util['format']('[%s][STOP:QUEUE][NAME:%s]',_0x4bdb17,_0x238321[_0x43e7('0x2b')]));emitChannelQueueInteraction(_0x44f6b0[_0x43e7('0x27')],_0x238321[_0x43e7('0x2b')],_0x44f6b0[_0x43e7('0x1d')],_0x44f6b0[_0x43e7('0xa')][_0x43e7('0x2b')],_0x44f6b0['message']['id'],![],_0x3b8f78,_0x238321['id']);if(rpc[_0x44f6b0['channel']+'QueueReport']){return rpc[_0x44f6b0['channel']+'QueueReport']['update'](_0x4bdb17,_0x4251c8)['catch'](function(_0x14d888){logger['error'](_0x43e7('0x32'));});}}}function endRouting(_0x8e9f40,_0x31bc78,_0x50a2d0,_0x40f72f){if(_0x8e9f40&&_0x31bc78){_0x31bc78[_0x43e7('0x1c')]-=0x1;var _0x101d45={'leaveAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'exitAt':moment()['format'](_0x43e7('0x1e')),'reason':_0x43e7('0x33')};logger[_0x43e7('0x29')](util[_0x43e7('0xf')](_0x43e7('0x34'),_0x8e9f40,_0x31bc78[_0x43e7('0x2b')]));emitChannelQueueInteraction(_0x50a2d0[_0x43e7('0x27')],_0x31bc78[_0x43e7('0x2b')],_0x50a2d0['body'],_0x50a2d0[_0x43e7('0xa')][_0x43e7('0x2b')],_0x50a2d0['message']['id'],![],_0x40f72f);if(rpc[_0x50a2d0[_0x43e7('0x27')]+'QueueReport']){return rpc[_0x50a2d0[_0x43e7('0x27')]+_0x43e7('0x2c')][_0x43e7('0x35')](_0x8e9f40,_0x101d45)[_0x43e7('0x2e')](function(_0x35ac85){logger[_0x43e7('0x2f')]('update\x20queue\x20report');});}}}function handleFindQueue(_0x574a93){return function(_0x30dfa9){return _0x30dfa9[_0x43e7('0x2b')][_0x43e7('0x36')]()===_0x574a93[_0x43e7('0x36')]();};}exports[_0x43e7('0x37')]=function(_0x4a4a85,_0x32a451,_0x4227c4,_0x575439){return function(_0x3628e0){try{var _0x51a69c={'name':_0x32a451[0x0],'timeout':_0x32a451[0x1]};var _0x2ad8ef=queue['validate'](_0x51a69c,{'typecast':!![]});if(_0x2ad8ef[_0x43e7('0x38')]){logger[_0x43e7('0x2f')](_0x43e7('0x39'),_0x4a4a85,_[_0x43e7('0x3a')](_0x2ad8ef,'message')['join'](',\x20'));_0x3628e0[_0x43e7('0x3b')]();}else{var _0x40c509=_[_0x43e7('0x3c')](_0x4227c4[_0x575439[_0x43e7('0x27')]+'Queues'],handleFindQueue(_0x51a69c['name']));if(_0x40c509){startRouting(_0x4a4a85,_0x40c509,_0x575439,_0x4227c4);var _0x5dd988=(_0x40c509[_0x43e7('0x33')]||0xa)*0x3e8;var _0x57f5d0=(_0x51a69c[_0x43e7('0x33')]||0x14)*0x3e8;var _0x4b3a59,_0x5b28db;if(_0x5dd988>_0x57f5d0){_0x57f5d0=_0x5dd988;}var _0x46b2e6=seqqueue['createQueue'](_0x5dd988);_0x46b2e6['id']=_0x4a4a85;_0x46b2e6[_0x43e7('0x3d')]=_0x5dd988;_0x46b2e6[_0x43e7('0x3e')]=_0x57f5d0;_0x46b2e6[_0x43e7('0x27')]=_0x575439[_0x43e7('0x27')];_0x4227c4['rules'][_0x4a4a85]['on'](_0x43e7('0x3f'),function(){logger[_0x43e7('0x29')](_0x43e7('0x40'),_0x4a4a85);stopRouting(_0x4a4a85,_0x40c509,_0x575439,_0x4227c4);clearTimeout(_0x4b3a59);_0x4b3a59=undefined;_0x46b2e6[_0x43e7('0x41')](!![]);if(_0x4227c4[_0x43e7('0x42')][_0x4a4a85]){delete _0x4227c4[_0x43e7('0x42')][_0x4a4a85];}_0x3628e0['stop']();});_0x4227c4['rules'][_0x4a4a85]['on'](_0x43e7('0x43'),function(){if(_0x4227c4[_0x43e7('0x42')][_0x4a4a85]){delete _0x4227c4[_0x43e7('0x42')][_0x4a4a85];}});_0x4b3a59=setTimeout(function(){logger['info']('[%s][QUEUE]\x20APPLICATION\x20END',_0x4a4a85);endRouting(_0x4a4a85,_0x40c509,_0x575439,_0x4227c4);clearTimeout(_0x4b3a59);_0x46b2e6['close'](!![]);_0x3628e0[_0x43e7('0x44')]();},_0x57f5d0);switch(_0x40c509[_0x43e7('0x45')]){case'rrmemory':strategy[_0x43e7('0x46')](_0x46b2e6,_0x40c509,_0x4227c4,_0x575439);break;default:strategy[_0x43e7('0x47')](_0x46b2e6,_0x40c509,_0x4227c4,_0x575439);}}else{logger[_0x43e7('0x2f')]('[%s][QUEUE]\x20queue\x20not\x20found\x20%s',_0x4a4a85,_0x51a69c['name']);_0x3628e0['stop']();}}}catch(_0x4de644){console[_0x43e7('0x48')](_0x4de644);logger[_0x43e7('0x2f')]('[%s][QUEUE]\x20%s',_0x4a4a85,_0x4de644[_0x43e7('0x49')]);_0x3628e0[_0x43e7('0x3b')]();}};}; \ No newline at end of file +var _0xedd9=['[%s][STOP:QUEUE][NAME:%s]','update','update\x20queue\x20report','timeout','toLowerCase','length','[%s][QUEUE]\x20%s','map','join','stop','find','Queues','createQueue','atimeout','qtimeout','close','rules','next','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','stack','lodash','util','seq-queue','moment','ioredis','../../../../config/environment','../../../../config/logger','routing','redis','defaults','localhost','account','queue','from','joinAt','emit','clone','queue_id','%sQueuesWaitingInteractions','pick','format','%s:queue:%s','%s_queue_waiting_interaction:%s','remove','../../rpc/openchannelQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','string','number','timeout\x20is\x20a\x20number','waiting','body','contact','list','upperFirst','channel','QueueId','interaction','MessageId','chat','AccountId','info','name','message','QueueReport','create','catch','error','create\x20queue\x20report','YYYY-MM-DD\x20HH:mm:ss','accepted'];(function(_0xbbc830,_0x136c01){var _0x3e4d65=function(_0x103d11){while(--_0x103d11){_0xbbc830['push'](_0xbbc830['shift']());}};_0x3e4d65(++_0x136c01);}(_0xedd9,0xfc));var _0x9edd=function(_0x486284,_0x51016d){_0x486284=_0x486284-0x0;var _0xcbf963=_0xedd9[_0x486284];return _0xcbf963;};'use strict';var schema=require('validate');var _=require(_0x9edd('0x0'));var util=require(_0x9edd('0x1'));var seqqueue=require(_0x9edd('0x2'));var moment=require(_0x9edd('0x3'));var Redis=require(_0x9edd('0x4'));var config=require(_0x9edd('0x5'));var logger=require(_0x9edd('0x6'))(_0x9edd('0x7'));var strategy=require('./strategy');config[_0x9edd('0x8')]=_[_0x9edd('0x9')](config[_0x9edd('0x8')],{'host':_0x9edd('0xa'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x9edd('0x8')]));var attributes=['id','queue_id',_0x9edd('0xb'),_0x9edd('0xc'),_0x9edd('0xd'),_0x9edd('0xe')];function emit(_0x49d5e3,_0x494a24,_0x5d2f90){io['to'](_0x49d5e3)[_0x9edd('0xf')](_0x494a24,_0x5d2f90);}function emitChannelQueueInteraction(_0x138767,_0x523026,_0xbf9da6,_0x13dc4f,_0x5b6c00,_0x30c0d7,_0x1b73d1,_0x25e64c){var _0xfd544a=_[_0x9edd('0x10')](_0xbf9da6);_0xfd544a[_0x9edd('0x11')]=_0x25e64c;_0xfd544a[_0x9edd('0xc')]=_0x523026;_0xfd544a[_0x9edd('0xb')]=_0x13dc4f;_0xfd544a['id']=_0x5b6c00;if(_0x30c0d7){_0x1b73d1[util['format'](_0x9edd('0x12'),_0x138767)][_0x5b6c00]=_[_0x9edd('0x13')](_0xfd544a,attributes);}else{delete _0x1b73d1[util[_0x9edd('0x14')](_0x9edd('0x12'),_0x138767)][_0x5b6c00];}emit(util[_0x9edd('0x14')](_0x9edd('0x15'),_0x138767,_0x523026),util[_0x9edd('0x14')](_0x9edd('0x16'),_0x138767,_0x30c0d7?'save':_0x9edd('0x17')),_[_0x9edd('0x13')](_0xfd544a,attributes));}var rpc={'openchannelQueueReport':require(_0x9edd('0x18')),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require(_0x9edd('0x19')),'smsQueueReport':require(_0x9edd('0x1a')),'faxQueueReport':require(_0x9edd('0x1b')),'whatsappQueueReport':require('../../rpc/whatsappQueueReport')};var queue=schema({'name':{'type':_0x9edd('0x1c'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x9edd('0x1d'),'message':_0x9edd('0x1e')}});function startRouting(_0x4bdb88,_0x498977,_0x45c3ab,_0x50338f){if(_0x4bdb88&&_0x498977&&_0x45c3ab){_0x498977[_0x9edd('0x1f')]+=0x1;var _0x54a03f={'uniqueid':_0x4bdb88,'from':_0x45c3ab['body']?_0x45c3ab[_0x9edd('0x20')][_0x9edd('0xd')]:'','joinAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x45c3ab[_0x9edd('0x21')]?_0x45c3ab[_0x9edd('0x21')]['id']:null,'ListId':_0x45c3ab[_0x9edd('0x22')]?_0x45c3ab['list']['id']:null};_0x54a03f[_[_0x9edd('0x23')](_0x45c3ab[_0x9edd('0x24')])+_0x9edd('0x25')]=_0x498977['id']||null;_0x54a03f[_[_0x9edd('0x23')](_0x45c3ab[_0x9edd('0x24')])+'InteractionId']=_0x45c3ab[_0x9edd('0x26')]?_0x45c3ab[_0x9edd('0x26')]['id']:null;_0x54a03f[_[_0x9edd('0x23')](_0x45c3ab[_0x9edd('0x24')])+_0x9edd('0x27')]=_0x45c3ab['message']?_0x45c3ab['message']['id']:null;_0x54a03f[_[_0x9edd('0x23')](_0x45c3ab[_0x9edd('0x24')])+(_0x45c3ab[_0x9edd('0x24')]!==_0x9edd('0x28')?_0x9edd('0x29'):'WebsiteId')]=_0x45c3ab['account']?_0x45c3ab[_0x9edd('0xb')]['id']:null;logger[_0x9edd('0x2a')](util[_0x9edd('0x14')]('[%s][START:QUEUE][NAME:%s]',_0x4bdb88,_0x498977[_0x9edd('0x2b')]));emitChannelQueueInteraction(_0x45c3ab[_0x9edd('0x24')],_0x498977[_0x9edd('0x2b')],_0x54a03f,_0x45c3ab[_0x9edd('0xb')]['name'],_0x45c3ab[_0x9edd('0x2c')]['id'],!![],_0x50338f,_0x498977['id']);if(rpc[_0x45c3ab[_0x9edd('0x24')]+_0x9edd('0x2d')]){return rpc[_0x45c3ab[_0x9edd('0x24')]+_0x9edd('0x2d')][_0x9edd('0x2e')](_0x54a03f)[_0x9edd('0x2f')](function(_0x1fba7b){logger[_0x9edd('0x30')](_0x9edd('0x31'));});}}}function stopRouting(_0x4fd03f,_0x138002,_0x6907a5,_0xa55906){if(_0x4fd03f&&_0x138002){_0x138002[_0x9edd('0x1f')]-=0x1;var _0x5af178={'leaveAt':moment()[_0x9edd('0x14')](_0x9edd('0x32')),'acceptAt':moment()[_0x9edd('0x14')]('YYYY-MM-DD\x20HH:mm:ss'),'reason':_0x9edd('0x33')};logger[_0x9edd('0x2a')](util[_0x9edd('0x14')](_0x9edd('0x34'),_0x4fd03f,_0x138002[_0x9edd('0x2b')]));emitChannelQueueInteraction(_0x6907a5[_0x9edd('0x24')],_0x138002[_0x9edd('0x2b')],_0x6907a5[_0x9edd('0x20')],_0x6907a5[_0x9edd('0xb')][_0x9edd('0x2b')],_0x6907a5[_0x9edd('0x2c')]['id'],![],_0xa55906,_0x138002['id']);if(rpc[_0x6907a5[_0x9edd('0x24')]+_0x9edd('0x2d')]){return rpc[_0x6907a5[_0x9edd('0x24')]+'QueueReport'][_0x9edd('0x35')](_0x4fd03f,_0x5af178)['catch'](function(_0x968303){logger[_0x9edd('0x30')](_0x9edd('0x36'));});}}}function endRouting(_0x434d26,_0x16770e,_0x4fa5ab,_0x6de835){if(_0x434d26&&_0x16770e){_0x16770e[_0x9edd('0x1f')]-=0x1;var _0x2b3469={'leaveAt':moment()[_0x9edd('0x14')](_0x9edd('0x32')),'exitAt':moment()[_0x9edd('0x14')](_0x9edd('0x32')),'reason':_0x9edd('0x37')};logger[_0x9edd('0x2a')](util[_0x9edd('0x14')]('[%s][END:QUEUE][NAME:%s]',_0x434d26,_0x16770e[_0x9edd('0x2b')]));emitChannelQueueInteraction(_0x4fa5ab['channel'],_0x16770e[_0x9edd('0x2b')],_0x4fa5ab['body'],_0x4fa5ab[_0x9edd('0xb')][_0x9edd('0x2b')],_0x4fa5ab[_0x9edd('0x2c')]['id'],![],_0x6de835);if(rpc[_0x4fa5ab['channel']+_0x9edd('0x2d')]){return rpc[_0x4fa5ab[_0x9edd('0x24')]+_0x9edd('0x2d')]['update'](_0x434d26,_0x2b3469)[_0x9edd('0x2f')](function(_0x51ad91){logger[_0x9edd('0x30')](_0x9edd('0x36'));});}}}function handleFindQueue(_0x50be2c){return function(_0x315f52){return _0x315f52[_0x9edd('0x2b')][_0x9edd('0x38')]()===_0x50be2c[_0x9edd('0x38')]();};}exports['consequence']=function(_0x449f01,_0x5bbdf8,_0x2bdb3f,_0xc1e657){return function(_0x587d74){try{var _0x318757={'name':_0x5bbdf8[0x0],'timeout':_0x5bbdf8[0x1]};var _0x49a128=queue['validate'](_0x318757,{'typecast':!![]});if(_0x49a128[_0x9edd('0x39')]){logger[_0x9edd('0x30')](_0x9edd('0x3a'),_0x449f01,_[_0x9edd('0x3b')](_0x49a128,_0x9edd('0x2c'))[_0x9edd('0x3c')](',\x20'));_0x587d74[_0x9edd('0x3d')]();}else{var _0x75efbe=_[_0x9edd('0x3e')](_0x2bdb3f[_0xc1e657[_0x9edd('0x24')]+_0x9edd('0x3f')],handleFindQueue(_0x318757[_0x9edd('0x2b')]));if(_0x75efbe){startRouting(_0x449f01,_0x75efbe,_0xc1e657,_0x2bdb3f);var _0x3d5eba=(_0x75efbe[_0x9edd('0x37')]||0xa)*0x3e8;var _0x46e9f4=(_0x318757['timeout']||0x14)*0x3e8;var _0x13197d,_0x2570e3;if(_0x3d5eba>_0x46e9f4){_0x46e9f4=_0x3d5eba;}var _0x2231c1=seqqueue[_0x9edd('0x40')](_0x3d5eba);_0x2231c1['id']=_0x449f01;_0x2231c1[_0x9edd('0x41')]=_0x3d5eba;_0x2231c1[_0x9edd('0x42')]=_0x46e9f4;_0x2231c1[_0x9edd('0x24')]=_0xc1e657['channel'];_0x2bdb3f['rules'][_0x449f01]['on']('end',function(){logger[_0x9edd('0x2a')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0x449f01);stopRouting(_0x449f01,_0x75efbe,_0xc1e657,_0x2bdb3f);clearTimeout(_0x13197d);_0x13197d=undefined;_0x2231c1[_0x9edd('0x43')](!![]);if(_0x2bdb3f[_0x9edd('0x44')][_0x449f01]){delete _0x2bdb3f[_0x9edd('0x44')][_0x449f01];}_0x587d74[_0x9edd('0x3d')]();});_0x2bdb3f[_0x9edd('0x44')][_0x449f01]['on']('complete',function(){if(_0x2bdb3f[_0x9edd('0x44')][_0x449f01]){delete _0x2bdb3f[_0x9edd('0x44')][_0x449f01];}});_0x13197d=setTimeout(function(){logger[_0x9edd('0x2a')]('[%s][QUEUE]\x20APPLICATION\x20END',_0x449f01);endRouting(_0x449f01,_0x75efbe,_0xc1e657,_0x2bdb3f);clearTimeout(_0x13197d);_0x2231c1[_0x9edd('0x43')](!![]);_0x587d74[_0x9edd('0x45')]();},_0x46e9f4);switch(_0x75efbe[_0x9edd('0x46')]){case _0x9edd('0x47'):strategy[_0x9edd('0x47')](_0x2231c1,_0x75efbe,_0x2bdb3f,_0xc1e657);break;default:strategy[_0x9edd('0x48')](_0x2231c1,_0x75efbe,_0x2bdb3f,_0xc1e657);}}else{logger['error'](_0x9edd('0x49'),_0x449f01,_0x318757[_0x9edd('0x2b')]);_0x587d74['stop']();}}}catch(_0xb93816){console[_0x9edd('0x4a')](_0xb93816);logger['error'](_0x9edd('0x3a'),_0x449f01,_0xb93816[_0x9edd('0x4b')]);_0x587d74[_0x9edd('0x3d')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/strategy/agent.js b/server/services/routing/server/applications/strategy/agent.js index bd94b5d..a5e20ef 100644 --- a/server/services/routing/server/applications/strategy/agent.js +++ b/server/services/routing/server/applications/strategy/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe746=['prototype','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','STOP','TIMEOUT','exports','lodash','../../../../../config/logger','notificationId','agent','realtime','routing','squeue','handleRun','bind','timeout','drained','handleDrained','push','handleTimeout','info','isNil','agents','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','forcedOwnership','isAgentAvailable','channel','busyQueue','showNotification','writeLog','RINGING',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available'];(function(_0x182941,_0x2ee2ce){var _0x322428=function(_0x5e2c9d){while(--_0x5e2c9d){_0x182941['push'](_0x182941['shift']());}};_0x322428(++_0x2ee2ce);}(_0xe746,0xcc));var _0x6e74=function(_0x2407fa,_0x422faf){_0x2407fa=_0x2407fa-0x0;var _0x43f05e=_0xe746[_0x2407fa];return _0x43f05e;};'use strict';var _=require(_0x6e74('0x0'));var uuid=require('uuid');var util=require('./util');var logger=require(_0x6e74('0x1'))('routing');var Agent=function(_0xaf65e6,_0x3fa18a,_0x3bfe84,_0x1b9ea5){this[_0x6e74('0x2')]=uuid['v4']();this['squeue']=_0xaf65e6;this[_0x6e74('0x3')]=_0x3fa18a;this[_0x6e74('0x4')]=_0x3bfe84;this[_0x6e74('0x5')]=_0x1b9ea5;this[_0x6e74('0x6')]['push'](this[_0x6e74('0x7')]['bind'](this),this['handleTimeout'][_0x6e74('0x8')](this));this[_0x6e74('0x6')]['on'](_0x6e74('0x9'),this['handleTimeout']['bind'](this));this[_0x6e74('0x6')]['on'](_0x6e74('0xa'),this[_0x6e74('0xb')]['bind'](this));};Agent['prototype'][_0x6e74('0xc')]=function(){this[_0x6e74('0x6')][_0x6e74('0xc')](this[_0x6e74('0x7')][_0x6e74('0x8')](this),this[_0x6e74('0xd')][_0x6e74('0x8')](this));};Agent['prototype'][_0x6e74('0xb')]=function(){this[_0x6e74('0xd')](!![]);};Agent['prototype'][_0x6e74('0x7')]=function(_0x3a423c){logger[_0x6e74('0xe')]('[%s][AGENT]\x20try\x20with\x20%s',this[_0x6e74('0x6')]['id'],this[_0x6e74('0x3')]['id']);if(_[_0x6e74('0xf')](this['realtime'][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']])){logger[_0x6e74('0xe')](_0x6e74('0x11'),this['squeue']['id'],this[_0x6e74('0x3')]['id']);setTimeout(this['push'][_0x6e74('0x8')](this),0x3e8);}else{if(this[_0x6e74('0x5')][_0x6e74('0x12')]||util[_0x6e74('0x13')](this['squeue']['id'],this['realtime']['agents'][this['agent']['id']],this['squeue'][_0x6e74('0x14')],![])){this[_0x6e74('0x4')][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']]['busy']=!![];this[_0x6e74('0x4')][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']][_0x6e74('0x15')]=undefined;util[_0x6e74('0x16')](this[_0x6e74('0x2')],this['squeue']['id'],this[_0x6e74('0x4')]['agents'][this['agent']['id']],null,this['routing']);util[_0x6e74('0x17')](this[_0x6e74('0x6')]['id'],this['realtime'][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']],_0x6e74('0x18')+(this[_0x6e74('0x5')][_0x6e74('0x12')]?_0x6e74('0x19'):''));}else{logger[_0x6e74('0xe')](_0x6e74('0x1a'),this['squeue']['id'],this['agent']['id']);setTimeout(this['push'][_0x6e74('0x8')](this),0x3e8);}}};Agent[_0x6e74('0x1b')]['handleTimeout']=function(_0x10db4e){if(_[_0x6e74('0xf')](this[_0x6e74('0x4')][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']])){return logger[_0x6e74('0xe')](_0x6e74('0x11'),this[_0x6e74('0x6')]['id'],this[_0x6e74('0x3')]['id']);}else{logger[_0x6e74('0xe')](_0x6e74('0x1c'),this[_0x6e74('0x6')]['id'],this[_0x6e74('0x3')]['id']);util[_0x6e74('0x1d')](this[_0x6e74('0x2')],this[_0x6e74('0x6')]['id'],this[_0x6e74('0x4')][_0x6e74('0x10')][this['agent']['id']],null,this[_0x6e74('0x5')]);this[_0x6e74('0x4')][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']]['busy']=![];this[_0x6e74('0x4')][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']][_0x6e74('0x15')]=undefined;util['writeLog'](this[_0x6e74('0x6')]['id'],this['realtime'][_0x6e74('0x10')][this[_0x6e74('0x3')]['id']],_0x10db4e?_0x6e74('0x1e'):_0x6e74('0x1f'));}if(!_0x10db4e){setTimeout(this[_0x6e74('0xc')][_0x6e74('0x8')](this),0x3e8);}};function agent(_0x38d45e,_0x17d7aa,_0x24d528,_0x38f7d5){return new Agent(_0x38d45e,_0x17d7aa,_0x24d528,_0x38f7d5);}module[_0x6e74('0x20')]=agent; \ No newline at end of file +var _0x51c7=['[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','STOP','TIMEOUT','exports','lodash','uuid','./util','routing','notificationId','squeue','push','handleRun','handleTimeout','timeout','bind','drained','handleDrained','prototype','[%s][AGENT]\x20try\x20with\x20%s','agent','isNil','realtime','agents','forcedOwnership','isAgentAvailable','channel','busy','busyQueue','showNotification','writeLog','RINGING',':FORCED','info','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available'];(function(_0x2a0ffd,_0x5e35fc){var _0x3f72e4=function(_0x5c192f){while(--_0x5c192f){_0x2a0ffd['push'](_0x2a0ffd['shift']());}};_0x3f72e4(++_0x5e35fc);}(_0x51c7,0x96));var _0x751c=function(_0x42d41d,_0x17b8ea){_0x42d41d=_0x42d41d-0x0;var _0x2e6184=_0x51c7[_0x42d41d];return _0x2e6184;};'use strict';var _=require(_0x751c('0x0'));var uuid=require(_0x751c('0x1'));var util=require(_0x751c('0x2'));var logger=require('../../../../../config/logger')(_0x751c('0x3'));var Agent=function(_0x1b4014,_0x5976a8,_0x3f38fb,_0x36f6b2){this[_0x751c('0x4')]=uuid['v4']();this['squeue']=_0x1b4014;this['agent']=_0x5976a8;this['realtime']=_0x3f38fb;this[_0x751c('0x3')]=_0x36f6b2;this[_0x751c('0x5')][_0x751c('0x6')](this[_0x751c('0x7')]['bind'](this),this[_0x751c('0x8')]['bind'](this));this[_0x751c('0x5')]['on'](_0x751c('0x9'),this[_0x751c('0x8')][_0x751c('0xa')](this));this[_0x751c('0x5')]['on'](_0x751c('0xb'),this[_0x751c('0xc')]['bind'](this));};Agent[_0x751c('0xd')][_0x751c('0x6')]=function(){this['squeue'][_0x751c('0x6')](this['handleRun'][_0x751c('0xa')](this),this[_0x751c('0x8')][_0x751c('0xa')](this));};Agent['prototype']['handleDrained']=function(){this['handleTimeout'](!![]);};Agent[_0x751c('0xd')][_0x751c('0x7')]=function(_0x278fb1){logger['info'](_0x751c('0xe'),this[_0x751c('0x5')]['id'],this[_0x751c('0xf')]['id']);if(_[_0x751c('0x10')](this[_0x751c('0x11')][_0x751c('0x12')][this[_0x751c('0xf')]['id']])){logger['info']('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x751c('0x5')]['id'],this['agent']['id']);setTimeout(this[_0x751c('0x6')]['bind'](this),0x3e8);}else{if(this[_0x751c('0x3')][_0x751c('0x13')]||util[_0x751c('0x14')](this[_0x751c('0x5')]['id'],this[_0x751c('0x11')]['agents'][this['agent']['id']],this['squeue'][_0x751c('0x15')],![])){this['realtime']['agents'][this['agent']['id']][_0x751c('0x16')]=!![];this[_0x751c('0x11')][_0x751c('0x12')][this[_0x751c('0xf')]['id']][_0x751c('0x17')]=undefined;util[_0x751c('0x18')](this[_0x751c('0x4')],this[_0x751c('0x5')]['id'],this['realtime'][_0x751c('0x12')][this[_0x751c('0xf')]['id']],null,this[_0x751c('0x3')]);util[_0x751c('0x19')](this['squeue']['id'],this['realtime']['agents'][this[_0x751c('0xf')]['id']],_0x751c('0x1a')+(this[_0x751c('0x3')]['forcedOwnership']?_0x751c('0x1b'):''));}else{logger[_0x751c('0x1c')](_0x751c('0x1d'),this[_0x751c('0x5')]['id'],this['agent']['id']);setTimeout(this[_0x751c('0x6')]['bind'](this),0x3e8);}}};Agent[_0x751c('0xd')][_0x751c('0x8')]=function(_0x4efbb1){if(_[_0x751c('0x10')](this[_0x751c('0x11')][_0x751c('0x12')][this[_0x751c('0xf')]['id']])){return logger[_0x751c('0x1c')](_0x751c('0x1e'),this[_0x751c('0x5')]['id'],this['agent']['id']);}else{logger[_0x751c('0x1c')](_0x751c('0x1f'),this[_0x751c('0x5')]['id'],this['agent']['id']);util[_0x751c('0x20')](this[_0x751c('0x4')],this[_0x751c('0x5')]['id'],this[_0x751c('0x11')][_0x751c('0x12')][this[_0x751c('0xf')]['id']],null,this[_0x751c('0x3')]);this[_0x751c('0x11')][_0x751c('0x12')][this['agent']['id']]['busy']=![];this[_0x751c('0x11')]['agents'][this['agent']['id']][_0x751c('0x17')]=undefined;util[_0x751c('0x19')](this[_0x751c('0x5')]['id'],this[_0x751c('0x11')][_0x751c('0x12')][this[_0x751c('0xf')]['id']],_0x4efbb1?_0x751c('0x21'):_0x751c('0x22'));}if(!_0x4efbb1){setTimeout(this['push']['bind'](this),0x3e8);}};function agent(_0x30f7d9,_0x3b81d3,_0x8dc3a0,_0x49c0d8){return new Agent(_0x30f7d9,_0x3b81d3,_0x8dc3a0,_0x49c0d8);}module[_0x751c('0x23')]=agent; \ No newline at end of file diff --git a/server/services/routing/server/applications/strategy/beepall.js b/server/services/routing/server/applications/strategy/beepall.js index 51533af..d6a075a 100644 --- a/server/services/routing/server/applications/strategy/beepall.js +++ b/server/services/routing/server/applications/strategy/beepall.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf32e=['[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY','[%s][QUEUE]\x20EMPTY','hideNotification','STOP','TIMEOUT','busy','exports','lodash','uuid','./util','../../../../../config/logger','routing','notificationId','squeue','realtime','bind','timeout','handleTimeout','prototype','push','handleDrained','handleRun','isNil','queue','Agents','length','agents','info','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','writeLog','RINGING','busyQueue'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xf32e,0x167));var _0xef32=function(_0x3def72,_0x218642){_0x3def72=_0x3def72-0x0;var _0x366424=_0xf32e[_0x3def72];return _0x366424;};'use strict';var _=require(_0xef32('0x0'));var uuid=require(_0xef32('0x1'));var util=require(_0xef32('0x2'));var logger=require(_0xef32('0x3'))(_0xef32('0x4'));var Beepall=function(_0x424fde,_0x2c6e5a,_0x53af1c,_0x539998){this[_0xef32('0x5')]=uuid['v4']();this[_0xef32('0x6')]=_0x424fde;this['queue']=_0x2c6e5a;this[_0xef32('0x7')]=_0x53af1c;this['routing']=_0x539998;this['squeue']['push'](this['handleRun']['bind'](this),this['handleTimeout'][_0xef32('0x8')](this));this[_0xef32('0x6')]['on'](_0xef32('0x9'),this[_0xef32('0xa')][_0xef32('0x8')](this));this['squeue']['on']('drained',this['handleDrained'][_0xef32('0x8')](this));};Beepall[_0xef32('0xb')][_0xef32('0xc')]=function(){this['squeue']['push'](this['handleRun']['bind'](this),this[_0xef32('0xa')]['bind'](this));};Beepall[_0xef32('0xb')][_0xef32('0xd')]=function(_0x37a10c){this[_0xef32('0xa')](!![]);};Beepall[_0xef32('0xb')][_0xef32('0xe')]=function(_0x5ba56d){var _0x38ef12=!![];if(!_[_0xef32('0xf')](this[_0xef32('0x10')])&&!_['isNil'](this[_0xef32('0x10')]['Agents'])&&this[_0xef32('0x10')][_0xef32('0x11')]['length']>0x0){for(var _0x2852be=0x0,_0x2b0fe;_0x2852be0x0){for(var _0xaff3da=0x0,_0x377a82;_0xaff3da0x0&&_0x343664[_0x23ba85+_0xaf8a('0x25')]>=_0x343664[_0x23ba85+_0xaf8a('0x24')]){writeLog(_0x123bfa,_0x343664,_0x23ba85[_0xaf8a('0x26')]()+_0xaf8a('0x27'));return![];}}return!![];};exports[_0xaf8a('0x28')]=function(_0x3bb114,_0x27bded,_0x41781f,_0x24efaf,_0x13168c){return sendNotification(!![],_0x3bb114,_0x27bded,_0x41781f,_0x24efaf,_0x13168c);};exports[_0xaf8a('0x29')]=function(_0xfc4061,_0x5e6d16,_0x17544a,_0x1f7642,_0x238e09){return sendNotification(![],_0xfc4061,_0x5e6d16,_0x17544a,_0x1f7642,_0x238e09);};exports['writeLog']=writeLog; \ No newline at end of file +var _0xb59c=['msg','getMustacheRender','I\x20can\x27t\x20render\x20your\x20template','[%s][QUEUE]\x20%s','notification:%s','save','remove','info','[%s][QUEUE][AGENT:%s][STATUS:%s]','isAgentAvailable','busy','BUSY','online','Pause','PAUSE','hasOwnProperty','Capacity','CurrentCapacity','toUpperCase','hideNotification','writeLog','lodash','util','../utils','ioredis','../../../../../config/environment','../../../../../config/logger','routing','defaults','redis','localhost','emit','format','user:%s','name','split','\x20interaction','notificationSound','account','notificationShake','body'];(function(_0x3c7ec3,_0x89976c){var _0xeafb0a=function(_0x59aba8){while(--_0x59aba8){_0x3c7ec3['push'](_0x3c7ec3['shift']());}};_0xeafb0a(++_0x89976c);}(_0xb59c,0x10b));var _0xcb59=function(_0x43f439,_0xe5bfb7){_0x43f439=_0x43f439-0x0;var _0x5f5a72=_0xb59c[_0x43f439];return _0x5f5a72;};'use strict';var _=require(_0xcb59('0x0'));var util=require(_0xcb59('0x1'));var utils=require(_0xcb59('0x2'));var Mustache=require('mustache');var Redis=require(_0xcb59('0x3'));var config=require(_0xcb59('0x4'));var logger=require(_0xcb59('0x5'))(_0xcb59('0x6'));config['redis']=_[_0xcb59('0x7')](config[_0xcb59('0x8')],{'host':_0xcb59('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function emit(_0x50712f,_0x3597ea,_0x2289e6){io['to'](_0x50712f)[_0xcb59('0xa')](_0x3597ea,_0x2289e6);}function sendNotification(_0x305cb1,_0x1895f9,_0x3a1fb5,_0x42f94c,_0x1c9182,_0x559905){io['to'](util[_0xcb59('0xb')](_0xcb59('0xc'),_0x42f94c[_0xcb59('0xd')]))[_0xcb59('0xa')]('user:save',_0x42f94c);var _0xa8cbed=_0x559905||{};var _0x4ac5ee=_0x3a1fb5[_0xcb59('0xe')]('.');var _0x4773ff={'uniqueid':_0x1895f9,'channel':_0x4ac5ee[0x0],'id':_0x4ac5ee[0x1],'title':_0x4ac5ee[0x0]+_0xcb59('0xf'),'interactionId':_0x4ac5ee[0x2],'queue':_0x1c9182?_0x1c9182['name']:null,'sound':_0xa8cbed['account'][_0xcb59('0x10')],'shake':_0xa8cbed[_0xcb59('0x11')][_0xcb59('0x12')]};try{if(!_0xa8cbed['body']){_0xa8cbed['body']={};}if(_0x1c9182){_0xa8cbed[_0xcb59('0x13')]['queue']=_0x1c9182;}else if(_0xa8cbed['body']['queue']){delete _0xa8cbed[_0xcb59('0x13')]['queue'];}_0x4773ff[_0xcb59('0x14')]=utils[_0xcb59('0x15')](_0xa8cbed[_0xcb59('0x11')]['notificationTemplate'],_0xa8cbed);}catch(_0x21b7fd){_0x4773ff['msg']=_0xcb59('0x16');logger['error'](util[_0xcb59('0xb')](_0xcb59('0x17'),_0x1895f9,_0x21b7fd['message']));}io['to'](util['format']('user:%s',_0x42f94c[_0xcb59('0xd')]))[_0xcb59('0xa')](util[_0xcb59('0xb')](_0xcb59('0x18'),_0x305cb1?_0xcb59('0x19'):_0xcb59('0x1a')),_0x4773ff);}function writeLog(_0x300738,_0x54cfc2,_0x30b77e){return logger[_0xcb59('0x1b')](util[_0xcb59('0xb')](_0xcb59('0x1c'),_0x300738,_0x54cfc2[_0xcb59('0xd')],_0x30b77e));}exports[_0xcb59('0x1d')]=function(_0x4a51e1,_0x238461,_0x571f90,_0x5c73b2){if(_0x238461[_0xcb59('0x1e')]){writeLog(_0x4a51e1,_0x238461,_0xcb59('0x1f'));return![];}if(!_0x238461[_0xcb59('0x20')]){writeLog(_0x4a51e1,_0x238461,'OFFLINE');return![];}if(_0x238461[_0x571f90+_0xcb59('0x21')]){writeLog(_0x4a51e1,_0x238461,_0xcb59('0x22'));return![];}if(_0x5c73b2&&_0x238461[_0xcb59('0x23')](_0x571f90+_0xcb59('0x24'))&&_0x238461[_0xcb59('0x23')](_0x571f90+'CurrentCapacity')){if(_0x238461[_0x571f90+_0xcb59('0x24')]>0x0&&_0x238461[_0x571f90+_0xcb59('0x25')]>=_0x238461[_0x571f90+'Capacity']){writeLog(_0x4a51e1,_0x238461,_0x571f90[_0xcb59('0x26')]()+'\x20MAXCAPACITY');return![];}}return!![];};exports['showNotification']=function(_0x1fe9c2,_0x2f12f4,_0x1d47c2,_0x12f35a,_0xcfa8f7){return sendNotification(!![],_0x1fe9c2,_0x2f12f4,_0x1d47c2,_0x12f35a,_0xcfa8f7);};exports[_0xcb59('0x27')]=function(_0x220bd5,_0x35a28d,_0x517529,_0x27f230,_0x1ed923){return sendNotification(![],_0x220bd5,_0x35a28d,_0x517529,_0x27f230,_0x1ed923);};exports[_0xcb59('0x28')]=writeLog; \ No newline at end of file diff --git a/server/services/routing/server/applications/system.js b/server/services/routing/server/applications/system.js index f55f62b..3368c8c 100644 --- a/server/services/routing/server/applications/system.js +++ b/server/services/routing/server/applications/system.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ce3=['[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','next','[%s][SYSTEM]\x20%s','isObject','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','validate','shelljs','lodash','../../../../config/logger','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','error','map','join','getMustacheRender','info','[%s][SYSTEM]\x20commnad:\x20%s','exec','replace','isEmpty'];(function(_0x36f641,_0x1a3063){var _0x39b299=function(_0x20c0a3){while(--_0x20c0a3){_0x36f641['push'](_0x36f641['shift']());}};_0x39b299(++_0x1a3063);}(_0x6ce3,0x1bf));var _0x36ce=function(_0x3525b3,_0x71b7aa){_0x3525b3=_0x3525b3-0x0;var _0x287126=_0x6ce3[_0x3525b3];return _0x287126;};'use strict';var schema=require(_0x36ce('0x0'));var sh=require(_0x36ce('0x1'));var _=require(_0x36ce('0x2'));var utils=require('./utils');var logger=require(_0x36ce('0x3'))('routing');var system=schema({'command':{'type':_0x36ce('0x4'),'required':!![],'message':_0x36ce('0x5')}});exports['consequence']=function(_0x3cd53f,_0x59eac1){return function(_0x18041a){try{var _0x2a7ff4={'command':_0x59eac1[0x0]};var _0x5f2c34=system[_0x36ce('0x0')](_0x2a7ff4,{'typecast':!![]});if(_0x5f2c34['length']){logger[_0x36ce('0x6')]('[%s][SYSTEM]\x20%s',_0x3cd53f,_[_0x36ce('0x7')](_0x5f2c34,'message')[_0x36ce('0x8')](',\x20'));logger['info']('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x3cd53f);_0x18041a['next']();}else{var _0x4a6ed9=this;var _0x4b2825=utils[_0x36ce('0x9')](_0x59eac1[0x0],this);logger[_0x36ce('0xa')](_0x36ce('0xb'),_0x3cd53f,_0x4b2825);sh[_0x36ce('0xc')](_['trim'](_0x4b2825),function(_0x3b0860,_0x39378b){logger[_0x36ce('0xa')]('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x3cd53f,_0x3b0860);if(_0x3b0860==0x0){var _0x714e8d=_0x39378b[_0x36ce('0xd')](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x59eac1[0x1])||_[_0x36ce('0xe')](_0x59eac1[0x1])){logger[_0x36ce('0xa')](_0x36ce('0xf'),_0x3cd53f);_0x4a6ed9[_0x36ce('0x10')][_0x59eac1[0x1]]=_0x714e8d;}else{logger[_0x36ce('0xa')](_0x36ce('0x11'),_0x3cd53f,_0x59eac1[0x1],_0x714e8d);_0x4a6ed9['body'][_0x59eac1[0x1]]=_0x714e8d;}}_0x18041a[_0x36ce('0x12')]();});}}catch(_0x5eb756){logger[_0x36ce('0x6')](_0x36ce('0x13'),_0x3cd53f,_[_0x36ce('0x14')](_0x5eb756)?JSON['stringify'](_0x5eb756):_0x5eb756);logger[_0x36ce('0xa')](_0x36ce('0x15'),_0x3cd53f);_0x18041a['next']();}};}; \ No newline at end of file +var _0xd19f=['[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','validate','shelljs','lodash','./utils','../../../../config/logger','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','log','cris\x20in\x20function','error','[%s][SYSTEM]\x20%s','map','message','join','next','getMustacheRender','info','exec','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','isObject','stringify'];(function(_0x47001b,_0x4030b9){var _0xecf3b3=function(_0x21630b){while(--_0x21630b){_0x47001b['push'](_0x47001b['shift']());}};_0xecf3b3(++_0x4030b9);}(_0xd19f,0x79));var _0xfd19=function(_0x119705,_0xba9427){_0x119705=_0x119705-0x0;var _0x2affc2=_0xd19f[_0x119705];return _0x2affc2;};'use strict';var schema=require(_0xfd19('0x0'));var sh=require(_0xfd19('0x1'));var _=require(_0xfd19('0x2'));var utils=require(_0xfd19('0x3'));var logger=require(_0xfd19('0x4'))(_0xfd19('0x5'));var system=schema({'command':{'type':_0xfd19('0x6'),'required':!![],'message':_0xfd19('0x7')}});exports[_0xfd19('0x8')]=function(_0x44de11,_0x2113b0){console['log']('\x20cris\x20consequence',_0x2113b0);return function(_0x51756b){try{var _0x477b15={'command':_0x2113b0[0x0]};console[_0xfd19('0x9')](_0xfd19('0xa'),_0x477b15);var _0x25957b=system[_0xfd19('0x0')](_0x477b15,{'typecast':!![]});if(_0x25957b['length']){logger[_0xfd19('0xb')](_0xfd19('0xc'),_0x44de11,_[_0xfd19('0xd')](_0x25957b,_0xfd19('0xe'))[_0xfd19('0xf')](',\x20'));logger['info']('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x44de11);_0x51756b[_0xfd19('0x10')]();}else{var _0x249934=this;var _0x31688a=utils[_0xfd19('0x11')](_0x2113b0[0x0],this);logger[_0xfd19('0x12')]('[%s][SYSTEM]\x20commnad:\x20%s',_0x44de11,_0x31688a);sh[_0xfd19('0x13')](_[_0xfd19('0x14')](_0x31688a),function(_0x475c21,_0x5542c9){logger[_0xfd19('0x12')](_0xfd19('0x15'),_0x44de11,_0x475c21);if(_0x475c21==0x0){var _0x245d89=_0x5542c9['replace'](/(\r\n|\n|\r)/gm,'');if(_[_0xfd19('0x16')](_0x2113b0[0x1])||_[_0xfd19('0x17')](_0x2113b0[0x1])){logger[_0xfd19('0x12')](_0xfd19('0x18'),_0x44de11);_0x249934[_0xfd19('0x19')][_0x2113b0[0x1]]=_0x245d89;}else{logger['info'](_0xfd19('0x1a'),_0x44de11,_0x2113b0[0x1],_0x245d89);_0x249934[_0xfd19('0x19')][_0x2113b0[0x1]]=_0x245d89;}}_0x51756b[_0xfd19('0x10')]();});}}catch(_0x2f9788){logger[_0xfd19('0xb')](_0xfd19('0xc'),_0x44de11,_[_0xfd19('0x1b')](_0x2f9788)?JSON[_0xfd19('0x1c')](_0x2f9788):_0x2f9788);logger['info'](_0xfd19('0x1d'),_0x44de11);_0x51756b[_0xfd19('0x10')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/tag.js b/server/services/routing/server/applications/tag.js index 5a61dd6..37a75d5 100644 --- a/server/services/routing/server/applications/tag.js +++ b/server/services/routing/server/applications/tag.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4282=['error','[%s][TAG]\x20%s','map','message','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','Interaction','channel','addTags','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','catch','finally','next','stringify','validate','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','routing','number','consequence','length'];(function(_0x5a1fdc,_0x41b01a){var _0x3e1096=function(_0x3be327){while(--_0x3be327){_0x5a1fdc['push'](_0x5a1fdc['shift']());}};_0x3e1096(++_0x41b01a);}(_0x4282,0x1dc));var _0x2428=function(_0x6f1a87,_0x5d5bcf){_0x6f1a87=_0x6f1a87-0x0;var _0x2495c7=_0x4282[_0x6f1a87];return _0x2495c7;};'use strict';var schema=require(_0x2428('0x0'));var _=require('lodash');var rpc={'chatInteraction':require(_0x2428('0x1')),'openchannelInteraction':require(_0x2428('0x2')),'smsInteraction':require(_0x2428('0x3')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0x2428('0x4')),'whatsappInteraction':require(_0x2428('0x5'))};var logger=require('../../../../config/logger')(_0x2428('0x6'));var tag=schema({'tag':{'type':_0x2428('0x7'),'required':!![],'message':'TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports[_0x2428('0x8')]=function(_0x122a62,_0x2320c0,_0x20f324,_0x24fd81){return function(_0x3bd2d3){try{var _0x5d573f={'tag':_0x2320c0[0x0]};var _0x53e2d3=tag[_0x2428('0x0')](_0x5d573f,{'typecast':!![]});if(_0x53e2d3[_0x2428('0x9')]){logger[_0x2428('0xa')](_0x2428('0xb'),_0x122a62,_[_0x2428('0xc')](_0x53e2d3,_0x2428('0xd'))[_0x2428('0xe')](',\x20'));logger[_0x2428('0xf')](_0x2428('0x10'),_0x122a62);_0x3bd2d3['next']();}else{var _0x506e02={'ids':[_0x2320c0[0x0]]};if(rpc[_0x24fd81['channel']+_0x2428('0x11')]){rpc[_0x24fd81[_0x2428('0x12')]+_0x2428('0x11')][_0x2428('0x13')](_0x24fd81[_0x2428('0x14')]['id'],_0x506e02)[_0x2428('0x15')](function(_0x5ecef9){logger[_0x2428('0xf')](_0x2428('0x16'),_0x122a62,_0x2320c0[0x1],_0x24fd81['channel'],_0x24fd81[_0x2428('0x14')]['id']);})[_0x2428('0x17')](function(_0x411134){logger[_0x2428('0xa')](_0x2428('0xb'),_0x122a62,JSON['stringify'](_0x411134));logger['info'](_0x2428('0x10'),_0x122a62);})[_0x2428('0x18')](function(){_0x3bd2d3[_0x2428('0x19')]();});}}}catch(_0x1e22b1){logger[_0x2428('0xa')]('[%s][TAG]\x20%s',_0x122a62,_['isObject'](_0x1e22b1)?JSON[_0x2428('0x1a')](_0x1e22b1):_0x1e22b1);logger[_0x2428('0xf')](_0x2428('0x10'),_0x122a62);_0x3bd2d3[_0x2428('0x19')]();}};}; \ No newline at end of file +var _0x7c43=['message','next','channel','Interaction','interaction','then','info','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','catch','error','[%s][TAG]\x20%s','stringify','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','finally','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','map'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x7c43,0xf8));var _0x37c4=function(_0x6c295d,_0x4b83a9){_0x6c295d=_0x6c295d-0x0;var _0x1259e4=_0x7c43[_0x6c295d];return _0x1259e4;};'use strict';var schema=require('validate');var _=require('lodash');var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0x37c4('0x0')),'smsInteraction':require(_0x37c4('0x1')),'mailInteraction':require(_0x37c4('0x2')),'faxInteraction':require(_0x37c4('0x3')),'whatsappInteraction':require(_0x37c4('0x4'))};var logger=require(_0x37c4('0x5'))(_0x37c4('0x6'));var tag=schema({'tag':{'type':_0x37c4('0x7'),'required':!![],'message':_0x37c4('0x8')}});exports[_0x37c4('0x9')]=function(_0x2e84ac,_0x54e732,_0x1b4103,_0x32d2d7){return function(_0xdb71af){try{var _0x504621={'tag':_0x54e732[0x0]};var _0x1ac53c=tag['validate'](_0x504621,{'typecast':!![]});if(_0x1ac53c[_0x37c4('0xa')]){logger['error']('[%s][TAG]\x20%s',_0x2e84ac,_[_0x37c4('0xb')](_0x1ac53c,_0x37c4('0xc'))['join'](',\x20'));logger['info']('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x2e84ac);_0xdb71af[_0x37c4('0xd')]();}else{var _0x118969={'ids':[_0x54e732[0x0]]};if(rpc[_0x32d2d7[_0x37c4('0xe')]+_0x37c4('0xf')]){rpc[_0x32d2d7[_0x37c4('0xe')]+'Interaction']['addTags'](_0x32d2d7[_0x37c4('0x10')]['id'],_0x118969)[_0x37c4('0x11')](function(_0x2eab2a){logger[_0x37c4('0x12')](_0x37c4('0x13'),_0x2e84ac,_0x54e732[0x1],_0x32d2d7['channel'],_0x32d2d7[_0x37c4('0x10')]['id']);})[_0x37c4('0x14')](function(_0x5d5c1b){logger[_0x37c4('0x15')](_0x37c4('0x16'),_0x2e84ac,JSON[_0x37c4('0x17')](_0x5d5c1b));logger[_0x37c4('0x12')](_0x37c4('0x18'),_0x2e84ac);})[_0x37c4('0x19')](function(){_0xdb71af[_0x37c4('0xd')]();});}}}catch(_0x2edf2b){logger[_0x37c4('0x15')](_0x37c4('0x16'),_0x2e84ac,_['isObject'](_0x2edf2b)?JSON[_0x37c4('0x17')](_0x2edf2b):_0x2edf2b);logger[_0x37c4('0x12')](_0x37c4('0x18'),_0x2e84ac);_0xdb71af[_0x37c4('0xd')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/utils.js b/server/services/routing/server/applications/utils.js index c2dce73..cb0718c 100644 --- a/server/services/routing/server/applications/utils.js +++ b/server/services/routing/server/applications/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4bd=['lodash','exports','merge','body','contact','message','account','mustache'];(function(_0x55b86a,_0x9f9772){var _0x46f950=function(_0x3113b0){while(--_0x3113b0){_0x55b86a['push'](_0x55b86a['shift']());}};_0x46f950(++_0x9f9772);}(_0xd4bd,0x15f));var _0xdd4b=function(_0x539b71,_0x4daf0b){_0x539b71=_0x539b71-0x0;var _0x3d1a59=_0xd4bd[_0x539b71];return _0x3d1a59;};'use strict';var Mustache=require(_0xdd4b('0x0'));var _=require(_0xdd4b('0x1'));module[_0xdd4b('0x2')]={'getMustacheRender':function(_0x1c766f,_0x54b1db){return Mustache['render'](_0x1c766f,_[_0xdd4b('0x3')](_0x54b1db[_0xdd4b('0x4')],{'contact':_0x54b1db[_0xdd4b('0x5')],'message':_0x54b1db[_0xdd4b('0x6')],'account':_0x54b1db[_0xdd4b('0x7')],'interaction':_0x54b1db['interaction'],'list':_0x54b1db['list']}))||'';}}; \ No newline at end of file +var _0xecd5=['lodash','exports','render','merge','body','contact','account','list'];(function(_0x919445,_0x5467dc){var _0x511b3e=function(_0xde10f3){while(--_0xde10f3){_0x919445['push'](_0x919445['shift']());}};_0x511b3e(++_0x5467dc);}(_0xecd5,0x110));var _0x5ecd=function(_0x4c3056,_0x44b0e5){_0x4c3056=_0x4c3056-0x0;var _0x457b8f=_0xecd5[_0x4c3056];return _0x457b8f;};'use strict';var Mustache=require('mustache');var _=require(_0x5ecd('0x0'));module[_0x5ecd('0x1')]={'getMustacheRender':function(_0x1aa184,_0x4e96ee){return Mustache[_0x5ecd('0x2')](_0x1aa184,_[_0x5ecd('0x3')](_0x4e96ee[_0x5ecd('0x4')],{'contact':_0x4e96ee[_0x5ecd('0x5')],'message':_0x4e96ee['message'],'account':_0x4e96ee[_0x5ecd('0x6')],'interaction':_0x4e96ee['interaction'],'list':_0x4e96ee[_0x5ecd('0x7')]}))||'';}}; \ No newline at end of file diff --git a/server/services/routing/server/index.js b/server/services/routing/server/index.js index e9d495e..2a0d0ff 100644 --- a/server/services/routing/server/index.js +++ b/server/services/routing/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfdb3=['values','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','../../../config/environment','../rpc/openchannelQueueReport','../rpc/chatQueueReport','../lib/rule-engine','format','isNil','IntervalId','Intervals','map','interval','rules','message','interaction','isArray','applications','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata','split','push','slice','dialogflow','dialogflowv2','amazonlex','tag','TagId','%s:%s:%s','./interval','condition','intervals','./applications/','priority','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','execute','stringify','matchPath','emit','complete','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','channel','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','agent','agents','busy','busyQueue','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found'];(function(_0x3ef937,_0x12dc99){var _0x18fead=function(_0x355055){while(--_0x355055){_0x3ef937['push'](_0x3ef937['shift']());}};_0x18fead(++_0x12dc99);}(_0xfdb3,0xd8));var _0x3fdb=function(_0x2ebe07,_0x55dcec){_0x2ebe07=_0x2ebe07-0x0;var _0x1bc170=_0xfdb3[_0x2ebe07];return _0x1bc170;};'use strict';var _=require(_0x3fdb('0x0'));var util=require(_0x3fdb('0x1'));var path=require(_0x3fdb('0x2'));var fs=require('fs');var jayson=require(_0x3fdb('0x3'));var BPromise=require(_0x3fdb('0x4'));var uuid=require('uuid');var config=require(_0x3fdb('0x5'));var logger=require('../../../config/logger')('routing');var rpc={'openchannelQueueReport':require(_0x3fdb('0x6')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require(_0x3fdb('0x7')),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x3fdb('0x8'));function getId(_0x5a0aae,_0x4bf41e,_0x24fa75){return util[_0x3fdb('0x9')]('%s.%s.%s',_0x5a0aae,_0x4bf41e||0x0,_0x24fa75||0x0);}function getIntervals(_0x24c989,_0x4fc997){var _0x569d16=[];if(!_[_0x3fdb('0xa')](_0x4fc997[_0x3fdb('0xb')])&&!_['isNil'](_0x24c989[_0x4fc997['IntervalId']])&&!_[_0x3fdb('0xa')](_0x24c989[_0x4fc997['IntervalId']][_0x3fdb('0xc')])){_0x569d16=_[_0x3fdb('0xd')](_0x24c989[_0x4fc997[_0x3fdb('0xb')]][_0x3fdb('0xc')],_0x3fdb('0xe'));}else if(!_[_0x3fdb('0xa')](_0x4fc997[_0x3fdb('0xe')])){_0x569d16=[_0x4fc997['interval']];}return _0x569d16;}exports['listen']=function(_0x5d7e11){_0x5d7e11[_0x3fdb('0xf')]={};return new BPromise(function(_0x7a94b,_0x3879e7){var _0x16b84b={'Start':function(_0x2e0c2f){var _0x4df52a=this;return new Promise(function(_0x1920a0,_0x45f957){if(_0x2e0c2f){try{var _0x560d69=[];var _0x100e0b=getId(_0x2e0c2f['channel'],_0x2e0c2f[_0x3fdb('0x10')]?_0x2e0c2f['message']['id']:0x0,_0x2e0c2f[_0x3fdb('0x11')]?_0x2e0c2f[_0x3fdb('0x11')]['id']:0x0);if(_0x2e0c2f['applications']&&_[_0x3fdb('0x12')](_0x2e0c2f[_0x3fdb('0x13')])&&_0x2e0c2f[_0x3fdb('0x13')][_0x3fdb('0x14')]){for(var _0x3266c8=0x0;_0x3266c8<_0x2e0c2f[_0x3fdb('0x13')][_0x3fdb('0x14')];_0x3266c8+=0x1){var _0x2542a0=_0x2e0c2f[_0x3fdb('0x13')][_0x3266c8];if(fs[_0x3fdb('0x15')](path[_0x3fdb('0x16')](__dirname,'applications',_0x2542a0[_0x3fdb('0x17')]+_0x3fdb('0x18')))){var _0x40ef69=[];switch(_0x2542a0[_0x3fdb('0x17')][_0x3fdb('0x19')]()){case _0x3fdb('0x1a'):var _0x192375=_0x2542a0[_0x3fdb('0x1b')][_0x3fdb('0x1c')](',');_0x40ef69['push'](_0x192375[0x0]);_0x40ef69[_0x3fdb('0x1d')](_0x192375[_0x3fdb('0x1e')](0x1,_0x192375['length'])['join'](','));break;case _0x3fdb('0x1f'):var _0x3ab825=_0x2542a0[_0x3fdb('0x1b')][_0x3fdb('0x1c')](',');_0x40ef69[_0x3fdb('0x1d')](_0x3ab825[0x0]);_0x40ef69[_0x3fdb('0x1d')](_0x3ab825[0x1]);_0x40ef69[_0x3fdb('0x1d')](_0x3ab825[_0x3fdb('0x1e')](0x2,_0x3ab825[_0x3fdb('0x14')])['join'](','));break;case _0x3fdb('0x20'):var _0x2375ab=_0x2542a0[_0x3fdb('0x1b')][_0x3fdb('0x1c')](',');_0x40ef69[_0x3fdb('0x1d')](_0x2375ab[0x0]);_0x40ef69[_0x3fdb('0x1d')](_0x2375ab[0x1]);_0x40ef69[_0x3fdb('0x1d')](_0x2375ab[0x2]);_0x40ef69[_0x3fdb('0x1d')](_0x2375ab[0x3]);_0x40ef69[_0x3fdb('0x1d')](_0x2375ab['slice'](0x4,_0x2375ab[_0x3fdb('0x14')])['join'](','));break;case _0x3fdb('0x21'):var _0x31f390=_0x2542a0[_0x3fdb('0x1b')][_0x3fdb('0x1c')](',');_0x40ef69[_0x3fdb('0x1d')](_0x31f390[0x0]);_0x40ef69[_0x3fdb('0x1d')](_0x31f390[0x1]);_0x40ef69['push'](_0x31f390[0x2]);_0x40ef69[_0x3fdb('0x1d')](_0x31f390[0x3]);_0x40ef69['push'](_0x31f390['slice'](0x4,_0x31f390['length'])[_0x3fdb('0x16')](','));break;case _0x3fdb('0x10'):_0x40ef69[_0x3fdb('0x1d')](_0x2542a0[_0x3fdb('0x1b')]);break;case _0x3fdb('0x22'):_0x40ef69[_0x3fdb('0x1d')](_0x2542a0[_0x3fdb('0x23')]);_0x40ef69[_0x3fdb('0x1d')](_0x2542a0[_0x3fdb('0x1b')]);break;default:_0x40ef69=_[_0x3fdb('0xa')](_0x2542a0[_0x3fdb('0x1b')])?[]:_0x2542a0['appdata'][_0x3fdb('0x1c')](',');}var _0x3410f5={'id':util[_0x3fdb('0x9')](_0x3fdb('0x24'),_0x100e0b,_0x2542a0['id'],_0x2542a0['app']),'condition':require(_0x3fdb('0x25'))[_0x3fdb('0x26')](_0x100e0b,getIntervals(_0x5d7e11[_0x3fdb('0x27')],_0x2542a0),_0x5d7e11),'consequence':require(_0x3fdb('0x28')+_0x2542a0[_0x3fdb('0x17')])['consequence'](_0x100e0b,_0x40ef69,_0x5d7e11,_0x2e0c2f),'p':_0x2542a0[_0x3fdb('0x29')]||0x0};logger[_0x3fdb('0x2a')](_0x3fdb('0x2b'),_0x3410f5['id'],_0x3fdb('0x2c'),getIntervals(_0x5d7e11[_0x3fdb('0x27')],_0x2542a0)[_0x3fdb('0x16')](_0x3fdb('0x2d')));_0x560d69[_0x3fdb('0x1d')](_0x3410f5);}else{logger[_0x3fdb('0x2e')]('Please\x20create\x20a\x20new\x20file\x20under',path['join'](__dirname,_0x3fdb('0x13'),_0x2542a0[_0x3fdb('0x17')]+_0x3fdb('0x18')));}}_0x5d7e11[_0x3fdb('0xf')][_0x100e0b]=new RuleEngine(_0x560d69);_0x5d7e11['rules'][_0x100e0b][_0x3fdb('0x2f')](_0x2e0c2f,function(_0x4a5d87){logger[_0x3fdb('0x2a')]('Applications\x20executed',JSON[_0x3fdb('0x30')](_0x4a5d87[_0x3fdb('0x31')]));if(_0x5d7e11[_0x3fdb('0xf')][_0x100e0b]){_0x5d7e11[_0x3fdb('0xf')][_0x100e0b][_0x3fdb('0x32')](_0x3fdb('0x33'));}});return _0x1920a0({'code':0xc8,'message':_0x2e0c2f});}else{logger['info'](_0x3fdb('0x34'));return _0x1920a0({'code':0xc8,'message':_0x2e0c2f});}}catch(_0x4efec3){logger[_0x3fdb('0x2e')](_0x4efec3[_0x3fdb('0x35')]);return _0x45f957(_0x4df52a[_0x3fdb('0x2e')](0x1f4,_0x4efec3));}}return _0x45f957(_0x3fdb('0x36'));});},'AcceptMessage':function(_0x235e2c){var _0x184995=this;return new Promise(function(_0x5af558,_0x18869d){if(_0x235e2c[_0x3fdb('0x10')]&&_0x235e2c[_0x3fdb('0x10')]['id']){try{var _0x32c660=getId(_0x235e2c[_0x3fdb('0x37')],_0x235e2c[_0x3fdb('0x10')]?_0x235e2c['message']['id']:0x0,_0x235e2c[_0x3fdb('0x11')]?_0x235e2c[_0x3fdb('0x11')]['id']:0x0);if(_0x5d7e11[_0x3fdb('0xf')][_0x32c660]){_0x5d7e11[_0x3fdb('0xf')][_0x32c660]['emit'](_0x3fdb('0x38'));if(rpc[_0x235e2c['channel']+_0x3fdb('0x39')]){rpc[_0x235e2c['channel']+_0x3fdb('0x39')][_0x3fdb('0x3a')](_0x32c660,{'UserId':_0x235e2c[_0x3fdb('0x10')][_0x3fdb('0x3b')]})[_0x3fdb('0x3c')](function(_0x236e3a){logger[_0x3fdb('0x2e')](_0x3fdb('0x3d'));});}}return _0x5af558({'code':0xc8,'message':_0x235e2c});}catch(_0x24c50f){logger[_0x3fdb('0x2e')](_0x24c50f[_0x3fdb('0x35')]);return _0x18869d(_0x184995['error'](0x1f4,_0x24c50f));}}logger['error'](_0x3fdb('0x3e'));return _0x18869d(_0x184995['error'](0x1f4,_0x3fdb('0x3e')));});},'RejectMessage':function(_0x4059c2){var _0x19012e=this;return new Promise(function(_0x12db8c,_0x4e178a){if(_0x4059c2['agent']&&_0x4059c2[_0x3fdb('0x3f')]['id']){try{if(_0x5d7e11[_0x3fdb('0x40')][_0x4059c2[_0x3fdb('0x3f')]['id']]){_0x5d7e11['agents'][_0x4059c2[_0x3fdb('0x3f')]['id']][_0x3fdb('0x41')]=![];_0x5d7e11['agents'][_0x4059c2[_0x3fdb('0x3f')]['id']][_0x3fdb('0x42')]=undefined;}return _0x12db8c({'code':0xc8,'message':_0x4059c2});}catch(_0x367acd){logger['error'](_0x367acd[_0x3fdb('0x35')]);return _0x4e178a(_0x19012e[_0x3fdb('0x2e')](0x1f4,_0x367acd));}}logger[_0x3fdb('0x2e')](_0x3fdb('0x3e'));return _0x4e178a(_0x19012e['error'](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x341295){var _0x4c6c82=this;return new Promise(function(_0x5467bb,_0x1ce3e3){if(_0x341295['channel']&&_0x341295['interaction']&&_0x341295['interaction']['id']){try{var _0x21e3d8=getId(_0x341295[_0x3fdb('0x37')],_0x341295[_0x3fdb('0x10')]?_0x341295[_0x3fdb('0x10')]['id']:0x0,_0x341295['interaction']?_0x341295[_0x3fdb('0x11')]['id']:0x0);if(_0x5d7e11[_0x3fdb('0xf')][_0x21e3d8]){_0x5d7e11[_0x3fdb('0xf')][_0x21e3d8]['emit']('end');}return _0x5467bb({'code':0xc8,'message':_0x341295});}catch(_0x342811){logger['error'](_0x342811[_0x3fdb('0x35')]);return _0x1ce3e3(_0x4c6c82[_0x3fdb('0x2e')](0x1f4,_0x342811));}}logger[_0x3fdb('0x2e')](_0x3fdb('0x3e'));return _0x1ce3e3(_0x4c6c82[_0x3fdb('0x2e')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x4e5e61){var _0x27fefe=this;return new Promise(function(_0x242480,_0x1557e8){if(_0x5d7e11[_0x3fdb('0x40')][_0x3fdb('0x43')](_0x4e5e61['id'])){for(var _0x42af43 in _0x4e5e61[_0x3fdb('0x44')]){if(_0x4e5e61['capacity'][_0x3fdb('0x43')](_0x42af43)){if(_0x5d7e11[_0x3fdb('0x40')][_0x4e5e61['id']][_0x3fdb('0x43')](_0x42af43+_0x3fdb('0x45'))){_0x5d7e11[_0x3fdb('0x40')][_0x4e5e61['id']][_0x42af43+_0x3fdb('0x45')]=parseInt(_0x4e5e61[_0x3fdb('0x44')][_0x42af43],0xa);}}}_0x5d7e11[_0x3fdb('0x40')][_0x4e5e61['id']][_0x3fdb('0x46')]();return _0x242480({'code':0xc8,'message':_0x5d7e11[_0x3fdb('0x40')][_0x4e5e61['id']]});}else{return _0x1557e8(_0x27fefe['error'](0x1f4,_0x3fdb('0x47')));}});},'Agents':function(_0xa388bb){return new Promise(function(_0x52a59f,_0x1c2a23){var _0x33aaa5=_[_0x3fdb('0x48')](_0x5d7e11[_0x3fdb('0x40')]);_0x52a59f({'count':_0x33aaa5[_0x3fdb('0x14')],'rows':_0x33aaa5});});},'ChatQueues':function(_0x107796){return new Promise(function(_0x16bd1d,_0x60f00b){var _0x3efea8=[];for(var _0xe7d4c9 in _0x5d7e11[_0x3fdb('0x49')]){if(_0x5d7e11['chatQueues'][_0x3fdb('0x43')](_0xe7d4c9)){var _0x508ec1=_0x5d7e11['chatQueues'][_0xe7d4c9];var _0x500f1e={'id':_0x508ec1['id'],'available':_0x508ec1[_0x3fdb('0x4a')],'loggedIn':_0x508ec1[_0x3fdb('0x4b')],'name':_0x508ec1[_0x3fdb('0x4c')],'paused':_0x508ec1[_0x3fdb('0x4d')],'waiting':_0x508ec1[_0x3fdb('0x4e')]};_0x3efea8[_0x3fdb('0x1d')](_0x500f1e);}}_0x16bd1d({'count':_0x3efea8[_0x3fdb('0x14')],'rows':_0x3efea8});});},'MailQueues':function(_0x8ac6e3){return new Promise(function(_0x5a5854,_0x3e591d){var _0x3f06d9=[];for(var _0x51486a in _0x5d7e11[_0x3fdb('0x4f')]){if(_0x5d7e11[_0x3fdb('0x4f')][_0x3fdb('0x43')](_0x51486a)){var _0x3a2614=_0x5d7e11[_0x3fdb('0x4f')][_0x51486a];var _0x1df601={'id':_0x3a2614['id'],'available':_0x3a2614[_0x3fdb('0x4a')],'loggedIn':_0x3a2614[_0x3fdb('0x4b')],'name':_0x3a2614[_0x3fdb('0x4c')],'paused':_0x3a2614[_0x3fdb('0x4d')],'waiting':_0x3a2614['waiting']};_0x3f06d9['push'](_0x1df601);}}_0x5a5854({'count':_0x3f06d9[_0x3fdb('0x14')],'rows':_0x3f06d9});});},'OpenchannelQueues':function(_0x5baad4){return new Promise(function(_0x141cb9,_0x31567a){var _0x4dc552=[];for(var _0x119326 in _0x5d7e11[_0x3fdb('0x50')]){if(_0x5d7e11['openchannelQueues'][_0x3fdb('0x43')](_0x119326)){var _0x40a1ce=_0x5d7e11[_0x3fdb('0x50')][_0x119326];var _0x4007ed={'id':_0x40a1ce['id'],'available':_0x40a1ce[_0x3fdb('0x4a')],'loggedIn':_0x40a1ce['loggedIn'],'name':_0x40a1ce[_0x3fdb('0x4c')],'paused':_0x40a1ce[_0x3fdb('0x4d')],'waiting':_0x40a1ce['waiting']};_0x4dc552[_0x3fdb('0x1d')](_0x4007ed);}}_0x141cb9({'count':_0x4dc552[_0x3fdb('0x14')],'rows':_0x4dc552});});},'SmsQueues':function(_0x82308f){return new Promise(function(_0x31672a,_0x16fb30){var _0x2f2681=[];for(var _0x5239dd in _0x5d7e11[_0x3fdb('0x51')]){if(_0x5d7e11[_0x3fdb('0x51')][_0x3fdb('0x43')](_0x5239dd)){var _0x1ccae4=_0x5d7e11['smsQueues'][_0x5239dd];var _0x42bd6b={'id':_0x1ccae4['id'],'available':_0x1ccae4['available'],'loggedIn':_0x1ccae4[_0x3fdb('0x4b')],'name':_0x1ccae4['name'],'paused':_0x1ccae4[_0x3fdb('0x4d')],'waiting':_0x1ccae4[_0x3fdb('0x4e')]};_0x2f2681[_0x3fdb('0x1d')](_0x42bd6b);}}_0x31672a({'count':_0x2f2681[_0x3fdb('0x14')],'rows':_0x2f2681});});},'FaxQueues':function(_0x4b468e){return new Promise(function(_0x56af3c,_0x34c13d){var _0x5eaa18=[];for(var _0x2a51e3 in _0x5d7e11[_0x3fdb('0x52')]){if(_0x5d7e11['faxQueues'][_0x3fdb('0x43')](_0x2a51e3)){var _0x16a9de=_0x5d7e11[_0x3fdb('0x52')][_0x2a51e3];var _0x504a87={'id':_0x16a9de['id'],'available':_0x16a9de[_0x3fdb('0x4a')],'loggedIn':_0x16a9de['loggedIn'],'name':_0x16a9de[_0x3fdb('0x4c')],'paused':_0x16a9de['paused'],'waiting':_0x16a9de[_0x3fdb('0x4e')]};_0x5eaa18['push'](_0x504a87);}}_0x56af3c({'count':_0x5eaa18['length'],'rows':_0x5eaa18});});},'WhatsappQueues':function(_0x4d5821){return new Promise(function(_0x4c9dbb,_0x1b12b2){var _0x5cf454=[];for(var _0x25fe0d in _0x5d7e11[_0x3fdb('0x53')]){if(_0x5d7e11[_0x3fdb('0x53')][_0x3fdb('0x43')](_0x25fe0d)){var _0x14c4d1=_0x5d7e11[_0x3fdb('0x53')][_0x25fe0d];var _0x232bd7={'id':_0x14c4d1['id'],'available':_0x14c4d1[_0x3fdb('0x4a')],'loggedIn':_0x14c4d1['loggedIn'],'name':_0x14c4d1[_0x3fdb('0x4c')],'paused':_0x14c4d1[_0x3fdb('0x4d')],'waiting':_0x14c4d1[_0x3fdb('0x4e')]};_0x5cf454[_0x3fdb('0x1d')](_0x232bd7);}}_0x4c9dbb({'count':_0x5cf454['length'],'rows':_0x5cf454});});},'ChatQueuesWaitingInteractions':function(_0x14b702){return new Promise(function(_0x26de6b,_0x1db151){var _0x479728=_[_0x3fdb('0x48')](_0x5d7e11[_0x3fdb('0x54')]);_0x26de6b({'count':_0x479728['length'],'rows':_0x479728});});},'MailQueuesWaitingInteractions':function(_0x1c2658){return new Promise(function(_0x4ab5f3,_0x376e77){var _0x4f81c7=_['values'](_0x5d7e11[_0x3fdb('0x55')]);_0x4ab5f3({'count':_0x4f81c7[_0x3fdb('0x14')],'rows':_0x4f81c7});});},'OpenchannelQueuesWaitingInteractions':function(_0x2dce8c){return new Promise(function(_0x208994,_0x5dc287){var _0x1368b1=_[_0x3fdb('0x48')](_0x5d7e11[_0x3fdb('0x56')]);_0x208994({'count':_0x1368b1[_0x3fdb('0x14')],'rows':_0x1368b1});});},'SmsQueuesWaitingInteractions':function(_0x4a1ce1){return new Promise(function(_0x5922a5,_0x14b532){var _0xd6333a=_[_0x3fdb('0x48')](_0x5d7e11['smsQueuesWaitingInteractions']);_0x5922a5({'count':_0xd6333a[_0x3fdb('0x14')],'rows':_0xd6333a});});},'FaxQueuesWaitingInteractions':function(_0x4fd555){return new Promise(function(_0x1630cc,_0xd42b02){var _0x456982=_[_0x3fdb('0x48')](_0x5d7e11[_0x3fdb('0x57')]);_0x1630cc({'count':_0x456982['length'],'rows':_0x456982});});},'WhatsappQueuesWaitingInteractions':function(_0x509ee8){return new Promise(function(_0xbb3371,_0xa50d1d){var _0x181965=_[_0x3fdb('0x48')](_0x5d7e11[_0x3fdb('0x58')]);_0xbb3371({'count':_0x181965[_0x3fdb('0x14')],'rows':_0x181965});});}};var _0x106f90=jayson[_0x3fdb('0x59')](_0x16b84b)[_0x3fdb('0x5a')]();_0x106f90['on']('error',function(_0xef8ebc){logger[_0x3fdb('0x2e')](JSON[_0x3fdb('0x30')](_0xef8ebc));return _0x3879e7(_0xef8ebc);});_0x106f90[_0x3fdb('0x5b')](0x232c,_0x3fdb('0x5c'),function(){console[_0x3fdb('0x5d')](_0x3fdb('0x5e'),0x232c);return _0x7a94b(_0x3fdb('0x5f')+0x232c);});});}; \ No newline at end of file +var _0x4b84=['channel','message','interaction','applications','isArray','length','existsSync','join','app','.js','toLowerCase','appdata','split','mail','push','slice','dialogflow','dialogflowv2','amazonlex','TagId','format','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','priority','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','stringify','matchPath','emit','complete','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agent','agents','busyQueue','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','log','RPC\x20listening\x20on\x20port:','lodash','util','bluebird','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/faxQueueReport','../lib/rule-engine','%s.%s.%s','isNil','IntervalId','Intervals','interval','listen','rules'];(function(_0xfe33d8,_0x34c571){var _0x5aaa75=function(_0x169472){while(--_0x169472){_0xfe33d8['push'](_0xfe33d8['shift']());}};_0x5aaa75(++_0x34c571);}(_0x4b84,0x1cc));var _0x44b8=function(_0x42245d,_0x51758f){_0x42245d=_0x42245d-0x0;var _0x4b211a=_0x4b84[_0x42245d];return _0x4b211a;};'use strict';var _=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var path=require('path');var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0x44b8('0x2'));var uuid=require('uuid');var config=require('../../../config/environment');var logger=require(_0x44b8('0x3'))(_0x44b8('0x4'));var rpc={'openchannelQueueReport':require(_0x44b8('0x5')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0x44b8('0x6')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x44b8('0x7'));function getId(_0x5947f7,_0x3e87c5,_0x5a2353){return util['format'](_0x44b8('0x8'),_0x5947f7,_0x3e87c5||0x0,_0x5a2353||0x0);}function getIntervals(_0x42319d,_0x30ebc3){var _0x48a371=[];if(!_[_0x44b8('0x9')](_0x30ebc3[_0x44b8('0xa')])&&!_[_0x44b8('0x9')](_0x42319d[_0x30ebc3[_0x44b8('0xa')]])&&!_[_0x44b8('0x9')](_0x42319d[_0x30ebc3[_0x44b8('0xa')]][_0x44b8('0xb')])){_0x48a371=_['map'](_0x42319d[_0x30ebc3[_0x44b8('0xa')]][_0x44b8('0xb')],'interval');}else if(!_[_0x44b8('0x9')](_0x30ebc3['interval'])){_0x48a371=[_0x30ebc3[_0x44b8('0xc')]];}return _0x48a371;}exports[_0x44b8('0xd')]=function(_0x4df670){_0x4df670[_0x44b8('0xe')]={};return new BPromise(function(_0x4be54c,_0x54fa95){var _0x2a3e4c={'Start':function(_0x2af0ad){var _0x1722da=this;return new Promise(function(_0x41ab46,_0x5e52f2){if(_0x2af0ad){try{var _0x495c74=[];var _0x5d6349=getId(_0x2af0ad[_0x44b8('0xf')],_0x2af0ad['message']?_0x2af0ad[_0x44b8('0x10')]['id']:0x0,_0x2af0ad[_0x44b8('0x11')]?_0x2af0ad['interaction']['id']:0x0);if(_0x2af0ad[_0x44b8('0x12')]&&_[_0x44b8('0x13')](_0x2af0ad['applications'])&&_0x2af0ad[_0x44b8('0x12')][_0x44b8('0x14')]){for(var _0x4b600f=0x0;_0x4b600f<_0x2af0ad[_0x44b8('0x12')][_0x44b8('0x14')];_0x4b600f+=0x1){var _0xebfe79=_0x2af0ad[_0x44b8('0x12')][_0x4b600f];if(fs[_0x44b8('0x15')](path[_0x44b8('0x16')](__dirname,_0x44b8('0x12'),_0xebfe79[_0x44b8('0x17')]+_0x44b8('0x18')))){var _0x1e0f2d=[];switch(_0xebfe79[_0x44b8('0x17')][_0x44b8('0x19')]()){case'autoreply':var _0x56549a=_0xebfe79[_0x44b8('0x1a')][_0x44b8('0x1b')](',');if(_0x2af0ad[_0x44b8('0xf')]===_0x44b8('0x1c')){_0x1e0f2d['push'](_0x56549a[0x0]);_0x1e0f2d[_0x44b8('0x1d')](_0x56549a[0x1]);_0x1e0f2d['push'](_0x56549a[_0x44b8('0x1e')](0x2,_0x56549a[_0x44b8('0x14')])[_0x44b8('0x16')](','));}else{_0x1e0f2d[_0x44b8('0x1d')](_0x56549a[0x0]);_0x1e0f2d[_0x44b8('0x1d')](_0x56549a['slice'](0x1,_0x56549a[_0x44b8('0x14')])['join'](','));}break;case _0x44b8('0x1f'):var _0x350482=_0xebfe79['appdata'][_0x44b8('0x1b')](',');_0x1e0f2d[_0x44b8('0x1d')](_0x350482[0x0]);_0x1e0f2d[_0x44b8('0x1d')](_0x350482[0x1]);_0x1e0f2d['push'](_0x350482[_0x44b8('0x1e')](0x2,_0x350482[_0x44b8('0x14')])['join'](','));break;case _0x44b8('0x20'):var _0x4a182d=_0xebfe79[_0x44b8('0x1a')]['split'](',');_0x1e0f2d['push'](_0x4a182d[0x0]);_0x1e0f2d['push'](_0x4a182d[0x1]);_0x1e0f2d[_0x44b8('0x1d')](_0x4a182d[0x2]);_0x1e0f2d[_0x44b8('0x1d')](_0x4a182d[0x3]);_0x1e0f2d[_0x44b8('0x1d')](_0x4a182d[_0x44b8('0x1e')](0x4,_0x4a182d[_0x44b8('0x14')])[_0x44b8('0x16')](','));break;case _0x44b8('0x21'):var _0xc1c7a=_0xebfe79[_0x44b8('0x1a')][_0x44b8('0x1b')](',');_0x1e0f2d[_0x44b8('0x1d')](_0xc1c7a[0x0]);_0x1e0f2d[_0x44b8('0x1d')](_0xc1c7a[0x1]);_0x1e0f2d[_0x44b8('0x1d')](_0xc1c7a[0x2]);_0x1e0f2d['push'](_0xc1c7a[0x3]);_0x1e0f2d[_0x44b8('0x1d')](_0xc1c7a['slice'](0x4,_0xc1c7a[_0x44b8('0x14')])[_0x44b8('0x16')](','));break;case _0x44b8('0x10'):_0x1e0f2d[_0x44b8('0x1d')](_0xebfe79[_0x44b8('0x1a')]);break;case'tag':_0x1e0f2d[_0x44b8('0x1d')](_0xebfe79[_0x44b8('0x22')]);_0x1e0f2d[_0x44b8('0x1d')](_0xebfe79[_0x44b8('0x1a')]);break;default:_0x1e0f2d=_[_0x44b8('0x9')](_0xebfe79['appdata'])?[]:_0xebfe79[_0x44b8('0x1a')][_0x44b8('0x1b')](',');}var _0x1a30fc={'id':util[_0x44b8('0x23')](_0x44b8('0x24'),_0x5d6349,_0xebfe79['id'],_0xebfe79[_0x44b8('0x17')]),'condition':require(_0x44b8('0x25'))[_0x44b8('0x26')](_0x5d6349,getIntervals(_0x4df670[_0x44b8('0x27')],_0xebfe79),_0x4df670),'consequence':require(_0x44b8('0x28')+_0xebfe79[_0x44b8('0x17')])[_0x44b8('0x29')](_0x5d6349,_0x1e0f2d,_0x4df670,_0x2af0ad),'p':_0xebfe79[_0x44b8('0x2a')]||0x0};logger[_0x44b8('0x2b')](_0x44b8('0x2c'),_0x1a30fc['id'],_0x44b8('0x2d'),getIntervals(_0x4df670[_0x44b8('0x27')],_0xebfe79)[_0x44b8('0x16')](_0x44b8('0x2e')));_0x495c74[_0x44b8('0x1d')](_0x1a30fc);}else{logger[_0x44b8('0x2f')](_0x44b8('0x30'),path['join'](__dirname,_0x44b8('0x12'),_0xebfe79[_0x44b8('0x17')]+'.js'));}}_0x4df670[_0x44b8('0xe')][_0x5d6349]=new RuleEngine(_0x495c74);_0x4df670[_0x44b8('0xe')][_0x5d6349][_0x44b8('0x31')](_0x2af0ad,function(_0x332c2b){logger['info'](_0x44b8('0x32'),JSON[_0x44b8('0x33')](_0x332c2b[_0x44b8('0x34')]));if(_0x4df670[_0x44b8('0xe')][_0x5d6349]){_0x4df670[_0x44b8('0xe')][_0x5d6349][_0x44b8('0x35')](_0x44b8('0x36'));}});return _0x41ab46({'code':0xc8,'message':_0x2af0ad});}else{logger[_0x44b8('0x2b')](_0x44b8('0x37'));return _0x41ab46({'code':0xc8,'message':_0x2af0ad});}}catch(_0x3d1be1){logger[_0x44b8('0x2f')](_0x3d1be1[_0x44b8('0x38')]);return _0x5e52f2(_0x1722da[_0x44b8('0x2f')](0x1f4,_0x3d1be1));}}return _0x5e52f2(_0x44b8('0x39'));});},'AcceptMessage':function(_0x2f8b59){var _0x29b43f=this;return new Promise(function(_0x57d8c4,_0x12a0a4){if(_0x2f8b59[_0x44b8('0x3a')]&&_0x2f8b59[_0x44b8('0x3a')]['id']){if(_0x4df670['agents'][_0x2f8b59[_0x44b8('0x3a')]['id']]){_0x4df670[_0x44b8('0x3b')][_0x2f8b59[_0x44b8('0x3a')]['id']]['busy']=![];_0x4df670[_0x44b8('0x3b')][_0x2f8b59[_0x44b8('0x3a')]['id']][_0x44b8('0x3c')]=undefined;}}if(_0x2f8b59[_0x44b8('0x10')]&&_0x2f8b59[_0x44b8('0x10')]['id']){try{var _0x499a3e=getId(_0x2f8b59['channel'],_0x2f8b59[_0x44b8('0x10')]?_0x2f8b59[_0x44b8('0x10')]['id']:0x0,_0x2f8b59[_0x44b8('0x11')]?_0x2f8b59[_0x44b8('0x11')]['id']:0x0);if(_0x4df670[_0x44b8('0xe')][_0x499a3e]){_0x4df670[_0x44b8('0xe')][_0x499a3e][_0x44b8('0x35')](_0x44b8('0x3d'));if(rpc[_0x2f8b59[_0x44b8('0xf')]+_0x44b8('0x3e')]){rpc[_0x2f8b59[_0x44b8('0xf')]+_0x44b8('0x3e')][_0x44b8('0x3f')](_0x499a3e,{'UserId':_0x2f8b59[_0x44b8('0x10')][_0x44b8('0x40')]})[_0x44b8('0x41')](function(_0xce06dc){logger[_0x44b8('0x2f')](_0x44b8('0x42'));});}}return _0x57d8c4({'code':0xc8,'message':_0x2f8b59});}catch(_0x49c507){logger['error'](_0x49c507[_0x44b8('0x38')]);return _0x12a0a4(_0x29b43f[_0x44b8('0x2f')](0x1f4,_0x49c507));}}logger[_0x44b8('0x2f')](_0x44b8('0x43'));return _0x12a0a4(_0x29b43f[_0x44b8('0x2f')](0x1f4,_0x44b8('0x43')));});},'RejectMessage':function(_0x411ed6){var _0x4fe73f=this;return new Promise(function(_0x156070,_0x53edca){if(_0x411ed6[_0x44b8('0x3a')]&&_0x411ed6[_0x44b8('0x3a')]['id']){try{if(_0x4df670[_0x44b8('0x3b')][_0x411ed6[_0x44b8('0x3a')]['id']]){_0x4df670[_0x44b8('0x3b')][_0x411ed6[_0x44b8('0x3a')]['id']]['busy']=![];_0x4df670[_0x44b8('0x3b')][_0x411ed6[_0x44b8('0x3a')]['id']][_0x44b8('0x3c')]=undefined;}return _0x156070({'code':0xc8,'message':_0x411ed6});}catch(_0x25d266){logger['error'](_0x25d266[_0x44b8('0x38')]);return _0x53edca(_0x4fe73f[_0x44b8('0x2f')](0x1f4,_0x25d266));}}logger[_0x44b8('0x2f')](_0x44b8('0x43'));return _0x53edca(_0x4fe73f[_0x44b8('0x2f')](0x1f4,_0x44b8('0x43')));});},'AbandonInteraction':function(_0x500bad){var _0x19d95d=this;return new Promise(function(_0x450715,_0x2c5c27){if(_0x500bad[_0x44b8('0xf')]&&_0x500bad[_0x44b8('0x11')]&&_0x500bad['interaction']['id']){try{var _0x493840=getId(_0x500bad[_0x44b8('0xf')],_0x500bad['message']?_0x500bad[_0x44b8('0x10')]['id']:0x0,_0x500bad['interaction']?_0x500bad[_0x44b8('0x11')]['id']:0x0);if(_0x4df670[_0x44b8('0xe')][_0x493840]){_0x4df670[_0x44b8('0xe')][_0x493840][_0x44b8('0x35')](_0x44b8('0x3d'));}return _0x450715({'code':0xc8,'message':_0x500bad});}catch(_0x32f588){logger[_0x44b8('0x2f')](_0x32f588['stack']);return _0x2c5c27(_0x19d95d[_0x44b8('0x2f')](0x1f4,_0x32f588));}}logger[_0x44b8('0x2f')](_0x44b8('0x43'));return _0x2c5c27(_0x19d95d['error'](0x1f4,_0x44b8('0x43')));});},'AgentCapacity':function(_0x103249){var _0x45f9a0=this;return new Promise(function(_0x2b256b,_0x510921){if(_0x4df670[_0x44b8('0x3b')][_0x44b8('0x44')](_0x103249['id'])){for(var _0x4a6e55 in _0x103249[_0x44b8('0x45')]){if(_0x103249[_0x44b8('0x45')][_0x44b8('0x44')](_0x4a6e55)){if(_0x4df670[_0x44b8('0x3b')][_0x103249['id']][_0x44b8('0x44')](_0x4a6e55+'CurrentCapacity')){_0x4df670['agents'][_0x103249['id']][_0x4a6e55+_0x44b8('0x46')]=parseInt(_0x103249[_0x44b8('0x45')][_0x4a6e55],0xa);}}}_0x4df670[_0x44b8('0x3b')][_0x103249['id']][_0x44b8('0x47')]();return _0x2b256b({'code':0xc8,'message':_0x4df670[_0x44b8('0x3b')][_0x103249['id']]});}else{return _0x510921(_0x45f9a0[_0x44b8('0x2f')](0x1f4,_0x44b8('0x48')));}});},'Agents':function(_0xf0fb0d){return new Promise(function(_0x10bbd9,_0xdff81b){var _0x16c628=_[_0x44b8('0x49')](_0x4df670['agents']);_0x10bbd9({'count':_0x16c628[_0x44b8('0x14')],'rows':_0x16c628});});},'ChatQueues':function(_0x252eb3){return new Promise(function(_0x29c0f7,_0x1697e4){var _0x1a96a3=[];for(var _0x1df915 in _0x4df670[_0x44b8('0x4a')]){if(_0x4df670[_0x44b8('0x4a')][_0x44b8('0x44')](_0x1df915)){var _0x2d6a31=_0x4df670[_0x44b8('0x4a')][_0x1df915];var _0x15bcba={'id':_0x2d6a31['id'],'available':_0x2d6a31[_0x44b8('0x4b')],'loggedIn':_0x2d6a31[_0x44b8('0x4c')],'name':_0x2d6a31[_0x44b8('0x4d')],'paused':_0x2d6a31[_0x44b8('0x4e')],'waiting':_0x2d6a31[_0x44b8('0x4f')]};_0x1a96a3[_0x44b8('0x1d')](_0x15bcba);}}_0x29c0f7({'count':_0x1a96a3['length'],'rows':_0x1a96a3});});},'MailQueues':function(_0x1ec516){return new Promise(function(_0x3aac51,_0x10e519){var _0x2b37e=[];for(var _0x51f763 in _0x4df670[_0x44b8('0x50')]){if(_0x4df670[_0x44b8('0x50')]['hasOwnProperty'](_0x51f763)){var _0x2c529a=_0x4df670[_0x44b8('0x50')][_0x51f763];var _0x5df821={'id':_0x2c529a['id'],'available':_0x2c529a[_0x44b8('0x4b')],'loggedIn':_0x2c529a[_0x44b8('0x4c')],'name':_0x2c529a['name'],'paused':_0x2c529a[_0x44b8('0x4e')],'waiting':_0x2c529a[_0x44b8('0x4f')]};_0x2b37e[_0x44b8('0x1d')](_0x5df821);}}_0x3aac51({'count':_0x2b37e['length'],'rows':_0x2b37e});});},'OpenchannelQueues':function(_0x16e790){return new Promise(function(_0x5da64b,_0x36cdd8){var _0x5161ea=[];for(var _0x176536 in _0x4df670[_0x44b8('0x51')]){if(_0x4df670[_0x44b8('0x51')][_0x44b8('0x44')](_0x176536)){var _0x3c6aad=_0x4df670[_0x44b8('0x51')][_0x176536];var _0x4c7edd={'id':_0x3c6aad['id'],'available':_0x3c6aad[_0x44b8('0x4b')],'loggedIn':_0x3c6aad['loggedIn'],'name':_0x3c6aad[_0x44b8('0x4d')],'paused':_0x3c6aad[_0x44b8('0x4e')],'waiting':_0x3c6aad['waiting']};_0x5161ea[_0x44b8('0x1d')](_0x4c7edd);}}_0x5da64b({'count':_0x5161ea[_0x44b8('0x14')],'rows':_0x5161ea});});},'SmsQueues':function(_0x1cf31f){return new Promise(function(_0x30d60f,_0x198085){var _0x3774fe=[];for(var _0x266447 in _0x4df670[_0x44b8('0x52')]){if(_0x4df670[_0x44b8('0x52')][_0x44b8('0x44')](_0x266447)){var _0x41111f=_0x4df670[_0x44b8('0x52')][_0x266447];var _0x52381a={'id':_0x41111f['id'],'available':_0x41111f[_0x44b8('0x4b')],'loggedIn':_0x41111f[_0x44b8('0x4c')],'name':_0x41111f[_0x44b8('0x4d')],'paused':_0x41111f['paused'],'waiting':_0x41111f[_0x44b8('0x4f')]};_0x3774fe[_0x44b8('0x1d')](_0x52381a);}}_0x30d60f({'count':_0x3774fe['length'],'rows':_0x3774fe});});},'FaxQueues':function(_0x10f6cc){return new Promise(function(_0x1a8cff,_0xb89680){var _0x3d80c3=[];for(var _0x44bb6b in _0x4df670['faxQueues']){if(_0x4df670[_0x44b8('0x53')][_0x44b8('0x44')](_0x44bb6b)){var _0x279753=_0x4df670[_0x44b8('0x53')][_0x44bb6b];var _0x2e02d7={'id':_0x279753['id'],'available':_0x279753[_0x44b8('0x4b')],'loggedIn':_0x279753[_0x44b8('0x4c')],'name':_0x279753[_0x44b8('0x4d')],'paused':_0x279753['paused'],'waiting':_0x279753[_0x44b8('0x4f')]};_0x3d80c3[_0x44b8('0x1d')](_0x2e02d7);}}_0x1a8cff({'count':_0x3d80c3[_0x44b8('0x14')],'rows':_0x3d80c3});});},'WhatsappQueues':function(_0x3ce76e){return new Promise(function(_0x5b26e8,_0x480189){var _0x47b087=[];for(var _0x118f89 in _0x4df670[_0x44b8('0x54')]){if(_0x4df670[_0x44b8('0x54')][_0x44b8('0x44')](_0x118f89)){var _0x32e630=_0x4df670['whatsappQueues'][_0x118f89];var _0x26745c={'id':_0x32e630['id'],'available':_0x32e630['available'],'loggedIn':_0x32e630[_0x44b8('0x4c')],'name':_0x32e630[_0x44b8('0x4d')],'paused':_0x32e630[_0x44b8('0x4e')],'waiting':_0x32e630['waiting']};_0x47b087['push'](_0x26745c);}}_0x5b26e8({'count':_0x47b087[_0x44b8('0x14')],'rows':_0x47b087});});},'ChatQueuesWaitingInteractions':function(_0x1964b2){return new Promise(function(_0x248e6c,_0x536734){var _0x1f5277=_[_0x44b8('0x49')](_0x4df670[_0x44b8('0x55')]);_0x248e6c({'count':_0x1f5277[_0x44b8('0x14')],'rows':_0x1f5277});});},'MailQueuesWaitingInteractions':function(_0x57addf){return new Promise(function(_0x51fd30,_0xdaebf7){var _0x1888f8=_[_0x44b8('0x49')](_0x4df670[_0x44b8('0x56')]);_0x51fd30({'count':_0x1888f8[_0x44b8('0x14')],'rows':_0x1888f8});});},'OpenchannelQueuesWaitingInteractions':function(_0x4cc81e){return new Promise(function(_0x40571c,_0x4c7cdf){var _0x4e46c2=_[_0x44b8('0x49')](_0x4df670[_0x44b8('0x57')]);_0x40571c({'count':_0x4e46c2[_0x44b8('0x14')],'rows':_0x4e46c2});});},'SmsQueuesWaitingInteractions':function(_0x1c7ef2){return new Promise(function(_0x506f9c,_0x45a674){var _0x2212e8=_['values'](_0x4df670[_0x44b8('0x58')]);_0x506f9c({'count':_0x2212e8[_0x44b8('0x14')],'rows':_0x2212e8});});},'FaxQueuesWaitingInteractions':function(_0x5452dd){return new Promise(function(_0x2f8e4b,_0x5ddbc7){var _0x56dccf=_[_0x44b8('0x49')](_0x4df670[_0x44b8('0x59')]);_0x2f8e4b({'count':_0x56dccf[_0x44b8('0x14')],'rows':_0x56dccf});});},'WhatsappQueuesWaitingInteractions':function(_0x531af3){return new Promise(function(_0x510760,_0x5b82ec){var _0x36334a=_[_0x44b8('0x49')](_0x4df670[_0x44b8('0x5a')]);_0x510760({'count':_0x36334a[_0x44b8('0x14')],'rows':_0x36334a});});}};var _0x1a5621=jayson[_0x44b8('0x5b')](_0x2a3e4c)[_0x44b8('0x5c')]();_0x1a5621['on'](_0x44b8('0x2f'),function(_0x5d7447){logger[_0x44b8('0x2f')](JSON['stringify'](_0x5d7447));return _0x54fa95(_0x5d7447);});_0x1a5621['listen'](0x232c,'127.0.0.1',function(){console[_0x44b8('0x5d')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x4be54c(_0x44b8('0x5e')+0x232c);});});}; \ No newline at end of file diff --git a/server/services/routing/server/interval.js b/server/services/routing/server/interval.js index 63d24c6..7ee576e 100644 --- a/server/services/routing/server/interval.js +++ b/server/services/routing/server/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f02=['join','\x20|\x20','when','log','stack','util','bluebird','lodash','../../../config/logger','routing','client','request','then','error','message','result','catch','condition','rules','info','[%s][INTERVAL]\x20ROUTING\x20STOPPED','stop','push','Command','format','indexOf','[%s][INTERVAL]\x20%s\x20%s'];(function(_0x4301d5,_0x63b417){var _0xf9e507=function(_0x5c6e73){while(--_0x5c6e73){_0x4301d5['push'](_0x4301d5['shift']());}};_0xf9e507(++_0x63b417);}(_0x3f02,0x1b5));var _0x23f0=function(_0x12d812,_0x496bb7){_0x12d812=_0x12d812-0x0;var _0x3711ab=_0x3f02[_0x12d812];return _0x3711ab;};'use strict';var util=require(_0x23f0('0x0'));var BPromise=require(_0x23f0('0x1'));var jayson=require('jayson/promise');var _=require(_0x23f0('0x2'));var logger=require(_0x23f0('0x3'))(_0x23f0('0x4'));var client=jayson[_0x23f0('0x5')]['http']({'port':0x232a});function request(_0x324c5e,_0x191565){return new BPromise(function(_0xa5bf7c,_0x18bb31){return client[_0x23f0('0x6')](_0x324c5e,_0x191565)[_0x23f0('0x7')](function(_0x5c1ed9){if(_0x5c1ed9[_0x23f0('0x8')]){return _0x18bb31(_0x5c1ed9[_0x23f0('0x8')][_0x23f0('0x9')]);}else{return _0xa5bf7c(_0x5c1ed9[_0x23f0('0xa')]);}})[_0x23f0('0xb')](function(_0x3b090b){return _0x18bb31(_0x3b090b);});});}exports[_0x23f0('0xc')]=function(_0x592c3d,_0x15c638,_0xeba6cf){return function(_0x53fa9b){if(_0xeba6cf[_0x23f0('0xd')]&&!_0xeba6cf[_0x23f0('0xd')][_0x592c3d]){logger[_0x23f0('0xe')](_0x23f0('0xf'),_0x592c3d);return _0x53fa9b[_0x23f0('0x10')]();}var _0x2330c9=[];for(var _0x30c951=0x0;_0x30c951<_0x15c638['length'];_0x30c951+=0x1){_0x2330c9[_0x23f0('0x11')](request(_0x23f0('0x12'),{'command':util[_0x23f0('0x13')]('iftime\x20%s',_0x15c638[_0x30c951])})[_0x23f0('0x7')](function(_0x585014){return _0x585014&&_0x585014[_0x23f0('0x9')]&&_0x585014[_0x23f0('0x9')][_0x23f0('0x14')]('true')>=0x0?!![]:![];})[_0x23f0('0xb')](function(_0x242615){logger[_0x23f0('0x8')]('[%s][INTERVAL]\x20%s',_0x592c3d,_0x15c638[_0x30c951]);}));}BPromise['all'](_0x2330c9)[_0x23f0('0x7')](function(_0x55f2d5){var _0x361dc3=_['some'](_0x55f2d5);logger[_0x23f0('0xe')](_0x23f0('0x15'),_0x592c3d,_0x15c638[_0x23f0('0x16')](_0x23f0('0x17')),_0x361dc3);_0x53fa9b[_0x23f0('0x18')](_0x361dc3);})['catch'](function(_0x2acebc){console[_0x23f0('0x19')](_0x2acebc);logger[_0x23f0('0x8')](_0x23f0('0x15'),_0x592c3d,_0x15c638['join']('\x20|\x20'),_0x2acebc[_0x23f0('0x1a')]);_0x53fa9b[_0x23f0('0x10')]();});};}; \ No newline at end of file +var _0xcf6f=['result','catch','condition','rules','stop','length','Command','iftime\x20%s','indexOf','true','[%s][INTERVAL]\x20%s','all','some','info','[%s][INTERVAL]\x20%s\x20%s','join','log','stack','util','bluebird','jayson/promise','lodash','../../../config/logger','routing','http','request','then','error','message'];(function(_0x38ef1d,_0x4c08f9){var _0x1b0464=function(_0x460cfb){while(--_0x460cfb){_0x38ef1d['push'](_0x38ef1d['shift']());}};_0x1b0464(++_0x4c08f9);}(_0xcf6f,0x86));var _0xfcf6=function(_0x6b3755,_0xf171fe){_0x6b3755=_0x6b3755-0x0;var _0x42f233=_0xcf6f[_0x6b3755];return _0x42f233;};'use strict';var util=require(_0xfcf6('0x0'));var BPromise=require(_0xfcf6('0x1'));var jayson=require(_0xfcf6('0x2'));var _=require(_0xfcf6('0x3'));var logger=require(_0xfcf6('0x4'))(_0xfcf6('0x5'));var client=jayson['client'][_0xfcf6('0x6')]({'port':0x232a});function request(_0x11404c,_0x57e892){return new BPromise(function(_0x2c74e4,_0x58781d){return client[_0xfcf6('0x7')](_0x11404c,_0x57e892)[_0xfcf6('0x8')](function(_0x1e3391){if(_0x1e3391[_0xfcf6('0x9')]){return _0x58781d(_0x1e3391[_0xfcf6('0x9')][_0xfcf6('0xa')]);}else{return _0x2c74e4(_0x1e3391[_0xfcf6('0xb')]);}})[_0xfcf6('0xc')](function(_0x1bdb06){return _0x58781d(_0x1bdb06);});});}exports[_0xfcf6('0xd')]=function(_0x5e9f7c,_0x5e0fc2,_0x59aea5){return function(_0x1e817b){if(_0x59aea5[_0xfcf6('0xe')]&&!_0x59aea5[_0xfcf6('0xe')][_0x5e9f7c]){logger['info']('[%s][INTERVAL]\x20ROUTING\x20STOPPED',_0x5e9f7c);return _0x1e817b[_0xfcf6('0xf')]();}var _0x24af22=[];for(var _0x4ce1f7=0x0;_0x4ce1f7<_0x5e0fc2[_0xfcf6('0x10')];_0x4ce1f7+=0x1){_0x24af22['push'](request(_0xfcf6('0x11'),{'command':util['format'](_0xfcf6('0x12'),_0x5e0fc2[_0x4ce1f7])})['then'](function(_0x1a4863){return _0x1a4863&&_0x1a4863[_0xfcf6('0xa')]&&_0x1a4863['message'][_0xfcf6('0x13')](_0xfcf6('0x14'))>=0x0?!![]:![];})[_0xfcf6('0xc')](function(_0x21426b){logger[_0xfcf6('0x9')](_0xfcf6('0x15'),_0x5e9f7c,_0x5e0fc2[_0x4ce1f7]);}));}BPromise[_0xfcf6('0x16')](_0x24af22)[_0xfcf6('0x8')](function(_0x5a4329){var _0xc34bb6=_[_0xfcf6('0x17')](_0x5a4329);logger[_0xfcf6('0x18')](_0xfcf6('0x19'),_0x5e9f7c,_0x5e0fc2[_0xfcf6('0x1a')]('\x20|\x20'),_0xc34bb6);_0x1e817b['when'](_0xc34bb6);})[_0xfcf6('0xc')](function(_0x5d401f){console[_0xfcf6('0x1b')](_0x5d401f);logger[_0xfcf6('0x9')](_0xfcf6('0x19'),_0x5e9f7c,_0x5e0fc2[_0xfcf6('0x1a')]('\x20|\x20'),_0x5d401f[_0xfcf6('0x1c')]);_0x1e817b[_0xfcf6('0xf')]();});};}; \ No newline at end of file diff --git a/server/services/xdr/agents.controller.js b/server/services/xdr/agents.controller.js index bfcbd02..6446b0c 100644 --- a/server/services/xdr/agents.controller.js +++ b/server/services/xdr/agents.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4084=['debug','format','now','lastevent','connectedlinename','info','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','error','[%s][agents][agentcalled]','agentringnoanswer','isNil','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','agentringnoanswerAt','reason','timeout','ringtime','push','forIn','includes','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','holdtime','[%s][agents][queuecallerabandon]','agentconnect','[%s][agents][agentconnect]','agentconnectAt','connect','talktime','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','agentcomplete','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','diffTime','complete','blindtransfer','transfereruniqueid','extension','transferuniqueid','[%s][agents][blindtransfer]','attendedtransfer','[%s][agents][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','[%s][agents][attendedtransfer]\x20agent:%s','transfer','transfertype','ATTENDED','origtransfererexten','transfereeuniqueid','agententerreason','calleridname','agentcalledAt','secondtransfererlinkedid','transferexten','secondtransfererexten','transfertargetuniqueid','clone','[%s][agents][hangup]','cause','rejected','indexOf','splice','agent','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','lodash','util','./utils','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','membername','interface','calleridnum','connectedlinenum','queue','getVoiceQueueByName','then','type','agentacw','acw','acwTimeout','request','CreateVoiceAgentReport','destuniqueid','agentcalled'];(function(_0x3ae715,_0x8eedaf){var _0x2abe29=function(_0x339a3a){while(--_0x339a3a){_0x3ae715['push'](_0x3ae715['shift']());}};_0x2abe29(++_0x8eedaf);}(_0x4084,0x9f));var _0x4408=function(_0x209517,_0x2828ac){_0x209517=_0x209517-0x0;var _0xa4a36b=_0x4084[_0x209517];return _0xa4a36b;};'use strict';var _=require(_0x4408('0x0'));var util=require(_0x4408('0x1'));var utils=require(_0x4408('0x2'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x2a089a,_0x2d9b2c){utils['info'](util['format'](_0x4408('0x3'),_0x2a089a[_0x4408('0x4')],_0x2a089a[_0x4408('0x5')],_0x2a089a['queue'],_0x2a089a[_0x4408('0x6')],_0x2a089a[_0x4408('0x7')],_0x2a089a[_0x4408('0x8')],_0x2a089a[_0x4408('0x9')],_0x2a089a['lastevent']));if(_0x2a089a[_0x4408('0xa')]){utils[_0x4408('0xb')](_0x2a089a[_0x4408('0xa')])[_0x4408('0xc')](function(_0x18b3f7){if(_0x18b3f7){_0x2a089a[_0x4408('0xd')]=_0x18b3f7['type'];_0x2a089a[_0x4408('0xe')]=_0x2a089a['agentcomplete']?_0x18b3f7[_0x4408('0xf')]:![];_0x2a089a['acwtime']=_0x2a089a[_0x4408('0xe')]?_0x18b3f7[_0x4408('0x10')]:0x0;}utils[_0x4408('0x11')](_0x4408('0x12'),_0x2a089a);});}else{utils[_0x4408('0x11')](_0x4408('0x12'),_0x2a089a);}if(_0x2d9b2c){delete transfers[_0x2a089a[_0x4408('0x4')]];}else{delete agents[_0x2a089a[_0x4408('0x13')]];}}exports[_0x4408('0x14')]=function(_0x5de544){try{utils[_0x4408('0x15')](util[_0x4408('0x16')]('[%s][agents][agentcalled]',_0x5de544[_0x4408('0x4')]),_0x5de544);agents[_0x5de544[_0x4408('0x13')]]=_0x5de544;agents[_0x5de544['destuniqueid']]['agentcalledAt']=utils[_0x4408('0x17')]();agents[_0x5de544[_0x4408('0x13')]][_0x4408('0x18')]='called';agents[_0x5de544[_0x4408('0x13')]][_0x4408('0x9')]=null;agents[_0x5de544[_0x4408('0x13')]][_0x4408('0x19')]=null;utils[_0x4408('0x1a')](util['format'](_0x4408('0x1b'),_0x5de544[_0x4408('0x4')],agents[_0x5de544[_0x4408('0x13')]]['membername'],_0x5de544[_0x4408('0x13')]));}catch(_0x514eb7){utils[_0x4408('0x1c')](util[_0x4408('0x16')](_0x4408('0x1d'),_0x5de544[_0x4408('0x4')]),_0x514eb7);}};exports[_0x4408('0x1e')]=function(_0x4e7b4e){try{if(!_[_0x4408('0x1f')](agents[_0x4e7b4e[_0x4408('0x13')]])){utils[_0x4408('0x15')](util['format'](_0x4408('0x20'),_0x4e7b4e[_0x4408('0x4')]),_0x4e7b4e);utils[_0x4408('0x1a')](util['format'](_0x4408('0x21'),_0x4e7b4e[_0x4408('0x4')],agents[_0x4e7b4e[_0x4408('0x13')]][_0x4408('0x6')],_0x4e7b4e[_0x4408('0x13')]));agents[_0x4e7b4e['destuniqueid']][_0x4408('0x1e')]=!![];agents[_0x4e7b4e['destuniqueid']][_0x4408('0x22')]=utils[_0x4408('0x17')]();agents[_0x4e7b4e[_0x4408('0x13')]][_0x4408('0x18')]='timeout';agents[_0x4e7b4e[_0x4408('0x13')]][_0x4408('0x23')]=_0x4408('0x24');agents[_0x4e7b4e[_0x4408('0x13')]]['holdtime']=_0x4e7b4e[_0x4408('0x25')]?parseInt(_0x4e7b4e[_0x4408('0x25')])/0x3e8:0x0;agents[_0x4e7b4e['destuniqueid']]['talktime']=0x0;unanswered[_0x4408('0x26')](_0x4e7b4e[_0x4408('0x13')]);}}catch(_0x51ff28){utils[_0x4408('0x1c')](util[_0x4408('0x16')](_0x4408('0x20'),_0x4e7b4e[_0x4408('0x4')]),_0x51ff28);}};exports['queuecallerabandon']=function(_0x1c1895){try{_[_0x4408('0x27')](agents,function(_0x5a91c4,_0x47850a){if(_0x5a91c4['uniqueid']==_0x1c1895[_0x4408('0x4')]&&!_[_0x4408('0x28')](unanswered,_0x5a91c4[_0x4408('0x13')])){utils[_0x4408('0x15')](util[_0x4408('0x16')]('[%s][agents][queuecallerabandon]',_0x1c1895['uniqueid']),_0x1c1895);utils[_0x4408('0x1a')](util[_0x4408('0x16')](_0x4408('0x29'),_0x1c1895[_0x4408('0x4')],_0x5a91c4[_0x4408('0x6')],_0x5a91c4[_0x4408('0x13')]));_0x5a91c4[_0x4408('0x1e')]=!![];_0x5a91c4[_0x4408('0x22')]=utils['now']();_0x5a91c4['lastevent']=_0x4408('0x2a');_0x5a91c4[_0x4408('0x23')]=_0x4408('0x2a');_0x5a91c4['holdtime']=_0x1c1895[_0x4408('0x2b')];_0x5a91c4['talktime']=0x0;writeDB(_0x5a91c4);}});}catch(_0x1c9057){utils[_0x4408('0x1c')](util[_0x4408('0x16')](_0x4408('0x2c'),_0x1c1895[_0x4408('0x4')]),_0x1c9057);}};exports[_0x4408('0x2d')]=function(_0x54f864){try{if(agents[_0x54f864['destuniqueid']]){utils[_0x4408('0x15')](util[_0x4408('0x16')](_0x4408('0x2e'),_0x54f864[_0x4408('0x4')]),_0x54f864);utils[_0x4408('0x1a')](util[_0x4408('0x16')]('[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0x54f864[_0x4408('0x4')],agents[_0x54f864[_0x4408('0x13')]][_0x4408('0x6')],_0x54f864[_0x4408('0x13')]));agents[_0x54f864[_0x4408('0x13')]][_0x4408('0x2f')]=utils[_0x4408('0x17')]();agents[_0x54f864[_0x4408('0x13')]][_0x4408('0x9')]=_0x54f864[_0x4408('0x9')];agents[_0x54f864[_0x4408('0x13')]][_0x4408('0x19')]=_0x54f864[_0x4408('0x19')];agents[_0x54f864[_0x4408('0x13')]][_0x4408('0x2b')]=_0x54f864[_0x4408('0x25')];agents[_0x54f864['destuniqueid']][_0x4408('0x18')]=_0x4408('0x30');_['forIn'](agents,function(_0x180e3e,_0x4fb7f2){if(_0x180e3e[_0x4408('0x13')]!=_0x54f864['destuniqueid']&&_0x180e3e[_0x4408('0x4')]==_0x54f864['uniqueid']){_0x180e3e[_0x4408('0x31')]=0x0;_0x180e3e['holdtime']=_0x54f864['ringtime'];_0x180e3e[_0x4408('0x1e')]=!![];_0x180e3e[_0x4408('0x22')]=utils[_0x4408('0x17')]();_0x180e3e[_0x4408('0x18')]=_0x4408('0x32');_0x180e3e[_0x4408('0x23')]=_0x4408('0x32');_0x180e3e[_0x4408('0x33')]=_0x54f864[_0x4408('0x13')];_0x180e3e[_0x4408('0x34')]=_0x54f864['membername'];writeDB(_0x180e3e);}});}}catch(_0x2422a0){utils['error'](util['format'](_0x4408('0x2e'),_0x54f864[_0x4408('0x4')]),_0x2422a0);}};exports[_0x4408('0x35')]=function(_0x2344a3){try{if(!_[_0x4408('0x1f')](agents[_0x2344a3[_0x4408('0x13')]])){utils['debug'](util[_0x4408('0x16')](_0x4408('0x36'),_0x2344a3[_0x4408('0x4')]),_0x2344a3);utils['info'](util[_0x4408('0x16')](_0x4408('0x37'),_0x2344a3[_0x4408('0x4')],agents[_0x2344a3[_0x4408('0x13')]][_0x4408('0x6')],_0x2344a3[_0x4408('0x13')]));agents[_0x2344a3['destuniqueid']][_0x4408('0x35')]=!![];agents[_0x2344a3[_0x4408('0x13')]][_0x4408('0x38')]=utils[_0x4408('0x17')]();agents[_0x2344a3[_0x4408('0x13')]][_0x4408('0x31')]=utils[_0x4408('0x39')](agents[_0x2344a3[_0x4408('0x13')]][_0x4408('0x38')],agents[_0x2344a3[_0x4408('0x13')]]['agentconnectAt']);agents[_0x2344a3[_0x4408('0x13')]]['reason']=_0x2344a3['reason'];agents[_0x2344a3[_0x4408('0x13')]][_0x4408('0x18')]=_0x4408('0x3a');writeDB(agents[_0x2344a3[_0x4408('0x13')]]);}}catch(_0x414f2b){utils[_0x4408('0x1c')](util[_0x4408('0x16')](_0x4408('0x36'),_0x2344a3[_0x4408('0x4')]),_0x414f2b);}};exports[_0x4408('0x3b')]=function(_0x5787d4){try{if(!_['isNil'](agents[_0x5787d4[_0x4408('0x3c')]])){utils[_0x4408('0x15')](util['format']('[%s][agents][blindtransfer]',_0x5787d4[_0x4408('0x4')]),_0x5787d4);utils[_0x4408('0x1a')](util['format']('[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s',_0x5787d4[_0x4408('0x4')],agents[_0x5787d4[_0x4408('0x3c')]][_0x4408('0x6')],agents[_0x5787d4[_0x4408('0x3c')]][_0x4408('0x4')]));agents[_0x5787d4[_0x4408('0x3c')]]['transfer']=!![];agents[_0x5787d4[_0x4408('0x3c')]]['transfertype']='blind';agents[_0x5787d4[_0x4408('0x3c')]]['transferexten']=_0x5787d4[_0x4408('0x3d')];agents[_0x5787d4[_0x4408('0x3c')]][_0x4408('0x3e')]=agents[_0x5787d4[_0x4408('0x3c')]]['uniqueid'];}}catch(_0x35bae8){utils[_0x4408('0x1c')](util[_0x4408('0x16')](_0x4408('0x3f'),_0x5787d4['uniqueid']),_0x35bae8);}};exports[_0x4408('0x40')]=function(_0x5d73ac){try{utils[_0x4408('0x15')](util[_0x4408('0x16')](_0x4408('0x41'),_0x5d73ac[_0x4408('0x42')]),_0x5d73ac);if(_0x5d73ac[_0x4408('0x42')]==_0x5d73ac[_0x4408('0x43')]){if(!_['isNil'](agents[_0x5d73ac[_0x4408('0x44')]])){utils[_0x4408('0x1a')](util[_0x4408('0x16')](_0x4408('0x45'),_0x5d73ac[_0x4408('0x42')],agents[_0x5d73ac[_0x4408('0x44')]][_0x4408('0x6')]));agents[_0x5d73ac[_0x4408('0x44')]][_0x4408('0x46')]=!![];agents[_0x5d73ac[_0x4408('0x44')]][_0x4408('0x47')]=_0x4408('0x48');agents[_0x5d73ac['secondtransfereruniqueid']]['transferexten']=_0x5d73ac[_0x4408('0x49')];agents[_0x5d73ac[_0x4408('0x44')]][_0x4408('0x3e')]=_0x5d73ac[_0x4408('0x42')];}if(_0x5d73ac[_0x4408('0x4a')]&&agents[_0x5d73ac['transfereeuniqueid']]){agents[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x4b')]=0x1;transfers[_0x5d73ac[_0x4408('0x4a')]]=_['clone'](agents[_0x5d73ac[_0x4408('0x4a')]]);transfers[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x8')]=agents[_0x5d73ac['secondtransfereruniqueid']]['calleridnum'];transfers[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x4c')]=agents[_0x5d73ac[_0x4408('0x44')]][_0x4408('0x4c')];transfers[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x4d')]=utils[_0x4408('0x17')]();transfers[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x2f')]=utils[_0x4408('0x17')]();transfers[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x2b')]=0x0;transfers[_0x5d73ac[_0x4408('0x4a')]][_0x4408('0x4b')]=0x2;}}else if(_0x5d73ac[_0x4408('0x44')]==_0x5d73ac[_0x4408('0x4e')]){if(!_['isNil'](agents[_0x5d73ac[_0x4408('0x42')]])){utils['info'](util[_0x4408('0x16')](_0x4408('0x45'),_0x5d73ac[_0x4408('0x42')],agents[_0x5d73ac[_0x4408('0x42')]]['membername']));agents[_0x5d73ac[_0x4408('0x42')]][_0x4408('0x46')]=!![];agents[_0x5d73ac[_0x4408('0x42')]][_0x4408('0x47')]=_0x4408('0x48');agents[_0x5d73ac[_0x4408('0x42')]][_0x4408('0x4f')]=_0x5d73ac[_0x4408('0x50')];agents[_0x5d73ac[_0x4408('0x42')]]['transferuniqueid']=_0x5d73ac[_0x4408('0x44')];}if(_0x5d73ac[_0x4408('0x51')]&&agents[_0x5d73ac[_0x4408('0x51')]]){agents[_0x5d73ac[_0x4408('0x51')]][_0x4408('0x4b')]=0x1;transfers[_0x5d73ac[_0x4408('0x51')]]=_[_0x4408('0x52')](agents[_0x5d73ac[_0x4408('0x51')]]);transfers[_0x5d73ac[_0x4408('0x51')]][_0x4408('0x8')]=agents[_0x5d73ac['origtransfereruniqueid']][_0x4408('0x8')];transfers[_0x5d73ac[_0x4408('0x51')]]['calleridname']=agents[_0x5d73ac[_0x4408('0x42')]][_0x4408('0x4c')];transfers[_0x5d73ac[_0x4408('0x51')]][_0x4408('0x4d')]=utils[_0x4408('0x17')]();transfers[_0x5d73ac['transfertargetuniqueid']][_0x4408('0x2f')]=utils[_0x4408('0x17')]();transfers[_0x5d73ac[_0x4408('0x51')]][_0x4408('0x2b')]=0x0;transfers[_0x5d73ac[_0x4408('0x51')]][_0x4408('0x4b')]=0x2;}}}catch(_0x19d481){utils[_0x4408('0x1c')](util[_0x4408('0x16')](_0x4408('0x41'),_0x5d73ac[_0x4408('0x42')]),_0x19d481);}};exports['hangup']=function(_0x1d9c59){try{utils[_0x4408('0x15')](util[_0x4408('0x16')](_0x4408('0x53'),_0x1d9c59[_0x4408('0x4')]),_0x1d9c59);if(agents[_0x1d9c59[_0x4408('0x4')]]&&agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x23')]===_0x4408('0x24')){if(_0x1d9c59[_0x4408('0x54')]==='21'){agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x23')]=_0x4408('0x55');agents[_0x1d9c59['uniqueid']][_0x4408('0x18')]=_0x4408('0x55');}utils['info'](util[_0x4408('0x16')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x1d9c59[_0x4408('0x4')],agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x6')],agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x23')],agents[_0x1d9c59[_0x4408('0x4')]]['lastevent']));writeDB(agents[_0x1d9c59[_0x4408('0x4')]]);var _0x5c0fbe=unanswered[_0x4408('0x56')](_0x1d9c59[_0x4408('0x4')]);if(_0x5c0fbe>-0x1){unanswered[_0x4408('0x57')](_0x5c0fbe,0x1);}}if(transfers[_0x1d9c59[_0x4408('0x4')]]){transfers[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x35')]=!![];transfers[_0x1d9c59[_0x4408('0x4')]]['agentcompleteAt']=utils[_0x4408('0x17')]();transfers[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x31')]=utils[_0x4408('0x39')](transfers[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x38')],transfers[_0x1d9c59[_0x4408('0x4')]]['agentconnectAt']);transfers[_0x1d9c59['uniqueid']][_0x4408('0x23')]=_0x4408('0x58');transfers[_0x1d9c59[_0x4408('0x4')]]['lastevent']=_0x4408('0x3a');utils[_0x4408('0x1a')](util[_0x4408('0x16')](_0x4408('0x59'),_0x1d9c59['uniqueid'],transfers[_0x1d9c59['uniqueid']][_0x4408('0x6')],transfers[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x23')],transfers[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x18')]));writeDB(transfers[_0x1d9c59[_0x4408('0x4')]],!![]);}if(agents[_0x1d9c59[_0x4408('0x4')]]&&agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x2f')]){agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x35')]=!![];agents[_0x1d9c59[_0x4408('0x4')]]['agentcompleteAt']=utils[_0x4408('0x17')]();agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x31')]=utils[_0x4408('0x39')](agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x38')],agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x2f')]);agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x23')]=agents[_0x1d9c59['uniqueid']][_0x4408('0x46')]?_0x4408('0x46'):_0x4408('0x58');agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x18')]=_0x4408('0x3a');utils[_0x4408('0x1a')](util[_0x4408('0x16')](_0x4408('0x59'),_0x1d9c59[_0x4408('0x4')],agents[_0x1d9c59[_0x4408('0x4')]][_0x4408('0x6')],agents[_0x1d9c59['uniqueid']][_0x4408('0x23')],agents[_0x1d9c59['uniqueid']][_0x4408('0x18')]));writeDB(agents[_0x1d9c59[_0x4408('0x4')]]);}}catch(_0x4950cf){utils['error'](util['format']('[%s][agents][hangup]',_0x1d9c59[_0x4408('0x4')]),_0x4950cf);}}; \ No newline at end of file +var _0xbc91=['connectedlinename','info','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','agentringnoanswer','[%s][agents][agentringnoanswer]','agentringnoanswerAt','lastevent','timeout','reason','ringtime','talktime','push','error','forIn','includes','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','holdtime','[%s][agents][queuecallerabandon]','[%s][agents][agentconnect]','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connect','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','isNil','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','diffTime','complete','transfereruniqueid','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfertype','transferexten','extension','attendedtransfer','[%s][agents][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','transfer','ATTENDED','transferuniqueid','transfereeuniqueid','agententerreason','clone','calleridname','secondtransfererlinkedid','secondtransfererexten','transfertargetuniqueid','hangup','[%s][agents][hangup]','cause','rejected','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','indexOf','agent','util','./utils','format','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','queue','membername','calleridnum','connectedlinenum','getVoiceQueueByName','then','type','agentacw','agentcomplete','acwtime','CreateVoiceAgentReport','request','destuniqueid','agentcalled','debug','[%s][agents][agentcalled]','agentcalledAt','now','called'];(function(_0x4abd58,_0x523c62){var _0x3608a8=function(_0xa5878){while(--_0xa5878){_0x4abd58['push'](_0x4abd58['shift']());}};_0x3608a8(++_0x523c62);}(_0xbc91,0x1da));var _0x1bc9=function(_0x5dc9ec,_0x407af4){_0x5dc9ec=_0x5dc9ec-0x0;var _0x5b4cdb=_0xbc91[_0x5dc9ec];return _0x5b4cdb;};'use strict';var _=require('lodash');var util=require(_0x1bc9('0x0'));var utils=require(_0x1bc9('0x1'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x313b97,_0x5c758a){utils['info'](util[_0x1bc9('0x2')](_0x1bc9('0x3'),_0x313b97[_0x1bc9('0x4')],_0x313b97['channel'],_0x313b97[_0x1bc9('0x5')],_0x313b97[_0x1bc9('0x6')],_0x313b97['interface'],_0x313b97[_0x1bc9('0x7')],_0x313b97[_0x1bc9('0x8')],_0x313b97['lastevent']));if(_0x313b97[_0x1bc9('0x5')]){utils[_0x1bc9('0x9')](_0x313b97[_0x1bc9('0x5')])[_0x1bc9('0xa')](function(_0xdd77ad){if(_0xdd77ad){_0x313b97[_0x1bc9('0xb')]=_0xdd77ad[_0x1bc9('0xb')];_0x313b97[_0x1bc9('0xc')]=_0x313b97[_0x1bc9('0xd')]?_0xdd77ad['acw']:![];_0x313b97[_0x1bc9('0xe')]=_0x313b97[_0x1bc9('0xc')]?_0xdd77ad['acwTimeout']:0x0;}utils['request'](_0x1bc9('0xf'),_0x313b97);});}else{utils[_0x1bc9('0x10')]('CreateVoiceAgentReport',_0x313b97);}if(_0x5c758a){delete transfers[_0x313b97[_0x1bc9('0x4')]];}else{delete agents[_0x313b97[_0x1bc9('0x11')]];}}exports[_0x1bc9('0x12')]=function(_0x223686){try{utils[_0x1bc9('0x13')](util['format'](_0x1bc9('0x14'),_0x223686[_0x1bc9('0x4')]),_0x223686);agents[_0x223686[_0x1bc9('0x11')]]=_0x223686;agents[_0x223686[_0x1bc9('0x11')]][_0x1bc9('0x15')]=utils[_0x1bc9('0x16')]();agents[_0x223686[_0x1bc9('0x11')]]['lastevent']=_0x1bc9('0x17');agents[_0x223686[_0x1bc9('0x11')]][_0x1bc9('0x8')]=null;agents[_0x223686['destuniqueid']][_0x1bc9('0x18')]=null;utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x1a'),_0x223686[_0x1bc9('0x4')],agents[_0x223686[_0x1bc9('0x11')]]['membername'],_0x223686['destuniqueid']));}catch(_0x5c8b4e){utils['error'](util[_0x1bc9('0x2')](_0x1bc9('0x14'),_0x223686[_0x1bc9('0x4')]),_0x5c8b4e);}};exports[_0x1bc9('0x1b')]=function(_0x4de3cb){try{if(!_['isNil'](agents[_0x4de3cb[_0x1bc9('0x11')]])){utils[_0x1bc9('0x13')](util[_0x1bc9('0x2')](_0x1bc9('0x1c'),_0x4de3cb['uniqueid']),_0x4de3cb);utils[_0x1bc9('0x19')](util['format']('[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout',_0x4de3cb[_0x1bc9('0x4')],agents[_0x4de3cb[_0x1bc9('0x11')]][_0x1bc9('0x6')],_0x4de3cb[_0x1bc9('0x11')]));agents[_0x4de3cb[_0x1bc9('0x11')]][_0x1bc9('0x1b')]=!![];agents[_0x4de3cb[_0x1bc9('0x11')]][_0x1bc9('0x1d')]=utils[_0x1bc9('0x16')]();agents[_0x4de3cb['destuniqueid']][_0x1bc9('0x1e')]=_0x1bc9('0x1f');agents[_0x4de3cb['destuniqueid']][_0x1bc9('0x20')]=_0x1bc9('0x1f');agents[_0x4de3cb[_0x1bc9('0x11')]]['holdtime']=_0x4de3cb[_0x1bc9('0x21')]?parseInt(_0x4de3cb[_0x1bc9('0x21')])/0x3e8:0x0;agents[_0x4de3cb[_0x1bc9('0x11')]][_0x1bc9('0x22')]=0x0;unanswered[_0x1bc9('0x23')](_0x4de3cb[_0x1bc9('0x11')]);}}catch(_0x71f631){utils[_0x1bc9('0x24')](util[_0x1bc9('0x2')](_0x1bc9('0x1c'),_0x4de3cb[_0x1bc9('0x4')]),_0x71f631);}};exports['queuecallerabandon']=function(_0x59ba7d){try{_[_0x1bc9('0x25')](agents,function(_0x91663d,_0x3fd354){if(_0x91663d[_0x1bc9('0x4')]==_0x59ba7d[_0x1bc9('0x4')]&&!_[_0x1bc9('0x26')](unanswered,_0x91663d[_0x1bc9('0x11')])){utils[_0x1bc9('0x13')](util['format']('[%s][agents][queuecallerabandon]',_0x59ba7d[_0x1bc9('0x4')]),_0x59ba7d);utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x27'),_0x59ba7d[_0x1bc9('0x4')],_0x91663d[_0x1bc9('0x6')],_0x91663d[_0x1bc9('0x11')]));_0x91663d['agentringnoanswer']=!![];_0x91663d['agentringnoanswerAt']=utils[_0x1bc9('0x16')]();_0x91663d['lastevent']=_0x1bc9('0x28');_0x91663d[_0x1bc9('0x20')]=_0x1bc9('0x28');_0x91663d['holdtime']=_0x59ba7d[_0x1bc9('0x29')];_0x91663d[_0x1bc9('0x22')]=0x0;writeDB(_0x91663d);}});}catch(_0x985ff1){utils[_0x1bc9('0x24')](util[_0x1bc9('0x2')](_0x1bc9('0x2a'),_0x59ba7d[_0x1bc9('0x4')]),_0x985ff1);}};exports['agentconnect']=function(_0x2475a8){try{if(agents[_0x2475a8[_0x1bc9('0x11')]]){utils[_0x1bc9('0x13')](util['format'](_0x1bc9('0x2b'),_0x2475a8[_0x1bc9('0x4')]),_0x2475a8);utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x2c'),_0x2475a8[_0x1bc9('0x4')],agents[_0x2475a8[_0x1bc9('0x11')]]['membername'],_0x2475a8[_0x1bc9('0x11')]));agents[_0x2475a8[_0x1bc9('0x11')]][_0x1bc9('0x2d')]=utils[_0x1bc9('0x16')]();agents[_0x2475a8['destuniqueid']][_0x1bc9('0x8')]=_0x2475a8['connectedlinenum'];agents[_0x2475a8['destuniqueid']][_0x1bc9('0x18')]=_0x2475a8['connectedlinename'];agents[_0x2475a8['destuniqueid']][_0x1bc9('0x29')]=_0x2475a8[_0x1bc9('0x21')];agents[_0x2475a8[_0x1bc9('0x11')]][_0x1bc9('0x1e')]=_0x1bc9('0x2e');_['forIn'](agents,function(_0x24e0dc,_0x4dd229){if(_0x24e0dc[_0x1bc9('0x11')]!=_0x2475a8[_0x1bc9('0x11')]&&_0x24e0dc[_0x1bc9('0x4')]==_0x2475a8[_0x1bc9('0x4')]){_0x24e0dc[_0x1bc9('0x22')]=0x0;_0x24e0dc[_0x1bc9('0x29')]=_0x2475a8[_0x1bc9('0x21')];_0x24e0dc[_0x1bc9('0x1b')]=!![];_0x24e0dc['agentringnoanswerAt']=utils[_0x1bc9('0x16')]();_0x24e0dc[_0x1bc9('0x1e')]=_0x1bc9('0x2f');_0x24e0dc['reason']=_0x1bc9('0x2f');_0x24e0dc[_0x1bc9('0x30')]=_0x2475a8['destuniqueid'];_0x24e0dc[_0x1bc9('0x31')]=_0x2475a8['membername'];writeDB(_0x24e0dc);}});}}catch(_0x5c5ac2){utils['error'](util[_0x1bc9('0x2')](_0x1bc9('0x2b'),_0x2475a8[_0x1bc9('0x4')]),_0x5c5ac2);}};exports['agentcomplete']=function(_0x37c751){try{if(!_[_0x1bc9('0x32')](agents[_0x37c751[_0x1bc9('0x11')]])){utils[_0x1bc9('0x13')](util[_0x1bc9('0x2')](_0x1bc9('0x33'),_0x37c751[_0x1bc9('0x4')]),_0x37c751);utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x34'),_0x37c751[_0x1bc9('0x4')],agents[_0x37c751[_0x1bc9('0x11')]][_0x1bc9('0x6')],_0x37c751[_0x1bc9('0x11')]));agents[_0x37c751['destuniqueid']][_0x1bc9('0xd')]=!![];agents[_0x37c751[_0x1bc9('0x11')]][_0x1bc9('0x35')]=utils[_0x1bc9('0x16')]();agents[_0x37c751[_0x1bc9('0x11')]][_0x1bc9('0x22')]=utils[_0x1bc9('0x36')](agents[_0x37c751['destuniqueid']][_0x1bc9('0x35')],agents[_0x37c751[_0x1bc9('0x11')]][_0x1bc9('0x2d')]);agents[_0x37c751[_0x1bc9('0x11')]][_0x1bc9('0x20')]=_0x37c751[_0x1bc9('0x20')];agents[_0x37c751[_0x1bc9('0x11')]][_0x1bc9('0x1e')]=_0x1bc9('0x37');writeDB(agents[_0x37c751[_0x1bc9('0x11')]]);}}catch(_0x49303c){utils[_0x1bc9('0x24')](util[_0x1bc9('0x2')](_0x1bc9('0x33'),_0x37c751['uniqueid']),_0x49303c);}};exports['blindtransfer']=function(_0x22d2f9){try{if(!_['isNil'](agents[_0x22d2f9[_0x1bc9('0x38')]])){utils[_0x1bc9('0x13')](util[_0x1bc9('0x2')]('[%s][agents][blindtransfer]',_0x22d2f9[_0x1bc9('0x4')]),_0x22d2f9);utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x39'),_0x22d2f9[_0x1bc9('0x4')],agents[_0x22d2f9[_0x1bc9('0x38')]]['membername'],agents[_0x22d2f9[_0x1bc9('0x38')]][_0x1bc9('0x4')]));agents[_0x22d2f9['transfereruniqueid']]['transfer']=!![];agents[_0x22d2f9[_0x1bc9('0x38')]][_0x1bc9('0x3a')]='blind';agents[_0x22d2f9[_0x1bc9('0x38')]][_0x1bc9('0x3b')]=_0x22d2f9[_0x1bc9('0x3c')];agents[_0x22d2f9['transfereruniqueid']]['transferuniqueid']=agents[_0x22d2f9[_0x1bc9('0x38')]][_0x1bc9('0x4')];}}catch(_0x29d77d){utils[_0x1bc9('0x24')](util[_0x1bc9('0x2')]('[%s][agents][blindtransfer]',_0x22d2f9[_0x1bc9('0x4')]),_0x29d77d);}};exports[_0x1bc9('0x3d')]=function(_0x190d8e){try{utils['debug'](util['format'](_0x1bc9('0x3e'),_0x190d8e[_0x1bc9('0x3f')]),_0x190d8e);if(_0x190d8e[_0x1bc9('0x3f')]==_0x190d8e[_0x1bc9('0x40')]){if(!_['isNil'](agents[_0x190d8e['secondtransfereruniqueid']])){utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')]('[%s][agents][attendedtransfer]\x20agent:%s',_0x190d8e[_0x1bc9('0x3f')],agents[_0x190d8e[_0x1bc9('0x41')]]['membername']));agents[_0x190d8e[_0x1bc9('0x41')]][_0x1bc9('0x42')]=!![];agents[_0x190d8e['secondtransfereruniqueid']][_0x1bc9('0x3a')]=_0x1bc9('0x43');agents[_0x190d8e[_0x1bc9('0x41')]][_0x1bc9('0x3b')]=_0x190d8e['origtransfererexten'];agents[_0x190d8e[_0x1bc9('0x41')]][_0x1bc9('0x44')]=_0x190d8e[_0x1bc9('0x3f')];}if(_0x190d8e[_0x1bc9('0x45')]&&agents[_0x190d8e[_0x1bc9('0x45')]]){agents[_0x190d8e['transfereeuniqueid']][_0x1bc9('0x46')]=0x1;transfers[_0x190d8e[_0x1bc9('0x45')]]=_[_0x1bc9('0x47')](agents[_0x190d8e[_0x1bc9('0x45')]]);transfers[_0x190d8e[_0x1bc9('0x45')]][_0x1bc9('0x7')]=agents[_0x190d8e[_0x1bc9('0x41')]][_0x1bc9('0x7')];transfers[_0x190d8e['transfereeuniqueid']][_0x1bc9('0x48')]=agents[_0x190d8e[_0x1bc9('0x41')]][_0x1bc9('0x48')];transfers[_0x190d8e[_0x1bc9('0x45')]]['agentcalledAt']=utils[_0x1bc9('0x16')]();transfers[_0x190d8e[_0x1bc9('0x45')]][_0x1bc9('0x2d')]=utils[_0x1bc9('0x16')]();transfers[_0x190d8e['transfereeuniqueid']][_0x1bc9('0x29')]=0x0;transfers[_0x190d8e[_0x1bc9('0x45')]][_0x1bc9('0x46')]=0x2;}}else if(_0x190d8e[_0x1bc9('0x41')]==_0x190d8e[_0x1bc9('0x49')]){if(!_[_0x1bc9('0x32')](agents[_0x190d8e['origtransfereruniqueid']])){utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')]('[%s][agents][attendedtransfer]\x20agent:%s',_0x190d8e['origtransfereruniqueid'],agents[_0x190d8e[_0x1bc9('0x3f')]][_0x1bc9('0x6')]));agents[_0x190d8e[_0x1bc9('0x3f')]][_0x1bc9('0x42')]=!![];agents[_0x190d8e[_0x1bc9('0x3f')]][_0x1bc9('0x3a')]='ATTENDED';agents[_0x190d8e[_0x1bc9('0x3f')]][_0x1bc9('0x3b')]=_0x190d8e[_0x1bc9('0x4a')];agents[_0x190d8e[_0x1bc9('0x3f')]]['transferuniqueid']=_0x190d8e['secondtransfereruniqueid'];}if(_0x190d8e['transfertargetuniqueid']&&agents[_0x190d8e['transfertargetuniqueid']]){agents[_0x190d8e['transfertargetuniqueid']][_0x1bc9('0x46')]=0x1;transfers[_0x190d8e[_0x1bc9('0x4b')]]=_[_0x1bc9('0x47')](agents[_0x190d8e[_0x1bc9('0x4b')]]);transfers[_0x190d8e[_0x1bc9('0x4b')]]['calleridnum']=agents[_0x190d8e[_0x1bc9('0x3f')]][_0x1bc9('0x7')];transfers[_0x190d8e['transfertargetuniqueid']]['calleridname']=agents[_0x190d8e[_0x1bc9('0x3f')]]['calleridname'];transfers[_0x190d8e[_0x1bc9('0x4b')]][_0x1bc9('0x15')]=utils[_0x1bc9('0x16')]();transfers[_0x190d8e[_0x1bc9('0x4b')]][_0x1bc9('0x2d')]=utils['now']();transfers[_0x190d8e['transfertargetuniqueid']][_0x1bc9('0x29')]=0x0;transfers[_0x190d8e['transfertargetuniqueid']]['agententerreason']=0x2;}}}catch(_0x4debf0){utils['error'](util['format']('[%s][agents][attendedtransfer]',_0x190d8e['origtransfereruniqueid']),_0x4debf0);}};exports[_0x1bc9('0x4c')]=function(_0x1a686f){try{utils[_0x1bc9('0x13')](util['format'](_0x1bc9('0x4d'),_0x1a686f[_0x1bc9('0x4')]),_0x1a686f);if(agents[_0x1a686f[_0x1bc9('0x4')]]&&agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x20')]==='timeout'){if(_0x1a686f[_0x1bc9('0x4e')]==='21'){agents[_0x1a686f['uniqueid']]['reason']=_0x1bc9('0x4f');agents[_0x1a686f['uniqueid']][_0x1bc9('0x1e')]='rejected';}utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x50'),_0x1a686f[_0x1bc9('0x4')],agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x6')],agents[_0x1a686f['uniqueid']][_0x1bc9('0x20')],agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x1e')]));writeDB(agents[_0x1a686f[_0x1bc9('0x4')]]);var _0xafb49c=unanswered[_0x1bc9('0x51')](_0x1a686f[_0x1bc9('0x4')]);if(_0xafb49c>-0x1){unanswered['splice'](_0xafb49c,0x1);}}if(transfers[_0x1a686f[_0x1bc9('0x4')]]){transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0xd')]=!![];transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x35')]=utils[_0x1bc9('0x16')]();transfers[_0x1a686f[_0x1bc9('0x4')]]['talktime']=utils[_0x1bc9('0x36')](transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x35')],transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x2d')]);transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x20')]=_0x1bc9('0x52');transfers[_0x1a686f[_0x1bc9('0x4')]]['lastevent']=_0x1bc9('0x37');utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x1a686f['uniqueid'],transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x6')],transfers[_0x1a686f[_0x1bc9('0x4')]]['reason'],transfers[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x1e')]));writeDB(transfers[_0x1a686f[_0x1bc9('0x4')]],!![]);}if(agents[_0x1a686f[_0x1bc9('0x4')]]&&agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x2d')]){agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0xd')]=!![];agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x35')]=utils['now']();agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x22')]=utils[_0x1bc9('0x36')](agents[_0x1a686f[_0x1bc9('0x4')]]['agentcompleteAt'],agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x2d')]);agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x20')]=agents[_0x1a686f['uniqueid']][_0x1bc9('0x42')]?_0x1bc9('0x42'):_0x1bc9('0x52');agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x1e')]=_0x1bc9('0x37');utils[_0x1bc9('0x19')](util[_0x1bc9('0x2')](_0x1bc9('0x50'),_0x1a686f['uniqueid'],agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x6')],agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x20')],agents[_0x1a686f[_0x1bc9('0x4')]][_0x1bc9('0x1e')]));writeDB(agents[_0x1a686f['uniqueid']]);}}catch(_0x4a87b8){utils[_0x1bc9('0x24')](util[_0x1bc9('0x2')](_0x1bc9('0x4d'),_0x1a686f[_0x1bc9('0x4')]),_0x4a87b8);}}; \ No newline at end of file diff --git a/server/services/xdr/calls.controller.js b/server/services/xdr/calls.controller.js index 2f41a26..97a65d9 100644 --- a/server/services/xdr/calls.controller.js +++ b/server/services/xdr/calls.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfebf=['[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','exten','now','DOCUMENTATION','isNil','channelstate','systemanswertime','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','destinationchannel','answertime','disposition','toNumber','error','[%s][calls][newstate]','hangup','[%s][calls][hangup]','callerid','calleridname','calleridnum','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','cause-txt','endtime','duration','starttime','billableseconds','localtwolinkedid','[%s][calls][attendedtransfer]','transfereechannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','origtransfereruniqueid','secondtransfererchannel','userfield','_attended','transfertargetchannel','origtransfererchannel','musiconholdstart','musiconholdstartAt','mohtime','diffTime','[%s][calls][musiconholdstop]','varset','[%s][calls][varset]','variable','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','value','source','xmd-phone','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','xmd-callerid-preview','xmd-callerid','xmd-queue','xmcs-queue','[%s][calls][varset]\x20variable:%s\x20value:%s','lastdata','xmd-contactid','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','ContactId','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','routeid','newexten','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','toLowerCase','appdata','cdr','split','substring','noop','set','lastapplication','lodash','util','NO\x20ANSWER','FAILED','ANSWERED','BUSY','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','membername','interface','connectedlinenum','lastevent','getUserByInternal','accountcode','UserId','request','CreateVoiceCallReport','newchannel','debug','[%s][calls][newchannel]','linkedid','OutgoingSpoolFailed'];(function(_0xe4f180,_0x46e1b7){var _0x1a3add=function(_0x2750be){while(--_0x2750be){_0xe4f180['push'](_0xe4f180['shift']());}};_0x1a3add(++_0x46e1b7);}(_0xfebf,0x173));var _0xffeb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfebf[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xffeb('0x0'));var util=require(_0xffeb('0x1'));var utils=require('./utils');var dispositions=[_0xffeb('0x2'),'FAILED',_0xffeb('0x3'),_0xffeb('0x2'),'NO\x20ANSWER',_0xffeb('0x2'),_0xffeb('0x4'),_0xffeb('0x5'),_0xffeb('0x3'),'FAILED','FAILED'];var channels={};function writeDB(_0x56b980){utils[_0xffeb('0x6')](util[_0xffeb('0x7')](_0xffeb('0x8'),_0x56b980[_0xffeb('0x9')],_0x56b980[_0xffeb('0xa')],_0x56b980['queue'],_0x56b980[_0xffeb('0xb')],_0x56b980[_0xffeb('0xc')],_0x56b980['calleridnum'],_0x56b980[_0xffeb('0xd')],_0x56b980[_0xffeb('0xe')]));if(_0x56b980['accountcode']){utils[_0xffeb('0xf')](_0x56b980[_0xffeb('0x10')])['then'](function(_0x3d7450){if(_0x3d7450){_0x56b980[_0xffeb('0x11')]=_0x3d7450['id'];}utils[_0xffeb('0x12')](_0xffeb('0x13'),_0x56b980);});}else{utils[_0xffeb('0x12')](_0xffeb('0x13'),_0x56b980);}if(channels[_0x56b980[_0xffeb('0x9')]]){delete channels[_0x56b980['uniqueid']];}}exports[_0xffeb('0x14')]=function(_0x4663ad){try{utils[_0xffeb('0x15')](util[_0xffeb('0x7')](_0xffeb('0x16'),_0x4663ad['uniqueid']),_0x4663ad);if(_0x4663ad[_0xffeb('0x9')]==_0x4663ad[_0xffeb('0x17')]&&_0x4663ad[_0xffeb('0xa')]!=_0xffeb('0x18')){utils['info'](util['format'](_0xffeb('0x19'),_0x4663ad[_0xffeb('0x9')],_0x4663ad[_0xffeb('0x1a')],_0x4663ad[_0xffeb('0x1b')]));channels[_0x4663ad['uniqueid']]={'uniqueid':_0x4663ad[_0xffeb('0x9')],'accountcode':_0x4663ad[_0xffeb('0x10')],'source':_0x4663ad['calleridnum'],'destination':_0x4663ad[_0xffeb('0x1b')],'destinationcontext':_0x4663ad[_0xffeb('0x1a')],'channel':_0x4663ad[_0xffeb('0xa')],'starttime':utils[_0xffeb('0x1c')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0xffeb('0x2'),'amaflags':_0xffeb('0x1d')};}}catch(_0x415425){utils['error'](util[_0xffeb('0x7')](_0xffeb('0x16'),_0x4663ad[_0xffeb('0x9')]),_0x415425);}};exports['newstate']=function(_0x3835e4){try{utils['debug'](util['format']('[%s][calls][newstate]',_0x3835e4[_0xffeb('0x9')]),_0x3835e4);if(!_[_0xffeb('0x1e')](channels[_0x3835e4[_0xffeb('0x9')]])&&_0x3835e4[_0xffeb('0x1f')]==0x6){utils[_0xffeb('0x6')](util['format']('[%s][calls][newstate]\x20context:%s\x20channel:%s',_0x3835e4[_0xffeb('0x9')],_0x3835e4[_0xffeb('0x1a')],_0x3835e4['channel']));if(_[_0xffeb('0x1e')](channels[_0x3835e4[_0xffeb('0x9')]][_0xffeb('0x20')])){channels[_0x3835e4[_0xffeb('0x9')]]['systemanswertime']=utils[_0xffeb('0x1c')]();}}else if(!_[_0xffeb('0x1e')](channels[_0x3835e4[_0xffeb('0x17')]])&&_0x3835e4[_0xffeb('0x1f')]==0x6&&_0x3835e4[_0xffeb('0x1a')]!='transfer'){utils[_0xffeb('0x6')](util[_0xffeb('0x7')](_0xffeb('0x21'),_0x3835e4[_0xffeb('0x9')],_0x3835e4[_0xffeb('0x17')],_0x3835e4[_0xffeb('0x1a')],_0x3835e4['channel']));channels[_0x3835e4[_0xffeb('0x17')]]['accountcode']=_0x3835e4[_0xffeb('0x10')];channels[_0x3835e4['linkedid']][_0xffeb('0x22')]=_0x3835e4['channel'];if(_[_0xffeb('0x1e')](channels[_0x3835e4['linkedid']][_0xffeb('0x23')])){channels[_0x3835e4['linkedid']]['answertime']=utils[_0xffeb('0x1c')]();}channels[_0x3835e4[_0xffeb('0x17')]][_0xffeb('0x24')]=dispositions[_[_0xffeb('0x25')](_0x3835e4[_0xffeb('0x1f')])]||'ANSWERED';}}catch(_0x5702c0){utils[_0xffeb('0x26')](util['format'](_0xffeb('0x27'),_0x3835e4[_0xffeb('0x9')]),_0x5702c0);}};exports[_0xffeb('0x28')]=function(_0x127453){try{if(!_[_0xffeb('0x1e')](channels[_0x127453[_0xffeb('0x9')]])){utils[_0xffeb('0x15')](util[_0xffeb('0x7')](_0xffeb('0x29'),_0x127453[_0xffeb('0x9')]),_0x127453);if(_['isNil'](channels[_0x127453['uniqueid']][_0xffeb('0x2a')])){channels[_0x127453['uniqueid']]['callerid']=_0x127453[_0xffeb('0x2b')]+'\x20<'+_0x127453[_0xffeb('0x2c')]+'>';}utils['info'](util[_0xffeb('0x7')](_0xffeb('0x2d'),_0x127453['uniqueid'],channels[_0x127453['uniqueid']][_0xffeb('0x2a')],_0x127453[_0xffeb('0x2e')]));channels[_0x127453['uniqueid']][_0xffeb('0x2f')]=utils[_0xffeb('0x1c')]();channels[_0x127453[_0xffeb('0x9')]][_0xffeb('0x30')]=utils['diffTime'](channels[_0x127453['uniqueid']]['endtime'],channels[_0x127453[_0xffeb('0x9')]][_0xffeb('0x31')]);channels[_0x127453[_0xffeb('0x9')]][_0xffeb('0x32')]=channels[_0x127453[_0xffeb('0x9')]][_0xffeb('0x23')]?utils['diffTime'](channels[_0x127453['uniqueid']]['endtime'],channels[_0x127453[_0xffeb('0x9')]][_0xffeb('0x23')]):0x0;writeDB(channels[_0x127453[_0xffeb('0x9')]]);}}catch(_0x18f7c9){utils[_0xffeb('0x26')](util[_0xffeb('0x7')]('[%s][calls][hangup]',_0x127453['uniqueid']),_0x18f7c9);}};exports['attendedtransfer']=function(_0x316bd6){try{if(!_[_0xffeb('0x1e')](channels[_0x316bd6[_0xffeb('0x33')]])){utils[_0xffeb('0x15')](util[_0xffeb('0x7')](_0xffeb('0x34'),_0x316bd6['origtransfereruniqueid']),_0x316bd6);if(channels[_0x316bd6[_0xffeb('0x33')]][_0xffeb('0xa')]==_0x316bd6[_0xffeb('0x35')]){utils[_0xffeb('0x6')](util[_0xffeb('0x7')](_0xffeb('0x36'),_0x316bd6[_0xffeb('0x37')],_0x316bd6[_0xffeb('0x33')],_0x316bd6[_0xffeb('0x38')]));channels[_0x316bd6[_0xffeb('0x33')]][_0xffeb('0x22')]=_0x316bd6['secondtransfererchannel'];channels[_0x316bd6['localtwolinkedid']][_0xffeb('0x39')]=_0xffeb('0x3a');}else if(channels[_0x316bd6['localtwolinkedid']][_0xffeb('0xa')]=_0x316bd6[_0xffeb('0x3b')]){utils['info'](util[_0xffeb('0x7')](_0xffeb('0x36'),_0x316bd6['origtransfereruniqueid'],_0x316bd6['localtwolinkedid'],_0x316bd6[_0xffeb('0x3c')]));channels[_0x316bd6['localtwolinkedid']]['destinationchannel']=_0x316bd6['origtransfererchannel'];channels[_0x316bd6[_0xffeb('0x33')]][_0xffeb('0x39')]=_0xffeb('0x3a');}}}catch(_0xb9b50b){utils['error'](util['format']('[%s][calls][attendedtransfer]',_0x316bd6[_0xffeb('0x37')]),_0xb9b50b);}};exports[_0xffeb('0x3d')]=function(_0x1b7013){try{if(!_[_0xffeb('0x1e')](channels[_0x1b7013[_0xffeb('0x9')]])){utils[_0xffeb('0x15')](util[_0xffeb('0x7')]('[%s][calls][musiconholdstart]',_0x1b7013[_0xffeb('0x9')]),_0x1b7013);channels[_0x1b7013[_0xffeb('0x9')]][_0xffeb('0x3e')]=utils[_0xffeb('0x1c')]();utils[_0xffeb('0x6')](util[_0xffeb('0x7')]('[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s',_0x1b7013[_0xffeb('0x9')],channels[_0x1b7013[_0xffeb('0x9')]][_0xffeb('0x3e')]));}}catch(_0x4342b9){utils[_0xffeb('0x26')](util[_0xffeb('0x7')]('[%s][calls][musiconholdstart]',_0x1b7013[_0xffeb('0x9')]),_0x4342b9);}};exports['musiconholdstop']=function(_0x502b0b){try{if(!_[_0xffeb('0x1e')](channels[_0x502b0b[_0xffeb('0x9')]])){utils[_0xffeb('0x15')](util[_0xffeb('0x7')]('[%s][calls][musiconholdstop]',_0x502b0b[_0xffeb('0x9')]),_0x502b0b);if(!_['isNil'](channels[_0x502b0b[_0xffeb('0x9')]][_0xffeb('0x3e')])){channels[_0x502b0b[_0xffeb('0x9')]][_0xffeb('0x3f')]+=utils[_0xffeb('0x40')](utils[_0xffeb('0x1c')](),channels[_0x502b0b[_0xffeb('0x9')]][_0xffeb('0x3e')]);utils[_0xffeb('0x6')](util[_0xffeb('0x7')]('[%s][calls][musiconholdstop]\x20mohtime:%s',_0x502b0b['uniqueid'],channels[_0x502b0b['uniqueid']][_0xffeb('0x3f')]));delete channels[_0x502b0b[_0xffeb('0x9')]]['musiconholdstartAt'];}}}catch(_0xfaec){utils[_0xffeb('0x26')](util['format'](_0xffeb('0x41'),_0x502b0b[_0xffeb('0x9')]),_0xfaec);}};exports[_0xffeb('0x42')]=function(_0x50955d){try{if(!_[_0xffeb('0x1e')](channels[_0x50955d['uniqueid']])){utils[_0xffeb('0x15')](util[_0xffeb('0x7')](_0xffeb('0x43'),_0x50955d[_0xffeb('0x9')]),_0x50955d);if(!_['isNil'](_0x50955d[_0xffeb('0x44')]['xmd-originatecalleridnum'])){utils[_0xffeb('0x6')](util[_0xffeb('0x7')](_0xffeb('0x45'),_0x50955d[_0xffeb('0x9')],_0x50955d[_0xffeb('0x46')]));channels[_0x50955d['uniqueid']][_0xffeb('0x47')]=_0x50955d[_0xffeb('0x46')];}if(!_['isNil'](_0x50955d[_0xffeb('0x44')][_0xffeb('0x48')])){utils['info'](util[_0xffeb('0x7')](_0xffeb('0x49'),_0x50955d[_0xffeb('0x9')],_0x50955d['value']));channels[_0x50955d[_0xffeb('0x9')]]['destination']=_0x50955d['value'];channels[_0x50955d[_0xffeb('0x9')]][_0xffeb('0x2a')]='\x22'+_0x50955d[_0xffeb('0x46')]+'\x22\x20<'+_0x50955d[_0xffeb('0x46')]+'>';}if(!_[_0xffeb('0x1e')](_0x50955d[_0xffeb('0x44')][_0xffeb('0x4a')])||!_[_0xffeb('0x1e')](_0x50955d[_0xffeb('0x44')]['xmd-callerid'])){utils[_0xffeb('0x6')](util[_0xffeb('0x7')]('[%s][calls][varset]\x20variable:%s\x20value:%s',_0x50955d[_0xffeb('0x9')],!_[_0xffeb('0x1e')](_0x50955d[_0xffeb('0x44')][_0xffeb('0x4a')])?_0xffeb('0x4a'):_0xffeb('0x4b'),_0x50955d[_0xffeb('0x46')]));channels[_0x50955d[_0xffeb('0x9')]][_0xffeb('0x2a')]=_0x50955d[_0xffeb('0x46')];}if(!_['isNil'](_0x50955d[_0xffeb('0x44')][_0xffeb('0x4c')])||!_['isNil'](_0x50955d[_0xffeb('0x44')][_0xffeb('0x4d')])){utils['info'](util[_0xffeb('0x7')](_0xffeb('0x4e'),_0x50955d[_0xffeb('0x9')],!_['isNil'](_0x50955d[_0xffeb('0x44')][_0xffeb('0x4c')])?_0xffeb('0x4c'):_0xffeb('0x4d'),_0x50955d[_0xffeb('0x46')]));channels[_0x50955d['uniqueid']]['lastapplication']='Queue';channels[_0x50955d['uniqueid']][_0xffeb('0x4f')]=_0x50955d[_0xffeb('0x46')];channels[_0x50955d[_0xffeb('0x9')]]['queue']=!![];}if(!_[_0xffeb('0x1e')](_0x50955d['variable'][_0xffeb('0x50')])){utils['info'](util[_0xffeb('0x7')](_0xffeb('0x51'),_0x50955d[_0xffeb('0x9')],_0x50955d[_0xffeb('0x46')]));channels[_0x50955d[_0xffeb('0x9')]][_0xffeb('0x52')]=_0x50955d[_0xffeb('0x46')];}if(!_[_0xffeb('0x1e')](_0x50955d[_0xffeb('0x44')]['xmd-cdrtype'])){utils[_0xffeb('0x6')](util['format'](_0xffeb('0x53'),_0x50955d[_0xffeb('0x9')],_0x50955d[_0xffeb('0x46')]));channels[_0x50955d[_0xffeb('0x9')]]['type']=_0x50955d[_0xffeb('0x46')];}if(!_[_0xffeb('0x1e')](_0x50955d[_0xffeb('0x44')][_0xffeb('0x54')])){utils['info'](util[_0xffeb('0x7')](_0xffeb('0x55'),_0x50955d[_0xffeb('0x9')],_0x50955d[_0xffeb('0x46')]));channels[_0x50955d[_0xffeb('0x9')]][_0xffeb('0x56')]=_0x50955d[_0xffeb('0x46')];}if(!_['isNil'](_0x50955d['variable']['sipcallid'])){utils['info'](util[_0xffeb('0x7')]('[%s][calls][varset]\x20variable:sipcallid\x20value:%s',_0x50955d[_0xffeb('0x9')],_0x50955d[_0xffeb('0x46')]));channels[_0x50955d['uniqueid']]['sipcallid']=_0x50955d[_0xffeb('0x46')];}}}catch(_0x47e7d8){utils[_0xffeb('0x26')](util[_0xffeb('0x7')](_0xffeb('0x43'),_0x50955d[_0xffeb('0x9')]),_0x47e7d8);}};exports[_0xffeb('0x57')]=function(_0x2aa3ff){try{if(!_[_0xffeb('0x1e')](channels[_0x2aa3ff[_0xffeb('0x9')]])){utils[_0xffeb('0x15')](util[_0xffeb('0x7')](_0xffeb('0x58'),_0x2aa3ff[_0xffeb('0x9')]),_0x2aa3ff);utils[_0xffeb('0x6')](util[_0xffeb('0x7')](_0xffeb('0x59'),_0x2aa3ff[_0xffeb('0x9')],_0x2aa3ff[_0xffeb('0x5a')],_0x2aa3ff['appdata']));if(_0x2aa3ff['application'][_0xffeb('0x5b')]()=='set'&&_['startsWith'](_0x2aa3ff[_0xffeb('0x5c')][_0xffeb('0x5b')](),_0xffeb('0x5d'))){var _0x6a1447=_0x2aa3ff[_0xffeb('0x5c')][_0xffeb('0x5e')]('=');var _0x2b007c=_0x6a1447[0x0][_0xffeb('0x5f')](_0x6a1447[0x0]['lastIndexOf']('(')+0x1,_0x6a1447[0x0]['lastIndexOf'](')'));var _0x5ea69c=_0x6a1447[0x1];channels[_0x2aa3ff['uniqueid']][_0x2b007c]=_0x5ea69c;}if(!_['includes']([_0xffeb('0x28'),_0xffeb('0x60'),'execif',_0xffeb('0x61'),'gotoif'],_0x2aa3ff[_0xffeb('0x5a')][_0xffeb('0x5b')]())){channels[_0x2aa3ff[_0xffeb('0x9')]][_0xffeb('0x62')]=_0x2aa3ff[_0xffeb('0x5a')];channels[_0x2aa3ff['uniqueid']][_0xffeb('0x4f')]=_0x2aa3ff[_0xffeb('0x5c')];}}}catch(_0x272378){utils['error'](util[_0xffeb('0x7')](_0xffeb('0x58'),_0x2aa3ff[_0xffeb('0x9')]),_0x272378);}}; \ No newline at end of file +var _0xa356=['OutgoingSpoolFailed','context','exten','now','DOCUMENTATION','error','[%s][calls][newchannel]','newstate','[%s][calls][newstate]','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','isNil','systemanswertime','transfer','destinationchannel','answertime','disposition','toNumber','ANSWERED','hangup','debug','[%s][calls][hangup]','callerid','calleridname','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','endtime','duration','diffTime','starttime','localtwolinkedid','[%s][calls][attendedtransfer]','origtransfereruniqueid','transfereechannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','secondtransfererchannel','userfield','_attended','transfertargetchannel','origtransfererchannel','musiconholdstart','[%s][calls][musiconholdstart]','musiconholdstartAt','musiconholdstop','[%s][calls][musiconholdstop]','mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','[%s][calls][varset]','variable','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','source','value','xmd-phone','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','xmd-callerid-preview','xmd-callerid','xmd-queue','xmcs-queue','[%s][calls][varset]\x20variable:%s\x20value:%s','lastapplication','Queue','lastdata','xmd-contactid','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','ContactId','xmd-cdrtype','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','sipcallid','[%s][calls][varset]\x20variable:sipcallid\x20value:%s','newexten','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','cdr','appdata','split','substring','lastIndexOf','includes','noop','execif','set','gotoif','toLowerCase','util','./utils','NO\x20ANSWER','FAILED','BUSY','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','queue','membername','interface','calleridnum','getUserByInternal','accountcode','UserId','CreateVoiceCallReport','request','newchannel','linkedid'];(function(_0x1ca4c3,_0x554126){var _0x4426a6=function(_0x11e9b0){while(--_0x11e9b0){_0x1ca4c3['push'](_0x1ca4c3['shift']());}};_0x4426a6(++_0x554126);}(_0xa356,0x12f));var _0x6a35=function(_0xe9459,_0x3cb4a9){_0xe9459=_0xe9459-0x0;var _0x1c11b0=_0xa356[_0xe9459];return _0x1c11b0;};'use strict';var _=require('lodash');var util=require(_0x6a35('0x0'));var utils=require(_0x6a35('0x1'));var dispositions=[_0x6a35('0x2'),_0x6a35('0x3'),_0x6a35('0x3'),'NO\x20ANSWER',_0x6a35('0x2'),'NO\x20ANSWER','ANSWERED',_0x6a35('0x4'),_0x6a35('0x3'),'FAILED',_0x6a35('0x3')];var channels={};function writeDB(_0x283e11){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x7'),_0x283e11[_0x6a35('0x8')],_0x283e11[_0x6a35('0x9')],_0x283e11[_0x6a35('0xa')],_0x283e11[_0x6a35('0xb')],_0x283e11[_0x6a35('0xc')],_0x283e11[_0x6a35('0xd')],_0x283e11['connectedlinenum'],_0x283e11['lastevent']));if(_0x283e11['accountcode']){utils[_0x6a35('0xe')](_0x283e11[_0x6a35('0xf')])['then'](function(_0x2cd0af){if(_0x2cd0af){_0x283e11[_0x6a35('0x10')]=_0x2cd0af['id'];}utils['request'](_0x6a35('0x11'),_0x283e11);});}else{utils[_0x6a35('0x12')](_0x6a35('0x11'),_0x283e11);}if(channels[_0x283e11['uniqueid']]){delete channels[_0x283e11[_0x6a35('0x8')]];}}exports[_0x6a35('0x13')]=function(_0x5526fc){try{utils['debug'](util[_0x6a35('0x6')]('[%s][calls][newchannel]',_0x5526fc['uniqueid']),_0x5526fc);if(_0x5526fc['uniqueid']==_0x5526fc[_0x6a35('0x14')]&&_0x5526fc[_0x6a35('0x9')]!=_0x6a35('0x15')){utils[_0x6a35('0x5')](util[_0x6a35('0x6')]('[%s][calls][newchannel]\x20context:%s\x20exten:%s',_0x5526fc[_0x6a35('0x8')],_0x5526fc[_0x6a35('0x16')],_0x5526fc[_0x6a35('0x17')]));channels[_0x5526fc[_0x6a35('0x8')]]={'uniqueid':_0x5526fc['uniqueid'],'accountcode':_0x5526fc[_0x6a35('0xf')],'source':_0x5526fc['calleridnum'],'destination':_0x5526fc[_0x6a35('0x17')],'destinationcontext':_0x5526fc[_0x6a35('0x16')],'channel':_0x5526fc[_0x6a35('0x9')],'starttime':utils[_0x6a35('0x18')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0x6a35('0x2'),'amaflags':_0x6a35('0x19')};}}catch(_0x12300a){utils[_0x6a35('0x1a')](util['format'](_0x6a35('0x1b'),_0x5526fc[_0x6a35('0x8')]),_0x12300a);}};exports[_0x6a35('0x1c')]=function(_0x2581e8){try{utils['debug'](util[_0x6a35('0x6')](_0x6a35('0x1d'),_0x2581e8[_0x6a35('0x8')]),_0x2581e8);if(!_['isNil'](channels[_0x2581e8[_0x6a35('0x8')]])&&_0x2581e8[_0x6a35('0x1e')]==0x6){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x1f'),_0x2581e8[_0x6a35('0x8')],_0x2581e8['context'],_0x2581e8[_0x6a35('0x9')]));if(_[_0x6a35('0x20')](channels[_0x2581e8['uniqueid']][_0x6a35('0x21')])){channels[_0x2581e8[_0x6a35('0x8')]][_0x6a35('0x21')]=utils[_0x6a35('0x18')]();}}else if(!_['isNil'](channels[_0x2581e8[_0x6a35('0x14')]])&&_0x2581e8[_0x6a35('0x1e')]==0x6&&_0x2581e8[_0x6a35('0x16')]!=_0x6a35('0x22')){utils[_0x6a35('0x5')](util[_0x6a35('0x6')]('[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s',_0x2581e8[_0x6a35('0x8')],_0x2581e8[_0x6a35('0x14')],_0x2581e8[_0x6a35('0x16')],_0x2581e8[_0x6a35('0x9')]));channels[_0x2581e8[_0x6a35('0x14')]][_0x6a35('0xf')]=_0x2581e8['accountcode'];channels[_0x2581e8[_0x6a35('0x14')]][_0x6a35('0x23')]=_0x2581e8[_0x6a35('0x9')];if(_[_0x6a35('0x20')](channels[_0x2581e8[_0x6a35('0x14')]]['answertime'])){channels[_0x2581e8[_0x6a35('0x14')]][_0x6a35('0x24')]=utils[_0x6a35('0x18')]();}channels[_0x2581e8['linkedid']][_0x6a35('0x25')]=dispositions[_[_0x6a35('0x26')](_0x2581e8[_0x6a35('0x1e')])]||_0x6a35('0x27');}}catch(_0x2da467){utils[_0x6a35('0x1a')](util[_0x6a35('0x6')](_0x6a35('0x1d'),_0x2581e8[_0x6a35('0x8')]),_0x2da467);}};exports[_0x6a35('0x28')]=function(_0x23238f){try{if(!_[_0x6a35('0x20')](channels[_0x23238f[_0x6a35('0x8')]])){utils[_0x6a35('0x29')](util[_0x6a35('0x6')](_0x6a35('0x2a'),_0x23238f[_0x6a35('0x8')]),_0x23238f);if(_['isNil'](channels[_0x23238f['uniqueid']][_0x6a35('0x2b')])){channels[_0x23238f[_0x6a35('0x8')]][_0x6a35('0x2b')]=_0x23238f[_0x6a35('0x2c')]+'\x20<'+_0x23238f[_0x6a35('0xd')]+'>';}utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x2d'),_0x23238f[_0x6a35('0x8')],channels[_0x23238f[_0x6a35('0x8')]][_0x6a35('0x2b')],_0x23238f['cause-txt']));channels[_0x23238f[_0x6a35('0x8')]][_0x6a35('0x2e')]=utils[_0x6a35('0x18')]();channels[_0x23238f[_0x6a35('0x8')]][_0x6a35('0x2f')]=utils[_0x6a35('0x30')](channels[_0x23238f['uniqueid']][_0x6a35('0x2e')],channels[_0x23238f['uniqueid']][_0x6a35('0x31')]);channels[_0x23238f[_0x6a35('0x8')]]['billableseconds']=channels[_0x23238f['uniqueid']][_0x6a35('0x24')]?utils['diffTime'](channels[_0x23238f[_0x6a35('0x8')]][_0x6a35('0x2e')],channels[_0x23238f[_0x6a35('0x8')]][_0x6a35('0x24')]):0x0;writeDB(channels[_0x23238f[_0x6a35('0x8')]]);}}catch(_0x440a3e){utils[_0x6a35('0x1a')](util[_0x6a35('0x6')](_0x6a35('0x2a'),_0x23238f['uniqueid']),_0x440a3e);}};exports['attendedtransfer']=function(_0x28a09d){try{if(!_[_0x6a35('0x20')](channels[_0x28a09d[_0x6a35('0x32')]])){utils[_0x6a35('0x29')](util[_0x6a35('0x6')](_0x6a35('0x33'),_0x28a09d[_0x6a35('0x34')]),_0x28a09d);if(channels[_0x28a09d[_0x6a35('0x32')]]['channel']==_0x28a09d[_0x6a35('0x35')]){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x36'),_0x28a09d[_0x6a35('0x34')],_0x28a09d[_0x6a35('0x32')],_0x28a09d[_0x6a35('0x37')]));channels[_0x28a09d[_0x6a35('0x32')]][_0x6a35('0x23')]=_0x28a09d[_0x6a35('0x37')];channels[_0x28a09d[_0x6a35('0x32')]][_0x6a35('0x38')]=_0x6a35('0x39');}else if(channels[_0x28a09d['localtwolinkedid']][_0x6a35('0x9')]=_0x28a09d[_0x6a35('0x3a')]){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x36'),_0x28a09d[_0x6a35('0x34')],_0x28a09d[_0x6a35('0x32')],_0x28a09d['origtransfererchannel']));channels[_0x28a09d[_0x6a35('0x32')]][_0x6a35('0x23')]=_0x28a09d[_0x6a35('0x3b')];channels[_0x28a09d[_0x6a35('0x32')]][_0x6a35('0x38')]=_0x6a35('0x39');}}}catch(_0x5bd686){utils['error'](util[_0x6a35('0x6')](_0x6a35('0x33'),_0x28a09d[_0x6a35('0x34')]),_0x5bd686);}};exports[_0x6a35('0x3c')]=function(_0x39b991){try{if(!_[_0x6a35('0x20')](channels[_0x39b991[_0x6a35('0x8')]])){utils[_0x6a35('0x29')](util[_0x6a35('0x6')](_0x6a35('0x3d'),_0x39b991[_0x6a35('0x8')]),_0x39b991);channels[_0x39b991[_0x6a35('0x8')]][_0x6a35('0x3e')]=utils[_0x6a35('0x18')]();utils[_0x6a35('0x5')](util[_0x6a35('0x6')]('[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s',_0x39b991['uniqueid'],channels[_0x39b991[_0x6a35('0x8')]][_0x6a35('0x3e')]));}}catch(_0x35f3c9){utils[_0x6a35('0x1a')](util[_0x6a35('0x6')](_0x6a35('0x3d'),_0x39b991[_0x6a35('0x8')]),_0x35f3c9);}};exports[_0x6a35('0x3f')]=function(_0x154e74){try{if(!_[_0x6a35('0x20')](channels[_0x154e74[_0x6a35('0x8')]])){utils[_0x6a35('0x29')](util[_0x6a35('0x6')](_0x6a35('0x40'),_0x154e74['uniqueid']),_0x154e74);if(!_[_0x6a35('0x20')](channels[_0x154e74[_0x6a35('0x8')]][_0x6a35('0x3e')])){channels[_0x154e74[_0x6a35('0x8')]][_0x6a35('0x41')]+=utils[_0x6a35('0x30')](utils[_0x6a35('0x18')](),channels[_0x154e74[_0x6a35('0x8')]][_0x6a35('0x3e')]);utils[_0x6a35('0x5')](util['format'](_0x6a35('0x42'),_0x154e74[_0x6a35('0x8')],channels[_0x154e74[_0x6a35('0x8')]][_0x6a35('0x41')]));delete channels[_0x154e74[_0x6a35('0x8')]][_0x6a35('0x3e')];}}}catch(_0xa8dd18){utils[_0x6a35('0x1a')](util['format'](_0x6a35('0x40'),_0x154e74['uniqueid']),_0xa8dd18);}};exports[_0x6a35('0x43')]=function(_0x562556){try{if(!_[_0x6a35('0x20')](channels[_0x562556[_0x6a35('0x8')]])){utils[_0x6a35('0x29')](util[_0x6a35('0x6')](_0x6a35('0x44'),_0x562556[_0x6a35('0x8')]),_0x562556);if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')]['xmd-originatecalleridnum'])){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x46'),_0x562556[_0x6a35('0x8')],_0x562556['value']));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x47')]=_0x562556[_0x6a35('0x48')];}if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x49')])){utils[_0x6a35('0x5')](util['format'](_0x6a35('0x4a'),_0x562556[_0x6a35('0x8')],_0x562556[_0x6a35('0x48')]));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x4b')]=_0x562556[_0x6a35('0x48')];channels[_0x562556['uniqueid']][_0x6a35('0x2b')]='\x22'+_0x562556[_0x6a35('0x48')]+'\x22\x20<'+_0x562556[_0x6a35('0x48')]+'>';}if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x4c')])||!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x4d')])){utils['info'](util['format']('[%s][calls][varset]\x20variable:%s\x20value:%s',_0x562556['uniqueid'],!_['isNil'](_0x562556[_0x6a35('0x45')][_0x6a35('0x4c')])?_0x6a35('0x4c'):_0x6a35('0x4d'),_0x562556[_0x6a35('0x48')]));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x2b')]=_0x562556[_0x6a35('0x48')];}if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x4e')])||!_['isNil'](_0x562556[_0x6a35('0x45')][_0x6a35('0x4f')])){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x50'),_0x562556[_0x6a35('0x8')],!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x4e')])?_0x6a35('0x4e'):_0x6a35('0x4f'),_0x562556[_0x6a35('0x48')]));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x51')]=_0x6a35('0x52');channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x53')]=_0x562556[_0x6a35('0x48')];channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0xa')]=!![];}if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x54')])){utils['info'](util[_0x6a35('0x6')](_0x6a35('0x55'),_0x562556[_0x6a35('0x8')],_0x562556[_0x6a35('0x48')]));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x56')]=_0x562556[_0x6a35('0x48')];}if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')][_0x6a35('0x57')])){utils['info'](util[_0x6a35('0x6')](_0x6a35('0x58'),_0x562556[_0x6a35('0x8')],_0x562556[_0x6a35('0x48')]));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x59')]=_0x562556[_0x6a35('0x48')];}if(!_[_0x6a35('0x20')](_0x562556[_0x6a35('0x45')]['outboundrouteid'])){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x5a'),_0x562556[_0x6a35('0x8')],_0x562556[_0x6a35('0x48')]));channels[_0x562556[_0x6a35('0x8')]]['routeid']=_0x562556[_0x6a35('0x48')];}if(!_[_0x6a35('0x20')](_0x562556['variable'][_0x6a35('0x5b')])){utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x5c'),_0x562556[_0x6a35('0x8')],_0x562556['value']));channels[_0x562556[_0x6a35('0x8')]][_0x6a35('0x5b')]=_0x562556[_0x6a35('0x48')];}}}catch(_0x20269a){utils[_0x6a35('0x1a')](util[_0x6a35('0x6')](_0x6a35('0x44'),_0x562556[_0x6a35('0x8')]),_0x20269a);}};exports[_0x6a35('0x5d')]=function(_0x182ed7){try{if(!_[_0x6a35('0x20')](channels[_0x182ed7[_0x6a35('0x8')]])){utils[_0x6a35('0x29')](util[_0x6a35('0x6')](_0x6a35('0x5e'),_0x182ed7[_0x6a35('0x8')]),_0x182ed7);utils[_0x6a35('0x5')](util[_0x6a35('0x6')](_0x6a35('0x5f'),_0x182ed7['uniqueid'],_0x182ed7['application'],_0x182ed7['appdata']));if(_0x182ed7[_0x6a35('0x60')]['toLowerCase']()=='set'&&_['startsWith'](_0x182ed7['appdata']['toLowerCase'](),_0x6a35('0x61'))){var _0x2f1c54=_0x182ed7[_0x6a35('0x62')][_0x6a35('0x63')]('=');var _0x5b3788=_0x2f1c54[0x0][_0x6a35('0x64')](_0x2f1c54[0x0][_0x6a35('0x65')]('(')+0x1,_0x2f1c54[0x0][_0x6a35('0x65')](')'));var _0x33eef9=_0x2f1c54[0x1];channels[_0x182ed7[_0x6a35('0x8')]][_0x5b3788]=_0x33eef9;}if(!_[_0x6a35('0x66')](['hangup',_0x6a35('0x67'),_0x6a35('0x68'),_0x6a35('0x69'),_0x6a35('0x6a')],_0x182ed7[_0x6a35('0x60')][_0x6a35('0x6b')]())){channels[_0x182ed7[_0x6a35('0x8')]][_0x6a35('0x51')]=_0x182ed7[_0x6a35('0x60')];channels[_0x182ed7[_0x6a35('0x8')]]['lastdata']=_0x182ed7[_0x6a35('0x62')];}}}catch(_0x5e6f32){utils['error'](util[_0x6a35('0x6')](_0x6a35('0x5e'),_0x182ed7[_0x6a35('0x8')]),_0x5e6f32);}}; \ No newline at end of file diff --git a/server/services/xdr/core.controller.js b/server/services/xdr/core.controller.js index a031dee..13e7edb 100644 --- a/server/services/xdr/core.controller.js +++ b/server/services/xdr/core.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa174=['fullybooted','error','[core]\x20error','close','[core]\x20close','managerevent','./utils','info','[core]\x20connected','shutdown','[core]\x20shutdown'];(function(_0x583e17,_0x101a27){var _0x25e100=function(_0x562715){while(--_0x562715){_0x583e17['push'](_0x583e17['shift']());}};_0x25e100(++_0x101a27);}(_0xa174,0x145));var _0x4a17=function(_0x509919,_0x163c28){_0x509919=_0x509919-0x0;var _0x36c6b8=_0xa174[_0x509919];return _0x36c6b8;};'use strict';var utils=require(_0x4a17('0x0'));exports['connect']=function(){utils[_0x4a17('0x1')](_0x4a17('0x2'));};exports[_0x4a17('0x3')]=function(){utils[_0x4a17('0x1')](_0x4a17('0x4'));};exports[_0x4a17('0x5')]=function(){utils[_0x4a17('0x1')]('[core]\x20fullybooted');};exports[_0x4a17('0x6')]=function(_0x2e509a){utils[_0x4a17('0x6')](_0x4a17('0x7'),_0x2e509a);};exports[_0x4a17('0x8')]=function(){utils[_0x4a17('0x1')](_0x4a17('0x9'));};exports[_0x4a17('0xa')]=function(_0x1c3d6e){}; \ No newline at end of file +var _0x2da2=['fullybooted','error','[core]\x20error','close','[core]\x20close','managerevent','./utils','connect','info','[core]\x20connected','shutdown','[core]\x20shutdown'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x2da2,0x1aa));var _0x22da=function(_0x1e50fc,_0x285d4c){_0x1e50fc=_0x1e50fc-0x0;var _0x4a1e9d=_0x2da2[_0x1e50fc];return _0x4a1e9d;};'use strict';var utils=require(_0x22da('0x0'));exports[_0x22da('0x1')]=function(){utils[_0x22da('0x2')](_0x22da('0x3'));};exports[_0x22da('0x4')]=function(){utils[_0x22da('0x2')](_0x22da('0x5'));};exports[_0x22da('0x6')]=function(){utils['info']('[core]\x20fullybooted');};exports['error']=function(_0x71b310){utils[_0x22da('0x7')](_0x22da('0x8'),_0x71b310);};exports[_0x22da('0x9')]=function(){utils[_0x22da('0x2')](_0x22da('0xa'));};exports[_0x22da('0xb')]=function(_0xd797b4){}; \ No newline at end of file diff --git a/server/services/xdr/dials.controller.js b/server/services/xdr/dials.controller.js index 1aaa171..090d559 100644 --- a/server/services/xdr/dials.controller.js +++ b/server/services/xdr/dials.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeed6=['lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','dialstatus','ANSWER','answertime','connect','[%s][dials][dialend]\x20dialstatus:%s','[%s][dials][dialend]','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','cause-txt','diffTime','holdtime','endtime','billableseconds','[%s][dials][hangup]','lodash','util','./utils','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','channel','dialstring','calleridnum','connectedlinenum','request','CreateVoiceDialReport','newexten','debug','format','[%s][dials][newexten]','uniqueid','[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','startsWith','cdr(routeid)','split','error','varset','[%s][dials][varset]','isNil','variable','outboundrouteid','info','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','dialbegin','[%s][dials][dialbegin]','assign','starttime','now'];(function(_0x16e2c4,_0x259972){var _0x2cbb02=function(_0x3dfa5f){while(--_0x3dfa5f){_0x16e2c4['push'](_0x16e2c4['shift']());}};_0x2cbb02(++_0x259972);}(_0xeed6,0x7b));var _0x6eed=function(_0x525284,_0x525c3e){_0x525284=_0x525284-0x0;var _0x1fbcd6=_0xeed6[_0x525284];return _0x1fbcd6;};'use strict';var _=require(_0x6eed('0x0'));var util=require(_0x6eed('0x1'));var utils=require(_0x6eed('0x2'));var dials={};function writeDB(_0x324a62){utils['info'](util['format'](_0x6eed('0x3'),_0x324a62['uniqueid'],_0x324a62[_0x6eed('0x4')],_0x324a62[_0x6eed('0x5')],_0x324a62[_0x6eed('0x6')],_0x324a62[_0x6eed('0x7')],_0x324a62['dialstatus']));utils[_0x6eed('0x8')](_0x6eed('0x9'),_0x324a62);delete dials[_0x324a62['uniqueid']];}exports[_0x6eed('0xa')]=function(_0x1469ff){try{utils[_0x6eed('0xb')](util[_0x6eed('0xc')](_0x6eed('0xd'),_0x1469ff[_0x6eed('0xe')]),_0x1469ff);utils['info'](util[_0x6eed('0xc')](_0x6eed('0xf'),_0x1469ff[_0x6eed('0xe')],_0x1469ff[_0x6eed('0x10')],_0x1469ff[_0x6eed('0x11')]));if(_0x1469ff[_0x6eed('0x10')][_0x6eed('0x12')]()=='set'&&_[_0x6eed('0x13')](_0x1469ff[_0x6eed('0x11')][_0x6eed('0x12')](),_0x6eed('0x14'))){var _0x92089e=_0x1469ff[_0x6eed('0x11')][_0x6eed('0x15')]('=');dials[_0x1469ff[_0x6eed('0xe')]]={'routeId':_0x92089e[0x1]};}}catch(_0x690488){utils[_0x6eed('0x16')](util[_0x6eed('0xc')]('[%s][dials][newexten]',_0x1469ff['uniqueid']),_0x690488);}};exports[_0x6eed('0x17')]=function(_0x269fa8){try{utils[_0x6eed('0xb')](util['format'](_0x6eed('0x18'),_0x269fa8[_0x6eed('0xe')]),_0x269fa8);if(!_[_0x6eed('0x19')](_0x269fa8[_0x6eed('0x1a')][_0x6eed('0x1b')])){utils[_0x6eed('0x1c')](util[_0x6eed('0xc')](_0x6eed('0x1d'),_0x269fa8['uniqueid'],_0x269fa8[_0x6eed('0x1e')]));dials[_0x269fa8['uniqueid']]={'routeId':_0x269fa8['value']};}}catch(_0x2fc959){utils[_0x6eed('0x16')](util[_0x6eed('0xc')]('[%s][dials][varset]',_0x269fa8['uniqueid']),_0x2fc959);}};exports[_0x6eed('0x1f')]=function(_0x2f08fb){try{if(!_[_0x6eed('0x19')](dials[_0x2f08fb[_0x6eed('0xe')]])){utils[_0x6eed('0xb')](util['format'](_0x6eed('0x20'),_0x2f08fb[_0x6eed('0xe')]),_0x2f08fb);dials[_0x2f08fb['uniqueid']]=_[_0x6eed('0x21')](dials[_0x2f08fb['uniqueid']],_0x2f08fb);dials[_0x2f08fb[_0x6eed('0xe')]][_0x6eed('0x22')]=utils[_0x6eed('0x23')]();dials[_0x2f08fb[_0x6eed('0xe')]][_0x6eed('0x24')]=_0x6eed('0x25');utils['info'](util[_0x6eed('0xc')](_0x6eed('0x26'),_0x2f08fb[_0x6eed('0xe')],dials[_0x2f08fb['uniqueid']][_0x6eed('0x22')]));}}catch(_0x4ee365){utils[_0x6eed('0x16')](util[_0x6eed('0xc')](_0x6eed('0x20'),_0x2f08fb[_0x6eed('0xe')]),_0x4ee365);}};exports[_0x6eed('0x27')]=function(_0x1ff524){try{if(!_['isNil'](dials[_0x1ff524['uniqueid']])){utils[_0x6eed('0xb')](util[_0x6eed('0xc')]('[%s][dials][dialend]',_0x1ff524[_0x6eed('0xe')]),_0x1ff524);dials[_0x1ff524[_0x6eed('0xe')]][_0x6eed('0x28')]=_0x1ff524[_0x6eed('0x28')];if(_0x1ff524['dialstatus']==_0x6eed('0x29')){dials[_0x1ff524[_0x6eed('0xe')]]=_[_0x6eed('0x21')](dials[_0x1ff524[_0x6eed('0xe')]],_0x1ff524);dials[_0x1ff524[_0x6eed('0xe')]][_0x6eed('0x2a')]=utils['now']();dials[_0x1ff524[_0x6eed('0xe')]][_0x6eed('0x24')]=_0x6eed('0x2b');utils[_0x6eed('0x1c')](util['format']('[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect',_0x1ff524[_0x6eed('0xe')],_0x1ff524[_0x6eed('0x28')],dials[_0x1ff524['uniqueid']][_0x6eed('0x2a')]));}else{utils[_0x6eed('0x1c')](util[_0x6eed('0xc')](_0x6eed('0x2c'),_0x1ff524['uniqueid'],_0x1ff524[_0x6eed('0x28')]));}}}catch(_0x532e20){utils[_0x6eed('0x16')](util['format'](_0x6eed('0x2d'),_0x1ff524['uniqueid']),_0x532e20);}};exports['hangup']=function(_0x5c8669){try{if(!_[_0x6eed('0x19')](dials[_0x5c8669[_0x6eed('0xe')]])){utils[_0x6eed('0xb')](util[_0x6eed('0xc')]('[%s][dials][hangup]',_0x5c8669[_0x6eed('0xe')]),_0x5c8669);utils[_0x6eed('0x1c')](util['format'](_0x6eed('0x2e'),_0x5c8669['uniqueid'],_0x5c8669[_0x6eed('0x6')],_0x5c8669['calleridname'],_0x5c8669[_0x6eed('0x2f')]));dials[_0x5c8669[_0x6eed('0xe')]]=_[_0x6eed('0x21')](dials[_0x5c8669[_0x6eed('0xe')]],{'endtime':utils[_0x6eed('0x23')](),'lastevent':'complete'});dials[_0x5c8669[_0x6eed('0xe')]]['duration']=utils[_0x6eed('0x30')](dials[_0x5c8669[_0x6eed('0xe')]]['endtime'],dials[_0x5c8669[_0x6eed('0xe')]]['starttime']);dials[_0x5c8669[_0x6eed('0xe')]][_0x6eed('0x31')]=utils[_0x6eed('0x30')](dials[_0x5c8669[_0x6eed('0xe')]][_0x6eed('0x2a')]||dials[_0x5c8669['uniqueid']][_0x6eed('0x32')],dials[_0x5c8669[_0x6eed('0xe')]][_0x6eed('0x22')]);dials[_0x5c8669['uniqueid']][_0x6eed('0x33')]=dials[_0x5c8669[_0x6eed('0xe')]]['answertime']?utils[_0x6eed('0x30')](dials[_0x5c8669[_0x6eed('0xe')]][_0x6eed('0x32')],dials[_0x5c8669[_0x6eed('0xe')]][_0x6eed('0x2a')]):0x0;writeDB(dials[_0x5c8669[_0x6eed('0xe')]]);}}catch(_0x33553d){utils[_0x6eed('0x16')](util[_0x6eed('0xc')](_0x6eed('0x34'),_0x5c8669[_0x6eed('0xe')]),_0x33553d);}}; \ No newline at end of file +var _0x1402=['diffTime','endtime','billableseconds','lodash','util','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','uniqueid','channel','dialstring','calleridnum','connectedlinenum','dialstatus','request','CreateVoiceDialReport','newexten','[%s][dials][newexten]','application','set','startsWith','cdr(routeid)','varset','debug','[%s][dials][varset]','isNil','variable','outboundrouteid','info','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','error','dialbegin','assign','starttime','lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','[%s][dials][dialend]','answertime','now','connect','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s','hangup','[%s][dials][hangup]','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','cause-txt','complete','duration'];(function(_0x22aacc,_0x307cb7){var _0xdc8e8b=function(_0x1fcf63){while(--_0x1fcf63){_0x22aacc['push'](_0x22aacc['shift']());}};_0xdc8e8b(++_0x307cb7);}(_0x1402,0x1c5));var _0x2140=function(_0x44799b,_0x269c0d){_0x44799b=_0x44799b-0x0;var _0x4b16e7=_0x1402[_0x44799b];return _0x4b16e7;};'use strict';var _=require(_0x2140('0x0'));var util=require(_0x2140('0x1'));var utils=require('./utils');var dials={};function writeDB(_0x3b8906){utils['info'](util[_0x2140('0x2')](_0x2140('0x3'),_0x3b8906[_0x2140('0x4')],_0x3b8906[_0x2140('0x5')],_0x3b8906[_0x2140('0x6')],_0x3b8906[_0x2140('0x7')],_0x3b8906[_0x2140('0x8')],_0x3b8906[_0x2140('0x9')]));utils[_0x2140('0xa')](_0x2140('0xb'),_0x3b8906);delete dials[_0x3b8906[_0x2140('0x4')]];}exports[_0x2140('0xc')]=function(_0x3af325){try{utils['debug'](util[_0x2140('0x2')](_0x2140('0xd'),_0x3af325[_0x2140('0x4')]),_0x3af325);utils['info'](util[_0x2140('0x2')]('[%s][dials][newexten]\x20application:%s\x20appdata:%s',_0x3af325[_0x2140('0x4')],_0x3af325[_0x2140('0xe')],_0x3af325['appdata']));if(_0x3af325['application']['toLowerCase']()==_0x2140('0xf')&&_[_0x2140('0x10')](_0x3af325['appdata']['toLowerCase'](),_0x2140('0x11'))){var _0x1186d6=_0x3af325['appdata']['split']('=');dials[_0x3af325['uniqueid']]={'routeId':_0x1186d6[0x1]};}}catch(_0x4b9572){utils['error'](util[_0x2140('0x2')]('[%s][dials][newexten]',_0x3af325[_0x2140('0x4')]),_0x4b9572);}};exports[_0x2140('0x12')]=function(_0x4cedf0){try{utils[_0x2140('0x13')](util[_0x2140('0x2')](_0x2140('0x14'),_0x4cedf0['uniqueid']),_0x4cedf0);if(!_[_0x2140('0x15')](_0x4cedf0[_0x2140('0x16')][_0x2140('0x17')])){utils[_0x2140('0x18')](util[_0x2140('0x2')](_0x2140('0x19'),_0x4cedf0['uniqueid'],_0x4cedf0[_0x2140('0x1a')]));dials[_0x4cedf0[_0x2140('0x4')]]={'routeId':_0x4cedf0['value']};}}catch(_0x3ad253){utils[_0x2140('0x1b')](util[_0x2140('0x2')](_0x2140('0x14'),_0x4cedf0['uniqueid']),_0x3ad253);}};exports[_0x2140('0x1c')]=function(_0x55a522){try{if(!_[_0x2140('0x15')](dials[_0x55a522[_0x2140('0x4')]])){utils[_0x2140('0x13')](util[_0x2140('0x2')]('[%s][dials][dialbegin]',_0x55a522['uniqueid']),_0x55a522);dials[_0x55a522['uniqueid']]=_[_0x2140('0x1d')](dials[_0x55a522['uniqueid']],_0x55a522);dials[_0x55a522[_0x2140('0x4')]][_0x2140('0x1e')]=utils['now']();dials[_0x55a522['uniqueid']][_0x2140('0x1f')]=_0x2140('0x20');utils[_0x2140('0x18')](util['format'](_0x2140('0x21'),_0x55a522['uniqueid'],dials[_0x55a522[_0x2140('0x4')]][_0x2140('0x1e')]));}}catch(_0x3dbb5c){utils[_0x2140('0x1b')](util[_0x2140('0x2')]('[%s][dials][dialbegin]',_0x55a522['uniqueid']),_0x3dbb5c);}};exports[_0x2140('0x22')]=function(_0xdc3a12){try{if(!_[_0x2140('0x15')](dials[_0xdc3a12['uniqueid']])){utils[_0x2140('0x13')](util['format'](_0x2140('0x23'),_0xdc3a12[_0x2140('0x4')]),_0xdc3a12);dials[_0xdc3a12[_0x2140('0x4')]][_0x2140('0x9')]=_0xdc3a12[_0x2140('0x9')];if(_0xdc3a12[_0x2140('0x9')]=='ANSWER'){dials[_0xdc3a12['uniqueid']]=_[_0x2140('0x1d')](dials[_0xdc3a12[_0x2140('0x4')]],_0xdc3a12);dials[_0xdc3a12['uniqueid']][_0x2140('0x24')]=utils[_0x2140('0x25')]();dials[_0xdc3a12['uniqueid']][_0x2140('0x1f')]=_0x2140('0x26');utils[_0x2140('0x18')](util[_0x2140('0x2')](_0x2140('0x27'),_0xdc3a12['uniqueid'],_0xdc3a12[_0x2140('0x9')],dials[_0xdc3a12[_0x2140('0x4')]]['answertime']));}else{utils[_0x2140('0x18')](util['format'](_0x2140('0x28'),_0xdc3a12['uniqueid'],_0xdc3a12[_0x2140('0x9')]));}}}catch(_0x79da50){utils[_0x2140('0x1b')](util[_0x2140('0x2')](_0x2140('0x23'),_0xdc3a12[_0x2140('0x4')]),_0x79da50);}};exports[_0x2140('0x29')]=function(_0x13ec55){try{if(!_['isNil'](dials[_0x13ec55['uniqueid']])){utils[_0x2140('0x13')](util[_0x2140('0x2')](_0x2140('0x2a'),_0x13ec55[_0x2140('0x4')]),_0x13ec55);utils[_0x2140('0x18')](util['format'](_0x2140('0x2b'),_0x13ec55[_0x2140('0x4')],_0x13ec55[_0x2140('0x7')],_0x13ec55['calleridname'],_0x13ec55[_0x2140('0x2c')]));dials[_0x13ec55['uniqueid']]=_[_0x2140('0x1d')](dials[_0x13ec55[_0x2140('0x4')]],{'endtime':utils[_0x2140('0x25')](),'lastevent':_0x2140('0x2d')});dials[_0x13ec55[_0x2140('0x4')]][_0x2140('0x2e')]=utils[_0x2140('0x2f')](dials[_0x13ec55[_0x2140('0x4')]][_0x2140('0x30')],dials[_0x13ec55[_0x2140('0x4')]]['starttime']);dials[_0x13ec55['uniqueid']]['holdtime']=utils[_0x2140('0x2f')](dials[_0x13ec55[_0x2140('0x4')]][_0x2140('0x24')]||dials[_0x13ec55['uniqueid']][_0x2140('0x30')],dials[_0x13ec55['uniqueid']][_0x2140('0x1e')]);dials[_0x13ec55[_0x2140('0x4')]][_0x2140('0x31')]=dials[_0x13ec55[_0x2140('0x4')]][_0x2140('0x24')]?utils[_0x2140('0x2f')](dials[_0x13ec55['uniqueid']]['endtime'],dials[_0x13ec55[_0x2140('0x4')]][_0x2140('0x24')]):0x0;writeDB(dials[_0x13ec55['uniqueid']]);}}catch(_0x41b1d2){utils['error'](util['format'](_0x2140('0x2a'),_0x13ec55[_0x2140('0x4')]),_0x41b1d2);}}; \ No newline at end of file diff --git a/server/services/xdr/index.js b/server/services/xdr/index.js index 2da7a1e..425eeaf 100644 --- a/server/services/xdr/index.js +++ b/server/services/xdr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7d3b=['hangup','cdr','[%s][index][cdr]','[%s][index][blindtransfer]','blindtransfer','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','varset','[%s][index][varset]','newexten','[%s][index][newexten]','newchannel','[%s][index][dialbegin]','dialbegin','dialend','[%s][index][dialend]','asterisk-manager','../../config/environment','./utils','util','asterisk','port','username','xdr','XDR\x20DISABLED','./calls.controller','./recordings.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','debug','format','device','agentcalled','[%s][index][agentcalled]','uniqueid','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','[%s][index][musiconholdstop]','musiconholdstop','newstate','[%s][index][newstate]','[%s][index][hangup]'];(function(_0x47f026,_0x24c95f){var _0x40bf6c=function(_0x1f151f){while(--_0x1f151f){_0x47f026['push'](_0x47f026['shift']());}};_0x40bf6c(++_0x24c95f);}(_0x7d3b,0x8b));var _0xb7d3=function(_0x1ba67b,_0x35ba6f){_0x1ba67b=_0x1ba67b-0x0;var _0x2247dd=_0x7d3b[_0x1ba67b];return _0x2247dd;};var AsteriskManager=require(_0xb7d3('0x0'));var config=require(_0xb7d3('0x1'));var utils=require(_0xb7d3('0x2'));var util=require(_0xb7d3('0x3'));var ami=new AsteriskManager(config[_0xb7d3('0x4')][_0xb7d3('0x5')],config['asterisk']['ip'],config['asterisk'][_0xb7d3('0x6')],config['asterisk']['password'],!![]);ami['keepConnected']();if(config[_0xb7d3('0x7')]&&config['xdr']['disabled']){utils['info'](_0xb7d3('0x8'));}else{var agents=require('./agents.controller');var calls=require(_0xb7d3('0x9'));var queues=require('./queues.controller');var recordings=require(_0xb7d3('0xa'));var members=require('./members.controller');var dials=require('./dials.controller');var transfers=require(_0xb7d3('0xb'));var core=require(_0xb7d3('0xc'));ami['on'](_0xb7d3('0xd'),core[_0xb7d3('0xd')]);ami['on'](_0xb7d3('0xe'),core[_0xb7d3('0xe')]);ami['on']('fullybooted',core[_0xb7d3('0xf')]);ami['on'](_0xb7d3('0x10'),core['error']);ami['on'](_0xb7d3('0x11'),core[_0xb7d3('0x11')]);ami['on']('managerevent',core[_0xb7d3('0x12')]);ami['on'](_0xb7d3('0x13'),function(_0x2234a5){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')]('[%s][index][devicestatechange]',_0x2234a5[_0xb7d3('0x16')]),_0x2234a5);members[_0xb7d3('0x13')](_0x2234a5);}catch(_0x337dea){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')]('[%s][index][devicestatechange]',_0x2234a5['device']),_0x337dea);}});ami['on'](_0xb7d3('0x17'),function(_0x5ab270){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x18'),_0x5ab270[_0xb7d3('0x19')]),_0x5ab270);agents[_0xb7d3('0x17')](_0x5ab270);}catch(_0x485cc5){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x18'),_0x5ab270[_0xb7d3('0x19')]),_0x485cc5);}});ami['on'](_0xb7d3('0x1a'),function(_0x2099fc){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x1b'),_0x2099fc[_0xb7d3('0x19')]),_0x2099fc);agents['agentringnoanswer'](_0x2099fc);}catch(_0x44982a){utils[_0xb7d3('0x10')](util['format'](_0xb7d3('0x1b'),_0x2099fc['uniqueid']),_0x44982a);}});ami['on'](_0xb7d3('0x1c'),function(_0x14a0a1){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x1d'),_0x14a0a1['uniqueid']),_0x14a0a1);agents[_0xb7d3('0x1c')](_0x14a0a1);queues['agentconnect'](_0x14a0a1);}catch(_0x411766){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x1d'),_0x14a0a1[_0xb7d3('0x19')]),_0x411766);}});ami['on']('agentcomplete',function(_0x3ce0c5){try{utils['debug'](util[_0xb7d3('0x15')]('[%s][index][agentcomplete]',_0x3ce0c5[_0xb7d3('0x19')]),_0x3ce0c5);agents['agentcomplete'](_0x3ce0c5);queues[_0xb7d3('0x1e')](_0x3ce0c5);members[_0xb7d3('0x1e')](_0x3ce0c5);}catch(_0x308580){utils['error'](util[_0xb7d3('0x15')]('[%s][index][agentcomplete]',_0x3ce0c5[_0xb7d3('0x19')]),_0x308580);}});ami['on'](_0xb7d3('0x1f'),function(_0x3678bb){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x20'),_0x3678bb[_0xb7d3('0x19')]),_0x3678bb);agents[_0xb7d3('0x1f')](_0x3678bb);queues[_0xb7d3('0x1f')](_0x3678bb);}catch(_0x1fb882){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x20'),_0x3678bb[_0xb7d3('0x19')]),_0x1fb882);}});ami['on'](_0xb7d3('0x21'),function(_0x38a48e){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x22'),_0x38a48e[_0xb7d3('0x19')]),_0x38a48e);queues[_0xb7d3('0x21')](_0x38a48e);recordings[_0xb7d3('0x21')](_0x38a48e);}catch(_0x419d78){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x22'),_0x38a48e[_0xb7d3('0x19')]),_0x419d78);}});ami['on'](_0xb7d3('0x23'),function(_0x5fb8b7){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x24'),_0x5fb8b7['uniqueid']),_0x5fb8b7);queues[_0xb7d3('0x23')](_0x5fb8b7);}catch(_0x567994){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x24'),_0x5fb8b7[_0xb7d3('0x19')]),_0x567994);}});ami['on'](_0xb7d3('0x25'),function(_0x2f18b5){try{utils['debug'](util[_0xb7d3('0x15')](_0xb7d3('0x26'),_0x2f18b5[_0xb7d3('0x19')]),_0x2f18b5);queues['musiconholdstart'](_0x2f18b5);calls[_0xb7d3('0x25')](_0x2f18b5);}catch(_0x2261f9){utils[_0xb7d3('0x10')](util['format'](_0xb7d3('0x26'),_0x2f18b5['uniqueid']),_0x2261f9);}});ami['on']('musiconholdstop',function(_0x45a86d){try{utils['debug'](util[_0xb7d3('0x15')](_0xb7d3('0x27'),_0x45a86d['uniqueid']),_0x45a86d);queues[_0xb7d3('0x28')](_0x45a86d);calls['musiconholdstop'](_0x45a86d);}catch(_0x3491b4){utils[_0xb7d3('0x10')](util['format'](_0xb7d3('0x27'),_0x45a86d[_0xb7d3('0x19')]),_0x3491b4);}});ami['on'](_0xb7d3('0x29'),function(_0x784b4a){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x2a'),_0x784b4a[_0xb7d3('0x19')]),_0x784b4a);calls[_0xb7d3('0x29')](_0x784b4a);recordings[_0xb7d3('0x29')](_0x784b4a);}catch(_0x40a6be){utils['error'](util['format']('[%s][index][newstate]',_0x784b4a[_0xb7d3('0x19')]),_0x40a6be);}});ami['on']('hangup',function(_0x29be60){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x2b'),_0x29be60[_0xb7d3('0x19')]),_0x29be60);calls[_0xb7d3('0x2c')](_0x29be60);recordings[_0xb7d3('0x2c')](_0x29be60);dials[_0xb7d3('0x2c')](_0x29be60);agents[_0xb7d3('0x2c')](_0x29be60);queues[_0xb7d3('0x2c')](_0x29be60);}catch(_0x238a43){utils[_0xb7d3('0x10')](util['format']('[%s][index][hangup]',_0x29be60[_0xb7d3('0x19')]),_0x238a43);}});ami['on'](_0xb7d3('0x2d'),function(_0x3e2906){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x2e'),_0x3e2906['uniqueid']),_0x3e2906);members[_0xb7d3('0x2d')](_0x3e2906);}catch(_0x3dac27){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x2e'),_0x3e2906['uniqueid']),_0x3dac27);}});ami['on']('blindtransfer',function(_0x1aadd6){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x2f'),_0x1aadd6[_0xb7d3('0x19')]),_0x1aadd6);queues[_0xb7d3('0x30')](_0x1aadd6);agents['blindtransfer'](_0x1aadd6);transfers[_0xb7d3('0x30')](_0x1aadd6);}catch(_0x2862bf){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x2f'),_0x1aadd6[_0xb7d3('0x19')]),_0x2862bf);}});ami['on'](_0xb7d3('0x31'),function(_0x31d9df){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x32'),_0x31d9df[_0xb7d3('0x33')]),_0x31d9df);queues[_0xb7d3('0x31')](_0x31d9df);transfers[_0xb7d3('0x31')](_0x31d9df);agents[_0xb7d3('0x31')](_0x31d9df);calls[_0xb7d3('0x31')](_0x31d9df);}catch(_0x378423){utils['error'](util[_0xb7d3('0x15')](_0xb7d3('0x32'),_0x31d9df[_0xb7d3('0x33')]),_0x378423);}});ami['on'](_0xb7d3('0x34'),function(_0x3d2f1b){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x35'),_0x3d2f1b['uniqueid']),_0x3d2f1b);queues[_0xb7d3('0x34')](_0x3d2f1b);recordings[_0xb7d3('0x34')](_0x3d2f1b);calls[_0xb7d3('0x34')](_0x3d2f1b);dials[_0xb7d3('0x34')](_0x3d2f1b);}catch(_0x144480){utils['error'](util[_0xb7d3('0x15')]('[%s][index][varset]',_0x3d2f1b[_0xb7d3('0x19')]),_0x144480);}});ami['on'](_0xb7d3('0x36'),function(_0x561dee){try{utils['debug'](util[_0xb7d3('0x15')](_0xb7d3('0x37'),_0x561dee[_0xb7d3('0x19')]),_0x561dee);calls[_0xb7d3('0x36')](_0x561dee);recordings[_0xb7d3('0x36')](_0x561dee);dials[_0xb7d3('0x36')](_0x561dee);}catch(_0x2fa40a){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')]('[%s][index][newexten]',_0x561dee[_0xb7d3('0x19')]),_0x2fa40a);}});ami['on'](_0xb7d3('0x38'),function(_0x3af74d){try{utils['debug'](util[_0xb7d3('0x15')]('[%s][index][newchannel]',_0x3af74d['uniqueid']),_0x3af74d);calls[_0xb7d3('0x38')](_0x3af74d);recordings[_0xb7d3('0x38')](_0x3af74d);}catch(_0x3dbcd8){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')]('[%s][index][newchannel]',_0x3af74d['uniqueid']),_0x3dbcd8);}});ami['on']('dialbegin',function(_0x186ae6){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x39'),_0x186ae6[_0xb7d3('0x19')]),_0x186ae6);dials[_0xb7d3('0x3a')](_0x186ae6);}catch(_0xe0a484){utils['error'](util[_0xb7d3('0x15')]('[%s]dialbegin',_0x186ae6['uniqueid']),_0xe0a484);}});ami['on'](_0xb7d3('0x3b'),function(_0x242a5d){try{utils[_0xb7d3('0x14')](util[_0xb7d3('0x15')](_0xb7d3('0x3c'),_0x242a5d[_0xb7d3('0x19')]),_0x242a5d);dials[_0xb7d3('0x3b')](_0x242a5d);}catch(_0x505ea0){utils[_0xb7d3('0x10')](util[_0xb7d3('0x15')](_0xb7d3('0x3c'),_0x242a5d[_0xb7d3('0x19')]),_0x505ea0);}});} \ No newline at end of file +var _0x9b14=['port','password','keepConnected','xdr','disabled','./agents.controller','./queues.controller','./recordings.controller','./members.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','debug','format','[%s][index][devicestatechange]','device','[%s][index][agentcalled]','uniqueid','agentcalled','[%s][index][agentringnoanswer]','agentringnoanswer','[%s][index][agentconnect]','agentconnect','[%s][index][agentcomplete]','agentcomplete','queuecallerabandon','[%s][index][queuecallerabandon]','[%s][index][queuecallerjoin]','queuecallerjoin','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','newstate','hangup','[%s][index][hangup]','cdr','[%s][index][cdr]','[%s][index][blindtransfer]','blindtransfer','attendedtransfer','origtransfereruniqueid','[%s][index][varset]','varset','newexten','[%s][index][newexten]','newchannel','[%s][index][newchannel]','dialbegin','dialend','[%s][index][dialend]','asterisk-manager','../../config/environment','./utils','util','asterisk'];(function(_0xb27cf7,_0x49480e){var _0x411d9e=function(_0x5bc326){while(--_0x5bc326){_0xb27cf7['push'](_0xb27cf7['shift']());}};_0x411d9e(++_0x49480e);}(_0x9b14,0x7b));var _0x49b1=function(_0x221abd,_0x621d76){_0x221abd=_0x221abd-0x0;var _0x47e399=_0x9b14[_0x221abd];return _0x47e399;};var AsteriskManager=require(_0x49b1('0x0'));var config=require(_0x49b1('0x1'));var utils=require(_0x49b1('0x2'));var util=require(_0x49b1('0x3'));var ami=new AsteriskManager(config[_0x49b1('0x4')][_0x49b1('0x5')],config[_0x49b1('0x4')]['ip'],config['asterisk']['username'],config[_0x49b1('0x4')][_0x49b1('0x6')],!![]);ami[_0x49b1('0x7')]();if(config[_0x49b1('0x8')]&&config[_0x49b1('0x8')][_0x49b1('0x9')]){utils['info']('XDR\x20DISABLED');}else{var agents=require(_0x49b1('0xa'));var calls=require('./calls.controller');var queues=require(_0x49b1('0xb'));var recordings=require(_0x49b1('0xc'));var members=require(_0x49b1('0xd'));var dials=require('./dials.controller');var transfers=require(_0x49b1('0xe'));var core=require(_0x49b1('0xf'));ami['on']('connect',core[_0x49b1('0x10')]);ami['on'](_0x49b1('0x11'),core[_0x49b1('0x11')]);ami['on'](_0x49b1('0x12'),core[_0x49b1('0x12')]);ami['on'](_0x49b1('0x13'),core['error']);ami['on'](_0x49b1('0x14'),core[_0x49b1('0x14')]);ami['on'](_0x49b1('0x15'),core[_0x49b1('0x15')]);ami['on'](_0x49b1('0x16'),function(_0x584ad0){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x19'),_0x584ad0[_0x49b1('0x1a')]),_0x584ad0);members[_0x49b1('0x16')](_0x584ad0);}catch(_0x38fbd6){utils[_0x49b1('0x13')](util['format']('[%s][index][devicestatechange]',_0x584ad0[_0x49b1('0x1a')]),_0x38fbd6);}});ami['on']('agentcalled',function(_0x1192fc){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x1b'),_0x1192fc[_0x49b1('0x1c')]),_0x1192fc);agents[_0x49b1('0x1d')](_0x1192fc);}catch(_0x113d90){utils[_0x49b1('0x13')](util[_0x49b1('0x18')](_0x49b1('0x1b'),_0x1192fc['uniqueid']),_0x113d90);}});ami['on']('agentringnoanswer',function(_0x3ca2d7){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x1e'),_0x3ca2d7[_0x49b1('0x1c')]),_0x3ca2d7);agents[_0x49b1('0x1f')](_0x3ca2d7);}catch(_0x530543){utils['error'](util[_0x49b1('0x18')](_0x49b1('0x1e'),_0x3ca2d7[_0x49b1('0x1c')]),_0x530543);}});ami['on']('agentconnect',function(_0x57d468){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x20'),_0x57d468[_0x49b1('0x1c')]),_0x57d468);agents[_0x49b1('0x21')](_0x57d468);queues[_0x49b1('0x21')](_0x57d468);}catch(_0x2bd663){utils['error'](util[_0x49b1('0x18')](_0x49b1('0x20'),_0x57d468['uniqueid']),_0x2bd663);}});ami['on']('agentcomplete',function(_0x361485){try{utils[_0x49b1('0x17')](util['format'](_0x49b1('0x22'),_0x361485[_0x49b1('0x1c')]),_0x361485);agents[_0x49b1('0x23')](_0x361485);queues[_0x49b1('0x23')](_0x361485);members[_0x49b1('0x23')](_0x361485);}catch(_0x38557d){utils[_0x49b1('0x13')](util[_0x49b1('0x18')](_0x49b1('0x22'),_0x361485[_0x49b1('0x1c')]),_0x38557d);}});ami['on'](_0x49b1('0x24'),function(_0x4af2b1){try{utils['debug'](util[_0x49b1('0x18')](_0x49b1('0x25'),_0x4af2b1['uniqueid']),_0x4af2b1);agents[_0x49b1('0x24')](_0x4af2b1);queues[_0x49b1('0x24')](_0x4af2b1);}catch(_0xcd21e1){utils[_0x49b1('0x13')](util['format']('[%s][index][queuecallerabandon]',_0x4af2b1[_0x49b1('0x1c')]),_0xcd21e1);}});ami['on']('queuecallerjoin',function(_0x277d3a){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x26'),_0x277d3a[_0x49b1('0x1c')]),_0x277d3a);queues[_0x49b1('0x27')](_0x277d3a);recordings['queuecallerjoin'](_0x277d3a);}catch(_0x4283c0){utils[_0x49b1('0x13')](util['format'](_0x49b1('0x26'),_0x277d3a['uniqueid']),_0x4283c0);}});ami['on'](_0x49b1('0x28'),function(_0x30aae0){try{utils['debug'](util['format'](_0x49b1('0x29'),_0x30aae0[_0x49b1('0x1c')]),_0x30aae0);queues[_0x49b1('0x28')](_0x30aae0);}catch(_0xfeaac9){utils[_0x49b1('0x13')](util['format'](_0x49b1('0x29'),_0x30aae0[_0x49b1('0x1c')]),_0xfeaac9);}});ami['on'](_0x49b1('0x2a'),function(_0x21e864){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x2b'),_0x21e864[_0x49b1('0x1c')]),_0x21e864);queues[_0x49b1('0x2a')](_0x21e864);calls[_0x49b1('0x2a')](_0x21e864);}catch(_0xf3d698){utils[_0x49b1('0x13')](util[_0x49b1('0x18')](_0x49b1('0x2b'),_0x21e864[_0x49b1('0x1c')]),_0xf3d698);}});ami['on'](_0x49b1('0x2c'),function(_0x1d38d4){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x2d'),_0x1d38d4[_0x49b1('0x1c')]),_0x1d38d4);queues[_0x49b1('0x2c')](_0x1d38d4);calls['musiconholdstop'](_0x1d38d4);}catch(_0x1f460c){utils[_0x49b1('0x13')](util['format']('[%s][index][musiconholdstop]',_0x1d38d4['uniqueid']),_0x1f460c);}});ami['on'](_0x49b1('0x2e'),function(_0x5f4abd){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')]('[%s][index][newstate]',_0x5f4abd[_0x49b1('0x1c')]),_0x5f4abd);calls['newstate'](_0x5f4abd);recordings[_0x49b1('0x2e')](_0x5f4abd);}catch(_0x50baba){utils[_0x49b1('0x13')](util[_0x49b1('0x18')]('[%s][index][newstate]',_0x5f4abd['uniqueid']),_0x50baba);}});ami['on'](_0x49b1('0x2f'),function(_0x14a0b3){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x30'),_0x14a0b3[_0x49b1('0x1c')]),_0x14a0b3);calls[_0x49b1('0x2f')](_0x14a0b3);recordings[_0x49b1('0x2f')](_0x14a0b3);dials['hangup'](_0x14a0b3);agents['hangup'](_0x14a0b3);queues[_0x49b1('0x2f')](_0x14a0b3);}catch(_0x3d6714){utils[_0x49b1('0x13')](util[_0x49b1('0x18')](_0x49b1('0x30'),_0x14a0b3[_0x49b1('0x1c')]),_0x3d6714);}});ami['on'](_0x49b1('0x31'),function(_0x5accf3){try{utils[_0x49b1('0x17')](util['format'](_0x49b1('0x32'),_0x5accf3[_0x49b1('0x1c')]),_0x5accf3);members[_0x49b1('0x31')](_0x5accf3);}catch(_0x45ac1f){utils[_0x49b1('0x13')](util[_0x49b1('0x18')]('[%s][index][cdr]',_0x5accf3[_0x49b1('0x1c')]),_0x45ac1f);}});ami['on']('blindtransfer',function(_0x3d1f16){try{utils[_0x49b1('0x17')](util['format'](_0x49b1('0x33'),_0x3d1f16['uniqueid']),_0x3d1f16);queues['blindtransfer'](_0x3d1f16);agents[_0x49b1('0x34')](_0x3d1f16);transfers[_0x49b1('0x34')](_0x3d1f16);}catch(_0x3470b8){utils[_0x49b1('0x13')](util[_0x49b1('0x18')](_0x49b1('0x33'),_0x3d1f16['uniqueid']),_0x3470b8);}});ami['on'](_0x49b1('0x35'),function(_0x44d1f0){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')]('[%s][index][attendedtransfer]',_0x44d1f0['origtransfereruniqueid']),_0x44d1f0);queues[_0x49b1('0x35')](_0x44d1f0);transfers[_0x49b1('0x35')](_0x44d1f0);agents['attendedtransfer'](_0x44d1f0);calls[_0x49b1('0x35')](_0x44d1f0);}catch(_0x1f116a){utils[_0x49b1('0x13')](util[_0x49b1('0x18')]('[%s][index][attendedtransfer]',_0x44d1f0[_0x49b1('0x36')]),_0x1f116a);}});ami['on']('varset',function(_0x489781){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x37'),_0x489781['uniqueid']),_0x489781);queues[_0x49b1('0x38')](_0x489781);recordings[_0x49b1('0x38')](_0x489781);calls['varset'](_0x489781);dials[_0x49b1('0x38')](_0x489781);}catch(_0x17ecc6){utils[_0x49b1('0x13')](util[_0x49b1('0x18')]('[%s][index][varset]',_0x489781[_0x49b1('0x1c')]),_0x17ecc6);}});ami['on'](_0x49b1('0x39'),function(_0x28ec04){try{utils['debug'](util[_0x49b1('0x18')](_0x49b1('0x3a'),_0x28ec04[_0x49b1('0x1c')]),_0x28ec04);calls[_0x49b1('0x39')](_0x28ec04);recordings[_0x49b1('0x39')](_0x28ec04);dials[_0x49b1('0x39')](_0x28ec04);}catch(_0x44df15){utils[_0x49b1('0x13')](util['format'](_0x49b1('0x3a'),_0x28ec04['uniqueid']),_0x44df15);}});ami['on'](_0x49b1('0x3b'),function(_0x148f91){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')](_0x49b1('0x3c'),_0x148f91[_0x49b1('0x1c')]),_0x148f91);calls[_0x49b1('0x3b')](_0x148f91);recordings[_0x49b1('0x3b')](_0x148f91);}catch(_0x5d1d30){utils[_0x49b1('0x13')](util['format']('[%s][index][newchannel]',_0x148f91[_0x49b1('0x1c')]),_0x5d1d30);}});ami['on'](_0x49b1('0x3d'),function(_0x5ccafe){try{utils[_0x49b1('0x17')](util[_0x49b1('0x18')]('[%s][index][dialbegin]',_0x5ccafe[_0x49b1('0x1c')]),_0x5ccafe);dials[_0x49b1('0x3d')](_0x5ccafe);}catch(_0x261713){utils['error'](util[_0x49b1('0x18')]('[%s]dialbegin',_0x5ccafe[_0x49b1('0x1c')]),_0x261713);}});ami['on'](_0x49b1('0x3e'),function(_0x3ddfb8){try{utils['debug'](util['format'](_0x49b1('0x3f'),_0x3ddfb8[_0x49b1('0x1c')]),_0x3ddfb8);dials[_0x49b1('0x3e')](_0x3ddfb8);}catch(_0x2ca138){utils[_0x49b1('0x13')](util[_0x49b1('0x18')]('[%s][index][dialend]',_0x3ddfb8[_0x49b1('0x1c')]),_0x2ca138);}});} \ No newline at end of file diff --git a/server/services/xdr/members.controller.js b/server/services/xdr/members.controller.js index e43e10f..b6d8fff 100644 --- a/server/services/xdr/members.controller.js +++ b/server/services/xdr/members.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e00=['data2','type','interface','getUserByInterface','membername','name','internal','CreateMemberReport','getUserByName','split','then','request','catch','error','devicestatechange','debug','[%s][members][devicestatechange]','device','[%s][members][devicestatechange]\x20state:%s\x20interface:%s','state','INUSE','BUSY','voice','now','NOT_INUSE','isNil','exitAt','duration','diffTime','enterAt','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','queue','assign','cdr','[%s][members][cdr]','data1','data3','destination','destinationchannel','source','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','lodash','util','./utils','Local/_attended@transfer','Queue:','info','format','uniqueid','channel'];(function(_0x29ea48,_0x466ba0){var _0x2dce4a=function(_0x519493){while(--_0x519493){_0x29ea48['push'](_0x29ea48['shift']());}};_0x2dce4a(++_0x466ba0);}(_0x6e00,0x1b9));var _0x06e0=function(_0x2cb967,_0xe645e1){_0x2cb967=_0x2cb967-0x0;var _0x1c8f42=_0x6e00[_0x2cb967];return _0x1c8f42;};'use strict';var _=require(_0x06e0('0x0'));var util=require(_0x06e0('0x1'));var utils=require(_0x06e0('0x2'));var members={};var exclude=[_0x06e0('0x3'),_0x06e0('0x4')];function writeDB(_0x372c91){utils[_0x06e0('0x5')](util[_0x06e0('0x6')]('[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s',_0x372c91[_0x06e0('0x7')],_0x372c91['interface'],_0x372c91[_0x06e0('0x8')],_0x372c91[_0x06e0('0x9')],_0x372c91['membername'],_0x372c91[_0x06e0('0xa')]));if(_0x372c91[_0x06e0('0xb')]){utils[_0x06e0('0xc')](_0x372c91[_0x06e0('0xb')])['then'](function(_0x145635){if(_0x145635){_0x372c91[_0x06e0('0xd')]=_0x145635[_0x06e0('0xe')];_0x372c91['internal']=_0x145635[_0x06e0('0xf')];utils['request'](_0x06e0('0x10'),_0x372c91);}else{utils[_0x06e0('0x11')](_0x372c91[_0x06e0('0xb')][_0x06e0('0x12')]('/')[0x1])[_0x06e0('0x13')](function(_0xa708e5){if(_0xa708e5){_0x372c91[_0x06e0('0xd')]=_0xa708e5[_0x06e0('0xe')];_0x372c91[_0x06e0('0xf')]=_0xa708e5[_0x06e0('0xf')];utils[_0x06e0('0x14')]('CreateMemberReport',_0x372c91);}});}})[_0x06e0('0x15')](function(_0x6e7edd){utils[_0x06e0('0x16')](util['format']('[%s][members][writeDB]',_0x372c91[_0x06e0('0x7')]),_0x6e7edd);});}delete members[_0x372c91[_0x06e0('0xb')]];}function startsWith(_0x1db8d6,_0x191612){return _['some'](_0x1db8d6,function(_0x51b943){return _['startsWith'](_0x191612,_0x51b943);});}exports[_0x06e0('0x17')]=function(_0x43bb19){try{utils[_0x06e0('0x18')](util[_0x06e0('0x6')](_0x06e0('0x19'),members[_0x43bb19['device']]?members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x7')]:_0x43bb19[_0x06e0('0x1a')]),_0x43bb19);utils[_0x06e0('0x5')](util[_0x06e0('0x6')](_0x06e0('0x1b'),members[_0x43bb19[_0x06e0('0x1a')]]?members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x7')]:_0x43bb19[_0x06e0('0x1a')],_0x43bb19[_0x06e0('0x1c')],_0x43bb19['device']));switch(_0x43bb19[_0x06e0('0x1c')]){case _0x06e0('0x1d'):case _0x06e0('0x1e'):if(!startsWith(exclude,_0x43bb19[_0x06e0('0x1a')])){members[_0x43bb19[_0x06e0('0x1a')]]={'channel':_0x06e0('0x1f'),'interface':_0x43bb19[_0x06e0('0x1a')],'type':'TALKING','enterAt':utils[_0x06e0('0x20')](),'role':'agent'};}break;case _0x06e0('0x21'):if(!_[_0x06e0('0x22')](members[_0x43bb19[_0x06e0('0x1a')]])){members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x23')]=utils[_0x06e0('0x20')]();members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x24')]=utils[_0x06e0('0x25')](members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x23')],members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x26')]);if(members[_0x43bb19[_0x06e0('0x1a')]][_0x06e0('0x7')]){writeDB(members[_0x43bb19[_0x06e0('0x1a')]]);}}break;default:break;}}catch(_0x293bb8){utils['error'](util[_0x06e0('0x6')](_0x06e0('0x19'),members[_0x43bb19[_0x06e0('0x1a')]]?members[_0x43bb19[_0x06e0('0x1a')]]['uniqueid']:_0x43bb19[_0x06e0('0x1a')]),_0x293bb8);}};exports['agentcomplete']=function(_0x210873){try{if(!_[_0x06e0('0x22')](members[_0x210873[_0x06e0('0xb')]])){utils[_0x06e0('0x18')](util['format']('[%s][members][agentcomplete]',_0x210873[_0x06e0('0x7')]),_0x210873);utils[_0x06e0('0x5')](util[_0x06e0('0x6')](_0x06e0('0x27'),_0x210873[_0x06e0('0x7')],_0x210873[_0x06e0('0xb')],_0x210873[_0x06e0('0x28')]));members[_0x210873[_0x06e0('0xb')]]=_[_0x06e0('0x29')](members[_0x210873[_0x06e0('0xb')]],{'data4':_0x210873['queue'],'uniqueid':_0x210873[_0x06e0('0x7')]});}}catch(_0x286a40){utils[_0x06e0('0x16')](util[_0x06e0('0x6')]('[%s][members][agentcomplete]',_0x210873[_0x06e0('0x7')]),_0x286a40);}};exports[_0x06e0('0x2a')]=function(_0xa26e1a){try{utils['debug'](util[_0x06e0('0x6')](_0x06e0('0x2b'),_0xa26e1a['uniqueid']),_0xa26e1a);if(_0xa26e1a['channel']){var _0x4ea057=_0xa26e1a[_0x06e0('0x8')][_0x06e0('0x12')]('-')[0x0];if(!_[_0x06e0('0x22')](members[_0x4ea057])){members[_0x4ea057]=_[_0x06e0('0x29')](members[_0x4ea057],{'data1':members[_0x4ea057][_0x06e0('0x2c')]||_0xa26e1a['type'],'data2':members[_0x4ea057][_0x06e0('0x9')]||_0xa26e1a['source'],'data3':members[_0x4ea057][_0x06e0('0x2d')]||_0xa26e1a[_0x06e0('0x2e')],'uniqueid':members[_0x4ea057][_0x06e0('0x7')]||_0xa26e1a[_0x06e0('0x7')]});utils['info'](util[_0x06e0('0x6')]('[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s',_0xa26e1a[_0x06e0('0x7')],members[_0x4ea057][_0x06e0('0x2c')],members[_0x4ea057][_0x06e0('0x9')],members[_0x4ea057][_0x06e0('0x2d')]));if(members[_0x4ea057][_0x06e0('0x23')]){writeDB(members[_0x4ea057]);}}}if(_0xa26e1a[_0x06e0('0x2f')]){var _0x276778=_0xa26e1a[_0x06e0('0x2f')][_0x06e0('0x12')]('-')[0x0];if(!_[_0x06e0('0x22')](members[_0x276778])){members[_0x276778]=_[_0x06e0('0x29')](members[_0x276778],{'data1':members[_0x276778][_0x06e0('0x2c')]||_0xa26e1a['type'],'data2':members[_0x276778][_0x06e0('0x9')]||_0xa26e1a[_0x06e0('0x30')],'data3':members[_0x276778][_0x06e0('0x2d')]||_0xa26e1a[_0x06e0('0x2e')],'uniqueid':members[_0x276778][_0x06e0('0x7')]||_0xa26e1a[_0x06e0('0x7')]});utils[_0x06e0('0x5')](util[_0x06e0('0x6')](_0x06e0('0x31'),_0xa26e1a[_0x06e0('0x7')],members[_0x276778][_0x06e0('0x2c')],members[_0x276778][_0x06e0('0x9')],members[_0x276778][_0x06e0('0x2d')]));if(members[_0x276778]['exitAt']){writeDB(members[_0x276778]);}}}}catch(_0x466162){utils[_0x06e0('0x16')](util[_0x06e0('0x6')]('[%s][members][cdr]',_0xa26e1a[_0x06e0('0x7')]),_0x466162);}}; \ No newline at end of file +var _0xd77b=['uniqueid','channel','data2','membername','type','interface','getUserByInterface','then','name','internal','request','CreateMemberReport','split','catch','error','[%s][members][writeDB]','startsWith','devicestatechange','[%s][members][devicestatechange]','device','[%s][members][devicestatechange]\x20state:%s\x20interface:%s','state','INUSE','now','NOT_INUSE','isNil','exitAt','diffTime','agentcomplete','[%s][members][agentcomplete]','queue','cdr','debug','assign','data1','source','destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','data3','destinationchannel','[%s][members][cdr]','Local/_attended@transfer','Queue:','info','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s'];(function(_0x383356,_0x33d2f5){var _0x32ee5a=function(_0x2741db){while(--_0x2741db){_0x383356['push'](_0x383356['shift']());}};_0x32ee5a(++_0x33d2f5);}(_0xd77b,0xe1));var _0xbd77=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0xd77b[_0x8c43de];return _0xa6591b;};'use strict';var _=require('lodash');var util=require('util');var utils=require('./utils');var members={};var exclude=[_0xbd77('0x0'),_0xbd77('0x1')];function writeDB(_0x36814d){utils[_0xbd77('0x2')](util[_0xbd77('0x3')](_0xbd77('0x4'),_0x36814d[_0xbd77('0x5')],_0x36814d['interface'],_0x36814d[_0xbd77('0x6')],_0x36814d[_0xbd77('0x7')],_0x36814d[_0xbd77('0x8')],_0x36814d[_0xbd77('0x9')]));if(_0x36814d[_0xbd77('0xa')]){utils[_0xbd77('0xb')](_0x36814d[_0xbd77('0xa')])[_0xbd77('0xc')](function(_0x479433){if(_0x479433){_0x36814d[_0xbd77('0x8')]=_0x479433[_0xbd77('0xd')];_0x36814d['internal']=_0x479433[_0xbd77('0xe')];utils[_0xbd77('0xf')](_0xbd77('0x10'),_0x36814d);}else{utils['getUserByName'](_0x36814d[_0xbd77('0xa')][_0xbd77('0x11')]('/')[0x1])['then'](function(_0x115af5){if(_0x115af5){_0x36814d[_0xbd77('0x8')]=_0x115af5[_0xbd77('0xd')];_0x36814d[_0xbd77('0xe')]=_0x115af5[_0xbd77('0xe')];utils[_0xbd77('0xf')](_0xbd77('0x10'),_0x36814d);}});}})[_0xbd77('0x12')](function(_0x1a8652){utils[_0xbd77('0x13')](util['format'](_0xbd77('0x14'),_0x36814d['uniqueid']),_0x1a8652);});}delete members[_0x36814d['interface']];}function startsWith(_0x169dac,_0x631a5b){return _['some'](_0x169dac,function(_0x126196){return _[_0xbd77('0x15')](_0x631a5b,_0x126196);});}exports[_0xbd77('0x16')]=function(_0x1fabdc){try{utils['debug'](util[_0xbd77('0x3')](_0xbd77('0x17'),members[_0x1fabdc['device']]?members[_0x1fabdc[_0xbd77('0x18')]][_0xbd77('0x5')]:_0x1fabdc[_0xbd77('0x18')]),_0x1fabdc);utils['info'](util[_0xbd77('0x3')](_0xbd77('0x19'),members[_0x1fabdc[_0xbd77('0x18')]]?members[_0x1fabdc[_0xbd77('0x18')]][_0xbd77('0x5')]:_0x1fabdc[_0xbd77('0x18')],_0x1fabdc[_0xbd77('0x1a')],_0x1fabdc[_0xbd77('0x18')]));switch(_0x1fabdc[_0xbd77('0x1a')]){case _0xbd77('0x1b'):case'BUSY':if(!startsWith(exclude,_0x1fabdc[_0xbd77('0x18')])){members[_0x1fabdc['device']]={'channel':'voice','interface':_0x1fabdc['device'],'type':'TALKING','enterAt':utils[_0xbd77('0x1c')](),'role':'agent'};}break;case _0xbd77('0x1d'):if(!_[_0xbd77('0x1e')](members[_0x1fabdc[_0xbd77('0x18')]])){members[_0x1fabdc[_0xbd77('0x18')]][_0xbd77('0x1f')]=utils[_0xbd77('0x1c')]();members[_0x1fabdc[_0xbd77('0x18')]]['duration']=utils[_0xbd77('0x20')](members[_0x1fabdc[_0xbd77('0x18')]][_0xbd77('0x1f')],members[_0x1fabdc[_0xbd77('0x18')]]['enterAt']);if(members[_0x1fabdc[_0xbd77('0x18')]][_0xbd77('0x5')]){writeDB(members[_0x1fabdc[_0xbd77('0x18')]]);}}break;default:break;}}catch(_0x3af073){utils['error'](util['format'](_0xbd77('0x17'),members[_0x1fabdc[_0xbd77('0x18')]]?members[_0x1fabdc[_0xbd77('0x18')]][_0xbd77('0x5')]:_0x1fabdc[_0xbd77('0x18')]),_0x3af073);}};exports[_0xbd77('0x21')]=function(_0x399a96){try{if(!_[_0xbd77('0x1e')](members[_0x399a96[_0xbd77('0xa')]])){utils['debug'](util[_0xbd77('0x3')](_0xbd77('0x22'),_0x399a96[_0xbd77('0x5')]),_0x399a96);utils[_0xbd77('0x2')](util[_0xbd77('0x3')]('[%s][members][agentcomplete]\x20interface:%s\x20queue:%s',_0x399a96[_0xbd77('0x5')],_0x399a96['interface'],_0x399a96[_0xbd77('0x23')]));members[_0x399a96[_0xbd77('0xa')]]=_['assign'](members[_0x399a96[_0xbd77('0xa')]],{'data4':_0x399a96['queue'],'uniqueid':_0x399a96[_0xbd77('0x5')]});}}catch(_0x5364ca){utils[_0xbd77('0x13')](util['format'](_0xbd77('0x22'),_0x399a96['uniqueid']),_0x5364ca);}};exports[_0xbd77('0x24')]=function(_0x380380){try{utils[_0xbd77('0x25')](util[_0xbd77('0x3')]('[%s][members][cdr]',_0x380380[_0xbd77('0x5')]),_0x380380);if(_0x380380[_0xbd77('0x6')]){var _0x219ba6=_0x380380[_0xbd77('0x6')][_0xbd77('0x11')]('-')[0x0];if(!_['isNil'](members[_0x219ba6])){members[_0x219ba6]=_[_0xbd77('0x26')](members[_0x219ba6],{'data1':members[_0x219ba6][_0xbd77('0x27')]||_0x380380[_0xbd77('0x9')],'data2':members[_0x219ba6][_0xbd77('0x7')]||_0x380380[_0xbd77('0x28')],'data3':members[_0x219ba6]['data3']||_0x380380[_0xbd77('0x29')],'uniqueid':members[_0x219ba6][_0xbd77('0x5')]||_0x380380[_0xbd77('0x5')]});utils[_0xbd77('0x2')](util[_0xbd77('0x3')](_0xbd77('0x2a'),_0x380380['uniqueid'],members[_0x219ba6][_0xbd77('0x27')],members[_0x219ba6]['data2'],members[_0x219ba6][_0xbd77('0x2b')]));if(members[_0x219ba6][_0xbd77('0x1f')]){writeDB(members[_0x219ba6]);}}}if(_0x380380['destinationchannel']){var _0x1f161c=_0x380380[_0xbd77('0x2c')]['split']('-')[0x0];if(!_['isNil'](members[_0x1f161c])){members[_0x1f161c]=_[_0xbd77('0x26')](members[_0x1f161c],{'data1':members[_0x1f161c]['data1']||_0x380380[_0xbd77('0x9')],'data2':members[_0x1f161c][_0xbd77('0x7')]||_0x380380[_0xbd77('0x28')],'data3':members[_0x1f161c]['data3']||_0x380380[_0xbd77('0x29')],'uniqueid':members[_0x1f161c]['uniqueid']||_0x380380[_0xbd77('0x5')]});utils[_0xbd77('0x2')](util[_0xbd77('0x3')]('[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s',_0x380380[_0xbd77('0x5')],members[_0x1f161c]['data1'],members[_0x1f161c]['data2'],members[_0x1f161c][_0xbd77('0x2b')]));if(members[_0x1f161c]['exitAt']){writeDB(members[_0x1f161c]);}}}}catch(_0x4be4de){utils[_0xbd77('0x13')](util['format'](_0xbd77('0x2d'),_0x380380[_0xbd77('0x5')]),_0x4be4de);}}; \ No newline at end of file diff --git a/server/services/xdr/queues.controller.js b/server/services/xdr/queues.controller.js index bf1b6a3..4a799f9 100644 --- a/server/services/xdr/queues.controller.js +++ b/server/services/xdr/queues.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe9ef=['toUpperCase','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','queuecallerabandonAt','EXITWITHKEY','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','holdtime','diffTime','error','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','agentcomplete','[%s][queues][agentcomplete]','TRANSFER','COMPLETEDBY','reason','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','[%s][queues][blindtransfer]','transfer','transfertype','extension','transferuniqueid','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','transferexten','origtransfererexten','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridnum','calleridname','queuecallerjoinAt','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','ATTENDED','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][attendedtransfer]','musiconholdstartAt','[%s][queues][musiconholdstart]','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','./utils','format','uniqueid','channel','queue','lastAssignedTo','accountcode','queuecallerexitreason','type','CreateVoiceQueueReport','request','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','info','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','hangup','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','queuecallerenterreason','varset','variable','queuestatus','value','isNil','queuecallerexit','queuecallerexitAt'];(function(_0x1090f4,_0x24bccc){var _0x3d8962=function(_0x4d0cc5){while(--_0x4d0cc5){_0x1090f4['push'](_0x1090f4['shift']());}};_0x3d8962(++_0x24bccc);}(_0xe9ef,0x16e));var _0xfe9e=function(_0x4fdc46,_0x2a3759){_0x4fdc46=_0x4fdc46-0x0;var _0x2c178a=_0xe9ef[_0x4fdc46];return _0x2c178a;};'use strict';var _=require(_0xfe9e('0x0'));var util=require('util');var utils=require(_0xfe9e('0x1'));var queues={};function writeDB(_0x15d1f4){utils['info'](util[_0xfe9e('0x2')]('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x15d1f4[_0xfe9e('0x3')],_0x15d1f4[_0xfe9e('0x4')],_0x15d1f4[_0xfe9e('0x5')],_0x15d1f4[_0xfe9e('0x6')],_0x15d1f4['calleridnum'],_0x15d1f4[_0xfe9e('0x7')],_0x15d1f4[_0xfe9e('0x8')]));if(_0x15d1f4['queue']){utils['getVoiceQueueByName'](_0x15d1f4[_0xfe9e('0x5')])['then'](function(_0x4325a6){if(_0x4325a6){_0x15d1f4[_0xfe9e('0x9')]=_0x4325a6[_0xfe9e('0x9')];}utils['request'](_0xfe9e('0xa'),_0x15d1f4);});}else{utils[_0xfe9e('0xb')](_0xfe9e('0xa'),_0x15d1f4);}if(_0x15d1f4['transfereduniqueid']){delete queues[_0x15d1f4[_0xfe9e('0xc')]];}else{delete queues[_0x15d1f4['uniqueid']];}}exports[_0xfe9e('0xd')]=function(_0x318158){try{utils[_0xfe9e('0xe')](util[_0xfe9e('0x2')](_0xfe9e('0xf'),_0x318158[_0xfe9e('0x3')]),_0x318158);utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x11'),_0x318158['uniqueid'],_0x318158[_0xfe9e('0x5')],_0x318158[_0xfe9e('0x12')]));queues[_0x318158['uniqueid']]=_[_0xfe9e('0x13')](_0x318158,{'originalposition':_0x318158[_0xfe9e('0x12')],'queuecallerjoinAt':utils[_0xfe9e('0x14')](),'mohtime':0x0});}catch(_0x3f5f68){utils['error'](util['format'](_0xfe9e('0xf'),_0x318158[_0xfe9e('0x3')]),_0x3f5f68);}};exports[_0xfe9e('0x15')]=function(_0x30ad77){try{if(!_['isNil'](queues[_0x30ad77[_0xfe9e('0x3')]])){utils[_0xfe9e('0xe')](util[_0xfe9e('0x2')](_0xfe9e('0x16'),_0x30ad77['uniqueid']),_0x30ad77);if(queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0x17')]){if(!queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0x18')]&&!queues[_0x30ad77[_0xfe9e('0x3')]]['queuecallerexit']){queues[_0x30ad77['uniqueid']][_0xfe9e('0x19')]=!![];queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0x1a')]=utils[_0xfe9e('0x14')]();queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0x8')]=_0xfe9e('0x1b');}utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x1c'),_0x30ad77[_0xfe9e('0x3')],queues[_0x30ad77[_0xfe9e('0x3')]]['name'],queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0x8')]));writeDB(queues[_0x30ad77['uniqueid']]);}else if(queues[_0x30ad77[_0xfe9e('0x3')]]['transfereduniqueid']){utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')]('[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s',_0x30ad77[_0xfe9e('0x3')],queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0x1d')],queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0xc')]));queues[queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0xc')]]=queues[_0x30ad77[_0xfe9e('0x3')]];queues[queues[_0x30ad77[_0xfe9e('0x3')]][_0xfe9e('0xc')]][_0xfe9e('0x1e')]=0x2;delete queues[_0x30ad77[_0xfe9e('0x3')]];}}}catch(_0x1595a5){utils['error'](util['format'](_0xfe9e('0x16'),_0x30ad77[_0xfe9e('0x3')]),_0x1595a5);}};exports[_0xfe9e('0x1f')]=function(_0x11be5f){try{utils['debug'](util[_0xfe9e('0x2')]('[%s][queues][varset]',_0x11be5f['uniqueid']),_0x11be5f);if(!_['isNil'](_0x11be5f[_0xfe9e('0x20')][_0xfe9e('0x21')])&&_0x11be5f[_0xfe9e('0x22')]['toUpperCase']()!=='CONTINUE'){if(!_[_0xfe9e('0x23')](queues[_0x11be5f[_0xfe9e('0x3')]])){queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x18')]=![];queues[_0x11be5f[_0xfe9e('0x3')]]['queuecallerabandonAt']=null;queues[_0x11be5f['uniqueid']][_0xfe9e('0x24')]=!![];queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x25')]=utils[_0xfe9e('0x14')]();queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x8')]=_0x11be5f[_0xfe9e('0x22')][_0xfe9e('0x26')]();utils['info'](util[_0xfe9e('0x2')](_0xfe9e('0x27'),_0x11be5f[_0xfe9e('0x3')],queues[_0x11be5f['uniqueid']][_0xfe9e('0x1d')],_0x11be5f[_0xfe9e('0x22')],queues[_0x11be5f['uniqueid']]['queuecallerexitreason']));writeDB(queues[_0x11be5f[_0xfe9e('0x3')]]);}}else if(!_[_0xfe9e('0x23')](_0x11be5f[_0xfe9e('0x20')][_0xfe9e('0x28')])){if(!_[_0xfe9e('0x23')](queues[_0x11be5f[_0xfe9e('0x3')]])&&!queues[_0x11be5f[_0xfe9e('0x3')]]['queuecallerabandon']){queues[_0x11be5f['uniqueid']][_0xfe9e('0x18')]=![];queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x29')]=null;queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x24')]=!![];queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x25')]=utils['now']();queues[_0x11be5f[_0xfe9e('0x3')]]['queuecallerexitreason']=_0xfe9e('0x2a');utils['info'](util[_0xfe9e('0x2')]('[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s',_0x11be5f[_0xfe9e('0x3')],queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x1d')],_0x11be5f[_0xfe9e('0x22')],queues[_0x11be5f[_0xfe9e('0x3')]][_0xfe9e('0x8')]));}}}catch(_0x58e703){utils['error'](util[_0xfe9e('0x2')]('[%s][queues][varset]',_0x11be5f[_0xfe9e('0x3')]),_0x58e703);}};exports[_0xfe9e('0x18')]=function(_0x51f709){try{if(!_[_0xfe9e('0x23')](queues[_0x51f709[_0xfe9e('0x3')]])){utils[_0xfe9e('0xe')](util[_0xfe9e('0x2')](_0xfe9e('0x2b'),_0x51f709['uniqueid']),_0x51f709);queues[_0x51f709[_0xfe9e('0x3')]][_0xfe9e('0x24')]=![];queues[_0x51f709[_0xfe9e('0x3')]][_0xfe9e('0x25')]=null;queues[_0x51f709[_0xfe9e('0x3')]][_0xfe9e('0x18')]=!![];queues[_0x51f709[_0xfe9e('0x3')]][_0xfe9e('0x29')]=utils[_0xfe9e('0x14')]();queues[_0x51f709['uniqueid']][_0xfe9e('0x8')]=_0xfe9e('0x2c');utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x2d'),_0x51f709['uniqueid'],queues[_0x51f709[_0xfe9e('0x3')]][_0xfe9e('0x1d')],queues[_0x51f709[_0xfe9e('0x3')]][_0xfe9e('0x8')]));}}catch(_0xfb551f){utils['error'](util[_0xfe9e('0x2')](_0xfe9e('0x2b'),_0x51f709[_0xfe9e('0x3')]),_0xfb551f);}};exports[_0xfe9e('0x2e')]=function(_0x3cda45){try{if(!_[_0xfe9e('0x23')](queues[_0x3cda45['uniqueid']])){utils['debug'](util[_0xfe9e('0x2')](_0xfe9e('0x2f'),_0x3cda45[_0xfe9e('0x3')]),_0x3cda45);utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x30'),_0x3cda45['uniqueid'],queues[_0x3cda45['uniqueid']][_0xfe9e('0x1d')],_0x3cda45[_0xfe9e('0x31')],_0x3cda45[_0xfe9e('0x32')]));queues[_0x3cda45['uniqueid']][_0xfe9e('0x2e')]=!![];queues[_0x3cda45[_0xfe9e('0x3')]][_0xfe9e('0x17')]=utils[_0xfe9e('0x14')]();queues[_0x3cda45['uniqueid']][_0xfe9e('0x33')]=utils[_0xfe9e('0x34')](queues[_0x3cda45[_0xfe9e('0x3')]][_0xfe9e('0x17')],queues[_0x3cda45[_0xfe9e('0x3')]]['queuecallerjoinAt']);queues[_0x3cda45[_0xfe9e('0x3')]][_0xfe9e('0x12')]=_0x3cda45[_0xfe9e('0x12')];queues[_0x3cda45[_0xfe9e('0x3')]]['count']=_0x3cda45['count'];queues[_0x3cda45[_0xfe9e('0x3')]][_0xfe9e('0x31')]=_0x3cda45[_0xfe9e('0x31')];queues[_0x3cda45[_0xfe9e('0x3')]][_0xfe9e('0x32')]=_0x3cda45[_0xfe9e('0x32')];}}catch(_0x3e4acd){utils[_0xfe9e('0x35')](util[_0xfe9e('0x2')](_0xfe9e('0x2f'),_0x3cda45[_0xfe9e('0x3')]),_0x3e4acd);}};exports[_0xfe9e('0x36')]=function(_0x4caa65){try{if(!_['isNil'](queues[_0x4caa65[_0xfe9e('0x3')]])){utils['debug'](util['format'](_0xfe9e('0x37'),_0x4caa65[_0xfe9e('0x3')]),_0x4caa65);utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x38'),_0x4caa65[_0xfe9e('0x3')],queues[_0x4caa65['uniqueid']]['name'],_0x4caa65[_0xfe9e('0x39')],_0x4caa65[_0xfe9e('0x3a')]));queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x18')]=![];queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x18')]=![];queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x29')]=null;queues[_0x4caa65['uniqueid']]['queuecallerexit']=![];queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x8')]=null;queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x25')]=null;queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x3b')]=!![];queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x7')]=_0x4caa65[_0xfe9e('0x3a')];queues[_0x4caa65[_0xfe9e('0x3')]][_0xfe9e('0x6')]=_0x4caa65[_0xfe9e('0x39')];}}catch(_0x41ae0a){utils[_0xfe9e('0x35')](util[_0xfe9e('0x2')](_0xfe9e('0x37'),_0x4caa65['uniqueid']),_0x41ae0a);}};exports[_0xfe9e('0x3c')]=function(_0x36f0af){try{if(!_['isNil'](queues[_0x36f0af[_0xfe9e('0x3')]])){if(queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x17')]){utils[_0xfe9e('0xe')](util['format'](_0xfe9e('0x3d'),_0x36f0af['uniqueid']),_0x36f0af);queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x18')]=![];queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x18')]=![];queues[_0x36f0af[_0xfe9e('0x3')]]['queuecallerabandonAt']=null;queues[_0x36f0af['uniqueid']][_0xfe9e('0x24')]=![];queues[_0x36f0af['uniqueid']][_0xfe9e('0x25')]=null;queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x3b')]=!![];queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x6')]=_0x36f0af[_0xfe9e('0x39')];queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x19')]=!![];queues[_0x36f0af[_0xfe9e('0x3')]]['queuecallercompleteAt']=utils[_0xfe9e('0x14')]();if(_0x36f0af['reason']=='transfer'){if(!queues[_0x36f0af['uniqueid']]['transfer']){queues[_0x36f0af[_0xfe9e('0x3')]]['queuecallerexitreason']=_0xfe9e('0x3e');}}else{queues[_0x36f0af['uniqueid']]['queuecallerexitreason']=_0xfe9e('0x3f')+_0x36f0af[_0xfe9e('0x40')][_0xfe9e('0x26')]();}utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x41'),_0x36f0af[_0xfe9e('0x3')],queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x1d')],_0x36f0af[_0xfe9e('0x39')],queues[_0x36f0af[_0xfe9e('0x3')]][_0xfe9e('0x8')]));writeDB(queues[_0x36f0af[_0xfe9e('0x3')]]);}}}catch(_0x3be095){utils[_0xfe9e('0x35')](util[_0xfe9e('0x2')](_0xfe9e('0x3d'),_0x36f0af[_0xfe9e('0x3')]),_0x3be095);}};exports[_0xfe9e('0x42')]=function(_0x2e01c2){try{if(!_[_0xfe9e('0x23')](queues[_0x2e01c2[_0xfe9e('0x43')]])){utils[_0xfe9e('0xe')](util[_0xfe9e('0x2')](_0xfe9e('0x44'),_0x2e01c2[_0xfe9e('0x3')]),_0x2e01c2);queues[_0x2e01c2[_0xfe9e('0x43')]][_0xfe9e('0x45')]=!![];queues[_0x2e01c2['transfereeuniqueid']][_0xfe9e('0x46')]='BLIND';queues[_0x2e01c2[_0xfe9e('0x43')]]['transferexten']=_0x2e01c2[_0xfe9e('0x47')];queues[_0x2e01c2[_0xfe9e('0x43')]][_0xfe9e('0x48')]=_0x2e01c2[_0xfe9e('0x43')];queues[_0x2e01c2[_0xfe9e('0x43')]][_0xfe9e('0x8')]='BLINDTRANSFER';utils[_0xfe9e('0x10')](util['format'](_0xfe9e('0x49'),_0x2e01c2[_0xfe9e('0x3')],queues[_0x2e01c2[_0xfe9e('0x43')]]['name'],_0x2e01c2[_0xfe9e('0x43')],_0x2e01c2[_0xfe9e('0x47')]));}}catch(_0x232c73){utils[_0xfe9e('0x35')](util[_0xfe9e('0x2')](_0xfe9e('0x44'),_0x2e01c2[_0xfe9e('0x3')]),_0x232c73);}};exports['attendedtransfer']=function(_0x5b1eb3){try{utils[_0xfe9e('0xe')](util[_0xfe9e('0x2')]('[%s][queues][attendedtransfer]',_0x5b1eb3['origtransfereruniqueid']),_0x5b1eb3);if(_0x5b1eb3[_0xfe9e('0x4a')]==_0x5b1eb3[_0xfe9e('0x4b')]){if(!_['isNil'](queues[_0x5b1eb3[_0xfe9e('0x4c')]])){utils[_0xfe9e('0x10')](util['format']('[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER',_0x5b1eb3['origtransfereruniqueid'],queues[_0x5b1eb3['secondtransfererlinkedid']]['name'],_0x5b1eb3['origtransfererexten']));queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x45')]=!![];queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x46')]='ATTENDED';queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x4d')]=_0x5b1eb3[_0xfe9e('0x4e')];queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x48')]=_0x5b1eb3[_0xfe9e('0x4a')];queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x8')]=_0xfe9e('0x4f');}if(!_[_0xfe9e('0x23')](queues[_0x5b1eb3[_0xfe9e('0x4b')]])){if(_0x5b1eb3[_0xfe9e('0x50')]&&queues[_0x5b1eb3['transfereelinkedid']]){queues[_0x5b1eb3[_0xfe9e('0x50')]][_0xfe9e('0x1e')]=0x1;queues[_0x5b1eb3[_0xfe9e('0x43')]]=_[_0xfe9e('0x51')](queues[_0x5b1eb3[_0xfe9e('0x50')]]);queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0xc')]=_0x5b1eb3[_0xfe9e('0x52')];queues[_0x5b1eb3['transfereeuniqueid']]['queuecallerenterreason']=0x2;queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x53')]=queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x53')];queues[_0x5b1eb3['transfereeuniqueid']][_0xfe9e('0x54')]=queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x54')];queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x55')]=utils[_0xfe9e('0x14')]();queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x17')]=utils['now']();queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x33')]=0x0;queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x56')]=0x0;utils['info'](util[_0xfe9e('0x2')](_0xfe9e('0x57'),_0x5b1eb3[_0xfe9e('0x4a')],queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x1d')],queues[_0x5b1eb3[_0xfe9e('0x43')]]['calleridnum'],queues[_0x5b1eb3[_0xfe9e('0x43')]][_0xfe9e('0x54')]));}else{utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x5b1eb3['origtransfereruniqueid'],queues[_0x5b1eb3[_0xfe9e('0x4b')]]['name'],_0x5b1eb3['secondtransfererlinkedid']));queues[_0x5b1eb3[_0xfe9e('0x4b')]][_0xfe9e('0xc')]=_0x5b1eb3[_0xfe9e('0x4c')];}}}else if(_0x5b1eb3[_0xfe9e('0x58')]==_0x5b1eb3[_0xfe9e('0x4c')]){if(!_[_0xfe9e('0x23')](queues[_0x5b1eb3[_0xfe9e('0x4b')]])){utils[_0xfe9e('0x10')](util[_0xfe9e('0x2')](_0xfe9e('0x59'),_0x5b1eb3['origtransfereruniqueid'],queues[_0x5b1eb3[_0xfe9e('0x4b')]][_0xfe9e('0x1d')],_0x5b1eb3['secondtransfereruniqueid'],_0x5b1eb3[_0xfe9e('0x5a')]));queues[_0x5b1eb3['origtransfererlinkedid']][_0xfe9e('0x45')]=!![];queues[_0x5b1eb3['origtransfererlinkedid']]['transfertype']=_0xfe9e('0x5b');queues[_0x5b1eb3['origtransfererlinkedid']][_0xfe9e('0x4d')]=_0x5b1eb3[_0xfe9e('0x5a')];queues[_0x5b1eb3[_0xfe9e('0x4b')]][_0xfe9e('0x48')]=_0x5b1eb3[_0xfe9e('0x58')];queues[_0x5b1eb3[_0xfe9e('0x4b')]]['queuecallerexitreason']=_0xfe9e('0x4f');}if(!_[_0xfe9e('0x23')](queues[_0x5b1eb3[_0xfe9e('0x4c')]])){if(_0x5b1eb3['transfertargetlinkedid']&&queues[_0x5b1eb3['transfertargetlinkedid']]){queues[_0x5b1eb3[_0xfe9e('0x5c')]][_0xfe9e('0x1e')]=0x1;queues[_0x5b1eb3[_0xfe9e('0x52')]]=_[_0xfe9e('0x51')](queues[_0x5b1eb3[_0xfe9e('0x5c')]]);queues[_0x5b1eb3['transfertargetuniqueid']][_0xfe9e('0xc')]=_0x5b1eb3[_0xfe9e('0x52')];queues[_0x5b1eb3[_0xfe9e('0x52')]]['queuecallerenterreason']=0x2;queues[_0x5b1eb3[_0xfe9e('0x52')]][_0xfe9e('0x53')]=queues[_0x5b1eb3['origtransfererlinkedid']][_0xfe9e('0x53')];queues[_0x5b1eb3[_0xfe9e('0x52')]][_0xfe9e('0x54')]=queues[_0x5b1eb3[_0xfe9e('0x4b')]][_0xfe9e('0x54')];queues[_0x5b1eb3[_0xfe9e('0x52')]]['queuecallerjoinAt']=utils[_0xfe9e('0x14')]();queues[_0x5b1eb3[_0xfe9e('0x52')]]['queuecallerleaveAt']=utils[_0xfe9e('0x14')]();queues[_0x5b1eb3[_0xfe9e('0x52')]][_0xfe9e('0x33')]=0x0;queues[_0x5b1eb3['transfertargetuniqueid']][_0xfe9e('0x56')]=0x0;utils[_0xfe9e('0x10')](util['format'](_0xfe9e('0x5d'),_0x5b1eb3[_0xfe9e('0x4a')],queues[_0x5b1eb3[_0xfe9e('0x52')]]['name'],queues[_0x5b1eb3[_0xfe9e('0x52')]][_0xfe9e('0xc')],queues[_0x5b1eb3['transfertargetuniqueid']]['calleridnum'],queues[_0x5b1eb3['transfertargetuniqueid']]['calleridname']));}else{utils['info'](util[_0xfe9e('0x2')](_0xfe9e('0x5e'),_0x5b1eb3[_0xfe9e('0x4a')],queues[_0x5b1eb3[_0xfe9e('0x4c')]][_0xfe9e('0x1d')],_0x5b1eb3[_0xfe9e('0x4b')]));queues[_0x5b1eb3['secondtransfererlinkedid']][_0xfe9e('0xc')]=_0x5b1eb3['origtransfererlinkedid'];}}}}catch(_0x219f48){utils[_0xfe9e('0x35')](util[_0xfe9e('0x2')](_0xfe9e('0x5f'),_0x5b1eb3[_0xfe9e('0x4a')]),_0x219f48);}};exports['musiconholdstart']=function(_0x5ef9e7){try{if(!_[_0xfe9e('0x23')](queues[_0x5ef9e7[_0xfe9e('0x3')]])){utils['debug'](util[_0xfe9e('0x2')]('[%s][queues][musiconholdstart]',_0x5ef9e7[_0xfe9e('0x3')]),_0x5ef9e7);queues[_0x5ef9e7['uniqueid']][_0xfe9e('0x60')]=utils['now']();utils[_0xfe9e('0x10')](util['format']('[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s',_0x5ef9e7['uniqueid'],queues[_0x5ef9e7[_0xfe9e('0x3')]][_0xfe9e('0x1d')],queues[_0x5ef9e7['uniqueid']]['musiconholdstartAt']));}}catch(_0x4300f5){utils[_0xfe9e('0x35')](util['format'](_0xfe9e('0x61'),_0x5ef9e7[_0xfe9e('0x3')]),_0x4300f5);}};exports[_0xfe9e('0x62')]=function(_0x59cb74){try{if(!_[_0xfe9e('0x23')](queues[_0x59cb74[_0xfe9e('0x3')]])){if(!_[_0xfe9e('0x23')](queues[_0x59cb74['uniqueid']][_0xfe9e('0x60')])){utils[_0xfe9e('0xe')](util[_0xfe9e('0x2')](_0xfe9e('0x63'),_0x59cb74[_0xfe9e('0x3')]),_0x59cb74);queues[_0x59cb74[_0xfe9e('0x3')]]['mohtime']+=utils[_0xfe9e('0x34')](utils[_0xfe9e('0x14')](),queues[_0x59cb74[_0xfe9e('0x3')]][_0xfe9e('0x60')]);utils[_0xfe9e('0x10')](util['format'](_0xfe9e('0x64'),_0x59cb74[_0xfe9e('0x3')],queues[_0x59cb74['uniqueid']]['name'],queues[_0x59cb74[_0xfe9e('0x3')]][_0xfe9e('0x56')]));delete queues[_0x59cb74[_0xfe9e('0x3')]][_0xfe9e('0x60')];}}}catch(_0x520015){utils[_0xfe9e('0x35')](util[_0xfe9e('0x2')](_0xfe9e('0x63'),_0x59cb74[_0xfe9e('0x3')]),_0x520015);}}; \ No newline at end of file +var _0x761c=['calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin','[%s][queues][queuecallerjoin]','info','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','hangup','isNil','debug','[%s][queues][hangup]','queuecallerleaveAt','queuecallerexit','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','[%s][queues][varset]','variable','queuestatus','value','toUpperCase','queuecallerabandon','queuecallerabandonAt','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','error','ABANDONED','[%s][queues][queuecallerabandon]','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','queuecallerleave','holdtime','diffTime','count','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','lastAssignedTo','[%s][queues][agentcomplete]','reason','transfer','TRANSFER','COMPLETEDBY','blindtransfer','transfereeuniqueid','transfertype','BLIND','transferexten','extension','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','ATTENDED','transfereelinkedid','clone','transfertargetuniqueid','calleridname','queuecallerjoinAt','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transferuniqueid','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','[%s][queues][musiconholdstart]','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','./utils','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','uniqueid','queue'];(function(_0x1a59a1,_0x3fa340){var _0x3789bc=function(_0x318d8a){while(--_0x318d8a){_0x1a59a1['push'](_0x1a59a1['shift']());}};_0x3789bc(++_0x3fa340);}(_0x761c,0x18a));var _0xc761=function(_0x48ab84,_0x5b4429){_0x48ab84=_0x48ab84-0x0;var _0x21737d=_0x761c[_0x48ab84];return _0x21737d;};'use strict';var _=require(_0xc761('0x0'));var util=require('util');var utils=require(_0xc761('0x1'));var queues={};function writeDB(_0x351648){utils['info'](util[_0xc761('0x2')](_0xc761('0x3'),_0x351648[_0xc761('0x4')],_0x351648['channel'],_0x351648[_0xc761('0x5')],_0x351648['lastAssignedTo'],_0x351648[_0xc761('0x6')],_0x351648[_0xc761('0x7')],_0x351648[_0xc761('0x8')]));if(_0x351648[_0xc761('0x5')]){utils[_0xc761('0x9')](_0x351648[_0xc761('0x5')])[_0xc761('0xa')](function(_0x507772){if(_0x507772){_0x351648[_0xc761('0xb')]=_0x507772[_0xc761('0xb')];}utils[_0xc761('0xc')](_0xc761('0xd'),_0x351648);});}else{utils[_0xc761('0xc')](_0xc761('0xd'),_0x351648);}if(_0x351648[_0xc761('0xe')]){delete queues[_0x351648['transfereduniqueid']];}else{delete queues[_0x351648['uniqueid']];}}exports[_0xc761('0xf')]=function(_0x4405a2){try{utils['debug'](util['format'](_0xc761('0x10'),_0x4405a2['uniqueid']),_0x4405a2);utils[_0xc761('0x11')](util['format'](_0xc761('0x12'),_0x4405a2['uniqueid'],_0x4405a2[_0xc761('0x5')],_0x4405a2[_0xc761('0x13')]));queues[_0x4405a2[_0xc761('0x4')]]=_[_0xc761('0x14')](_0x4405a2,{'originalposition':_0x4405a2[_0xc761('0x13')],'queuecallerjoinAt':utils[_0xc761('0x15')](),'mohtime':0x0});}catch(_0x21384f){utils['error'](util['format'](_0xc761('0x10'),_0x4405a2[_0xc761('0x4')]),_0x21384f);}};exports[_0xc761('0x16')]=function(_0x597085){try{if(!_[_0xc761('0x17')](queues[_0x597085[_0xc761('0x4')]])){utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x19'),_0x597085['uniqueid']),_0x597085);if(queues[_0x597085['uniqueid']][_0xc761('0x1a')]){if(!queues[_0x597085[_0xc761('0x4')]]['queuecallerabandon']&&!queues[_0x597085['uniqueid']][_0xc761('0x1b')]){queues[_0x597085[_0xc761('0x4')]][_0xc761('0x1c')]=!![];queues[_0x597085[_0xc761('0x4')]][_0xc761('0x1d')]=utils['now']();queues[_0x597085[_0xc761('0x4')]][_0xc761('0x8')]=_0xc761('0x1e');}utils[_0xc761('0x11')](util[_0xc761('0x2')]('[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s',_0x597085[_0xc761('0x4')],queues[_0x597085[_0xc761('0x4')]][_0xc761('0x1f')],queues[_0x597085[_0xc761('0x4')]]['queuecallerexitreason']));writeDB(queues[_0x597085['uniqueid']]);}else if(queues[_0x597085[_0xc761('0x4')]][_0xc761('0xe')]){utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x20'),_0x597085[_0xc761('0x4')],queues[_0x597085[_0xc761('0x4')]][_0xc761('0x1f')],queues[_0x597085['uniqueid']][_0xc761('0xe')]));queues[queues[_0x597085[_0xc761('0x4')]][_0xc761('0xe')]]=queues[_0x597085['uniqueid']];queues[queues[_0x597085['uniqueid']][_0xc761('0xe')]][_0xc761('0x21')]=0x2;delete queues[_0x597085['uniqueid']];}}}catch(_0x4687ec){utils['error'](util[_0xc761('0x2')]('[%s][queues][hangup]',_0x597085['uniqueid']),_0x4687ec);}};exports['varset']=function(_0x1e713e){try{utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x22'),_0x1e713e['uniqueid']),_0x1e713e);if(!_[_0xc761('0x17')](_0x1e713e[_0xc761('0x23')][_0xc761('0x24')])&&_0x1e713e[_0xc761('0x25')][_0xc761('0x26')]()!=='CONTINUE'){if(!_[_0xc761('0x17')](queues[_0x1e713e[_0xc761('0x4')]])){queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x27')]=![];queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x28')]=null;queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x1b')]=!![];queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x29')]=utils['now']();queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x8')]=_0x1e713e['value']['toUpperCase']();utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x2a'),_0x1e713e['uniqueid'],queues[_0x1e713e['uniqueid']]['name'],_0x1e713e[_0xc761('0x25')],queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x8')]));writeDB(queues[_0x1e713e[_0xc761('0x4')]]);}}else if(!_['isNil'](_0x1e713e[_0xc761('0x23')]['queueposition'])){if(!_['isNil'](queues[_0x1e713e[_0xc761('0x4')]])&&!queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x27')]){queues[_0x1e713e['uniqueid']][_0xc761('0x27')]=![];queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x28')]=null;queues[_0x1e713e['uniqueid']][_0xc761('0x1b')]=!![];queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x29')]=utils['now']();queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x8')]='EXITWITHKEY';utils[_0xc761('0x11')](util['format']('[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s',_0x1e713e[_0xc761('0x4')],queues[_0x1e713e[_0xc761('0x4')]][_0xc761('0x1f')],_0x1e713e[_0xc761('0x25')],queues[_0x1e713e['uniqueid']]['queuecallerexitreason']));}}}catch(_0x3ac3cc){utils[_0xc761('0x2b')](util[_0xc761('0x2')](_0xc761('0x22'),_0x1e713e[_0xc761('0x4')]),_0x3ac3cc);}};exports[_0xc761('0x27')]=function(_0x5783c7){try{if(!_[_0xc761('0x17')](queues[_0x5783c7[_0xc761('0x4')]])){utils[_0xc761('0x18')](util[_0xc761('0x2')]('[%s][queues][queuecallerabandon]',_0x5783c7['uniqueid']),_0x5783c7);queues[_0x5783c7[_0xc761('0x4')]][_0xc761('0x1b')]=![];queues[_0x5783c7['uniqueid']][_0xc761('0x29')]=null;queues[_0x5783c7[_0xc761('0x4')]][_0xc761('0x27')]=!![];queues[_0x5783c7[_0xc761('0x4')]][_0xc761('0x28')]=utils['now']();queues[_0x5783c7[_0xc761('0x4')]][_0xc761('0x8')]=_0xc761('0x2c');utils['info'](util[_0xc761('0x2')]('[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s',_0x5783c7['uniqueid'],queues[_0x5783c7['uniqueid']][_0xc761('0x1f')],queues[_0x5783c7[_0xc761('0x4')]]['queuecallerexitreason']));}}catch(_0x22d58d){utils[_0xc761('0x2b')](util[_0xc761('0x2')](_0xc761('0x2d'),_0x5783c7[_0xc761('0x4')]),_0x22d58d);}};exports['queuecallerleave']=function(_0xe14a5d){try{if(!_[_0xc761('0x17')](queues[_0xe14a5d[_0xc761('0x4')]])){utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x2e'),_0xe14a5d[_0xc761('0x4')]),_0xe14a5d);utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x2f'),_0xe14a5d[_0xc761('0x4')],queues[_0xe14a5d[_0xc761('0x4')]]['name'],_0xe14a5d[_0xc761('0x30')],_0xe14a5d['connectedlinename']));queues[_0xe14a5d['uniqueid']][_0xc761('0x31')]=!![];queues[_0xe14a5d[_0xc761('0x4')]][_0xc761('0x1a')]=utils['now']();queues[_0xe14a5d['uniqueid']][_0xc761('0x32')]=utils[_0xc761('0x33')](queues[_0xe14a5d['uniqueid']][_0xc761('0x1a')],queues[_0xe14a5d['uniqueid']]['queuecallerjoinAt']);queues[_0xe14a5d['uniqueid']]['position']=_0xe14a5d[_0xc761('0x13')];queues[_0xe14a5d[_0xc761('0x4')]][_0xc761('0x34')]=_0xe14a5d[_0xc761('0x34')];queues[_0xe14a5d[_0xc761('0x4')]][_0xc761('0x30')]=_0xe14a5d[_0xc761('0x30')];queues[_0xe14a5d['uniqueid']]['connectedlinename']=_0xe14a5d['connectedlinename'];}}catch(_0x5f229d){utils[_0xc761('0x2b')](util[_0xc761('0x2')](_0xc761('0x2e'),_0xe14a5d[_0xc761('0x4')]),_0x5f229d);}};exports[_0xc761('0x35')]=function(_0x516c76){try{if(!_[_0xc761('0x17')](queues[_0x516c76[_0xc761('0x4')]])){utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x36'),_0x516c76[_0xc761('0x4')]),_0x516c76);utils[_0xc761('0x11')](util['format'](_0xc761('0x37'),_0x516c76[_0xc761('0x4')],queues[_0x516c76['uniqueid']]['name'],_0x516c76[_0xc761('0x38')],_0x516c76[_0xc761('0x39')]));queues[_0x516c76[_0xc761('0x4')]]['queuecallerabandon']=![];queues[_0x516c76[_0xc761('0x4')]][_0xc761('0x27')]=![];queues[_0x516c76['uniqueid']][_0xc761('0x28')]=null;queues[_0x516c76[_0xc761('0x4')]]['queuecallerexit']=![];queues[_0x516c76['uniqueid']][_0xc761('0x8')]=null;queues[_0x516c76['uniqueid']]['queuecallerexitAt']=null;queues[_0x516c76[_0xc761('0x4')]][_0xc761('0x3a')]=!![];queues[_0x516c76[_0xc761('0x4')]][_0xc761('0x7')]=_0x516c76['destaccountcode'];queues[_0x516c76['uniqueid']][_0xc761('0x3b')]=_0x516c76[_0xc761('0x38')];}}catch(_0x1f1fe6){utils[_0xc761('0x2b')](util[_0xc761('0x2')](_0xc761('0x36'),_0x516c76[_0xc761('0x4')]),_0x1f1fe6);}};exports['agentcomplete']=function(_0x3db4cc){try{if(!_['isNil'](queues[_0x3db4cc[_0xc761('0x4')]])){if(queues[_0x3db4cc['uniqueid']][_0xc761('0x1a')]){utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x3c'),_0x3db4cc[_0xc761('0x4')]),_0x3db4cc);queues[_0x3db4cc[_0xc761('0x4')]]['queuecallerabandon']=![];queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x27')]=![];queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x28')]=null;queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x1b')]=![];queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x29')]=null;queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x3a')]=!![];queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x3b')]=_0x3db4cc[_0xc761('0x38')];queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x1c')]=!![];queues[_0x3db4cc['uniqueid']][_0xc761('0x1d')]=utils['now']();if(_0x3db4cc[_0xc761('0x3d')]==_0xc761('0x3e')){if(!queues[_0x3db4cc[_0xc761('0x4')]]['transfer']){queues[_0x3db4cc['uniqueid']]['queuecallerexitreason']=_0xc761('0x3f');}}else{queues[_0x3db4cc[_0xc761('0x4')]]['queuecallerexitreason']=_0xc761('0x40')+_0x3db4cc['reason']['toUpperCase']();}utils['info'](util['format']('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x3db4cc[_0xc761('0x4')],queues[_0x3db4cc['uniqueid']][_0xc761('0x1f')],_0x3db4cc[_0xc761('0x38')],queues[_0x3db4cc[_0xc761('0x4')]][_0xc761('0x8')]));writeDB(queues[_0x3db4cc['uniqueid']]);}}}catch(_0x2917fd){utils['error'](util[_0xc761('0x2')](_0xc761('0x3c'),_0x3db4cc['uniqueid']),_0x2917fd);}};exports[_0xc761('0x41')]=function(_0x1e2475){try{if(!_[_0xc761('0x17')](queues[_0x1e2475['transfereeuniqueid']])){utils[_0xc761('0x18')](util[_0xc761('0x2')]('[%s][queues][blindtransfer]',_0x1e2475['uniqueid']),_0x1e2475);queues[_0x1e2475[_0xc761('0x42')]]['transfer']=!![];queues[_0x1e2475[_0xc761('0x42')]][_0xc761('0x43')]=_0xc761('0x44');queues[_0x1e2475[_0xc761('0x42')]][_0xc761('0x45')]=_0x1e2475[_0xc761('0x46')];queues[_0x1e2475['transfereeuniqueid']]['transferuniqueid']=_0x1e2475[_0xc761('0x42')];queues[_0x1e2475[_0xc761('0x42')]][_0xc761('0x8')]=_0xc761('0x47');utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x48'),_0x1e2475[_0xc761('0x4')],queues[_0x1e2475['transfereeuniqueid']]['name'],_0x1e2475[_0xc761('0x42')],_0x1e2475[_0xc761('0x46')]));}}catch(_0x61d341){utils[_0xc761('0x2b')](util[_0xc761('0x2')]('[%s][queues][blindtransfer]',_0x1e2475[_0xc761('0x4')]),_0x61d341);}};exports[_0xc761('0x49')]=function(_0x44a13f){try{utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x4a'),_0x44a13f[_0xc761('0x4b')]),_0x44a13f);if(_0x44a13f[_0xc761('0x4b')]==_0x44a13f[_0xc761('0x4c')]){if(!_[_0xc761('0x17')](queues[_0x44a13f[_0xc761('0x4d')]])){utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x4e'),_0x44a13f[_0xc761('0x4b')],queues[_0x44a13f[_0xc761('0x4d')]][_0xc761('0x1f')],_0x44a13f[_0xc761('0x4f')]));queues[_0x44a13f[_0xc761('0x4d')]]['transfer']=!![];queues[_0x44a13f[_0xc761('0x4d')]][_0xc761('0x43')]=_0xc761('0x50');queues[_0x44a13f[_0xc761('0x4d')]][_0xc761('0x45')]=_0x44a13f[_0xc761('0x4f')];queues[_0x44a13f[_0xc761('0x4d')]]['transferuniqueid']=_0x44a13f['origtransfereruniqueid'];queues[_0x44a13f[_0xc761('0x4d')]]['queuecallerexitreason']='ATTENDEDTRANSFER';}if(!_[_0xc761('0x17')](queues[_0x44a13f[_0xc761('0x4c')]])){if(_0x44a13f[_0xc761('0x51')]&&queues[_0x44a13f[_0xc761('0x51')]]){queues[_0x44a13f[_0xc761('0x51')]][_0xc761('0x21')]=0x1;queues[_0x44a13f[_0xc761('0x42')]]=_[_0xc761('0x52')](queues[_0x44a13f[_0xc761('0x51')]]);queues[_0x44a13f['transfereeuniqueid']][_0xc761('0xe')]=_0x44a13f[_0xc761('0x53')];queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x21')]=0x2;queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x6')]=queues[_0x44a13f['secondtransfererlinkedid']][_0xc761('0x6')];queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x54')]=queues[_0x44a13f[_0xc761('0x4d')]][_0xc761('0x54')];queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x55')]=utils['now']();queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x1a')]=utils[_0xc761('0x15')]();queues[_0x44a13f[_0xc761('0x42')]]['holdtime']=0x0;queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x56')]=0x0;utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x57'),_0x44a13f[_0xc761('0x4b')],queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x1f')],queues[_0x44a13f['transfereeuniqueid']]['calleridnum'],queues[_0x44a13f[_0xc761('0x42')]][_0xc761('0x54')]));}else{utils[_0xc761('0x11')](util[_0xc761('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x44a13f['origtransfereruniqueid'],queues[_0x44a13f[_0xc761('0x4c')]]['name'],_0x44a13f[_0xc761('0x4d')]));queues[_0x44a13f[_0xc761('0x4c')]]['transfereduniqueid']=_0x44a13f[_0xc761('0x4d')];}}}else if(_0x44a13f[_0xc761('0x58')]==_0x44a13f['secondtransfererlinkedid']){if(!_[_0xc761('0x17')](queues[_0x44a13f['origtransfererlinkedid']])){utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x59'),_0x44a13f['origtransfereruniqueid'],queues[_0x44a13f[_0xc761('0x4c')]][_0xc761('0x1f')],_0x44a13f[_0xc761('0x58')],_0x44a13f[_0xc761('0x5a')]));queues[_0x44a13f[_0xc761('0x4c')]][_0xc761('0x3e')]=!![];queues[_0x44a13f[_0xc761('0x4c')]][_0xc761('0x43')]=_0xc761('0x50');queues[_0x44a13f[_0xc761('0x4c')]][_0xc761('0x45')]=_0x44a13f[_0xc761('0x5a')];queues[_0x44a13f['origtransfererlinkedid']][_0xc761('0x5b')]=_0x44a13f[_0xc761('0x58')];queues[_0x44a13f[_0xc761('0x4c')]][_0xc761('0x8')]='ATTENDEDTRANSFER';}if(!_['isNil'](queues[_0x44a13f[_0xc761('0x4d')]])){if(_0x44a13f['transfertargetlinkedid']&&queues[_0x44a13f[_0xc761('0x5c')]]){queues[_0x44a13f[_0xc761('0x5c')]][_0xc761('0x21')]=0x1;queues[_0x44a13f[_0xc761('0x53')]]=_['clone'](queues[_0x44a13f['transfertargetlinkedid']]);queues[_0x44a13f['transfertargetuniqueid']]['transfereduniqueid']=_0x44a13f[_0xc761('0x53')];queues[_0x44a13f[_0xc761('0x53')]][_0xc761('0x21')]=0x2;queues[_0x44a13f[_0xc761('0x53')]][_0xc761('0x6')]=queues[_0x44a13f[_0xc761('0x4c')]][_0xc761('0x6')];queues[_0x44a13f[_0xc761('0x53')]][_0xc761('0x54')]=queues[_0x44a13f[_0xc761('0x4c')]]['calleridname'];queues[_0x44a13f['transfertargetuniqueid']][_0xc761('0x55')]=utils[_0xc761('0x15')]();queues[_0x44a13f[_0xc761('0x53')]][_0xc761('0x1a')]=utils[_0xc761('0x15')]();queues[_0x44a13f[_0xc761('0x53')]]['holdtime']=0x0;queues[_0x44a13f[_0xc761('0x53')]]['mohtime']=0x0;utils[_0xc761('0x11')](util['format'](_0xc761('0x5d'),_0x44a13f[_0xc761('0x4b')],queues[_0x44a13f['transfertargetuniqueid']][_0xc761('0x1f')],queues[_0x44a13f[_0xc761('0x53')]][_0xc761('0xe')],queues[_0x44a13f['transfertargetuniqueid']]['calleridnum'],queues[_0x44a13f[_0xc761('0x53')]][_0xc761('0x54')]));}else{utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x5e'),_0x44a13f['origtransfereruniqueid'],queues[_0x44a13f[_0xc761('0x4d')]][_0xc761('0x1f')],_0x44a13f[_0xc761('0x4c')]));queues[_0x44a13f[_0xc761('0x4d')]][_0xc761('0xe')]=_0x44a13f['origtransfererlinkedid'];}}}}catch(_0x5a73ea){utils[_0xc761('0x2b')](util[_0xc761('0x2')]('[%s][queues][attendedtransfer]',_0x44a13f[_0xc761('0x4b')]),_0x5a73ea);}};exports['musiconholdstart']=function(_0x47f60b){try{if(!_[_0xc761('0x17')](queues[_0x47f60b[_0xc761('0x4')]])){utils[_0xc761('0x18')](util['format']('[%s][queues][musiconholdstart]',_0x47f60b[_0xc761('0x4')]),_0x47f60b);queues[_0x47f60b[_0xc761('0x4')]][_0xc761('0x5f')]=utils[_0xc761('0x15')]();utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x60'),_0x47f60b[_0xc761('0x4')],queues[_0x47f60b[_0xc761('0x4')]][_0xc761('0x1f')],queues[_0x47f60b[_0xc761('0x4')]][_0xc761('0x5f')]));}}catch(_0x3a0180){utils[_0xc761('0x2b')](util[_0xc761('0x2')](_0xc761('0x61'),_0x47f60b[_0xc761('0x4')]),_0x3a0180);}};exports['musiconholdstop']=function(_0x56dc32){try{if(!_[_0xc761('0x17')](queues[_0x56dc32[_0xc761('0x4')]])){if(!_[_0xc761('0x17')](queues[_0x56dc32['uniqueid']][_0xc761('0x5f')])){utils[_0xc761('0x18')](util[_0xc761('0x2')](_0xc761('0x62'),_0x56dc32['uniqueid']),_0x56dc32);queues[_0x56dc32[_0xc761('0x4')]][_0xc761('0x56')]+=utils[_0xc761('0x33')](utils[_0xc761('0x15')](),queues[_0x56dc32[_0xc761('0x4')]][_0xc761('0x5f')]);utils[_0xc761('0x11')](util[_0xc761('0x2')](_0xc761('0x63'),_0x56dc32[_0xc761('0x4')],queues[_0x56dc32['uniqueid']][_0xc761('0x1f')],queues[_0x56dc32[_0xc761('0x4')]]['mohtime']));delete queues[_0x56dc32[_0xc761('0x4')]]['musiconholdstartAt'];}}}catch(_0x3bd96a){utils[_0xc761('0x2b')](util[_0xc761('0x2')](_0xc761('0x62'),_0x56dc32[_0xc761('0x4')]),_0x3bd96a);}}; \ No newline at end of file diff --git a/server/services/xdr/recordings.controller.js b/server/services/xdr/recordings.controller.js index 48169cc..bd691d9 100644 --- a/server/services/xdr/recordings.controller.js +++ b/server/services/xdr/recordings.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3d53=['cdr','split','lastIndexOf','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','[%s][recordings][queuecallerjoin]','lodash','util','info','format','[%s][recordings][writeDB]','uniqueid','accountcode','getUserByInternal','then','membername','name','UserId','request','CreateVoiceRecording','newchannel','debug','context','exten','channel','error','[%s][recordings][newchannel]','newstate','[%s][recordings][newstate]','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','linkedid','transfer','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','variable','[%s][recordings][varset]','[%s][recordings][varset]\x20variable:%s\x20value:%s','value','endsWith','.wav49','replace','.WAV','find','monitors','push','hangup','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','cause-txt','calleridname','connectedlinenum','connectedlinename','type','outbound','forEach','clone','newexten','[%s][recordings][newexten]','application','appdata','set','startsWith','toLowerCase'];(function(_0x5c3b31,_0x5b2df8){var _0x57b973=function(_0x21a617){while(--_0x21a617){_0x5c3b31['push'](_0x5c3b31['shift']());}};_0x57b973(++_0x5b2df8);}(_0x3d53,0xc9));var _0x33d5=function(_0xf34109,_0x380779){_0xf34109=_0xf34109-0x0;var _0x570bfc=_0x3d53[_0xf34109];return _0x570bfc;};'use strict';var _=require(_0x33d5('0x0'));var util=require(_0x33d5('0x1'));var utils=require('./utils');var recordings={};function writeDB(_0x4e2a96){utils[_0x33d5('0x2')](util[_0x33d5('0x3')](_0x33d5('0x4'),_0x4e2a96[_0x33d5('0x5')]));if(_0x4e2a96[_0x33d5('0x6')]){utils[_0x33d5('0x7')](_0x4e2a96[_0x33d5('0x6')])[_0x33d5('0x8')](function(_0x63a8d6){if(_0x63a8d6){_0x4e2a96[_0x33d5('0x9')]=_0x63a8d6[_0x33d5('0xa')];_0x4e2a96[_0x33d5('0xb')]=_0x63a8d6['id'];}utils[_0x33d5('0xc')]('CreateVoiceRecording',_0x4e2a96);});}else{utils[_0x33d5('0xc')](_0x33d5('0xd'),_0x4e2a96);}}exports[_0x33d5('0xe')]=function(_0x121ab7){try{utils[_0x33d5('0xf')](util[_0x33d5('0x3')]('[%s][recordings][newchannel]',_0x121ab7[_0x33d5('0x5')]),_0x121ab7);if(_0x121ab7['uniqueid']==_0x121ab7['linkedid']){utils['info'](util['format']('[%s][recordings][newchannel]\x20context:%s\x20exten:%s',_0x121ab7[_0x33d5('0x5')],_0x121ab7[_0x33d5('0x10')],_0x121ab7[_0x33d5('0x11')]));recordings[_0x121ab7[_0x33d5('0x5')]]={'uniqueid':_0x121ab7[_0x33d5('0x5')],'accountcode':_0x121ab7[_0x33d5('0x6')],'exten':_0x121ab7[_0x33d5('0x11')],'context':_0x121ab7[_0x33d5('0x10')],'channel':_0x121ab7[_0x33d5('0x12')],'monitors':[]};}}catch(_0x4e3b83){utils[_0x33d5('0x13')](util[_0x33d5('0x3')](_0x33d5('0x14'),_0x121ab7['uniqueid']),_0x4e3b83);}};exports[_0x33d5('0x15')]=function(_0x354f0b){try{utils['debug'](util['format'](_0x33d5('0x16'),_0x354f0b[_0x33d5('0x5')]),_0x354f0b);if(!_[_0x33d5('0x17')](recordings[_0x354f0b[_0x33d5('0x5')]])&&_0x354f0b[_0x33d5('0x18')]==0x6){utils[_0x33d5('0x2')](util['format'](_0x33d5('0x19'),_0x354f0b[_0x33d5('0x5')],_0x354f0b[_0x33d5('0x10')],_0x354f0b[_0x33d5('0x12')]));}else if(!_[_0x33d5('0x17')](recordings[_0x354f0b[_0x33d5('0x1a')]])&&_0x354f0b[_0x33d5('0x18')]==0x6&&_0x354f0b[_0x33d5('0x10')]!=_0x33d5('0x1b')){utils['info'](util[_0x33d5('0x3')](_0x33d5('0x1c'),_0x354f0b[_0x33d5('0x5')],_0x354f0b['linkedid'],_0x354f0b[_0x33d5('0x10')],_0x354f0b['channel']));recordings[_0x354f0b['linkedid']][_0x33d5('0x6')]=_0x354f0b['accountcode'];}}catch(_0x1d12ac){utils[_0x33d5('0x13')](util[_0x33d5('0x3')](_0x33d5('0x16'),_0x354f0b['uniqueid']),_0x1d12ac);}};exports['varset']=function(_0x24a38d){try{if(!_[_0x33d5('0x17')](_0x24a38d[_0x33d5('0x1d')])&&!_[_0x33d5('0x17')](_0x24a38d[_0x33d5('0x1d')]['mixmonitor_filename'])){utils[_0x33d5('0xf')](util['format'](_0x33d5('0x1e'),_0x24a38d['uniqueid']),_0x24a38d);utils['info'](util[_0x33d5('0x3')](_0x33d5('0x1f'),_0x24a38d['uniqueid'],_0x24a38d[_0x33d5('0x1d')],_0x24a38d[_0x33d5('0x20')]));if(_[_0x33d5('0x21')](_0x24a38d[_0x33d5('0x20')],_0x33d5('0x22'))){_0x24a38d[_0x33d5('0x20')]=_0x24a38d[_0x33d5('0x20')][_0x33d5('0x23')](_0x33d5('0x22'),_0x33d5('0x24'));}if(recordings[_0x24a38d[_0x33d5('0x1a')]]){var _0x15c191=_[_0x33d5('0x25')](recordings[_0x24a38d[_0x33d5('0x1a')]][_0x33d5('0x26')],{'value':_0x24a38d[_0x33d5('0x20')]});if(_[_0x33d5('0x17')](_0x15c191)){recordings[_0x24a38d[_0x33d5('0x1a')]][_0x33d5('0x26')][_0x33d5('0x27')]({'value':_0x24a38d['value']});}}}}catch(_0x319c5e){utils[_0x33d5('0x13')](util[_0x33d5('0x3')](_0x33d5('0x1e'),_0x24a38d[_0x33d5('0x5')]),_0x319c5e);}};exports[_0x33d5('0x28')]=function(_0x212bfa){try{if(!_[_0x33d5('0x17')](recordings[_0x212bfa[_0x33d5('0x5')]])){utils['debug'](util[_0x33d5('0x3')](_0x33d5('0x29'),_0x212bfa[_0x33d5('0x5')]),_0x212bfa);utils[_0x33d5('0x2')](util[_0x33d5('0x3')](_0x33d5('0x2a'),_0x212bfa[_0x33d5('0x5')],_0x212bfa[_0x33d5('0x2b')],_0x212bfa['calleridname'],_0x212bfa[_0x33d5('0x2c')]));recordings[_0x212bfa[_0x33d5('0x5')]][_0x33d5('0x2b')]=_0x212bfa['calleridnum'];recordings[_0x212bfa[_0x33d5('0x5')]][_0x33d5('0x2d')]=_0x212bfa[_0x33d5('0x2d')];recordings[_0x212bfa['uniqueid']][_0x33d5('0x2e')]=_0x212bfa['connectedlinenum'];recordings[_0x212bfa[_0x33d5('0x5')]][_0x33d5('0x2f')]=_0x212bfa[_0x33d5('0x2f')];if(recordings[_0x212bfa[_0x33d5('0x5')]][_0x33d5('0x30')]==_0x33d5('0x31')&&recordings[_0x212bfa[_0x33d5('0x5')]][_0x33d5('0x6')]){recordings[_0x212bfa[_0x33d5('0x5')]][_0x33d5('0x2e')]=recordings[_0x212bfa['uniqueid']][_0x33d5('0x6')];recordings[_0x212bfa['uniqueid']]['connectedlinename']='';}recordings[_0x212bfa['uniqueid']][_0x33d5('0x26')][_0x33d5('0x32')](function(_0xe440d3){var _0x4563da=_[_0x33d5('0x33')](recordings[_0x212bfa['uniqueid']]);_0x4563da[_0x33d5('0x20')]=_0xe440d3[_0x33d5('0x20')];writeDB(_0x4563da);});delete recordings[_0x212bfa[_0x33d5('0x5')]];}}catch(_0x5b7297){utils[_0x33d5('0x13')](util['format']('[%s][recordings][hangup]',_0x212bfa['uniqueid']),_0x5b7297);}};exports[_0x33d5('0x34')]=function(_0x355834){try{if(!_['isNil'](recordings[_0x355834['uniqueid']])){utils['debug'](util[_0x33d5('0x3')](_0x33d5('0x35'),_0x355834[_0x33d5('0x5')]),_0x355834);utils['info'](util[_0x33d5('0x3')]('[%s][recordings][newexten]\x20application:%s\x20appdata:%s',_0x355834[_0x33d5('0x5')],_0x355834[_0x33d5('0x36')],_0x355834[_0x33d5('0x37')]));if(_0x355834[_0x33d5('0x36')]['toLowerCase']()==_0x33d5('0x38')&&_[_0x33d5('0x39')](_0x355834[_0x33d5('0x37')][_0x33d5('0x3a')](),_0x33d5('0x3b'))){var _0x347f89=_0x355834['appdata'][_0x33d5('0x3c')]('=');var _0x386f11=_0x347f89[0x0]['substring'](_0x347f89[0x0][_0x33d5('0x3d')]('(')+0x1,_0x347f89[0x0][_0x33d5('0x3d')](')'));var _0x21ca38=_0x347f89[0x1];recordings[_0x355834[_0x33d5('0x5')]][_0x386f11]=_0x21ca38;}}}catch(_0x16bcff){utils[_0x33d5('0x13')](util[_0x33d5('0x3')]('[%s][recordings][newexten]',_0x355834[_0x33d5('0x5')]),_0x16bcff);}};exports['queuecallerjoin']=function(_0x27018d){try{if(!_[_0x33d5('0x17')](recordings[_0x27018d['uniqueid']])){utils[_0x33d5('0xf')](util['format']('[%s][recordings][queuecallerjoin]',_0x27018d[_0x33d5('0x5')]),_0x27018d);utils['info'](util[_0x33d5('0x3')](_0x33d5('0x3e'),_0x27018d['uniqueid'],_0x27018d[_0x33d5('0x3f')]));recordings[_0x27018d[_0x33d5('0x5')]][_0x33d5('0x3f')]=_0x27018d['queue'];}}catch(_0x4423e7){utils[_0x33d5('0x13')](util[_0x33d5('0x3')](_0x33d5('0x40'),_0x27018d[_0x33d5('0x5')]),_0x4423e7);}}; \ No newline at end of file +var _0x161b=['[%s][recordings][varset]','endsWith','.wav49','value','find','monitors','push','hangup','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','calleridname','cause-txt','connectedlinenum','connectedlinename','type','outbound','forEach','clone','newexten','[%s][recordings][newexten]','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','startsWith','cdr','split','substring','lastIndexOf','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','lodash','util','./utils','info','format','uniqueid','getUserByInternal','name','request','CreateVoiceRecording','newchannel','debug','[%s][recordings][newchannel]','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','context','exten','accountcode','channel','error','newstate','[%s][recordings][newstate]','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','linkedid','transfer','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','variable','mixmonitor_filename'];(function(_0x6ff984,_0x52fbd1){var _0x1b8400=function(_0x15ce8c){while(--_0x15ce8c){_0x6ff984['push'](_0x6ff984['shift']());}};_0x1b8400(++_0x52fbd1);}(_0x161b,0x18e));var _0xb161=function(_0x2f8ec7,_0x35b26a){_0x2f8ec7=_0x2f8ec7-0x0;var _0x209395=_0x161b[_0x2f8ec7];return _0x209395;};'use strict';var _=require(_0xb161('0x0'));var util=require(_0xb161('0x1'));var utils=require(_0xb161('0x2'));var recordings={};function writeDB(_0x24a32a){utils[_0xb161('0x3')](util[_0xb161('0x4')]('[%s][recordings][writeDB]',_0x24a32a[_0xb161('0x5')]));if(_0x24a32a['accountcode']){utils[_0xb161('0x6')](_0x24a32a['accountcode'])['then'](function(_0x45df3d){if(_0x45df3d){_0x24a32a['membername']=_0x45df3d[_0xb161('0x7')];_0x24a32a['UserId']=_0x45df3d['id'];}utils[_0xb161('0x8')](_0xb161('0x9'),_0x24a32a);});}else{utils[_0xb161('0x8')](_0xb161('0x9'),_0x24a32a);}}exports[_0xb161('0xa')]=function(_0x51ebf6){try{utils[_0xb161('0xb')](util[_0xb161('0x4')](_0xb161('0xc'),_0x51ebf6[_0xb161('0x5')]),_0x51ebf6);if(_0x51ebf6[_0xb161('0x5')]==_0x51ebf6['linkedid']){utils[_0xb161('0x3')](util[_0xb161('0x4')](_0xb161('0xd'),_0x51ebf6[_0xb161('0x5')],_0x51ebf6[_0xb161('0xe')],_0x51ebf6[_0xb161('0xf')]));recordings[_0x51ebf6[_0xb161('0x5')]]={'uniqueid':_0x51ebf6[_0xb161('0x5')],'accountcode':_0x51ebf6[_0xb161('0x10')],'exten':_0x51ebf6['exten'],'context':_0x51ebf6[_0xb161('0xe')],'channel':_0x51ebf6[_0xb161('0x11')],'monitors':[]};}}catch(_0x1f4777){utils[_0xb161('0x12')](util[_0xb161('0x4')](_0xb161('0xc'),_0x51ebf6['uniqueid']),_0x1f4777);}};exports[_0xb161('0x13')]=function(_0x191cac){try{utils[_0xb161('0xb')](util[_0xb161('0x4')](_0xb161('0x14'),_0x191cac['uniqueid']),_0x191cac);if(!_[_0xb161('0x15')](recordings[_0x191cac['uniqueid']])&&_0x191cac[_0xb161('0x16')]==0x6){utils[_0xb161('0x3')](util[_0xb161('0x4')](_0xb161('0x17'),_0x191cac[_0xb161('0x5')],_0x191cac[_0xb161('0xe')],_0x191cac['channel']));}else if(!_[_0xb161('0x15')](recordings[_0x191cac[_0xb161('0x18')]])&&_0x191cac[_0xb161('0x16')]==0x6&&_0x191cac[_0xb161('0xe')]!=_0xb161('0x19')){utils[_0xb161('0x3')](util[_0xb161('0x4')](_0xb161('0x1a'),_0x191cac['uniqueid'],_0x191cac['linkedid'],_0x191cac[_0xb161('0xe')],_0x191cac[_0xb161('0x11')]));recordings[_0x191cac[_0xb161('0x18')]][_0xb161('0x10')]=_0x191cac[_0xb161('0x10')];}}catch(_0x3202aa){utils[_0xb161('0x12')](util['format'](_0xb161('0x14'),_0x191cac[_0xb161('0x5')]),_0x3202aa);}};exports['varset']=function(_0x40b8f9){try{if(!_['isNil'](_0x40b8f9['variable'])&&!_[_0xb161('0x15')](_0x40b8f9[_0xb161('0x1b')][_0xb161('0x1c')])){utils[_0xb161('0xb')](util[_0xb161('0x4')](_0xb161('0x1d'),_0x40b8f9[_0xb161('0x5')]),_0x40b8f9);utils[_0xb161('0x3')](util[_0xb161('0x4')]('[%s][recordings][varset]\x20variable:%s\x20value:%s',_0x40b8f9[_0xb161('0x5')],_0x40b8f9['variable'],_0x40b8f9['value']));if(_[_0xb161('0x1e')](_0x40b8f9['value'],_0xb161('0x1f'))){_0x40b8f9[_0xb161('0x20')]=_0x40b8f9[_0xb161('0x20')]['replace']('.wav49','.WAV');}if(recordings[_0x40b8f9['linkedid']]){var _0x337477=_[_0xb161('0x21')](recordings[_0x40b8f9[_0xb161('0x18')]][_0xb161('0x22')],{'value':_0x40b8f9[_0xb161('0x20')]});if(_[_0xb161('0x15')](_0x337477)){recordings[_0x40b8f9['linkedid']][_0xb161('0x22')][_0xb161('0x23')]({'value':_0x40b8f9[_0xb161('0x20')]});}}}}catch(_0x2fddb5){utils[_0xb161('0x12')](util[_0xb161('0x4')]('[%s][recordings][varset]',_0x40b8f9['uniqueid']),_0x2fddb5);}};exports[_0xb161('0x24')]=function(_0x4c8810){try{if(!_[_0xb161('0x15')](recordings[_0x4c8810['uniqueid']])){utils['debug'](util[_0xb161('0x4')](_0xb161('0x25'),_0x4c8810['uniqueid']),_0x4c8810);utils['info'](util[_0xb161('0x4')](_0xb161('0x26'),_0x4c8810[_0xb161('0x5')],_0x4c8810[_0xb161('0x27')],_0x4c8810[_0xb161('0x28')],_0x4c8810[_0xb161('0x29')]));recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x27')]=_0x4c8810[_0xb161('0x27')];recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x28')]=_0x4c8810[_0xb161('0x28')];recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x2a')]=_0x4c8810[_0xb161('0x2a')];recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x2b')]=_0x4c8810['connectedlinename'];if(recordings[_0x4c8810['uniqueid']][_0xb161('0x2c')]==_0xb161('0x2d')&&recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x10')]){recordings[_0x4c8810['uniqueid']][_0xb161('0x2a')]=recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x10')];recordings[_0x4c8810[_0xb161('0x5')]]['connectedlinename']='';}recordings[_0x4c8810[_0xb161('0x5')]][_0xb161('0x22')][_0xb161('0x2e')](function(_0x9de8cb){var _0x433c80=_[_0xb161('0x2f')](recordings[_0x4c8810[_0xb161('0x5')]]);_0x433c80[_0xb161('0x20')]=_0x9de8cb[_0xb161('0x20')];writeDB(_0x433c80);});delete recordings[_0x4c8810[_0xb161('0x5')]];}}catch(_0x1341e2){utils[_0xb161('0x12')](util[_0xb161('0x4')](_0xb161('0x25'),_0x4c8810[_0xb161('0x5')]),_0x1341e2);}};exports[_0xb161('0x30')]=function(_0x8ec72a){try{if(!_[_0xb161('0x15')](recordings[_0x8ec72a[_0xb161('0x5')]])){utils[_0xb161('0xb')](util['format'](_0xb161('0x31'),_0x8ec72a[_0xb161('0x5')]),_0x8ec72a);utils[_0xb161('0x3')](util[_0xb161('0x4')](_0xb161('0x32'),_0x8ec72a[_0xb161('0x5')],_0x8ec72a[_0xb161('0x33')],_0x8ec72a[_0xb161('0x34')]));if(_0x8ec72a[_0xb161('0x33')][_0xb161('0x35')]()=='set'&&_[_0xb161('0x36')](_0x8ec72a[_0xb161('0x34')][_0xb161('0x35')](),_0xb161('0x37'))){var _0x22377b=_0x8ec72a[_0xb161('0x34')][_0xb161('0x38')]('=');var _0x2c1d7a=_0x22377b[0x0][_0xb161('0x39')](_0x22377b[0x0][_0xb161('0x3a')]('(')+0x1,_0x22377b[0x0][_0xb161('0x3a')](')'));var _0x5887ae=_0x22377b[0x1];recordings[_0x8ec72a[_0xb161('0x5')]][_0x2c1d7a]=_0x5887ae;}}}catch(_0x2b8ff4){utils[_0xb161('0x12')](util['format'](_0xb161('0x31'),_0x8ec72a['uniqueid']),_0x2b8ff4);}};exports['queuecallerjoin']=function(_0x235567){try{if(!_['isNil'](recordings[_0x235567[_0xb161('0x5')]])){utils['debug'](util['format']('[%s][recordings][queuecallerjoin]',_0x235567[_0xb161('0x5')]),_0x235567);utils[_0xb161('0x3')](util['format'](_0xb161('0x3b'),_0x235567['uniqueid'],_0x235567[_0xb161('0x3c')]));recordings[_0x235567[_0xb161('0x5')]][_0xb161('0x3c')]=_0x235567[_0xb161('0x3c')];}}catch(_0x481c85){utils[_0xb161('0x12')](util['format']('[%s][recordings][queuecallerjoin]',_0x235567['uniqueid']),_0x481c85);}}; \ No newline at end of file diff --git a/server/services/xdr/transfers.controller.js b/server/services/xdr/transfers.controller.js index bc9d2c9..b738df5 100644 --- a/server/services/xdr/transfers.controller.js +++ b/server/services/xdr/transfers.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfa9b=['transfertargetcontext','transfertargetlinkedid','lodash','util','./utils','info','format','attended','origtransfereruniqueid','uniqueid','request','CreateVoiceTransferReport','blindtransfer','debug','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','type','error','[%s][transfers][blindtransfer]','attendedtransfer','[%s][transfers][attendedtransfer]','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','transfertargetcalleridnum','assign','origtransfererchannel','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransfererexten','origtransferercontext','origtransfererexten','transfereechannel','transfertargetcalleridname','transfertargetaccountcode'];(function(_0x163614,_0x4b0550){var _0x25af47=function(_0x3c0193){while(--_0x3c0193){_0x163614['push'](_0x163614['shift']());}};_0x25af47(++_0x4b0550);}(_0xfa9b,0x1f0));var _0xbfa9=function(_0x19e974,_0x274146){_0x19e974=_0x19e974-0x0;var _0x3f1a92=_0xfa9b[_0x19e974];return _0x3f1a92;};'use strict';var _=require(_0xbfa9('0x0'));var util=require(_0xbfa9('0x1'));var utils=require(_0xbfa9('0x2'));function writeDB(_0xcf304b){utils[_0xbfa9('0x3')](util[_0xbfa9('0x4')]('[%s][transfers][writeDB]\x20type:%s',_0xcf304b['type']===_0xbfa9('0x5')?_0xcf304b[_0xbfa9('0x6')]:_0xcf304b[_0xbfa9('0x7')],_0xcf304b['type']));utils[_0xbfa9('0x8')](_0xbfa9('0x9'),_0xcf304b);}exports[_0xbfa9('0xa')]=function(_0x10f2b2){try{utils[_0xbfa9('0xb')](util[_0xbfa9('0x4')]('[%s][transfers][blindtransfer]',_0x10f2b2['uniqueid']),_0x10f2b2);utils[_0xbfa9('0x3')](util[_0xbfa9('0x4')](_0xbfa9('0xc'),_0x10f2b2[_0xbfa9('0x7')],_0x10f2b2[_0xbfa9('0xd')],_0x10f2b2[_0xbfa9('0xe')],_0x10f2b2[_0xbfa9('0xf')],_0x10f2b2[_0xbfa9('0x10')]));_0x10f2b2[_0xbfa9('0x11')]='blind';writeDB(_0x10f2b2);}catch(_0x1efc85){utils[_0xbfa9('0x12')](util['format'](_0xbfa9('0x13'),_0x10f2b2[_0xbfa9('0x7')]),_0x1efc85);}};exports[_0xbfa9('0x14')]=function(_0x596a9a){try{utils[_0xbfa9('0xb')](util[_0xbfa9('0x4')](_0xbfa9('0x15'),_0x596a9a[_0xbfa9('0x6')]),_0x596a9a);utils[_0xbfa9('0x3')](util[_0xbfa9('0x4')](_0xbfa9('0x16'),_0x596a9a[_0xbfa9('0x6')],_0x596a9a[_0xbfa9('0x17')],_0x596a9a['origtransferercalleridname'],_0x596a9a[_0xbfa9('0x18')],_0x596a9a['transfertargetcalleridname']));_0x596a9a=_[_0xbfa9('0x19')](_0x596a9a,{'transfererchannel':_0x596a9a[_0xbfa9('0x1a')],'transferercalleridnum':_0x596a9a['origtransferercalleridnum'],'transferercalleridname':_0x596a9a['origtransferercalleridname'],'transfererconnectedlinenum':_0x596a9a[_0xbfa9('0x1b')],'transfererconnectedlinename':_0x596a9a[_0xbfa9('0x1c')],'transfereraccountcode':_0x596a9a[_0xbfa9('0x1d')],'transferercontext':_0x596a9a['secondtransferercontext'],'transfererexten':_0x596a9a[_0xbfa9('0x1e')],'transfererlinkedid':_0x596a9a['origtransfererlinkedid'],'context':_0x596a9a[_0xbfa9('0x1f')],'extension':_0x596a9a[_0xbfa9('0x20')],'type':_0xbfa9('0x5')});if(_['isNil'](_0x596a9a[_0xbfa9('0x21')])){_0x596a9a=_['assign'](_0x596a9a,{'transfereechannel':_0x596a9a['transfertargetchannel'],'transfereecalleridnum':_0x596a9a[_0xbfa9('0x18')],'transfereecalleridname':_0x596a9a[_0xbfa9('0x22')],'transfereeconnectedlinenum':_0x596a9a['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x596a9a['transfertargetconnectedlinename'],'transfereeaccountcode':_0x596a9a[_0xbfa9('0x23')],'transfereecontext':_0x596a9a[_0xbfa9('0x24')],'transfereeexten':_0x596a9a['transfertargetexten'],'transfereelinkedid':_0x596a9a[_0xbfa9('0x25')]});}writeDB(_0x596a9a);}catch(_0x31f341){utils[_0xbfa9('0x12')](util[_0xbfa9('0x4')](_0xbfa9('0x15'),_0x596a9a[_0xbfa9('0x6')]),_0x31f341);}}; \ No newline at end of file +var _0x62f6=['assign','origtransfererchannel','origtransferercalleridnum','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','origtransfererlinkedid','origtransferercontext','isNil','transfertargetchannel','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetlinkedid','[%s][transfers][attendedtransfer]','lodash','util','./utils','info','[%s][transfers][writeDB]\x20type:%s','type','attended','origtransfereruniqueid','request','blindtransfer','debug','format','[%s][transfers][blindtransfer]','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','blind','error','uniqueid','attendedtransfer','origtransferercalleridname','transfertargetcalleridnum','transfertargetcalleridname'];(function(_0x1965f9,_0x5df931){var _0x4aab6e=function(_0x59b40b){while(--_0x59b40b){_0x1965f9['push'](_0x1965f9['shift']());}};_0x4aab6e(++_0x5df931);}(_0x62f6,0x1aa));var _0x662f=function(_0x38fb1b,_0x105827){_0x38fb1b=_0x38fb1b-0x0;var _0x24dd7c=_0x62f6[_0x38fb1b];return _0x24dd7c;};'use strict';var _=require(_0x662f('0x0'));var util=require(_0x662f('0x1'));var utils=require(_0x662f('0x2'));function writeDB(_0x169293){utils[_0x662f('0x3')](util['format'](_0x662f('0x4'),_0x169293[_0x662f('0x5')]===_0x662f('0x6')?_0x169293[_0x662f('0x7')]:_0x169293['uniqueid'],_0x169293[_0x662f('0x5')]));utils[_0x662f('0x8')]('CreateVoiceTransferReport',_0x169293);}exports[_0x662f('0x9')]=function(_0x3f0100){try{utils[_0x662f('0xa')](util[_0x662f('0xb')](_0x662f('0xc'),_0x3f0100['uniqueid']),_0x3f0100);utils[_0x662f('0x3')](util[_0x662f('0xb')](_0x662f('0xd'),_0x3f0100['uniqueid'],_0x3f0100[_0x662f('0xe')],_0x3f0100[_0x662f('0xf')],_0x3f0100[_0x662f('0x10')],_0x3f0100[_0x662f('0x11')]));_0x3f0100['type']=_0x662f('0x12');writeDB(_0x3f0100);}catch(_0x7fe50){utils[_0x662f('0x13')](util[_0x662f('0xb')](_0x662f('0xc'),_0x3f0100[_0x662f('0x14')]),_0x7fe50);}};exports[_0x662f('0x15')]=function(_0x26603f){try{utils[_0x662f('0xa')](util[_0x662f('0xb')]('[%s][transfers][attendedtransfer]',_0x26603f['origtransfereruniqueid']),_0x26603f);utils['info'](util['format']('[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x26603f['origtransfereruniqueid'],_0x26603f['origtransferercalleridnum'],_0x26603f[_0x662f('0x16')],_0x26603f[_0x662f('0x17')],_0x26603f[_0x662f('0x18')]));_0x26603f=_[_0x662f('0x19')](_0x26603f,{'transfererchannel':_0x26603f[_0x662f('0x1a')],'transferercalleridnum':_0x26603f[_0x662f('0x1b')],'transferercalleridname':_0x26603f['origtransferercalleridname'],'transfererconnectedlinenum':_0x26603f[_0x662f('0x1c')],'transfererconnectedlinename':_0x26603f[_0x662f('0x1d')],'transfereraccountcode':_0x26603f[_0x662f('0x1e')],'transferercontext':_0x26603f[_0x662f('0x1f')],'transfererexten':_0x26603f['secondtransfererexten'],'transfererlinkedid':_0x26603f[_0x662f('0x20')],'context':_0x26603f[_0x662f('0x21')],'extension':_0x26603f['origtransfererexten'],'type':_0x662f('0x6')});if(_[_0x662f('0x22')](_0x26603f['transfereechannel'])){_0x26603f=_['assign'](_0x26603f,{'transfereechannel':_0x26603f[_0x662f('0x23')],'transfereecalleridnum':_0x26603f[_0x662f('0x17')],'transfereecalleridname':_0x26603f[_0x662f('0x18')],'transfereeconnectedlinenum':_0x26603f['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x26603f[_0x662f('0x24')],'transfereeaccountcode':_0x26603f[_0x662f('0x25')],'transfereecontext':_0x26603f[_0x662f('0x26')],'transfereeexten':_0x26603f['transfertargetexten'],'transfereelinkedid':_0x26603f[_0x662f('0x27')]});}writeDB(_0x26603f);}catch(_0x4266e9){utils[_0x662f('0x13')](util['format'](_0x662f('0x28'),_0x26603f[_0x662f('0x7')]),_0x4266e9);}}; \ No newline at end of file diff --git a/server/services/xdr/utils.js b/server/services/xdr/utils.js index 93e76f1..78a9e74 100644 --- a/server/services/xdr/utils.js +++ b/server/services/xdr/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['util','client','../../config/logger','xdr','info','debug','inspect','error','request','then','[utils][request]\x20name:%s','catch','GetUser','internal','name','interface','[utils][getUser]\x20where:%s','stringify','length','result','getUserByInternal','[utils][getUserByInternal]\x20internal:%s\x20%s','notfound','[utils][getUserByInternal]','[utils][getUserByInterface]\x20interface:%s\x20%s','found','[utils][getUserByInterface]','getUserByName','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','getVoiceQueueByName','GetVoiceQueue','type','acwTimeout','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]','addTime','add','seconds','format','YYYY-MM-DD\x20HH:mm:ss','subtractTime','subtract','diffTime','diff','now','isAfter','isBefore','bluebird','moment'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0xb10b,0x12a));var _0xbb10=function(_0x5866d1,_0xa6dc72){_0x5866d1=_0x5866d1-0x0;var _0x30071f=_0xb10b[_0x5866d1];return _0x30071f;};'use strict';var BPromise=require(_0xbb10('0x0'));var jayson=require('jayson/promise');var moment=require(_0xbb10('0x1'));var util=require(_0xbb10('0x2'));var client=jayson[_0xbb10('0x3')]['http']({'port':0x2329});var logger=require(_0xbb10('0x4'))(_0xbb10('0x5'));exports[_0xbb10('0x6')]=function(_0x22320e,_0x49baf4){logger[_0xbb10('0x6')](_0x22320e,_0x49baf4?util['inspect'](_0x49baf4,{'showHidden':![],'depth':null}):'');};exports[_0xbb10('0x7')]=function(_0x3cdd53,_0x513741){logger[_0xbb10('0x7')](_0x3cdd53,_0x513741?util[_0xbb10('0x8')](_0x513741,{'showHidden':![],'depth':null}):'');};exports[_0xbb10('0x9')]=function(_0x1c3ee5,_0x2353ef){logger[_0xbb10('0x9')](_0x1c3ee5,_0x2353ef?util[_0xbb10('0x8')](_0x2353ef,{'showHidden':![],'depth':null}):'');};exports[_0xbb10('0xa')]=function(_0x5ab04a,_0x4e47f8){return client[_0xbb10('0xa')](_0x5ab04a,{'body':_0x4e47f8})[_0xbb10('0xb')](function(_0xce64f3){logger['debug'](_0xbb10('0xc'),_0x5ab04a,_0xce64f3?util['inspect'](_0xce64f3,{'showHidden':![],'depth':null}):'');})[_0xbb10('0xd')](function(_0x916a32){logger[_0xbb10('0x9')](_0xbb10('0xc'),_0x5ab04a,_0x916a32?util[_0xbb10('0x8')](_0x916a32,{'showHidden':![],'depth':null}):'');});};function getUser(_0x147230){return client['request'](_0xbb10('0xe'),{'options':{'raw':!![],'attributes':['id',_0xbb10('0xf'),_0xbb10('0x10'),_0xbb10('0x11')],'where':_0x147230,'limit':0x1}})[_0xbb10('0xb')](function(_0x2f2ebf){logger[_0xbb10('0x7')](_0xbb10('0x12'),JSON[_0xbb10('0x13')](_0x147230),_0x2f2ebf?util[_0xbb10('0x8')](_0x2f2ebf,{'showHidden':![],'depth':null}):'');return _0x2f2ebf['result'][_0xbb10('0x14')]?_0x2f2ebf[_0xbb10('0x15')][0x0]:null;});}exports[_0xbb10('0x16')]=function(_0x42db98){return new BPromise(function(_0x378da8,_0x1682a4){if(_0x42db98){return getUser({'internal':_0x42db98})[_0xbb10('0xb')](function(_0x30efc6){logger[_0xbb10('0x6')](_0xbb10('0x17'),_0x42db98,_0x30efc6?'found':_0xbb10('0x18'));return _0x378da8(_0x30efc6);})[_0xbb10('0xd')](function(_0x388fab){logger[_0xbb10('0x9')](_0xbb10('0x19'),_0x388fab?util[_0xbb10('0x8')](_0x388fab,{'showHidden':![],'depth':null}):'');return _0x378da8(null);});}return _0x378da8(null);});};exports['getUserByInterface']=function(_0x12f888){return new BPromise(function(_0x12ef77,_0x50aea1){if(_0x12f888){return getUser({'interface':_0x12f888})['then'](function(_0x8e2b97){logger[_0xbb10('0x6')](_0xbb10('0x1a'),_0x12f888,_0x8e2b97?_0xbb10('0x1b'):_0xbb10('0x18'));return _0x12ef77(_0x8e2b97);})[_0xbb10('0xd')](function(_0x407cb4){logger[_0xbb10('0x9')](_0xbb10('0x1c'),_0x407cb4?util[_0xbb10('0x8')](_0x407cb4,{'showHidden':![],'depth':null}):'');return _0x12ef77(null);});}return _0x12ef77(null);});};exports[_0xbb10('0x1d')]=function(_0x26ad93){return new BPromise(function(_0x537898,_0x4fedac){if(_0x26ad93){return getUser({'name':_0x26ad93})['then'](function(_0xc93a04){logger[_0xbb10('0x6')](_0xbb10('0x1e'),_0x26ad93,_0xc93a04?'found':_0xbb10('0x18'));return _0x537898(_0xc93a04);})[_0xbb10('0xd')](function(_0x6ed43b){logger[_0xbb10('0x9')](_0xbb10('0x1f'),_0x6ed43b?util[_0xbb10('0x8')](_0x6ed43b,{'showHidden':![],'depth':null}):'');return _0x537898(null);});}return _0x537898(null);});};exports[_0xbb10('0x20')]=function(_0x4aabb9){return new BPromise(function(_0x3796c7,_0x21ac54){if(_0x4aabb9){return client[_0xbb10('0xa')](_0xbb10('0x21'),{'options':{'raw':!![],'attributes':['id',_0xbb10('0x10'),_0xbb10('0x22'),'acw',_0xbb10('0x23')],'where':{'name':_0x4aabb9},'limit':0x1}})['then'](function(_0x448d5c){logger['debug'](_0xbb10('0x24'),_0x4aabb9,_0x448d5c?util[_0xbb10('0x8')](_0x448d5c,{'showHidden':![],'depth':null}):'');logger[_0xbb10('0x6')]('[utils][getVoiceQueueByName]\x20name:%s\x20%s',_0x4aabb9,_0x448d5c?'found':_0xbb10('0x18'));return _0x3796c7(_0x448d5c[_0xbb10('0x15')]['length']?_0x448d5c[_0xbb10('0x15')][0x0]:null);})[_0xbb10('0xd')](function(_0x2f653f){logger[_0xbb10('0x9')](_0xbb10('0x25'),_0x2f653f?util[_0xbb10('0x8')](_0x2f653f,{'showHidden':![],'depth':null}):'');return _0x3796c7(null);});}return _0x3796c7(null);});};exports[_0xbb10('0x26')]=function(_0x4975f5,_0x25acb3){return moment(_0x4975f5)[_0xbb10('0x27')](_0x25acb3,_0xbb10('0x28'))[_0xbb10('0x29')](_0xbb10('0x2a'));};exports[_0xbb10('0x2b')]=function(_0x188cbd,_0x10202c){return moment(_0x188cbd)[_0xbb10('0x2c')](_0x10202c,'seconds')[_0xbb10('0x29')](_0xbb10('0x2a'));};exports[_0xbb10('0x2d')]=function(_0x3c3c45,_0x570f5a){return moment(_0x3c3c45)[_0xbb10('0x2e')](moment(_0x570f5a),'seconds');};exports['sumTime']=function(_0x3eb3cc,_0x40c164){return parseInt(_0x3eb3cc,0xa)+parseInt(_0x40c164,0xa);};exports[_0xbb10('0x2f')]=function(){return moment()[_0xbb10('0x29')](_0xbb10('0x2a'));};exports[_0xbb10('0x30')]=function(_0x547062,_0x1e5bbd){if(_0x1e5bbd){return moment(_0x547062)[_0xbb10('0x30')](_0x1e5bbd);}return!![];};exports['isBefore']=function(_0x5e3fbd,_0x5cd55f){if(_0x5cd55f){return moment(_0x5e3fbd)[_0xbb10('0x31')](_0x5cd55f);}else if(_0x5e3fbd){return!![];}return![];}; \ No newline at end of file +var _0x7a54=['result','getUserByInternal','[utils][getUserByInternal]\x20internal:%s\x20%s','found','notfound','[utils][getUserByInternal]','[utils][getUserByInterface]\x20interface:%s\x20%s','[utils][getUserByInterface]','getUserByName','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','getVoiceQueueByName','GetVoiceQueue','acw','[utils][getVoiceQueueByName]\x20name:%s\x20%s','length','[utils][getVoiceQueueByName]','addTime','add','YYYY-MM-DD\x20HH:mm:ss','subtract','format','diff','sumTime','now','isAfter','isBefore','bluebird','jayson/promise','moment','client','http','xdr','info','debug','error','inspect','request','[utils][request]\x20name:%s','catch','GetUser','internal','name','interface','then','[utils][getUser]\x20where:%s','stringify'];(function(_0x5771a1,_0x3939ef){var _0x5a3ffe=function(_0x59bc39){while(--_0x59bc39){_0x5771a1['push'](_0x5771a1['shift']());}};_0x5a3ffe(++_0x3939ef);}(_0x7a54,0x106));var _0x47a5=function(_0xb2f2f7,_0x153483){_0xb2f2f7=_0xb2f2f7-0x0;var _0x37fc1b=_0x7a54[_0xb2f2f7];return _0x37fc1b;};'use strict';var BPromise=require(_0x47a5('0x0'));var jayson=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var util=require('util');var client=jayson[_0x47a5('0x3')][_0x47a5('0x4')]({'port':0x2329});var logger=require('../../config/logger')(_0x47a5('0x5'));exports[_0x47a5('0x6')]=function(_0x2a1a7e,_0x3717e1){logger[_0x47a5('0x6')](_0x2a1a7e,_0x3717e1?util['inspect'](_0x3717e1,{'showHidden':![],'depth':null}):'');};exports[_0x47a5('0x7')]=function(_0x59199c,_0x343372){logger[_0x47a5('0x7')](_0x59199c,_0x343372?util['inspect'](_0x343372,{'showHidden':![],'depth':null}):'');};exports[_0x47a5('0x8')]=function(_0x5077f3,_0x5d90b3){logger['error'](_0x5077f3,_0x5d90b3?util[_0x47a5('0x9')](_0x5d90b3,{'showHidden':![],'depth':null}):'');};exports[_0x47a5('0xa')]=function(_0x5e31dd,_0x2eb0dd){return client['request'](_0x5e31dd,{'body':_0x2eb0dd})['then'](function(_0x1f47f4){logger[_0x47a5('0x7')](_0x47a5('0xb'),_0x5e31dd,_0x1f47f4?util[_0x47a5('0x9')](_0x1f47f4,{'showHidden':![],'depth':null}):'');})[_0x47a5('0xc')](function(_0xd308b8){logger[_0x47a5('0x8')]('[utils][request]\x20name:%s',_0x5e31dd,_0xd308b8?util[_0x47a5('0x9')](_0xd308b8,{'showHidden':![],'depth':null}):'');});};function getUser(_0x221b54){return client[_0x47a5('0xa')](_0x47a5('0xd'),{'options':{'raw':!![],'attributes':['id',_0x47a5('0xe'),_0x47a5('0xf'),_0x47a5('0x10')],'where':_0x221b54,'limit':0x1}})[_0x47a5('0x11')](function(_0x4e99a8){logger[_0x47a5('0x7')](_0x47a5('0x12'),JSON[_0x47a5('0x13')](_0x221b54),_0x4e99a8?util[_0x47a5('0x9')](_0x4e99a8,{'showHidden':![],'depth':null}):'');return _0x4e99a8[_0x47a5('0x14')]['length']?_0x4e99a8['result'][0x0]:null;});}exports[_0x47a5('0x15')]=function(_0x4b966e){return new BPromise(function(_0x5247fd,_0x423a81){if(_0x4b966e){return getUser({'internal':_0x4b966e})[_0x47a5('0x11')](function(_0x2ce454){logger[_0x47a5('0x6')](_0x47a5('0x16'),_0x4b966e,_0x2ce454?_0x47a5('0x17'):_0x47a5('0x18'));return _0x5247fd(_0x2ce454);})[_0x47a5('0xc')](function(_0x3aed38){logger['error'](_0x47a5('0x19'),_0x3aed38?util[_0x47a5('0x9')](_0x3aed38,{'showHidden':![],'depth':null}):'');return _0x5247fd(null);});}return _0x5247fd(null);});};exports['getUserByInterface']=function(_0x2b0360){return new BPromise(function(_0x1f03f7,_0x36874d){if(_0x2b0360){return getUser({'interface':_0x2b0360})['then'](function(_0xb8ae6c){logger[_0x47a5('0x6')](_0x47a5('0x1a'),_0x2b0360,_0xb8ae6c?_0x47a5('0x17'):'notfound');return _0x1f03f7(_0xb8ae6c);})[_0x47a5('0xc')](function(_0x385687){logger['error'](_0x47a5('0x1b'),_0x385687?util[_0x47a5('0x9')](_0x385687,{'showHidden':![],'depth':null}):'');return _0x1f03f7(null);});}return _0x1f03f7(null);});};exports[_0x47a5('0x1c')]=function(_0x129ce5){return new BPromise(function(_0x3abd6a,_0x50bf17){if(_0x129ce5){return getUser({'name':_0x129ce5})['then'](function(_0x136745){logger['info'](_0x47a5('0x1d'),_0x129ce5,_0x136745?'found':_0x47a5('0x18'));return _0x3abd6a(_0x136745);})[_0x47a5('0xc')](function(_0x36ad34){logger[_0x47a5('0x8')](_0x47a5('0x1e'),_0x36ad34?util[_0x47a5('0x9')](_0x36ad34,{'showHidden':![],'depth':null}):'');return _0x3abd6a(null);});}return _0x3abd6a(null);});};exports[_0x47a5('0x1f')]=function(_0x136b14){return new BPromise(function(_0x16631f,_0x361bfa){if(_0x136b14){return client[_0x47a5('0xa')](_0x47a5('0x20'),{'options':{'raw':!![],'attributes':['id',_0x47a5('0xf'),'type',_0x47a5('0x21'),'acwTimeout'],'where':{'name':_0x136b14},'limit':0x1}})[_0x47a5('0x11')](function(_0x9ac908){logger[_0x47a5('0x7')]('[utils][getVoiceQueueByName]\x20name:%s',_0x136b14,_0x9ac908?util[_0x47a5('0x9')](_0x9ac908,{'showHidden':![],'depth':null}):'');logger[_0x47a5('0x6')](_0x47a5('0x22'),_0x136b14,_0x9ac908?_0x47a5('0x17'):'notfound');return _0x16631f(_0x9ac908['result'][_0x47a5('0x23')]?_0x9ac908[_0x47a5('0x14')][0x0]:null);})['catch'](function(_0x4e1006){logger[_0x47a5('0x8')](_0x47a5('0x24'),_0x4e1006?util['inspect'](_0x4e1006,{'showHidden':![],'depth':null}):'');return _0x16631f(null);});}return _0x16631f(null);});};exports[_0x47a5('0x25')]=function(_0x53119b,_0x122ed6){return moment(_0x53119b)[_0x47a5('0x26')](_0x122ed6,'seconds')['format'](_0x47a5('0x27'));};exports['subtractTime']=function(_0x403028,_0x87e4c9){return moment(_0x403028)[_0x47a5('0x28')](_0x87e4c9,'seconds')[_0x47a5('0x29')]('YYYY-MM-DD\x20HH:mm:ss');};exports['diffTime']=function(_0x65542e,_0x5a8a7c){return moment(_0x65542e)[_0x47a5('0x2a')](moment(_0x5a8a7c),'seconds');};exports[_0x47a5('0x2b')]=function(_0x3534cb,_0x38c8d4){return parseInt(_0x3534cb,0xa)+parseInt(_0x38c8d4,0xa);};exports[_0x47a5('0x2c')]=function(){return moment()[_0x47a5('0x29')](_0x47a5('0x27'));};exports[_0x47a5('0x2d')]=function(_0x452be5,_0x1a0d23){if(_0x1a0d23){return moment(_0x452be5)['isAfter'](_0x1a0d23);}return!![];};exports[_0x47a5('0x2e')]=function(_0x10f136,_0x511c06){if(_0x511c06){return moment(_0x10f136)[_0x47a5('0x2e')](_0x511c06);}else if(_0x10f136){return!![];}return![];}; \ No newline at end of file diff --git a/snippet/1.0.16/scripts/vendor.js b/snippet/1.0.16/scripts/vendor.js index a37476a..fb33b0f 100644 --- a/snippet/1.0.16/scripts/vendor.js +++ b/snippet/1.0.16/scripts/vendor.js @@ -1 +1 @@ -!function(de){"use strict";var u={objectMaxDepth:5,urlErrorParamsEnabled:!0};function e(e){if(!Ee(e))return u;O(e.objectMaxDepth)&&(u.objectMaxDepth=c(e.objectMaxDepth)?e.objectMaxDepth:NaN),O(e.urlErrorParamsEnabled)&&Ae(e.urlErrorParamsEnabled)&&(u.urlErrorParamsEnabled=e.urlErrorParamsEnabled)}function c(e){return E(e)&&0").append(e).html();try{return e[0].nodeType===Ue?me(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(e,t){return"<"+me(t)})}catch(e){return me(t)}}function K(e){try{return decodeURIComponent(e)}catch(e){}}function Z(e){var i={};return ve((e||"").split("&"),function(e){var t,n,r;e&&(n=e=e.replace(/\+/g,"%20"),-1!==(t=e.indexOf("="))&&(n=e.substring(0,t),r=e.substring(t+1)),O(n=K(n))&&(r=!O(r)||K(r),pe.call(i,n)?ke(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r))}),i}function X(e){return Q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}var J=["ng-","data-ng-","ng:","x-ng-"];var ee=function(n){var e=n.currentScript;if(!e)return!0;if(!(e instanceof de.HTMLScriptElement||e instanceof de.SVGScriptElement))return!1;var t=e.attributes;return[t.getNamedItem("src"),t.getNamedItem("href"),t.getNamedItem("xlink:href")].every(function(e){if(!e)return!0;if(!e.value)return!1;var t=n.createElement("a");if(t.href=e.value,n.location.origin===t.origin)return!0;switch(t.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}})}(de.document);function te(r,e){var i,o,t={};if(ve(J,function(e){var t=e+"app";!i&&r.hasAttribute&&r.hasAttribute(t)&&(o=(i=r).getAttribute(t))}),ve(J,function(e){var t,n=e+"app";!i&&(t=r.querySelector("["+n.replace(":","\\:")+"]"))&&(o=(i=t).getAttribute(n))}),i){if(!ee)return void de.console.error("AngularJS: disabling automatic bootstrap.